Class CartSetCustomerIdActionBuilder

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

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

     CartSetCustomerIdAction cartSetCustomerIdAction = CartSetCustomerIdAction.builder()
             .build()
 
  • Constructor Details

    • CartSetCustomerIdActionBuilder

      public CartSetCustomerIdActionBuilder()
  • Method Details

    • customerId

      public CartSetCustomerIdActionBuilder customerId(@Nullable String customerId)

      id of an existing Customer. If the Customer is assigned to a CustomerGroup, this update action also sets the value for the customerGroup field. If empty, the update action removes the value for both customerId and customerGroup.

      Parameters:
      customerId - value to be set
      Returns:
      Builder
    • getCustomerId

      @Nullable public String getCustomerId()

      id of an existing Customer. If the Customer is assigned to a CustomerGroup, this update action also sets the value for the customerGroup field. If empty, the update action removes the value for both customerId and customerGroup.

      Returns:
      customerId
    • build

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

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

      public static CartSetCustomerIdActionBuilder of()
      factory method for an instance of CartSetCustomerIdActionBuilder
      Returns:
      builder
    • of

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