Builder for [PriceItem](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitem) objects.

Example usage:

```
// Create a price item builder.
var priceItemBuilder = AdsApp.extensions().newPriceItemBuilder();

// Create a price item operation.
var priceItemOperation = priceItemBuilder
  .withHeader("Kid's Haircut")               // required
  .withDescription("Girls and boys")         // required
  .withAmount(10)                            // required
  .withCurrencyCode("USD")                   // required
  .withUnitType("PER_WEEK")                  // required
  .withFinalUrl("http://www.example.com/")   // required
  .build();

// Optional: examine the outcome. The call to isSuccessful()
// will block until the operation completes.
if (priceItemOperation.isSuccessful()) {
  // Get the result.
  var priceItem = priceItemOperation.getResult();
} else {
  // Handle the errors.
  var errors = priceItemOperation.getErrors();
}
```

### Methods:

| Member | Type | Description |
|---|---|---|
| [build()](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder#build) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitemoperation` | Creates a [PriceItem](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitem). |
| [withAmount(amount)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder#withAmount_amount) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Sets the amount of money of the new price item to the specified value. |
| [withCurrencyCode(code)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder#withCurrencyCode_code) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Sets the currency code of the new price item to the specified value. |
| [withDescription(description)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder#withDescription_description) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Sets the description text of the new price item to the specified value. |
| [withFinalUrl(finalUrl)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder#withFinalUrl_finalUrl) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Sets the final URL of the new price item to the specified value. |
| [withHeader(header)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder#withHeader_header) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Sets the header text of the new price item to the specified value. |
| [withMobileFinalUrl(mobileFinalUrl)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder#withMobileFinalUrl_mobileFinalUrl) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Sets the mobile final URL of the new price item to the specified value. |
| [withUnitType(unitType)](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder#withUnitType_unitType) | `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Sets the unit type of the new price item to the specified value. |

## `build()`

Creates a [PriceItem](https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitem). Returns a PriceItemOperation that can be used to get the new price item (or access any associated errors if creation failed).

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitemoperation` | The associated price item operation. |

## `withAmount(amount)`

Sets the amount of money of the new price item to the specified value. Required before building.

### Arguments:

| Name | Type | Description |
|---|---|---|
| amount | `long` | Price item amount of money in micros. |

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Price item builder with the specified amount of money in micros. |

## `withCurrencyCode(code)`

Sets the currency code of the new price item to the specified value. Required before building. See [the API
reference](https://developers.google.com/google-ads/api/reference/data/codes-formats#currency-codes) for currency codes.

### Arguments:

| Name | Type | Description |
|---|---|---|
| code | `String` | Price item currency code. |

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Price item builder with the specified currency code. |

## `withDescription(description)`

Sets the description text of the new price item to the specified value. Required before building.

### Arguments:

| Name | Type | Description |
|---|---|---|
| description | `String` | Price item description text. |

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Price item builder with the specified description text. |

## `withFinalUrl(finalUrl)`

Sets the final URL of the new price item to the specified value.

The final URL represents the actual landing page for your price item. The final URL must be the URL of the page that the user
ends up on after clicking on your ad, once all the redirects have taken
place.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

### Arguments:

| Name | Type | Description |
|---|---|---|
| finalUrl | `String` | The final URL for the price item. |

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | The price item builder with the specified final URL. |

## `withHeader(header)`

Sets the header text of the new price item to the specified value. Required before building.

### Arguments:

| Name | Type | Description |
|---|---|---|
| header | `String` | Price item header text. |

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Price item builder with the specified header text. |

## `withMobileFinalUrl(mobileFinalUrl)`

Sets the mobile final URL of the new price item to the specified value.

The mobile final URL represents the actual landing page for your price item on a mobile device. The final mobile URL must be the URL of
the page that the user ends up on after clicking on your ad on a mobile
device, once all the redirects have taken place.

See [Using
Upgraded URLs](https://support.google.com/google-ads/answer/6049217) for more information.

### Arguments:

| Name | Type | Description |
|---|---|---|
| mobileFinalUrl | `String` | The mobile final URL for the price item. |

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | The price item builder with the specified final URL. |

## `withUnitType(unitType)`

Sets the unit type of the new price item to the specified value. Required before building. The unit type defines the rate that describes the price and must be one of `['PER_HOUR', 'PER_DAY', 'PER_WEEK', 'PER_MONTH',
'PER_YEAR', 'PER_NIGHT']`.

### Arguments:

| Name | Type | Description |
|---|---|---|
| unitType | `String` | Price item unit type. |

### Return values:

| Type | Description |
|---|---|
| `https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_priceitembuilder` | Price item builder with the specified unit type. |