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