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 InventoryEntryDraftBuilder
builder()
builder factory method for InventoryEntryDraftstatic InventoryEntryDraftBuilder
builder
(InventoryEntryDraft template) create builder for InventoryEntryDraft instancestatic InventoryEntryDraft
deepCopy
(InventoryEntryDraft template) factory method to create a deep copy of InventoryEntryDraft@Valid CustomFieldsDraft
Custom Fields of the InventoryEntry.Date and time of the next restock.getKey()
User-defined unique identifier for the InventoryEntry.@NotNull Long
Overall amount of stock.How often the InventoryEntry is restocked (in days).@NotNull String
getSku()
ProductVariantsku
of the InventoryEntry.@Valid ChannelResourceIdentifier
Channel that supplies this InventoryEntry.static InventoryEntryDraft
of()
factory methodstatic InventoryEntryDraft
of
(InventoryEntryDraft template) factory method to create a shallow copy InventoryEntryDraftvoid
setCustom
(CustomFieldsDraft custom) Custom Fields of the InventoryEntry.void
setExpectedDelivery
(ZonedDateTime expectedDelivery) Date and time of the next restock.void
User-defined unique identifier for the InventoryEntry.void
setQuantityOnStock
(Long quantityOnStock) Overall amount of stock.void
setRestockableInDays
(Long restockableInDays) How often the InventoryEntry is restocked (in days).void
ProductVariantsku
of the InventoryEntry.void
setSupplyChannel
(ChannelResourceIdentifier supplyChannel) Channel that supplies this InventoryEntry.static com.fasterxml.jackson.core.type.TypeReference<InventoryEntryDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withInventoryEntryDraft
(Function<InventoryEntryDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getSku
ProductVariant
sku
of 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
-
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:
getCustom
in interfaceCustomizableDraft<InventoryEntryDraft>
- Returns:
- custom
-
setSku
ProductVariant
sku
of 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
-
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:
setCustom
in 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
-
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
-