Class InventoryEntryDraftBuilder
java.lang.Object
com.commercetools.api.models.inventory.InventoryEntryDraftBuilder
- All Implemented Interfaces:
Builder<InventoryEntryDraft>
InventoryEntryDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
InventoryEntryDraft inventoryEntryDraft = InventoryEntryDraft.builder()
.sku("{sku}")
.quantityOnStock(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds InventoryEntryDraft with checking for non-null required valuesbuilds InventoryEntryDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields of the InventoryEntry.Custom Fields of the InventoryEntry.expectedDelivery
(ZonedDateTime expectedDelivery) Date and time of the next restock.Custom Fields of the InventoryEntry.Date and time of the next restock.getKey()
User-defined unique identifier for the InventoryEntry.Overall amount of stock.How often the InventoryEntry is restocked (in days).getSku()
ProductVariantsku
of the InventoryEntry.Channel that supplies this InventoryEntry.User-defined unique identifier for the InventoryEntry.static InventoryEntryDraftBuilder
of()
factory method for an instance of InventoryEntryDraftBuilderstatic InventoryEntryDraftBuilder
of
(InventoryEntryDraft template) create builder for InventoryEntryDraft instancequantityOnStock
(Long quantityOnStock) Overall amount of stock.restockableInDays
(Long restockableInDays) How often the InventoryEntry is restocked (in days).ProductVariantsku
of the InventoryEntry.supplyChannel
(ChannelResourceIdentifier supplyChannel) Channel that supplies this InventoryEntry.Channel that supplies this InventoryEntry.Custom Fields of the InventoryEntry.Channel that supplies this InventoryEntry.
-
Constructor Details
-
InventoryEntryDraftBuilder
public InventoryEntryDraftBuilder()
-
-
Method Details
-
sku
ProductVariant
sku
of the InventoryEntry.- Parameters:
sku
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier for the InventoryEntry.
- Parameters:
key
- value to be set- Returns:
- Builder
-
supplyChannel
public InventoryEntryDraftBuilder supplyChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) Channel that supplies this InventoryEntry.
- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
withSupplyChannel
public InventoryEntryDraftBuilder withSupplyChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) Channel that supplies this InventoryEntry.
- Parameters:
builder
- function to build the supplyChannel value- Returns:
- Builder
-
supplyChannel
Channel that supplies this InventoryEntry.
- Parameters:
supplyChannel
- value to be set- Returns:
- Builder
-
quantityOnStock
Overall amount of stock.
- Parameters:
quantityOnStock
- value to be set- Returns:
- Builder
-
restockableInDays
How often the InventoryEntry is restocked (in days).
- Parameters:
restockableInDays
- value to be set- Returns:
- Builder
-
expectedDelivery
Date and time of the next restock.
- Parameters:
expectedDelivery
- value to be set- Returns:
- Builder
-
custom
public InventoryEntryDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields of the InventoryEntry.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public InventoryEntryDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields of the InventoryEntry.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of the InventoryEntry.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getSku
ProductVariant
sku
of the InventoryEntry.- Returns:
- sku
-
getKey
User-defined unique identifier for the InventoryEntry.
- Returns:
- key
-
getSupplyChannel
Channel that supplies this InventoryEntry.
- Returns:
- supplyChannel
-
getQuantityOnStock
Overall amount of stock.
- Returns:
- quantityOnStock
-
getRestockableInDays
How often the InventoryEntry is restocked (in days).
- Returns:
- restockableInDays
-
getExpectedDelivery
Date and time of the next restock.
- Returns:
- expectedDelivery
-
getCustom
Custom Fields of the InventoryEntry.
- Returns:
- custom
-
build
builds InventoryEntryDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<InventoryEntryDraft>
- Returns:
- InventoryEntryDraft
-
buildUnchecked
builds InventoryEntryDraft without checking for non-null required values- Returns:
- InventoryEntryDraft
-
of
factory method for an instance of InventoryEntryDraftBuilder- Returns:
- builder
-
of
create builder for InventoryEntryDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-