Interface InventoryEntryDraft
- All Superinterfaces:
CustomizableDraft<InventoryEntryDraft>,Draft<InventoryEntryDraft>,WithKey
Example to create an instance using the builder pattern
InventoryEntryDraft inventoryEntryDraft = InventoryEntryDraft.builder()
.sku("{sku}")
.quantityOnStock(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic InventoryEntryDraftBuilderbuilder()builder factory method for InventoryEntryDraftstatic InventoryEntryDraftBuilderbuilder(InventoryEntryDraft template) create builder for InventoryEntryDraft instancecopyDeep()static InventoryEntryDraftdeepCopy(InventoryEntryDraft template) factory method to create a deep copy of InventoryEntryDraft@Valid CustomFieldsDraftCustom Fields of the InventoryEntry.Date and time of the next restock.getKey()User-defined unique identifier for the InventoryEntry.Maximum quantity that can be added to a Cart.Minimum quantity that can be added to a Cart.@NotNull LongOverall amount of stock.How often the InventoryEntry is restocked (in days).@NotNull StringgetSku()ProductVariantskuof the InventoryEntry.@Valid ChannelResourceIdentifierChannel that supplies this InventoryEntry.static InventoryEntryDraftof()factory methodstatic InventoryEntryDraftof(InventoryEntryDraft template) factory method to create a shallow copy InventoryEntryDraftvoidsetCustom(CustomFieldsDraft custom) Custom Fields of the InventoryEntry.voidsetExpectedDelivery(ZonedDateTime expectedDelivery) Date and time of the next restock.voidUser-defined unique identifier for the InventoryEntry.voidsetMaxCartQuantity(Integer maxCartQuantity) Maximum quantity that can be added to a Cart.voidsetMinCartQuantity(Integer minCartQuantity) Minimum quantity that can be added to a Cart.voidsetQuantityOnStock(Long quantityOnStock) Overall amount of stock.voidsetRestockableInDays(Long restockableInDays) How often the InventoryEntry is restocked (in days).voidProductVariantskuof the InventoryEntry.voidsetSupplyChannel(ChannelResourceIdentifier supplyChannel) Channel that supplies this InventoryEntry.static com.fasterxml.jackson.core.type.TypeReference<InventoryEntryDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithInventoryEntryDraft(Function<InventoryEntryDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getSku
ProductVariant
skuof the InventoryEntry.- Returns:
- sku
-
getKey
String getKey()User-defined unique identifier for the InventoryEntry.
This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing InventoryEntries with the Import API and the Merchant Center.
-
getSupplyChannel
Channel that supplies this InventoryEntry.
- Returns:
- supplyChannel
-
getQuantityOnStock
Overall amount of stock.
- Returns:
- quantityOnStock
-
getMinCartQuantity
Integer getMinCartQuantity()Minimum quantity that can be added to a Cart. See Quantity limits.
- Returns:
- minCartQuantity
-
getMaxCartQuantity
Integer getMaxCartQuantity()Maximum quantity that can be added to a Cart. See Quantity limits.
- Returns:
- maxCartQuantity
-
getRestockableInDays
Long getRestockableInDays()How often the InventoryEntry is restocked (in days).
- Returns:
- restockableInDays
-
getExpectedDelivery
ZonedDateTime getExpectedDelivery()Date and time of the next restock.
- Returns:
- expectedDelivery
-
getCustom
Custom Fields of the InventoryEntry.
- Specified by:
getCustomin interfaceCustomizableDraft<InventoryEntryDraft>- Returns:
- custom
-
setSku
ProductVariant
skuof the InventoryEntry.- Parameters:
sku- value to be set
-
setKey
User-defined unique identifier for the InventoryEntry.
This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing InventoryEntries with the Import API and the Merchant Center.
- Parameters:
key- value to be set
-
setSupplyChannel
Channel that supplies this InventoryEntry.
- Parameters:
supplyChannel- value to be set
-
setQuantityOnStock
Overall amount of stock.
- Parameters:
quantityOnStock- value to be set
-
setMinCartQuantity
Minimum quantity that can be added to a Cart. See Quantity limits.
- Parameters:
minCartQuantity- value to be set
-
setMaxCartQuantity
Maximum quantity that can be added to a Cart. See Quantity limits.
- Parameters:
maxCartQuantity- value to be set
-
setRestockableInDays
How often the InventoryEntry is restocked (in days).
- Parameters:
restockableInDays- value to be set
-
setExpectedDelivery
Date and time of the next restock.
- Parameters:
expectedDelivery- value to be set
-
setCustom
Custom Fields of the InventoryEntry.
- Specified by:
setCustomin interfaceCustomizableDraft<InventoryEntryDraft>- Parameters:
custom- value to be set
-
of
factory method- Returns:
- instance of InventoryEntryDraft
-
of
factory method to create a shallow copy InventoryEntryDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
InventoryEntryDraft copyDeep() -
deepCopy
factory method to create a deep copy of InventoryEntryDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InventoryEntryDraft- Returns:
- builder
-
builder
create builder for InventoryEntryDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withInventoryEntryDraft
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
-