Interface CartSetCartTotalTaxAction

All Superinterfaces:
CartUpdateAction, ResourceUpdateAction<CartUpdateAction>
All Known Implementing Classes:
CartSetCartTotalTaxActionImpl

public interface CartSetCartTotalTaxAction extends CartUpdateAction

This update action results in the taxedPrice field being added to the Cart when the ExternalAmount TaxMode is used.


Example to create an instance using the builder pattern

     CartSetCartTotalTaxAction cartSetCartTotalTaxAction = CartSetCartTotalTaxAction.builder()
             .externalTotalGross(externalTotalGrossBuilder -> externalTotalGrossBuilder)
             .build()
 
  • Field Details

    • SET_CART_TOTAL_TAX

      static final String SET_CART_TOTAL_TAX
      discriminator value for CartSetCartTotalTaxAction
      See Also:
  • Method Details

    • getExternalTotalGross

      @NotNull @Valid @NotNull @Valid Money getExternalTotalGross()

      The Cart's total gross price becoming the totalGross field (totalNet + taxes) on the Cart's taxedPrice.

      Returns:
      externalTotalGross
    • getExternalTaxPortions

      @Valid @Valid List<TaxPortionDraft> getExternalTaxPortions()

      Set if the externalTotalGross price is a sum of portions with different tax rates.

      Returns:
      externalTaxPortions
    • setExternalTotalGross

      void setExternalTotalGross(Money externalTotalGross)

      The Cart's total gross price becoming the totalGross field (totalNet + taxes) on the Cart's taxedPrice.

      Parameters:
      externalTotalGross - value to be set
    • setExternalTaxPortions

      void setExternalTaxPortions(TaxPortionDraft... externalTaxPortions)

      Set if the externalTotalGross price is a sum of portions with different tax rates.

      Parameters:
      externalTaxPortions - values to be set
    • setExternalTaxPortions

      void setExternalTaxPortions(List<TaxPortionDraft> externalTaxPortions)

      Set if the externalTotalGross price is a sum of portions with different tax rates.

      Parameters:
      externalTaxPortions - values to be set
    • of

      factory method
      Returns:
      instance of CartSetCartTotalTaxAction
    • of

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

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

      builder factory method for CartSetCartTotalTaxAction
      Returns:
      builder
    • builder

      create builder for CartSetCartTotalTaxAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartSetCartTotalTaxAction

      default <T> T withCartSetCartTotalTaxAction(Function<CartSetCartTotalTaxAction,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<CartSetCartTotalTaxAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference