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

PropertyReturnsDescription
adjustedPriceExTaxBigDecimalThe 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.
finalCostBigDecimalThe tax-inclusive final cost of this line item.
finalListPriceIncTaxBigDecimalThe final list price for this line, including tax, before discounts.
finalPriceExTaxBigDecimalThe 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.
itemDescriptionStringHuman-readable description of this line item, as recorded on the underlying order.
itemisedPriceItemisedPriceThe itemised price computed for this line item by the price manager, if pricing has been calculated for it.
lineItemIdStringUnique identifier of this line item, derived from the underlying product order's id.
listUnitPriceExTaxBigDecimalThe 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.
productProductThe product this line item is for.
productOrderProductOrderThe underlying persisted order this line item wraps.
productSkuProductSkuThe SKU this line item is for.
quantityBigDecimalThe quantity of this item being purchased, taken from the itemised price if one is present or from the order otherwise.
taxBigDecimalThe 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.
taxRateBigDecimalThe tax rate applied to this line item.
unitCostBigDecimalThe 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

PropertyReturnsDescription
discountExTaxBigDecimalThe 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.

ParameterDescription
narrativecollects 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.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.