Class 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.

See Also:

PropertyDescription
taxId: String (read-only)Gets the tax identifier (e.g.
taxRate: Number (read-only)Gets the tax rate as a decimal (e.g.
taxValue: Money (read-only)Gets the tax value (amount) in purchase currency, or null if computed from rate and tax basis.
ConstructorDescription
LineItemTax(String, Number)Creates a tax item for use with LineItem.setTaxes(Collection).
LineItemTax(String, Number, Money)Creates a tax item for use with LineItem.setTaxes(Collection).
MethodDescription
getTaxId()Gets the tax identifier (e.g.
getTaxRate()Gets the tax rate as a decimal (e.g.
getTaxValue()Gets the tax value (amount) in purchase currency, or null if computed from rate and tax basis.

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

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.


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(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

getTaxId(): String

Gets the tax identifier (e.g. "DE_7").

Returns:

  • the tax id

getTaxRate(): Number

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

Returns:

  • the tax rate

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