Interface TaxMode

All Superinterfaces:
JsonEnum
All Known Implementing Classes:
TaxMode.TaxModeEnum

public interface TaxMode extends JsonEnum

Indicates how taxes are set on the Cart.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    possible values of TaxMode
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TaxMode
    No taxes are added to the Cart.
    static final TaxMode
    Tax Rates are set externally per ExternalTaxRateDraft.
    static final TaxMode
    Tax amounts, Tax Rates, and tax portions are set externally per ExternalTaxAmountDraft.
    static final TaxMode
    Tax Rates are selected automatically from the TaxCategories based on the Cart shippingAddress.
  • Method Summary

    Modifier and Type
    Method
    Description
    static TaxMode
    factory method for a enum value of TaxMode if no enum has been found an anonymous instance will be created
    method to find enum using the JSON value
    the JSON value
    the enum value
    convert value to string
    static TaxMode[]
    possible enum values
  • 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. Also the Cart taxedPrice field must be explicitly set via Set Cart Total Tax. Since the API currently does not offer an update action for setting the taxedShippingPrice field of a Cart with ExternalAmount tax mode, it will always be empty.

    • 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

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

      static Optional<TaxMode> 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 TaxMode[] values()
      possible enum values
      Returns:
      array of possible enum values