A checkout line item contributed by a CustomCheckoutRule, such as a points reward or reseller-specific charge, built with fixed price, tax and description values rather than being priced from a Product. Instances are normally created through the nested CheckoutLineItemBuilder from a custom checkout rule script, added to the checkout preview by CheckoutRuleType.checkAndAddItems, and later committed via processCheckout, which delegates back to the owning CustomCheckoutRule.
Implements: CheckoutLineItem
Properties
| Property | Returns | Description |
|---|---|---|
| adjustedPriceExTax | BigDecimal | The configured price for this line item, excluding tax. There is no separate discounted price for this line item type, so this is the same as the cost it was built with. |
| finalCost | BigDecimal | The final, tax-inclusive cost of this line item. |
| finalListPriceIncTax | BigDecimal | The final price for this line item including tax, calculated as the configured cost plus the configured tax. |
| finalPriceExTax | BigDecimal | The configured price for this line item, excluding tax. |
| itemDescription | String | The description text this line item was configured with, shown to the customer in the checkout preview. |
| lineItemId | String | The identifier for this line item. |
| listUnitPriceExTax | BigDecimal | The list unit price of this item before any discount, excluding tax, derived from the configured cost divided by the quantity. |
| product | Product | The product that the configured product SKU belongs to. |
| productSku | ProductSku | The product SKU this line item was configured with, if it relates to a specific product. |
| quantity | BigDecimal | The quantity this line item was configured with. |
| tax | BigDecimal | The tax amount this line item was configured with. |
| taxRate | BigDecimal | The tax rate this line item was configured with. |
| unitCost | BigDecimal | The unit cost of this line item, excluding tax. |
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.
Inherited from PurchaseItem
Methods
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.
| Parameter | Description |
|---|---|
narrative | the narrative context the price is calculated for |
Methods
getListUnitPriceExTax() · getAdjustedPriceExTax() · getFinalListPriceIncTax() · getFinalPriceExTax() · getLineItemId() · getQuantity() · getUnitCost() · getTaxRate() · getFinalCost() · getItemDescription() · getProductSku() · getProduct() · getTax()
getListUnitPriceExTax()
Returns: BigDecimal
The list unit price of this item before any discount, excluding tax, derived from the configured cost divided by the quantity.
getAdjustedPriceExTax()
Returns: BigDecimal
The configured price for this line item, excluding tax. There is no separate discounted price for this line item type, so this is the same as the cost it was built with.
getFinalListPriceIncTax()
Returns: BigDecimal
The final price for this line item including tax, calculated as the configured cost plus the configured tax.
getFinalPriceExTax()
Returns: BigDecimal
The configured price for this line item, excluding tax.
getLineItemId()
Returns: String
The identifier for this line item.
getQuantity()
Returns: BigDecimal
The quantity this line item was configured with.
getUnitCost()
Returns: BigDecimal
The unit cost of this line item, excluding tax.
getTaxRate()
Returns: BigDecimal
The tax rate this line item was configured with.
getFinalCost()
Returns: BigDecimal
The final, tax-inclusive cost of this line item.
getItemDescription()
Returns: String
The description text this line item was configured with, shown to the customer in the checkout preview.
getProductSku()
Returns: ProductSku
The product SKU this line item was configured with, if it relates to a specific product.
getProduct()
Returns: Product
The product that the configured product SKU belongs to.
getTax()
Returns: BigDecimal
The tax amount this line item was configured with.