| java.lang.Object | |
| ↳ | com.usebutton.sdk.LineItem |
This class is deprecated.
Please use our order API - https://www.usebutton.com/developers/api-reference/#create-order.
Class representing an order's individual line items. This is used for order attribution in
reportOrder(List, String, String). You can use these items to e.g.
represent an cart of items, their ID, value and quantity or to break down the order total
to vat, discount etc.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Examples:
// 3 carrots at $1.99 (ea)
LineItem carrots = new LineItem("carrot", 199, 3, "Fresh Carrots");
// 1 banana at $3.99 (ea)
LineItem banana = new LineItem("banana", 399, 1, "Left Banana");
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Each line item can have optional free form attributes on them that will be used in the processing
of these items.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
| identifier | your items identifier or identifier for this line item ("sku-1234") |
|---|---|
| amount | the per item cost in the smallest decimal unit for this currency,
see reportOrder(List, String, String) for more
information about currency. (199 for $1.99)
|
| identifier | your items identifier or identifier for this line item ("sku-1234") |
|---|---|
| amount | the per item cost in the smallest decimal unit for this currency,
see reportOrder(int, String, String) for more
information about currency. (199 for $1.99) |
| quantity | the number of items of this type (1) |
Examples:
// 3 carrots at $1.99 (ea)
LineItem carrots = new LineItem("carrot", 199, 3, "Fresh Carrots");
// 1 banana at $3.99 (ea)
LineItem banana = new LineItem("banana", 399, 1, "Left Banana");
| identifier | /sku your items identifier or identifier for this line item ("sku-1234") |
|---|---|
| amount | the per item cost in the smallest decimal unit for this currency,
see reportOrder(int, String, String) for more
information about currency. (199 for $1.99) |
| quantity | the number of items of this type (3) |
| description | /name a longer description for this item ("Moose Felt Print") |
Each line item can have optional free form attributes on them that will be used in the processing of these items.