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