Interface InventoryEntrySetInventoryLimitsAction
- All Superinterfaces:
InventoryEntryUpdateAction,ResourceUpdateAction<InventoryEntryUpdateAction>
Sets the inventory limits for a specific InventoryEntry. This action allows you to define minimum and maximum quantities that can be added to a Cart. For more information, see Quantity limits.
Example to create an instance using the builder pattern
InventoryEntrySetInventoryLimitsAction inventoryEntrySetInventoryLimitsAction = InventoryEntrySetInventoryLimitsAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for InventoryEntrySetInventoryLimitsAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for InventoryEntrySetInventoryLimitsActioncreate builder for InventoryEntrySetInventoryLimitsAction instancecopyDeep()factory method to create a deep copy of InventoryEntrySetInventoryLimitsActionSets the maximum quantity that can be added to a Cart.Sets the minimum quantity that can be added to a Cart.of()factory methodof(InventoryEntrySetInventoryLimitsAction template) factory method to create a shallow copy InventoryEntrySetInventoryLimitsActionvoidsetMaxCartQuantity(Long maxCartQuantity) Sets the maximum quantity that can be added to a Cart.voidsetMinCartQuantity(Long minCartQuantity) Sets the minimum quantity that can be added to a Cart.static com.fasterxml.jackson.core.type.TypeReference<InventoryEntrySetInventoryLimitsAction>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithInventoryEntrySetInventoryLimitsAction(Function<InventoryEntrySetInventoryLimitsAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.inventory.InventoryEntryUpdateAction
getAction, withInventoryEntryUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_INVENTORY_LIMITS
discriminator value for InventoryEntrySetInventoryLimitsAction- See Also:
-
-
Method Details
-
getMinCartQuantity
Long getMinCartQuantity()Sets the minimum quantity that can be added to a Cart. If the value is absent or
nullthe inventory limit is removed.- Returns:
- minCartQuantity
-
getMaxCartQuantity
Long getMaxCartQuantity()Sets the maximum quantity that can be added to a Cart. If the value is absent or
nullthe inventory limit is removed.- Returns:
- maxCartQuantity
-
setMinCartQuantity
Sets the minimum quantity that can be added to a Cart. If the value is absent or
nullthe inventory limit is removed.- Parameters:
minCartQuantity- value to be set
-
setMaxCartQuantity
Sets the maximum quantity that can be added to a Cart. If the value is absent or
nullthe inventory limit is removed.- Parameters:
maxCartQuantity- value to be set
-
of
factory method- Returns:
- instance of InventoryEntrySetInventoryLimitsAction
-
of
factory method to create a shallow copy InventoryEntrySetInventoryLimitsAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
InventoryEntrySetInventoryLimitsAction copyDeep()- Specified by:
copyDeepin interfaceInventoryEntryUpdateAction
-
deepCopy
@Nullable static InventoryEntrySetInventoryLimitsAction deepCopy(@Nullable InventoryEntrySetInventoryLimitsAction template) factory method to create a deep copy of InventoryEntrySetInventoryLimitsAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InventoryEntrySetInventoryLimitsAction- Returns:
- builder
-
builder
static InventoryEntrySetInventoryLimitsActionBuilder builder(InventoryEntrySetInventoryLimitsAction template) create builder for InventoryEntrySetInventoryLimitsAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withInventoryEntrySetInventoryLimitsAction
default <T> T withInventoryEntrySetInventoryLimitsAction(Function<InventoryEntrySetInventoryLimitsAction, 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<InventoryEntrySetInventoryLimitsAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-