Class InventoryImportBuilder
java.lang.Object
com.commercetools.importapi.models.inventories.InventoryImportBuilder
- All Implemented Interfaces:
Builder<InventoryImport>
InventoryImportBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
InventoryImport inventoryImport = InventoryImport.builder()
.key("{key}")
.sku("{sku}")
.quantityOnStock(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds InventoryImport with checking for non-null required valuesbuilds InventoryImport without checking for non-null required valuesMaps toInventory.custom
.custom
(Function<CustomBuilder, CustomBuilder> builder) Maps toInventory.custom
.expectedDelivery
(ZonedDateTime expectedDelivery) Maps toInventory.expectedDelivery
Maps toInventory.custom
.Maps toInventory.expectedDelivery
getKey()
User-defined unique identifier.Maps toInventory.quantityOnStock
Maps toInventory.restockableInDays
getSku()
Maps toInventory.sku
Maps toInventory.supplyChannel
User-defined unique identifier.static InventoryImportBuilder
of()
factory method for an instance of InventoryImportBuilderstatic InventoryImportBuilder
of
(InventoryImport template) create builder for InventoryImport instancequantityOnStock
(Long quantityOnStock) Maps toInventory.quantityOnStock
restockableInDays
(Long restockableInDays) Maps toInventory.restockableInDays
Maps toInventory.sku
supplyChannel
(ChannelKeyReference supplyChannel) Maps toInventory.supplyChannel
Maps toInventory.supplyChannel
withCustom
(Function<CustomBuilder, Custom> builder) Maps toInventory.custom
.Maps toInventory.supplyChannel
-
Constructor Details
-
InventoryImportBuilder
public InventoryImportBuilder()
-
-
Method Details
-
key
User-defined unique identifier. If an InventoryEntry with this
key
exists, it will be updated with the imported data.- Parameters:
key
- value to be set- Returns:
- Builder
-
sku
Maps to
Inventory.sku
- Parameters:
sku
- value to be set- Returns:
- Builder
-
quantityOnStock
Maps to
Inventory.quantityOnStock
- Parameters:
quantityOnStock
- value to be set- Returns:
- Builder
-
restockableInDays
Maps to
Inventory.restockableInDays
- Parameters:
restockableInDays
- value to be set- Returns:
- Builder
-
expectedDelivery
Maps to
Inventory.expectedDelivery
- Parameters:
expectedDelivery
- value to be set- Returns:
- Builder
-
supplyChannel
public InventoryImportBuilder supplyChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReferenceBuilder> builder) Maps to
Inventory.supplyChannel
- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
withSupplyChannel
public InventoryImportBuilder withSupplyChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReference> builder) Maps to
Inventory.supplyChannel
- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
supplyChannel
Maps to
Inventory.supplyChannel
- Parameters:
supplyChannel
- value to be set- Returns:
- Builder
-
custom
Maps to
Inventory.custom
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Maps to
Inventory.custom
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Maps to
Inventory.custom
.- Parameters:
custom
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier. If an InventoryEntry with this
key
exists, it will be updated with the imported data.- Returns:
- key
-
getSku
Maps to
Inventory.sku
- Returns:
- sku
-
getQuantityOnStock
Maps to
Inventory.quantityOnStock
- Returns:
- quantityOnStock
-
getRestockableInDays
Maps to
Inventory.restockableInDays
- Returns:
- restockableInDays
-
getExpectedDelivery
Maps to
Inventory.expectedDelivery
- Returns:
- expectedDelivery
-
getSupplyChannel
Maps to
Inventory.supplyChannel
- Returns:
- supplyChannel
-
getCustom
Maps to
Inventory.custom
.- Returns:
- custom
-
build
builds InventoryImport with checking for non-null required values- Specified by:
build
in interfaceBuilder<InventoryImport>
- Returns:
- InventoryImport
-
buildUnchecked
builds InventoryImport without checking for non-null required values- Returns:
- InventoryImport
-
of
factory method for an instance of InventoryImportBuilder- Returns:
- builder
-
of
create builder for InventoryImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-