SBReceiptLineItem
This object represents a line item in a receipt.
Attribute | Description | Type | Required |
---|---|---|---|
id | Unique identifier of the line item | integer | Yes |
product | Details of the product associated with the line item | SBReceiptItemProduct | No |
productId | Identifier of the product | integer | No |
variantId | Identifier of the product variant | integer | No |
variant | Details of the product variant | SBProductVariant | No |
price | Unit price of the product | decimal | Yes |
quantity | Quantity of products purchased | decimal | Yes |
totalDiscounts | Total discounts applied to the line item | SBMoney | No |
totalTaxes | Total taxes applied to the line item | SBMoney | No |
totalFees | Total fees applied to the line item | SBMoney | No |
subTotal | Subtotal before discounts and taxes | SBMoney | Yes |
total | Total amount after discounts and taxes | SBMoney | Yes |
discounts | List of discounts applied to the line item | SBReceiptItemDiscount[] | No |
taxes | List of taxes applied to the line item | SBReceiptItemTax[] | No |
fees | Total fees applied to the line item | SBReceiptLineItemFee[] | No |
Exemple
{
"product": {
"id": 1,
"name": "Example Product",
"description": "This is an example product."
},
"productId": 1,
"variantId": 2,
"price": 19.99,
"quantity": 3,
"totalDiscounts": {
"amount": 5.00,
"currency": "USD"
},
"totalTaxes": {
"amount": 2.00,
"currency": "USD"
},
"subTotal": {
"amount": 54.97,
"currency": "USD"
},
"total": {
"amount": 51.97,
"currency": "USD"
},
"discounts": [],
"taxes": [],
"variant": {
"id": 2,
"name": "Example Variant",
"additionalInfo": "This is an example variant."
}
}