Interface InventoryImport
- All Superinterfaces:
ImportResource
Represents the data used to import an InventoryEntry. Once imported, this data is persisted as a InventoryEntry in the Project.
Example to create an instance using the builder pattern
InventoryImport inventoryImport = InventoryImport.builder()
.key("{key}")
.sku("{sku}")
.quantityOnStock(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic InventoryImportBuilderbuilder()builder factory method for InventoryImportstatic InventoryImportBuilderbuilder(InventoryImport template) create builder for InventoryImport instancecopyDeep()static InventoryImportdeepCopy(InventoryImport template) factory method to create a deep copy of InventoryImport@Valid CustomMaps toInventoryEntry.custom.Maps toInventoryEntry.expectedDelivery@NotNull StringgetKey()User-defined unique identifier.@NotNull LongMaps toInventoryEntry.quantityOnStockMaps toInventoryEntry.restockableInDays@NotNull StringgetSku()Maps toInventoryEntry.sku@Valid ChannelKeyReferenceMaps toInventoryEntry.supplyChannel.static InventoryImportof()factory methodstatic InventoryImportof(InventoryImport template) factory method to create a shallow copy InventoryImportvoidMaps toInventoryEntry.custom.voidsetExpectedDelivery(ZonedDateTime expectedDelivery) Maps toInventoryEntry.expectedDeliveryvoidUser-defined unique identifier.voidsetQuantityOnStock(Long quantityOnStock) Maps toInventoryEntry.quantityOnStockvoidsetRestockableInDays(Long restockableInDays) Maps toInventoryEntry.restockableInDaysvoidMaps toInventoryEntry.skuvoidsetSupplyChannel(ChannelKeyReference supplyChannel) Maps toInventoryEntry.supplyChannel.static com.fasterxml.jackson.core.type.TypeReference<InventoryImport>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithInventoryImport(Function<InventoryImport, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.common.ImportResource
withImportResource
-
Method Details
-
getKey
User-defined unique identifier. If an InventoryEntry with this
keyexists, it is updated with the imported data.- Specified by:
getKeyin interfaceImportResource- Returns:
- key
-
getSku
Maps to
InventoryEntry.sku- Returns:
- sku
-
getQuantityOnStock
Maps to
InventoryEntry.quantityOnStock- Returns:
- quantityOnStock
-
getRestockableInDays
Long getRestockableInDays()Maps to
InventoryEntry.restockableInDays- Returns:
- restockableInDays
-
getExpectedDelivery
ZonedDateTime getExpectedDelivery()Maps to
InventoryEntry.expectedDelivery- Returns:
- expectedDelivery
-
getSupplyChannel
Maps to
InventoryEntry.supplyChannel. If the referenced Channel does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Channel is created.- Returns:
- supplyChannel
-
getCustom
Maps to
InventoryEntry.custom.- Returns:
- custom
-
setKey
User-defined unique identifier. If an InventoryEntry with this
keyexists, it is updated with the imported data.- Specified by:
setKeyin interfaceImportResource- Parameters:
key- value to be set
-
setSku
Maps to
InventoryEntry.sku- Parameters:
sku- value to be set
-
setQuantityOnStock
Maps to
InventoryEntry.quantityOnStock- Parameters:
quantityOnStock- value to be set
-
setRestockableInDays
Maps to
InventoryEntry.restockableInDays- Parameters:
restockableInDays- value to be set
-
setExpectedDelivery
Maps to
InventoryEntry.expectedDelivery- Parameters:
expectedDelivery- value to be set
-
setSupplyChannel
Maps to
InventoryEntry.supplyChannel. If the referenced Channel does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Channel is created.- Parameters:
supplyChannel- value to be set
-
setCustom
Maps to
InventoryEntry.custom.- Parameters:
custom- value to be set
-
of
factory method- Returns:
- instance of InventoryImport
-
of
factory method to create a shallow copy InventoryImport- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
InventoryImport copyDeep()- Specified by:
copyDeepin interfaceImportResource
-
deepCopy
factory method to create a deep copy of InventoryImport- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InventoryImport- Returns:
- builder
-
builder
create builder for InventoryImport instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withInventoryImport
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
-