Class LineItemTax
dw.order
Class LineItemTax
Object
dw.object.Extensible
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.

Properties
taxId  :  String  (Read Only)
Gets the tax identifier (for example, "DE_7").
taxRate  :  Number  (Read Only)
Gets the tax rate as a decimal (for example, 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 (for example, "DE_7").
getTaxRate() : Number
Gets the tax rate as a decimal (for example, 0.07 for 7%).
getTaxValue() : Money
Gets the tax value (amount) in purchase currency, or null if computed from rate and tax basis.
Methods inherited from class Extensible
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.
Parameters:
taxId - tax identifier (for example, "DE_7"), must not be null or blank
taxRate - tax rate as decimal (for example, 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).
Parameters:
taxId - tax identifier (for example, "DE_7"), must not be null or blank
taxRate - tax rate as decimal (for example, 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 (for example, "DE_7").
Returns:
the tax id

getTaxRate
getTaxRate() : Number
Gets the tax rate as a decimal (for example, 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