Class InventoryImportBuilder
- All Implemented Interfaces:
Builder<InventoryImport>
Example to create an instance using the builder pattern
InventoryImport inventoryImport = InventoryImport.builder()
.key("{key}")
.sku("{sku}")
.quantityOnStock(0.3)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds InventoryImport with checking for non-null required valuesbuilds InventoryImport without checking for non-null required valuesMaps toInventoryEntry.custom.custom(Function<CustomBuilder, CustomBuilder> builder) Maps toInventoryEntry.custom.expectedDelivery(ZonedDateTime expectedDelivery) Maps toInventoryEntry.expectedDeliveryMaps toInventoryEntry.custom.Maps toInventoryEntry.expectedDeliverygetKey()User-defined unique identifier.Maps toInventoryEntry.quantityOnStockMaps toInventoryEntry.restockableInDaysgetSku()Maps toInventoryEntry.skuMaps toInventoryEntry.supplyChannel.User-defined unique identifier.static InventoryImportBuilderof()factory method for an instance of InventoryImportBuilderstatic InventoryImportBuilderof(InventoryImport template) create builder for InventoryImport instancequantityOnStock(Long quantityOnStock) Maps toInventoryEntry.quantityOnStockrestockableInDays(Long restockableInDays) Maps toInventoryEntry.restockableInDaysMaps toInventoryEntry.skusupplyChannel(ChannelKeyReference supplyChannel) Maps toInventoryEntry.supplyChannel.Maps toInventoryEntry.supplyChannel.withCustom(Function<CustomBuilder, Custom> builder) Maps toInventoryEntry.custom.Maps toInventoryEntry.supplyChannel.
-
Constructor Details
-
InventoryImportBuilder
public InventoryImportBuilder()
-
-
Method Details
-
key
User-defined unique identifier. If an InventoryEntry with this
keyexists, it is updated with the imported data.- Parameters:
key- value to be set- Returns:
- Builder
-
sku
Maps to
InventoryEntry.sku- Parameters:
sku- value to be set- Returns:
- Builder
-
quantityOnStock
Maps to
InventoryEntry.quantityOnStock- Parameters:
quantityOnStock- value to be set- Returns:
- Builder
-
restockableInDays
Maps to
InventoryEntry.restockableInDays- Parameters:
restockableInDays- value to be set- Returns:
- Builder
-
expectedDelivery
Maps to
InventoryEntry.expectedDelivery- Parameters:
expectedDelivery- value to be set- Returns:
- Builder
-
supplyChannel
public InventoryImportBuilder supplyChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReferenceBuilder> builder) Maps to
InventoryEntry.supplyChannel. If the referenced Channel does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Channel is created.- Parameters:
builder- function to build the supplyChannel value- Returns:
- Builder
-
withSupplyChannel
public InventoryImportBuilder withSupplyChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReference> builder) Maps to
InventoryEntry.supplyChannel. If the referenced Channel does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Channel is created.- Parameters:
builder- function to build the supplyChannel value- Returns:
- Builder
-
supplyChannel
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- Returns:
- Builder
-
custom
Maps to
InventoryEntry.custom.- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
withCustom
Maps to
InventoryEntry.custom.- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
custom
Maps to
InventoryEntry.custom.- Parameters:
custom- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier. If an InventoryEntry with this
keyexists, it is updated with the imported data.- Returns:
- key
-
getSku
Maps to
InventoryEntry.sku- Returns:
- sku
-
getQuantityOnStock
Maps to
InventoryEntry.quantityOnStock- Returns:
- quantityOnStock
-
getRestockableInDays
Maps to
InventoryEntry.restockableInDays- Returns:
- restockableInDays
-
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
-
build
builds InventoryImport with checking for non-null required values- Specified by:
buildin 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
-