Class CartSetCartTotalTaxActionBuilder

java.lang.Object
com.commercetools.api.models.cart.CartSetCartTotalTaxActionBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<CartSetCartTotalTaxAction>

public class CartSetCartTotalTaxActionBuilder extends Object implements io.vrap.rmf.base.client.Builder<CartSetCartTotalTaxAction>
CartSetCartTotalTaxActionBuilder
Example to create an instance using the builder pattern

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

    • CartSetCartTotalTaxActionBuilder

      public CartSetCartTotalTaxActionBuilder()
  • Method Details

    • externalTotalGross

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

      Parameters:
      builder - function to build the externalTotalGross value
      Returns:
      Builder
    • withExternalTotalGross

      public CartSetCartTotalTaxActionBuilder withExternalTotalGross(Function<MoneyBuilder,Money> builder)

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

      Parameters:
      builder - function to build the externalTotalGross value
      Returns:
      Builder
    • externalTotalGross

      public CartSetCartTotalTaxActionBuilder externalTotalGross(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
      Returns:
      Builder
    • externalTaxPortions

      public CartSetCartTotalTaxActionBuilder externalTaxPortions(@Nullable TaxPortionDraft... externalTaxPortions)

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

      Parameters:
      externalTaxPortions - value to be set
      Returns:
      Builder
    • externalTaxPortions

      public CartSetCartTotalTaxActionBuilder externalTaxPortions(@Nullable List<TaxPortionDraft> externalTaxPortions)

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

      Parameters:
      externalTaxPortions - value to be set
      Returns:
      Builder
    • plusExternalTaxPortions

      public CartSetCartTotalTaxActionBuilder plusExternalTaxPortions(@Nullable TaxPortionDraft... externalTaxPortions)

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

      Parameters:
      externalTaxPortions - value to be set
      Returns:
      Builder
    • plusExternalTaxPortions

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

      Parameters:
      builder - function to build the externalTaxPortions value
      Returns:
      Builder
    • withExternalTaxPortions

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

      Parameters:
      builder - function to build the externalTaxPortions value
      Returns:
      Builder
    • addExternalTaxPortions

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

      Parameters:
      builder - function to build the externalTaxPortions value
      Returns:
      Builder
    • setExternalTaxPortions

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

      Parameters:
      builder - function to build the externalTaxPortions value
      Returns:
      Builder
    • getExternalTotalGross

      public Money getExternalTotalGross()

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

      Returns:
      externalTotalGross
    • getExternalTaxPortions

      @Nullable public List<TaxPortionDraft> getExternalTaxPortions()

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

      Returns:
      externalTaxPortions
    • build

      public CartSetCartTotalTaxAction build()
      builds CartSetCartTotalTaxAction with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<CartSetCartTotalTaxAction>
      Returns:
      CartSetCartTotalTaxAction
    • buildUnchecked

      public CartSetCartTotalTaxAction buildUnchecked()
      builds CartSetCartTotalTaxAction without checking for non-null required values
      Returns:
      CartSetCartTotalTaxAction
    • of

      factory method for an instance of CartSetCartTotalTaxActionBuilder
      Returns:
      builder
    • of

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