Standard checkout line item backing a purchased product or service, sourced from a cart's ProductOrder and, where available, an ItemisedPrice computed by the price manager. Pricing methods prefer the itemised price when one is present, falling back to the values already stored on the ProductOrder otherwise. processCheckout writes the finalised cost, discount and tax back onto the ProductOrder and persists it as part of committing the checkout.
Implements: CheckoutLineItem
Properties
| Property | Returns | Description |
|---|---|---|
| adjustedPriceExTax | BigDecimal | The unit price of this item after any discount has been applied, excluding tax, taken from the itemised price if one is present or from the order's effective unit cost otherwise. |
| finalCost | BigDecimal | The tax-inclusive final cost of this line item. |
| finalListPriceIncTax | BigDecimal | The final list price for this line, including tax, before discounts. |
| finalPriceExTax | BigDecimal | The final price for this line after discounts, excluding tax, taken from the itemised price adjusted by the order's recorded discount, or from the order's grand total if there is no itemised price. |
| itemDescription | String | Human-readable description of this line item, as recorded on the underlying order. |
| itemisedPrice | ItemisedPrice | The itemised price computed for this line item by the price manager, if pricing has been calculated for it. |
| lineItemId | String | Unique identifier of this line item, derived from the underlying product order's id. |
| listUnitPriceExTax | BigDecimal | The list unit price of this item before any discount, excluding tax, taken from the itemised price if one is present or from the order's stored unit cost otherwise. |
| product | Product | The product this line item is for. |
| productOrder | ProductOrder | The underlying persisted order this line item wraps. |
| productSku | ProductSku | The SKU this line item is for. |
| quantity | BigDecimal | The quantity of this item being purchased, taken from the itemised price if one is present or from the order otherwise. |
| tax | BigDecimal | The tax amount for this line item, taken from the itemised price if one is present and has a value, otherwise from the order's stored tax. |
| taxRate | BigDecimal | The tax rate applied to this line item. |
| unitCost | BigDecimal | The unit cost of this line item, preferring the itemised price's adjusted unit price if it has one, otherwise falling back to the order's stored unit cost. |
Inherited from CheckoutLineItem
Properties
| Property | Returns | Description |
|---|---|---|
| discountExTax | BigDecimal | The total discount applied to this line, calculated as the list price for the full quantity less the final price, both excluding tax. |
Methods
getDiscountExTax()
Returns: BigDecimal
The total discount applied to this line, calculated as the list price for the full quantity less the final price, both excluding tax.
Methods
getLineItemId() · getListUnitPriceExTax() · getAdjustedPriceExTax() · getQuantity() · getTax() · getTaxRate() · getFinalCost() · finalCost(Narrative narrative) · getProductSku() · getItemDescription() · getUnitCost() · getProduct() · getFinalListPriceIncTax() · getFinalPriceExTax() · getProductOrder() · getItemisedPrice()
getLineItemId()
Returns: String
Unique identifier of this line item, derived from the underlying product order's id.
getListUnitPriceExTax()
Returns: BigDecimal
The list unit price of this item before any discount, excluding tax, taken from the itemised price if one is present or from the order's stored unit cost otherwise.
getAdjustedPriceExTax()
Returns: BigDecimal
The unit price of this item after any discount has been applied, excluding tax, taken from the itemised price if one is present or from the order's effective unit cost otherwise.
getQuantity()
Returns: BigDecimal
The quantity of this item being purchased, taken from the itemised price if one is present or from the order otherwise.
getTax()
Returns: BigDecimal
The tax amount for this line item, taken from the itemised price if one is present and has a value, otherwise from the order's stored tax.
getTaxRate()
Returns: BigDecimal
The tax rate applied to this line item.
getFinalCost()
Returns: BigDecimal
The tax-inclusive final cost of this line item.
finalCost(Narrative narrative)
Returns: BigDecimal
Calculates the tax-inclusive final cost of this line item, preferring the itemised price's calculation and appending an explanation to the given narrative, falling back to the order's stored grand total.
| Parameter | Description |
|---|---|
narrative | collects a human-readable explanation of the calculation, or null to skip it |
getProductSku()
Returns: ProductSku
The SKU this line item is for.
getItemDescription()
Returns: String
Human-readable description of this line item, as recorded on the underlying order.
getUnitCost()
Returns: BigDecimal
The unit cost of this line item, preferring the itemised price's adjusted unit price if it has one, otherwise falling back to the order's stored unit cost.
getProduct()
Returns: Product
The product this line item is for.
getFinalListPriceIncTax()
Returns: BigDecimal
The final list price for this line, including tax, before discounts.
getFinalPriceExTax()
Returns: BigDecimal
The final price for this line after discounts, excluding tax, taken from the itemised price adjusted by the order's recorded discount, or from the order's grand total if there is no itemised price.
getProductOrder()
Returns: ProductOrder
The underlying persisted order this line item wraps.
getItemisedPrice()
Returns: ItemisedPrice
The itemised price computed for this line item by the price manager, if pricing has been calculated for it.