Module jonix.onix3

Class BatchBonus

java.lang.Object
com.tectonica.jonix.onix3.BatchBonus
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixDataComposite<JonixBatchBonus>, OnixTag, Serializable

public class BatchBonus extends Object implements OnixComposite.OnixDataComposite<JonixBatchBonus>, Serializable

Batch bonus composite

A repeatable group of data elements which together specify a batch bonus, ie a quantity of free copies which are supplied (typically to a reseller) with a certain order quantity. The <BatchBonus> composite is optional.

Reference name <BatchBonus>
Short tag <batchbonus>
Cardinality 0…n

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • BatchBonus

      public BatchBonus()
    • BatchBonus

      public BatchBonus(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 (<BatchBonus> or <batchbonus>) is explicitly provided in the ONIX XML
    • ifExists

      public void ifExists(Consumer<BatchBonus> 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
    • batchQuantity

      public BatchQuantity batchQuantity()

      The number of copies which must be ordered to obtain the free copies specified in <FreeQuantity>. Mandatory in each occurrence of the <BatchBonus> composite, and non-repeating.

      Jonix-Comment: this field is required
    • freeQuantity

      public FreeQuantity freeQuantity()

      The number of free copies which will be supplied with an order for the batch quantity specified in the <BatchQuantity> field. Mandatory in each occurrence of the <BatchBonus> composite, and non-repeating.

      Jonix-Comment: this field is required
    • asStruct

      public JonixBatchBonus asStruct()
      Specified by:
      asStruct in interface OnixComposite.OnixDataComposite<JonixBatchBonus>