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