Line Item Attribute
Line items are intended to describe purchasable items and are used in cart and order
interactions.
| Field Name | Field Type | Description |
|---|---|---|
| attributes | object | A dictionary of user-supplied values. |
| catalogObjectType | string | Required. A type name representing the catalog object referenced in the line item. |
| catalogObjectId | string | Required. A unique ID representing the catalog object referenced in the line item. |
| currency | string | The currency for the price field. |
| price | number | The price of the catalog object referenced in the line item. |
| quantity | number | Required. The number of catalog objects in this line item. |
Line Item Attribute Example
iOS
Android
1LineItem(
2 catalogObjectType: "Product",
3 catalogObjectId: "product-11",
4 quantity: 1,
5 price: 20.0,
6 currency: "USD",
7 attributes: [
8 "gift_wrap: true
9 ]
10)1LineItem(
2 catalogObjectId = "product-1",
3 catalogObjectType = "Product",
4 quantity = 1,
5 price = 20.0,
6 currency = "USD",
7 attributes = mapOf(
8 "gift_wrap" to true
9 )
10 )