Represents one line item being purchased through a payment provider, carrying its quantity, unit cost, tax and final price. Payment provider implementations receive a list of these when processing a payment, as an alternative to the older DebitItem based methods.


Properties

PropertyReturnsDescription
finalCostBigDecimalThe tax inclusive final price, including promotions or other discounts
itemDescriptionStringHuman readable description of the item being purchased.
lineItemIdStringIdentifier for this line item within the cart, used to correlate the item with the source cart line.
productProductThe product being purchased.
productSkuProductSkuThe product sku being purchased, if this line item is for a specific sku.
quantityBigDecimalNumber of units of the item being purchased.
taxBigDecimalThe tax amount included in getFinalCost() for this line item.
taxRateBigDecimalTax rate applied to this item, expressed as the rate used to calculate getTax().
unitCostBigDecimalPrice of a single unit of the item, before tax and before any promotions or discounts.

Methods

getLineItemId() · getQuantity() · getUnitCost() · getTaxRate() · getFinalCost() · finalCost(Narrative narrative) · getItemDescription() · getProductSku() · getProduct() · getTax()

getLineItemId()

Returns: String

Identifier for this line item within the cart, used to correlate the item with the source cart line.

getQuantity()

Returns: BigDecimal

Number of units of the item being purchased.

getUnitCost()

Returns: BigDecimal

Price of a single unit of the item, before tax and before any promotions or discounts.

getTaxRate()

Returns: BigDecimal

Tax rate applied to this item, expressed as the rate used to calculate getTax().

getFinalCost()

Returns: BigDecimal

The tax inclusive final price, including promotions or other discounts

finalCost(Narrative narrative)

Returns: BigDecimal

Calculates the final cost of this item within the context of the given narrative, allowing narrative specific pricing or promotions to be applied.

ParameterDescription
narrativethe narrative context the price is calculated for

getItemDescription()

Returns: String

Human readable description of the item being purchased.

getProductSku()

Returns: ProductSku

The product sku being purchased, if this line item is for a specific sku.

getProduct()

Returns: Product

The product being purchased.

getTax()

Returns: BigDecimal

The tax amount included in getFinalCost() for this line item.

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