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
Example to create an instance using the builder pattern
CustomerChangePassword customerChangePassword = CustomerChangePassword.builder()
.id("{id}")
.version(0.3)
.currentPassword("{currentPassword}")
.newPassword("{newPassword}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CustomerChangePassword with checking for non-null required valuesbuilds CustomerChangePassword without checking for non-null required valuescurrentPassword
(String currentPassword) Current password of the Customer.Current password of the Customer.getId()
Unique identifier of the Customer.New password to be set.Expected version of the Customer on which the changes should be applied.Unique identifier of the Customer.newPassword
(String newPassword) New password to be set.of()
factory method for an instance of CustomerChangePasswordBuilderof
(CustomerChangePassword template) create builder for CustomerChangePassword instanceExpected version of the Customer on which the changes should be applied.
-
Constructor Details
-
CustomerChangePasswordBuilder
public CustomerChangePasswordBuilder()
-
-
Method Details
-
id
Unique identifier of the Customer.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Expected version of the Customer on which the changes should be applied.
- Parameters:
version
- value to be set- Returns:
- Builder
-
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
New password to be set.
- Parameters:
newPassword
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Customer.
- Returns:
- id
-
getVersion
Expected version of the Customer on which the changes should be applied.
- Returns:
- version
-
getCurrentPassword
Current password of the Customer.
If the current password does not match, an InvalidCurrentPassword error is returned.
- Returns:
- currentPassword
-
getNewPassword
New password to be set.
- Returns:
- newPassword
-
build
builds CustomerChangePassword with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomerChangePassword>
- Returns:
- CustomerChangePassword
-
buildUnchecked
builds CustomerChangePassword without checking for non-null required values- Returns:
- CustomerChangePassword
-
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
-