Interface CartChangeTaxModeAction

All Superinterfaces:
CartUpdateAction, ResourceUpdateAction<CartUpdateAction>

public interface CartChangeTaxModeAction extends CartUpdateAction
  • When External TaxMode is changed to Platform or Disabled, all previously set external Tax Rates are removed.
  • When set to Platform, Line Items, Custom Line Items, and Shipping Method require a Tax Category with a Tax Rate for the Cart's shippingAddress.

Example to create an instance using the builder pattern

     CartChangeTaxModeAction cartChangeTaxModeAction = CartChangeTaxModeAction.builder()
             .taxMode(TaxMode.PLATFORM)
             .build()
 
  • Field Details

    • CHANGE_TAX_MODE

      static final String CHANGE_TAX_MODE
      discriminator value for CartChangeTaxModeAction
      See Also:
  • Method Details

    • getTaxMode

      @NotNull @NotNull TaxMode getTaxMode()

      The new TaxMode.

      Returns:
      taxMode
    • setTaxMode

      void setTaxMode(TaxMode taxMode)

      The new TaxMode.

      Parameters:
      taxMode - value to be set
    • of

      factory method
      Returns:
      instance of CartChangeTaxModeAction
    • of

      factory method to create a shallow copy CartChangeTaxModeAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of CartChangeTaxModeAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for CartChangeTaxModeAction
      Returns:
      builder
    • builder

      create builder for CartChangeTaxModeAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartChangeTaxModeAction

      default <T> T withCartChangeTaxModeAction(Function<CartChangeTaxModeAction,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CartChangeTaxModeAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference