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