Class CustomerUpdateBuilder
java.lang.Object
com.commercetools.api.models.customer.CustomerUpdateBuilder
- All Implemented Interfaces:
Builder<CustomerUpdate>
CustomerUpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomerUpdate customerUpdate = CustomerUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions
(CustomerUpdateAction... actions) Update actions to be performed on the Customer.actions
(List<CustomerUpdateAction> actions) Update actions to be performed on the Customer.build()
builds CustomerUpdate with checking for non-null required valuesbuilds CustomerUpdate without checking for non-null required valuesUpdate actions to be performed on the Customer.Expected version of the Customer on which the changes should be applied.static CustomerUpdateBuilder
of()
factory method for an instance of CustomerUpdateBuilderstatic CustomerUpdateBuilder
of
(CustomerUpdate template) create builder for CustomerUpdate instanceplusActions
(CustomerUpdateAction... actions) Update actions to be performed on the Customer.plusActions
(Function<CustomerUpdateActionBuilder, Builder<? extends CustomerUpdateAction>> builder) Update actions to be performed on the Customer.Expected version of the Customer on which the changes should be applied.withActions
(Function<CustomerUpdateActionBuilder, Builder<? extends CustomerUpdateAction>> builder) Update actions to be performed on the Customer.
-
Constructor Details
-
CustomerUpdateBuilder
public CustomerUpdateBuilder()
-
-
Method Details
-
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
Update actions to be performed on the Customer.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
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:
actions
- value to be set- Returns:
- Builder
-
plusActions
public CustomerUpdateBuilder plusActions(Function<CustomerUpdateActionBuilder, Builder<? extends CustomerUpdateAction>> builder) Update actions to be performed on the Customer.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
withActions
public CustomerUpdateBuilder withActions(Function<CustomerUpdateActionBuilder, Builder<? extends CustomerUpdateAction>> builder) Update actions to be performed on the Customer.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
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
Update actions to be performed on the Customer.
- Returns:
- actions
-
build
builds CustomerUpdate with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomerUpdate>
- Returns:
- CustomerUpdate
-
buildUnchecked
builds CustomerUpdate without checking for non-null required values- Returns:
- CustomerUpdate
-
of
factory method for an instance of CustomerUpdateBuilder- Returns:
- builder
-
of
create builder for CustomerUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-