Class LineItemTax
dw.order
Class LineItemTax
Object
dw.order.LineItemTax
A tax on a line item: tax identifier, rate, and optional amount. Use with LineItem.setTaxes(Collection) and LineItem.getTaxes().

Create instances via new LineItemTax(taxId, taxRate) to have the server compute the tax value, or via new LineItemTax(taxId, taxRate, taxValue) to provide a pre-computed tax value.

Access is currently restricted to select pilot customers and controlled via feature toggle.

Properties
taxId  :  String  (Read Only)
Gets the tax identifier (e.g. "DE_7").
taxRate  :  Number  (Read Only)
Gets the tax rate as a decimal (e.g. 0.07 for 7%).
taxValue  :  Money  (Read Only)
Gets the tax value (amount) in purchase currency, or null if computed from rate and tax basis.
Constructor Summary
LineItemTax(taxId : String, taxRate : Number)
Creates a tax item for use with LineItem.setTaxes(Collection).
LineItemTax(taxId : String, taxRate : Number, taxValue : Money)
Creates a tax item for use with LineItem.setTaxes(Collection).
Method Summary
getTaxId() : String
Gets the tax identifier (e.g.
getTaxRate() : Number
Gets the tax rate as a decimal (e.g.
getTaxValue() : Money
Gets the tax value (amount) in purchase currency, or null if computed from rate and tax basis.
Constructor Detail
LineItemTax
public LineItemTax(taxId : String, taxRate : Number)
Creates a tax item for use with LineItem.setTaxes(Collection). The tax value will be computed server-side from the tax rate and the line item's tax basis.

Access is currently restricted to select pilot customers and controlled via feature toggle.

Parameters:
taxId - tax identifier (e.g. "DE_7"), must not be null or blank
taxRate - tax rate as decimal (e.g. 0.07 for 7%), must not be null

LineItemTax
public LineItemTax(taxId : String, taxRate : Number, taxValue : Money)
Creates a tax item for use with LineItem.setTaxes(Collection).

Access is currently restricted to select pilot customers and controlled via feature toggle.

Parameters:
taxId - tax identifier (e.g. "DE_7"), must not be null or blank
taxRate - tax rate as decimal (e.g. 0.07 for 7%), must not be null
taxValue - tax amount in purchase currency, or null to compute from rate and tax basis

Method Detail
getTaxId
getTaxId() : String
Gets the tax identifier (e.g. "DE_7").
Returns:
the tax id

getTaxRate
getTaxRate() : Number
Gets the tax rate as a decimal (e.g. 0.07 for 7%).
Returns:
the tax rate

getTaxValue
getTaxValue() : Money
Gets the tax value (amount) in purchase currency, or null if computed from rate and tax basis.
Returns:
the tax value as Money, or null