Class CustomerUpdateBuilder

java.lang.Object
com.commercetools.api.models.customer.CustomerUpdateBuilder
All Implemented Interfaces:
Builder<CustomerUpdate>

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

     CustomerUpdate customerUpdate = CustomerUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Constructor Details

    • CustomerUpdateBuilder

      public CustomerUpdateBuilder()
  • Method Details

    • version

      public CustomerUpdateBuilder version(Long version)

      Expected version of the Customer on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      Parameters:
      version - value to be set
      Returns:
      Builder
    • actions

      public CustomerUpdateBuilder actions(CustomerUpdateAction... actions)

      Update actions to be performed on the Customer.

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

      public CustomerUpdateBuilder actions(List<CustomerUpdateAction> actions)

      Update actions to be performed on the Customer.

      Parameters:
      actions - value to be set
      Returns:
      Builder
    • plusActions

      public CustomerUpdateBuilder plusActions(CustomerUpdateAction... actions)

      Update actions to be performed on the Customer.

      Parameters:
      actions - value to be set
      Returns:
      Builder
    • plusActions

      Update actions to be performed on the Customer.

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

      Update actions to be performed on the Customer.

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

      public Long getVersion()

      Expected version of the Customer on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      Returns:
      version
    • getActions

      public List<CustomerUpdateAction> getActions()

      Update actions to be performed on the Customer.

      Returns:
      actions
    • build

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

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

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

      public static CustomerUpdateBuilder of(CustomerUpdate template)
      create builder for CustomerUpdate instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder