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