Interface TaxCalculationMode

All Superinterfaces:
JsonEnum
All Known Implementing Classes:
TaxCalculationMode.TaxCalculationModeEnum

public interface TaxCalculationMode extends JsonEnum

Determines in which Tax calculation mode taxed prices are calculated.

  • Field Details

    • LINE_ITEM_LEVEL

      static final TaxCalculationMode LINE_ITEM_LEVEL

      Taxes are calculated after the unit price is multiplied by the quantity. This is the default mode.

      For example, ($1.08 * 3 = $3.24) * 1.19 = $3.8556 -> $3.86 rounded

    • UNIT_PRICE_LEVEL

      static final TaxCalculationMode UNIT_PRICE_LEVEL

      Taxes are calculated on the unit price before multiplying by the quantity.

      For example, ($1.08 * 1.19 = $1.2852 -> $1.29 rounded) * 3 = $3.87

  • Method Details

    • getJsonName

      String getJsonName()
      the JSON value
      Specified by:
      getJsonName in interface JsonEnum
      Returns:
      json value
    • name

      String name()
      the enum value
      Specified by:
      name in interface JsonEnum
      Returns:
      name
    • toString

      String toString()
      convert value to string
      Specified by:
      toString in interface JsonEnum
      Overrides:
      toString in class Object
      Returns:
      string representation
    • findEnum

      static TaxCalculationMode findEnum(String value)
      factory method for a enum value of TaxCalculationMode if no enum has been found an anonymous instance will be created
      Parameters:
      value - the enum value to be wrapped
      Returns:
      enum instance
    • findEnumViaJsonName

      static Optional<TaxCalculationMode> findEnumViaJsonName(String jsonName)
      method to find enum using the JSON value
      Parameters:
      jsonName - the json value to be wrapped
      Returns:
      optional of enum instance
    • values

      static TaxCalculationMode[] values()
      possible enum values
      Returns:
      array of possible enum values