Interface ProductVariantAvailability
The InventoryEntry information of the Product Variant. If there is a supply Channel for the InventoryEntry, then channels is returned. If not, then isOnStock, restockableInDays, and availableQuantity are returned.
Only available for Projects with the ProductCatalogModel Classic.
Example to create an instance using the builder pattern
ProductVariantAvailability productVariantAvailability = ProductVariantAvailability.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ProductVariantAvailabilitybuilder(ProductVariantAvailability template) create builder for ProductVariantAvailability instancecopyDeep()static ProductVariantAvailabilitydeepCopy(ProductVariantAvailability template) factory method to create a deep copy of ProductVariantAvailabilityNumber of items of the Product Variant that are in stock.For each InventoryEntry with a supply Channel, an entry is added tochannels.getId()Unique identifier of the InventoryEntry.trueif the Product Variant is in stock, based on an InventoryEntry that has no assigned supply Channel.Number of days to restock a Product Variant once it is out of stock.Current version of the InventoryEntry.static ProductVariantAvailabilityof()factory methodstatic ProductVariantAvailabilityof(ProductVariantAvailability template) factory method to create a shallow copy ProductVariantAvailabilityvoidsetAvailableQuantity(Long availableQuantity) Number of items of the Product Variant that are in stock.voidFor each InventoryEntry with a supply Channel, an entry is added tochannels.voidUnique identifier of the InventoryEntry.voidsetIsOnStock(Boolean isOnStock) trueif the Product Variant is in stock, based on an InventoryEntry that has no assigned supply Channel.voidsetRestockableInDays(Long restockableInDays) Number of days to restock a Product Variant once it is out of stock.voidsetVersion(Long version) Current version of the InventoryEntry.static tools.jackson.core.type.TypeReference<ProductVariantAvailability>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map function
-
Method Details
-
getChannels
For each InventoryEntry with a supply Channel, an entry is added to
channels.- Returns:
- channels
-
getIsOnStock
Boolean getIsOnStock()trueif the Product Variant is in stock, based on an InventoryEntry that has no assigned supply Channel. This value reflects global or default availability; it does not aggregate the channel-specific availabilities found in thechannelsfield.- Returns:
- isOnStock
-
getRestockableInDays
Long getRestockableInDays()Number of days to restock a Product Variant once it is out of stock.
- Returns:
- restockableInDays
-
getAvailableQuantity
Long getAvailableQuantity()Number of items of the Product Variant that are in stock.
- Returns:
- availableQuantity
-
getId
String getId()Unique identifier of the InventoryEntry.
- Returns:
- id
-
getVersion
Long getVersion()Current version of the InventoryEntry.
- Returns:
- version
-
setChannels
For each InventoryEntry with a supply Channel, an entry is added to
channels.- Parameters:
channels- value to be set
-
setIsOnStock
trueif the Product Variant is in stock, based on an InventoryEntry that has no assigned supply Channel. This value reflects global or default availability; it does not aggregate the channel-specific availabilities found in thechannelsfield.- Parameters:
isOnStock- value to be set
-
setRestockableInDays
Number of days to restock a Product Variant once it is out of stock.
- Parameters:
restockableInDays- value to be set
-
setAvailableQuantity
Number of items of the Product Variant that are in stock.
- Parameters:
availableQuantity- value to be set
-
setId
Unique identifier of the InventoryEntry.
- Parameters:
id- value to be set
-
setVersion
Current version of the InventoryEntry.
- Parameters:
version- value to be set
-
of
factory method- Returns:
- instance of ProductVariantAvailability
-
of
factory method to create a shallow copy ProductVariantAvailability- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductVariantAvailability copyDeep() -
deepCopy
factory method to create a deep copy of ProductVariantAvailability- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductVariantAvailability- Returns:
- builder
-
builder
create builder for ProductVariantAvailability instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductVariantAvailability
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-