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 for 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.Expiration time of ReserveOnCart reservations associated with this InventoryEntry.How often the InventoryEntry is restocked (in days).@NotNull StringgetSku()ProductVariantskuof the InventoryEntry.@Valid InventoryEntryStockLevelsConfiguration of stock levels for 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 for 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.voidsetReservationExpirationInMinutes(Integer reservationExpirationInMinutes) Expiration time of ReserveOnCart reservations associated with this InventoryEntry.voidsetRestockableInDays(Long restockableInDays) How often the InventoryEntry is restocked (in days).voidProductVariantskuof the InventoryEntry.voidsetStockLevels(InventoryEntryStockLevels stockLevels) Configuration of stock levels for 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. See Inventory checks and consistency for consistency information.
- 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
-
getReservationExpirationInMinutes
Integer getReservationExpirationInMinutes()Expiration time of ReserveOnCart reservations associated with this InventoryEntry.
- A Reservation is ReserveOnCart if it was created for a LineItem that is using the ReserveOnCart inventory mode.
- If this field is empty, the Project-level reservation expiration time applies.
- Returns:
- reservationExpirationInMinutes
-
getStockLevels
Configuration of stock levels for the InventoryEntry. Corresponding Messages are triggered when the
quantityOnStockreaches the configured levels.- Returns:
- stockLevels
-
getCustom
Custom Fields for 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. See Inventory checks and consistency for consistency information.
- 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
-
setReservationExpirationInMinutes
Expiration time of ReserveOnCart reservations associated with this InventoryEntry.
- A Reservation is ReserveOnCart if it was created for a LineItem that is using the ReserveOnCart inventory mode.
- If this field is empty, the Project-level reservation expiration time applies.
- Parameters:
reservationExpirationInMinutes- value to be set
-
setStockLevels
Configuration of stock levels for the InventoryEntry. Corresponding Messages are triggered when the
quantityOnStockreaches the configured levels.- Parameters:
stockLevels- value to be set
-
setCustom
Custom Fields for 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
-