Class CartSetLineItemTaxRateActionBuilder

java.lang.Object
com.commercetools.api.models.cart.CartSetLineItemTaxRateActionBuilder
All Implemented Interfaces:
Builder<CartSetLineItemTaxRateAction>

public class CartSetLineItemTaxRateActionBuilder extends Object implements Builder<CartSetLineItemTaxRateAction>
CartSetLineItemTaxRateActionBuilder
Example to create an instance using the builder pattern

     CartSetLineItemTaxRateAction cartSetLineItemTaxRateAction = CartSetLineItemTaxRateAction.builder()
             .build()
 
  • Constructor Details

    • CartSetLineItemTaxRateActionBuilder

      public CartSetLineItemTaxRateActionBuilder()
  • Method Details

    • lineItemId

      public CartSetLineItemTaxRateActionBuilder lineItemId(@Nullable String lineItemId)

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      Parameters:
      lineItemId - value to be set
      Returns:
      Builder
    • lineItemKey

      public CartSetLineItemTaxRateActionBuilder lineItemKey(@Nullable String lineItemKey)

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      Parameters:
      lineItemKey - value to be set
      Returns:
      Builder
    • externalTaxRate

      Value to set. If empty, any existing value is removed.

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

      Value to set. If empty, any existing value is removed.

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

      public CartSetLineItemTaxRateActionBuilder externalTaxRate(@Nullable ExternalTaxRateDraft externalTaxRate)

      Value to set. If empty, any existing value is removed.

      Parameters:
      externalTaxRate - value to be set
      Returns:
      Builder
    • shippingKey

      public CartSetLineItemTaxRateActionBuilder shippingKey(@Nullable String shippingKey)

      key of the ShippingMethod used for this Line Item. This is required for Carts with Multiple ShippingMode.

      Parameters:
      shippingKey - value to be set
      Returns:
      Builder
    • getLineItemId

      @Nullable public String getLineItemId()

      id of the LineItem to update. Either lineItemId or lineItemKey is required.

      Returns:
      lineItemId
    • getLineItemKey

      @Nullable public String getLineItemKey()

      key of the LineItem to update. Either lineItemId or lineItemKey is required.

      Returns:
      lineItemKey
    • getExternalTaxRate

      @Nullable public ExternalTaxRateDraft getExternalTaxRate()

      Value to set. If empty, any existing value is removed.

      Returns:
      externalTaxRate
    • getShippingKey

      @Nullable public String getShippingKey()

      key of the ShippingMethod used for this Line Item. This is required for Carts with Multiple ShippingMode.

      Returns:
      shippingKey
    • build

      builds CartSetLineItemTaxRateAction with checking for non-null required values
      Specified by:
      build in interface Builder<CartSetLineItemTaxRateAction>
      Returns:
      CartSetLineItemTaxRateAction
    • buildUnchecked

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

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

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