Class MyCustomerChangePasswordBuilder

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

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

     MyCustomerChangePassword myCustomerChangePassword = MyCustomerChangePassword.builder()
             .version(0.3)
             .currentPassword("{currentPassword}")
             .newPassword("{newPassword}")
             .build()
 
  • Constructor Details

    • MyCustomerChangePasswordBuilder

      public MyCustomerChangePasswordBuilder()
  • Method Details

    • version

      public MyCustomerChangePasswordBuilder 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 MyCustomerChangePasswordBuilder 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 MyCustomerChangePasswordBuilder newPassword(String newPassword)

      New password to be set.

      Parameters:
      newPassword - value to be set
      Returns:
      Builder
    • 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 MyCustomerChangePassword build()
      builds MyCustomerChangePassword with checking for non-null required values
      Specified by:
      build in interface Builder<MyCustomerChangePassword>
      Returns:
      MyCustomerChangePassword
    • buildUnchecked

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

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

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