Interface InventoryEntryChangeQuantityAction
- All Superinterfaces:
InventoryEntryUpdateAction,ResourceUpdateAction<InventoryEntryUpdateAction>
Sets the quantityOnStock to an absolute value. This changes the availableQuantity, based on the number of active reservations. To make an incremental change instead, use the InventoryEntryAddQuantityAction update action.
Example to create an instance using the builder pattern
InventoryEntryChangeQuantityAction inventoryEntryChangeQuantityAction = InventoryEntryChangeQuantityAction.builder()
.quantity(0.3)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for InventoryEntryChangeQuantityAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for InventoryEntryChangeQuantityActionbuilder(InventoryEntryChangeQuantityAction template) create builder for InventoryEntryChangeQuantityAction instancecopyDeep()deepCopy(InventoryEntryChangeQuantityAction template) factory method to create a deep copy of InventoryEntryChangeQuantityAction@NotNull LongValue to set forquantityOnStock.of()factory methodof(InventoryEntryChangeQuantityAction template) factory method to create a shallow copy InventoryEntryChangeQuantityActionvoidsetQuantity(Long quantity) Value to set forquantityOnStock.static com.fasterxml.jackson.core.type.TypeReference<InventoryEntryChangeQuantityAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.inventory.InventoryEntryUpdateAction
getAction, withInventoryEntryUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
CHANGE_QUANTITY
discriminator value for InventoryEntryChangeQuantityAction- See Also:
-
-
Method Details
-
getQuantity
Value to set for
quantityOnStock.- Returns:
- quantity
-
setQuantity
Value to set for
quantityOnStock.- Parameters:
quantity- value to be set
-
of
factory method- Returns:
- instance of InventoryEntryChangeQuantityAction
-
of
factory method to create a shallow copy InventoryEntryChangeQuantityAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
InventoryEntryChangeQuantityAction copyDeep()- Specified by:
copyDeepin interfaceInventoryEntryUpdateAction
-
deepCopy
@Nullable static InventoryEntryChangeQuantityAction deepCopy(@Nullable InventoryEntryChangeQuantityAction template) factory method to create a deep copy of InventoryEntryChangeQuantityAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InventoryEntryChangeQuantityAction- Returns:
- builder
-
builder
static InventoryEntryChangeQuantityActionBuilder builder(InventoryEntryChangeQuantityAction template) create builder for InventoryEntryChangeQuantityAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withInventoryEntryChangeQuantityAction
default <T> T withInventoryEntryChangeQuantityAction(Function<InventoryEntryChangeQuantityAction, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<InventoryEntryChangeQuantityAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-