Module jonix.onix3

Class Tax

java.lang.Object
com.tectonica.jonix.onix3.Tax
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixSuperComposite, OnixTag, Serializable

public class Tax extends Object implements OnixComposite.OnixSuperComposite, Serializable

Tax composite

A repeatable group of data elements which together specify tax included within a price amount. Optional, and used only when <PriceType> indicates an inc-tax price. For items to which different taxes or tax rates apply (eg mixed media products in the UK which are partly taxed at standard rate and partly at zero rate), the composite is repeated for each separate tax or tax rate. Although only one of <TaxRatePercent> or <TaxAmount> is mandatory within the composite, it is recommended that all tax elements in the composite should be explicitly populated.

If the tax regime requires separate tax rates and amounts linked explicitly to particular product parts (eg in Germany), the <ProductIdentifier> composite may be included in each <Tax> composite. Where tax is payable on multiple product parts, each should have its own instance of the <Tax> composite.

Reference name <Tax>
Short tag <tax>
Cardinality 0…n

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • Tax

      public Tax()
    • Tax

      public Tax(Element element)
  • Method Details

    • _initialize

      public void _initialize()
      Description copied from interface: OnixComposite
      This is an internal API. Since Jonix 8.0, composite objects are being populated lazily. This method initiates the population process, and is invoked internally by the accessor APIs of the composites
      Specified by:
      _initialize in interface OnixComposite
    • exists

      public boolean exists()
      Description copied from interface: OnixTag
      indicates whether this tag exists in the ONIX record
      Specified by:
      exists in interface OnixTag
      Returns:
      whether this tag (<Tax> or <tax>) is explicitly provided in the ONIX XML
    • ifExists

      public void ifExists(Consumer<Tax> action)
    • getXmlElement

      public Element getXmlElement()
      Description copied from interface: OnixComposite
      For advanced use-cases only.
      Specified by:
      getXmlElement in interface OnixComposite
      Returns:
      native representation of the XML element underlying to this tag
    • taxRatePercent

      public TaxRatePercent taxRatePercent()

      A tax rate expressed numerically as a percentage. Optional and non-repeating; but either <TaxRatePercent> or <TaxAmount> or both must be present in each occurrence of the <Tax> composite.

      Jonix-Comment: this field is required
    • taxType

      public TaxType taxType()

      An ONIX code identifying a tax type, eg VAT. Optional, and non-repeating.

      Jonix-Comment: this field is optional
    • taxRateCode

      public TaxRateCode taxRateCode()

      An ONIX code which specifies a tax rate. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • taxableAmount

      public TaxableAmount taxableAmount()

      The amount of the unit price of the product, excluding tax, which is taxable at the rate specified in an occurrence of the <Tax> composite. Optional and non-repeating; but required if tax is charged on part of the price. Omission of this element implies that tax is charged on the full amount of the price.

      Jonix-Comment: this field is optional
    • taxAmount

      public TaxAmount taxAmount()

      The amount of tax chargeable at the rate specified in an occurrence of the <Tax> composite. Optional and non-repeating; but either <TaxRatePercent> or <TaxAmount> or both must be present in each occurrence of the <Tax> composite.

      Jonix-Comment: this field is optional
    • productIdentifiers

      Optional and repeatable group of data elements which together specify one or more identifiers of a product part in accordance with a specified scheme, used here only when it is necessary to link a particular tax rate or amount with a particular product part contained within a multiple-item product or a trade pack. All identifiers included here must also be included in an instance of <ProductPart>, and where multiple identifiers are provided in any one occurrence of the <Tax> composite, they must all identify the same product part.

      Jonix-Comment: this list may be empty
    • pricePartDescriptions

      public ListOfOnixElement<PricePartDescription,String> pricePartDescriptions()

      A name or description which identifies a part of the product price that is subject to the relevant tax, for example a product part that may be taxed with a particular tax rate or amount (separately from other components), or a levy added to a product price that is itself subject to tax. Optional, and repeatable to provide parallel descriptive text in multiple languages. The language attribute is optional for a single instance of <PricePartDescription>, but must be included in each instance if <PricePartDescription> is repeated.

      Jonix-Comment: this list may be empty