Interface TaxMode

All Superinterfaces:
io.vrap.rmf.base.client.JsonEnum
All Known Implementing Classes:
TaxMode.TaxModeEnum

public interface TaxMode extends io.vrap.rmf.base.client.JsonEnum

Indicates how taxes are set on the Cart.

  • Field Details

    • PLATFORM

      static final TaxMode PLATFORM

      Tax Rates are selected automatically from the TaxCategories based on the Cart shippingAddress. This is the default tax mode for a new Cart.

      totalNet, totalGross, and taxPortions fields are calculated based on the taxRoundingMode.

    • EXTERNAL

      static final TaxMode EXTERNAL

      Tax Rates are set externally per ExternalTaxRateDraft. A Cart can be ordered only if all Line Items, Custom Line Items, and the Shipping Method have an external Tax Rate set.

      totalNet, totalGross, and taxPortions fields are calculated based on the taxRoundingMode.

    • EXTERNAL_AMOUNT

      static final TaxMode EXTERNAL_AMOUNT

      Tax amounts, Tax Rates, and tax portions are set externally per ExternalTaxAmountDraft. A Cart can be ordered only if the Cart and all Line Items, Custom Line Items, and the Shipping Method have an external tax amount and rate set.

      Price-specific update actions on Carts require external recalculation of the total gross price. Hence, the externalTaxAmount is removed in these cases and must be reset with Set LineItem TaxAmount, Set CustomLineItem TaxAmount, or Set ShippingMethod TaxAmount update actions.

    • DISABLED

      static final TaxMode DISABLED

      No taxes are added to the Cart.

      Note that this tax mode cannot be set on the My Carts API.

  • Method Details

    • getJsonName

      the JSON value
      Specified by:
      getJsonName in interface io.vrap.rmf.base.client.JsonEnum
      Returns:
      json value
    • name

      the enum value
      Specified by:
      name in interface io.vrap.rmf.base.client.JsonEnum
      Returns:
      name
    • toString

      convert value to string
      Specified by:
      toString in interface io.vrap.rmf.base.client.JsonEnum
      Overrides:
      toString in class Object
      Returns:
      string representation
    • findEnum

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

      method to find enum using the JSON value
      Parameters:
      jsonName - the json value to be wrapped
      Returns:
      optional of enum instance
    • values

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