Class CartSetShippingAddressActionBuilder

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

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

     CartSetShippingAddressAction cartSetShippingAddressAction = CartSetShippingAddressAction.builder()
             .build()
 
  • Constructor Details

    • CartSetShippingAddressActionBuilder

      public CartSetShippingAddressActionBuilder()
  • Method Details

    • address

      Value to set. It replaces the entire address, including Custom Fields if custom is not included. To preserve Custom Fields, include the custom object in the request.

      If not set, the shipping address is unset, and the taxedPrice and taxRate are unset in all Line Items of the Cart.

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

      Value to set. It replaces the entire address, including Custom Fields if custom is not included. To preserve Custom Fields, include the custom object in the request.

      If not set, the shipping address is unset, and the taxedPrice and taxRate are unset in all Line Items of the Cart.

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

      public CartSetShippingAddressActionBuilder address(@Nullable BaseAddress address)

      Value to set. It replaces the entire address, including Custom Fields if custom is not included. To preserve Custom Fields, include the custom object in the request.

      If not set, the shipping address is unset, and the taxedPrice and taxRate are unset in all Line Items of the Cart.

      Parameters:
      address - value to be set
      Returns:
      Builder
    • getAddress

      @Nullable public BaseAddress getAddress()

      Value to set. It replaces the entire address, including Custom Fields if custom is not included. To preserve Custom Fields, include the custom object in the request.

      If not set, the shipping address is unset, and the taxedPrice and taxRate are unset in all Line Items of the Cart.

      Returns:
      address
    • build

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

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

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

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