# Google Ads Data Manager V1 Client - Class Item (0.5.0)

0.5.0 (latest) 0.4.0 0.3.1 0.2.0 0.1.2 Reference documentation and code samples for the Google Ads Data Manager V1 Client class Item.

Represents an item in the cart associated with the event.

Generated from protobuf message `google.ads.datamanager.v1.Item`

## Namespace

Google \\ Ads \\ DataManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ merchant_product_id` | `string` Optional. The product ID within the Merchant Center account. |
| `↳ quantity` | `int|string` Optional. The number of this item associated with the event. |
| `↳ unit_price` | `float` Optional. The unit price excluding tax, shipping, and any transaction level discounts. |
| `↳ item_id` | `string` Optional. A unique identifier to reference the item. |
| `↳ additional_item_parameters` | `array<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.ItemParameter>` Optional. A bucket of any [event parameters related to an item](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events) to be included within the event that were not already specified using other structured fields. |
| `↳ merchant_id` | `string` Optional. The Merchant Center ID associated with the item. For Store Sales events this will override the value set at the cart level. This field is ignored for other events. |
| `↳ merchant_feed_label` | `string` Optional. The feed label of the Merchant Center feed. If countries are still being used, the 2-letter country code in ISO-3166-1 alpha-2 can be used instead. For Store Sales events this will override the value set at the cart level. This field is ignored for other events. |
| `↳ merchant_feed_language_code` | `string` Optional. The language code in ISO 639-1 associated with the Merchant Center feed where your items are uploaded. |
| `↳ conversion_value` | `float` Optional. The conversion value associated with this item within the event, for cases where the conversion value is different for each item. |
| `↳ custom_variables` | `array<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.ItemCustomVariable>` Optional. Additional key/value pair information to send to the conversion containers (conversion action or Floodlight activity), when tracking per-item conversions. |

### getMerchantProductId

Optional. The product ID within the Merchant Center account.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setMerchantProductId

Optional. The product ID within the Merchant Center account.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getQuantity

Optional. The number of this item associated with the event.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setQuantity

Optional. The number of this item associated with the event.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUnitPrice

Optional. The unit price excluding tax, shipping, and any transaction level
discounts.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setUnitPrice

Optional. The unit price excluding tax, shipping, and any transaction level
discounts.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getItemId

Optional. A unique identifier to reference the item.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setItemId

Optional. A unique identifier to reference the item.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAdditionalItemParameters

Optional. A bucket of any [event parameters related to an
item](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events)
to be included within the event that were not already specified using other
structured fields.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.ItemParameter>` |   |

### setAdditionalItemParameters

Optional. A bucket of any [event parameters related to an
item](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events)
to be included within the event that were not already specified using other
structured fields.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.ItemParameter>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMerchantId

Optional. The Merchant Center ID associated with the item. For Store Sales
events this will override the value set at the cart level. This field is
ignored for other events.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setMerchantId

Optional. The Merchant Center ID associated with the item. For Store Sales
events this will override the value set at the cart level. This field is
ignored for other events.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMerchantFeedLabel

Optional. The feed label of the Merchant Center feed. If countries are
still being used, the 2-letter country code in ISO-3166-1 alpha-2 can be
used instead. For Store Sales events this will override the value set at
the cart level. This field is ignored for other events.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setMerchantFeedLabel

Optional. The feed label of the Merchant Center feed. If countries are
still being used, the 2-letter country code in ISO-3166-1 alpha-2 can be
used instead. For Store Sales events this will override the value set at
the cart level. This field is ignored for other events.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMerchantFeedLanguageCode

Optional. The language code in ISO 639-1 associated with the Merchant
Center feed where your items are uploaded.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setMerchantFeedLanguageCode

Optional. The language code in ISO 639-1 associated with the Merchant
Center feed where your items are uploaded.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getConversionValue

Optional. The conversion value associated with this item within the event,
for cases where the conversion value is different for each item.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasConversionValue

### clearConversionValue

### setConversionValue

Optional. The conversion value associated with this item within the event,
for cases where the conversion value is different for each item.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCustomVariables

Optional. Additional key/value pair information to send to the conversion
containers (conversion action or Floodlight activity), when tracking
per-item
conversions.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.ItemCustomVariable>` |   |

### setCustomVariables

Optional. Additional key/value pair information to send to the conversion
containers (conversion action or Floodlight activity), when tracking
per-item
conversions.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.ItemCustomVariable>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |