Newer Version Available
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
A line item contains a single Item and the quantity that was ordered.
1public class LineItem
2extends java.lang.Object| Field | Description | Modifier and Type |
|---|---|---|
attributedTerm | Word to associate with this item that is then used in SmartSearch. | java.lang.String |
item | The item being ordered. It must be an instance of a concrete subclass of Item, such as Product. | Item |
quantity | The quantity of the item being ordered. | java.lang.Integer |
1@Nullable
2public Integer quantityThe quantity of the item being ordered.
1@NonNull
2public Item itemThe item being ordered. It must be an instance of a concrete subclass of Item, such as Product.
1@Nullable
2public String attributedTermWord to associate with this item that is then used in SmartSearch.
1public LineItem(@NonNull
2 Item item,
3 @Nullable
4 Integer quantity)Builds a line item which contains the specified number of units of a product in an order. This method only builds a data object. To use it, pass it to one of the tracking methods like Context.addToCart(com.evergage.android.promote.LineItem).
Parameters:
| Parameter | Description | Required? |
|---|---|---|
item | The Item (such as Product) being ordered | Yes |
quantity | The number of units of the product this line item represents | No |
All cart and order interactions involving LineItem requires each LineItem to have a price. For more information, see price.
Important
Newer Version Available