public class VariantAvailability
extends java.lang.Object
This information is replicated from variant's inventory entry
, purely as an optimization.
getRestockableInDays
matches
InventoryEntry.getRestockableInDays
,
isOnStock
is true if and only if
InventoryEntry.quantityOnStock
is greater than 0.
Note:The corresponding InventoryEntry is the immediate source of truth. The information in VariantAvailability is updated asynchronously when inventory entries are modified, and is therefore eventually consistent.
Modifier and Type | Method and Description |
---|---|
static VariantAvailability |
create(boolean isOnStock,
int restockableInDays) |
int |
getRestockableInDays()
The number of days required to restock the product variant.
|
boolean |
isOnStock()
True if the quantity on stock for the product variant is greater than 0.
|
java.lang.String |
toString() |
public static VariantAvailability create(boolean isOnStock, int restockableInDays)
public boolean isOnStock()
public int getRestockableInDays()
public java.lang.String toString()
toString
in class java.lang.Object