Interface InventoryEntryRemoveQuantityAction
- All Superinterfaces:
InventoryEntryUpdateAction,ResourceUpdateAction<InventoryEntryUpdateAction>
Removes a specific quantity from quantityOnStock. This changes the availableQuantity, based on the number of active reservations. You can update quantityOnStock to values below zero.
Carts with existing ReserveOnCart reservations will not be invalidated by this update action and can still be ordered.
Example to create an instance using the builder pattern
InventoryEntryRemoveQuantityAction inventoryEntryRemoveQuantityAction = InventoryEntryRemoveQuantityAction.builder()
.quantity(0.3)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for InventoryEntryRemoveQuantityAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for InventoryEntryRemoveQuantityActionbuilder(InventoryEntryRemoveQuantityAction template) create builder for InventoryEntryRemoveQuantityAction instancecopyDeep()deepCopy(InventoryEntryRemoveQuantityAction template) factory method to create a deep copy of InventoryEntryRemoveQuantityAction@NotNull LongValue to remove fromquantityOnStock.of()factory methodof(InventoryEntryRemoveQuantityAction template) factory method to create a shallow copy InventoryEntryRemoveQuantityActionvoidsetQuantity(Long quantity) Value to remove fromquantityOnStock.static com.fasterxml.jackson.core.type.TypeReference<InventoryEntryRemoveQuantityAction>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
-
REMOVE_QUANTITY
discriminator value for InventoryEntryRemoveQuantityAction- See Also:
-
-
Method Details
-
getQuantity
Value to remove from
quantityOnStock.- Returns:
- quantity
-
setQuantity
Value to remove from
quantityOnStock.- Parameters:
quantity- value to be set
-
of
factory method- Returns:
- instance of InventoryEntryRemoveQuantityAction
-
of
factory method to create a shallow copy InventoryEntryRemoveQuantityAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
InventoryEntryRemoveQuantityAction copyDeep()- Specified by:
copyDeepin interfaceInventoryEntryUpdateAction
-
deepCopy
@Nullable static InventoryEntryRemoveQuantityAction deepCopy(@Nullable InventoryEntryRemoveQuantityAction template) factory method to create a deep copy of InventoryEntryRemoveQuantityAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InventoryEntryRemoveQuantityAction- Returns:
- builder
-
builder
static InventoryEntryRemoveQuantityActionBuilder builder(InventoryEntryRemoveQuantityAction template) create builder for InventoryEntryRemoveQuantityAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withInventoryEntryRemoveQuantityAction
default <T> T withInventoryEntryRemoveQuantityAction(Function<InventoryEntryRemoveQuantityAction, 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<InventoryEntryRemoveQuantityAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-