Fluent builder for constructing a CustomCheckoutRuleLineItem, used by custom checkout rule implementations (including JS-based rule scripts) to add priced items such as points rewards to the checkout preview. Each setter returns the builder itself so calls can be chained; call build to produce the finished line item. A rule script obtains one from the lineItemBuilder() method on the rule wrapper passed to it.

Group: Builders


Methods

productSku(ProductSku p) · quantity(BigDecimal p) · quantity(Long p) · quantity(Double d) · costExTax(BigDecimal p) · tax(BigDecimal p) · taxRate(BigDecimal p) · description(String p) · build()

productSku(ProductSku p)

Returns: CheckoutLineItemBuilder

Sets the product SKU this line item relates to, if any.

ParameterDescription
pthe product SKU

quantity(BigDecimal p)

Returns: CheckoutLineItemBuilder

Sets the quantity for this line item.

ParameterDescription
pthe quantity

quantity(Long p)

Returns: CheckoutLineItemBuilder

Sets the quantity for this line item from a whole number.

ParameterDescription
pthe quantity, ignored if null

quantity(Double d)

Returns: CheckoutLineItemBuilder

Sets the quantity for this line item from a floating point number.

ParameterDescription
dthe quantity, ignored if null

costExTax(BigDecimal p)

Returns: CheckoutLineItemBuilder

Sets the price for this line item, excluding tax.

ParameterDescription
pthe price excluding tax

tax(BigDecimal p)

Returns: CheckoutLineItemBuilder

Sets the tax amount for this line item.

ParameterDescription
pthe tax amount

taxRate(BigDecimal p)

Returns: CheckoutLineItemBuilder

Sets the tax rate for this line item.

ParameterDescription
pthe tax rate

description(String p)

Returns: CheckoutLineItemBuilder

Sets the description shown to the customer for this line item.

ParameterDescription
pthe item description

build()

Returns: CustomCheckoutRuleLineItem

Builds the CustomCheckoutRuleLineItem from the values set on this builder.

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