Class InventoryEntryDraftBuilder
- All Implemented Interfaces:
Builder<InventoryEntryDraft>
Example to create an instance using the builder pattern
InventoryEntryDraft inventoryEntryDraft = InventoryEntryDraft.builder()
.sku("{sku}")
.quantityOnStock(0.3)
.build()
-
Constructor Summary
Constructors -
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 for the InventoryEntry.Custom Fields for the InventoryEntry.expectedDelivery(ZonedDateTime expectedDelivery) Date and time of the next restock.Custom 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.Overall amount of stock.Expiration time of ReserveOnCart reservations associated with this InventoryEntry.How often the InventoryEntry is restocked (in days).getSku()ProductVariantskuof the InventoryEntry.Configuration of stock levels for the InventoryEntry.Channel that supplies this InventoryEntry.User-defined unique identifier for the InventoryEntry.maxCartQuantity(Integer maxCartQuantity) Maximum quantity that can be added to a Cart.minCartQuantity(Integer minCartQuantity) Minimum quantity that can be added to a Cart.static InventoryEntryDraftBuilderof()factory method for an instance of InventoryEntryDraftBuilderstatic InventoryEntryDraftBuilderof(InventoryEntryDraft template) create builder for InventoryEntryDraft instancequantityOnStock(Long quantityOnStock) Overall amount of stock.reservationExpirationInMinutes(Integer reservationExpirationInMinutes) Expiration time of ReserveOnCart reservations associated with this InventoryEntry.restockableInDays(Long restockableInDays) How often the InventoryEntry is restocked (in days).ProductVariantskuof the InventoryEntry.stockLevels(InventoryEntryStockLevels stockLevels) Configuration of stock levels for the InventoryEntry.Configuration of stock levels for the InventoryEntry.supplyChannel(ChannelResourceIdentifier supplyChannel) Channel that supplies this InventoryEntry.Channel that supplies this InventoryEntry.Custom Fields for the InventoryEntry.Configuration of stock levels for the InventoryEntry.Channel that supplies this InventoryEntry.
-
Constructor Details
-
InventoryEntryDraftBuilder
public InventoryEntryDraftBuilder()
-
-
Method Details
-
sku
ProductVariant
skuof the InventoryEntry.- Parameters:
sku- value to be set- Returns:
- Builder
-
key
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- 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. See Inventory checks and consistency for consistency information.
- Parameters:
quantityOnStock- value to be set- Returns:
- Builder
-
minCartQuantity
Minimum quantity that can be added to a Cart. See Quantity limits.
- Parameters:
minCartQuantity- value to be set- Returns:
- Builder
-
maxCartQuantity
Maximum quantity that can be added to a Cart. See Quantity limits.
- Parameters:
maxCartQuantity- 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
-
reservationExpirationInMinutes
public InventoryEntryDraftBuilder reservationExpirationInMinutes(@Nullable Integer reservationExpirationInMinutes) 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- Returns:
- Builder
-
stockLevels
public InventoryEntryDraftBuilder stockLevels(Function<InventoryEntryStockLevelsBuilder, InventoryEntryStockLevelsBuilder> builder) Configuration of stock levels for the InventoryEntry. Corresponding Messages are triggered when the
quantityOnStockreaches the configured levels.- Parameters:
builder- function to build the stockLevels value- Returns:
- Builder
-
withStockLevels
public InventoryEntryDraftBuilder withStockLevels(Function<InventoryEntryStockLevelsBuilder, InventoryEntryStockLevels> builder) Configuration of stock levels for the InventoryEntry. Corresponding Messages are triggered when the
quantityOnStockreaches the configured levels.- Parameters:
builder- function to build the stockLevels value- Returns:
- Builder
-
stockLevels
Configuration of stock levels for the InventoryEntry. Corresponding Messages are triggered when the
quantityOnStockreaches the configured levels.- Parameters:
stockLevels- value to be set- Returns:
- Builder
-
custom
public InventoryEntryDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the InventoryEntry.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
withCustom
public InventoryEntryDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the InventoryEntry.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the InventoryEntry.
- Parameters:
custom- value to be set- Returns:
- Builder
-
getSku
ProductVariant
skuof the InventoryEntry.- Returns:
- sku
-
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.
- Returns:
- key
-
getSupplyChannel
Channel that supplies this InventoryEntry.
- Returns:
- supplyChannel
-
getQuantityOnStock
Overall amount of stock. See Inventory checks and consistency for consistency information.
- Returns:
- quantityOnStock
-
getMinCartQuantity
Minimum quantity that can be added to a Cart. See Quantity limits.
- Returns:
- minCartQuantity
-
getMaxCartQuantity
Maximum quantity that can be added to a Cart. See Quantity limits.
- Returns:
- maxCartQuantity
-
getRestockableInDays
How often the InventoryEntry is restocked (in days).
- Returns:
- restockableInDays
-
getExpectedDelivery
Date and time of the next restock.
- Returns:
- expectedDelivery
-
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.
- Returns:
- custom
-
build
builds InventoryEntryDraft with checking for non-null required values- Specified by:
buildin 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
-