Sale
Requires access scope.
An individual sale record associated with a sales agreement. Every money value in an order's sales data is represented in the currency's smallest unit. When amounts are divided across multiple line items, such as taxes or order discounts, the amounts might not divide evenly across all of the line items on the order. To address this, the remaining currency units that couldn't be divided evenly are allocated one at a time, starting with the first line item, until they are all accounted for. In aggregate, the values sum up correctly. In isolation, one line item might have a different tax or discount amount than another line item of the same price, before taxes and discounts. This is because the amount could not be divided evenly across the items. The allocation of currency units across line items is immutable. After they are allocated, currency units are never reallocated or redistributed among the line items.
Anchor to FieldsFields
- Anchor to actionTypeaction•
Type SaleAction non-nullType! The type of order action that the sale represents.
- •ID!non-null
The unique ID for the sale.
- Anchor to lineTypeline•
Type SaleLine non-nullType! The line type assocated with the sale.
- Anchor to quantityquantity•
The number of units either ordered or intended to be returned.
- Anchor to taxestaxes•[Sale
Tax!]! non-null All individual taxes associated with the sale.
- Anchor to totalAmounttotal•
Amount MoneyBag! non-null The total sale amount after taxes and discounts.
- Anchor to totalDiscountAmountAfterTaxestotal•
Discount Amount After Taxes MoneyBag! non-null The total discounts allocated to the sale after taxes.
- Anchor to totalDiscountAmountBeforeTaxestotal•
Discount Amount Before Taxes MoneyBag! non-null The total discounts allocated to the sale before taxes.
- Anchor to totalTaxAmounttotal•
Tax Amount MoneyBag! non-null The total amount of taxes for the sale.
{
"actionType": "",
"id": "",
"lineType": "",
"quantity": "",
"taxes": "",
"totalAmount": "",
"totalDiscountAmountAfterTaxes": "",
"totalDiscountAmountBeforeTaxes": "",
"totalTaxAmount": ""
}
interface Sale {
actionType: SaleActionType!
id: ID!
lineType: SaleLineType!
quantity: Int
taxes: [SaleTax!]!
totalAmount: MoneyBag!
totalDiscountAmountAfterTaxes: MoneyBag!
totalDiscountAmountBeforeTaxes: MoneyBag!
totalTaxAmount: MoneyBag!
}