Class CustomerChangePasswordBuilder

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

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

     CustomerChangePassword customerChangePassword = CustomerChangePassword.builder()
             .id("{id}")
             .version(0.3)
             .currentPassword("{currentPassword}")
             .newPassword("{newPassword}")
             .build()
 
  • Constructor Details

    • CustomerChangePasswordBuilder

      public CustomerChangePasswordBuilder()
  • Method Details

    • id

      Unique identifier of the Customer.

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

      public CustomerChangePasswordBuilder version(Long version)

      Expected version of the Customer on which the changes should be applied.

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

      public CustomerChangePasswordBuilder currentPassword(String currentPassword)

      Current password of the Customer.

      If the current password does not match, an InvalidCurrentPassword error is returned.

      Parameters:
      currentPassword - value to be set
      Returns:
      Builder
    • newPassword

      public CustomerChangePasswordBuilder newPassword(String newPassword)

      New password to be set.

      Parameters:
      newPassword - value to be set
      Returns:
      Builder
    • getId

      public String getId()

      Unique identifier of the Customer.

      Returns:
      id
    • getVersion

      public Long getVersion()

      Expected version of the Customer on which the changes should be applied.

      Returns:
      version
    • getCurrentPassword

      public String getCurrentPassword()

      Current password of the Customer.

      If the current password does not match, an InvalidCurrentPassword error is returned.

      Returns:
      currentPassword
    • getNewPassword

      public String getNewPassword()

      New password to be set.

      Returns:
      newPassword
    • build

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

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

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

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