# Google Ads Data Manager V1 Client - Class CartData (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 CartData.

The cart data associated with the event.

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

## Namespace

Google \\ Ads \\ DataManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ merchant_id` | `string` Optional. The Merchant Center ID associated with the items. |
| `↳ merchant_feed_label` | `string` Optional. The Merchant Center feed label associated with the feed of the items. |
| `↳ merchant_feed_language_code` | `string` Optional. The language code in ISO 639-1 associated with the Merchant Center feed of the items.where your items are uploaded. |
| `↳ transaction_discount` | `float` Optional. The sum of all discounts associated with the transaction. |
| `↳ items` | `array<https://docs.cloud.google.com/php/docs/reference/data-manager/latest/V1.Item>` Optional. The list of items associated with the event. |
| `↳ coupon_codes` | `string[]` Optional. The list of coupon codes that were applied to the cart. Cart-level and item-level coupon codes are independent. If the event is for a Google Analytics destination, only provide a single coupon code. Google Analytics ignores additional coupon codes. |

### getMerchantId

Optional. The Merchant Center ID associated with the items.

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

### setMerchantId

Optional. The Merchant Center ID associated with the items.

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

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

### getMerchantFeedLabel

Optional. The Merchant Center feed label associated with the feed of the
items.

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

### setMerchantFeedLabel

Optional. The Merchant Center feed label associated with the feed of the
items.

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

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

### getMerchantFeedLanguageCode

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

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

### setMerchantFeedLanguageCode

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

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

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

### getTransactionDiscount

Optional. The sum of all discounts associated with the transaction.

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

### setTransactionDiscount

Optional. The sum of all discounts associated with the transaction.

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

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

### getItems

Optional. The list of items associated with the event.

| **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.Item>` |   |

### setItems

Optional. The list of items associated with the event.

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

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

### getCouponCodes

Optional. The list of coupon codes that were applied to the cart.

Cart-level and item-level coupon codes are independent.
If the event is for a Google Analytics destination, only provide a single
coupon code. Google Analytics ignores additional coupon codes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setCouponCodes

Optional. The list of coupon codes that were applied to the cart.

Cart-level and item-level coupon codes are independent.
If the event is for a Google Analytics destination, only provide a single
coupon code. Google Analytics ignores additional coupon codes.

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

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