Interface InventoryMode
- All Superinterfaces:
io.vrap.rmf.base.client.JsonEnum
- All Known Implementing Classes:
InventoryMode.InventoryModeEnum
Indicates how Line Items in a Cart are tracked.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
possible values of InventoryMode -
Field Summary
Modifier and TypeFieldDescriptionstatic final InventoryMode
Adding and ordering items from a Cart are independent of the Inventory with no inventory checks or modifications.static final InventoryMode
Line Items in a Cart are only reserved for the duration of the ordering transaction.static final InventoryMode
Orders are tracked on the Inventory, and ordering a LineItem deducts the available quantity on the respective InventoryEntry. -
Method Summary
Modifier and TypeMethodDescriptionstatic InventoryMode
static InventoryMode
factory method for a enum value of InventoryMode if no enum has been found an anonymous instance will be createdstatic Optional<InventoryMode>
findEnumViaJsonName
(String jsonName) method to find enum using the JSON valuethe JSON valuename()
the enum valuetoString()
convert value to stringstatic InventoryMode[]
values()
possible enum values
-
Field Details
-
NONE
Adding and ordering items from a Cart are independent of the Inventory with no inventory checks or modifications.
This is the default mode.
-
TRACK_ONLY
Orders are tracked on the Inventory, and ordering a LineItem deducts the available quantity on the respective InventoryEntry.
An Order can be created even if the Line Item quantity is zero or negative, but if no matching Inventory Entry exists for the Line Item, an OutOfStock error is returned.
-
RESERVE_ON_ORDER
Line Items in a Cart are only reserved for the duration of the ordering transaction. If a Line Item is not available when creating an Order, an OutOfStock error is returned. This is because the InventoryEntry
availableQuantity
is insufficient (but is still updated) for the ordered Line Item quantity.However, an Order can be created if the InventoryEntry
restockableInDays
is set (including0
).
-
-
Method Details
-
getJsonName
String getJsonName()the JSON value- Specified by:
getJsonName
in interfaceio.vrap.rmf.base.client.JsonEnum
- Returns:
- json value
-
name
String name()the enum value- Specified by:
name
in interfaceio.vrap.rmf.base.client.JsonEnum
- Returns:
- name
-
toString
String toString()convert value to string -
findEnum
factory method for a enum value of InventoryMode if no enum has been found an anonymous instance will be created- Parameters:
value
- the enum value to be wrapped- Returns:
- enum instance
-
findEnumViaJsonName
method to find enum using the JSON value- Parameters:
jsonName
- the json value to be wrapped- Returns:
- optional of enum instance
-
values
possible enum values- Returns:
- array of possible enum values
-
defaultValue
-