Class InventoryEntryBuilder
- All Implemented Interfaces:
Builder<InventoryEntry>
Example to create an instance using the builder pattern
InventoryEntry inventoryEntry = InventoryEntry.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.sku("{sku}")
.quantityOnStock(0.3)
.availableQuantity(0.3)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailableQuantity(Long availableQuantity) Available amount of stock (quantityOnStock- reserved).build()builds InventoryEntry with checking for non-null required valuesbuilds InventoryEntry without checking for non-null required valuescreatedAt(ZonedDateTime createdAt) Date and time (UTC) the InventoryEntry was initially created.IDs and references that created the InventoryEntry.createdBy(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the InventoryEntry.custom(CustomFields custom) Custom Fields of the InventoryEntry.custom(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields of the InventoryEntry.expectedDelivery(ZonedDateTime expectedDelivery) Date and time of the next restock.Available amount of stock (quantityOnStock- reserved).Date and time (UTC) the InventoryEntry was initially created.IDs and references that created the InventoryEntry.Custom Fields of the InventoryEntry.Date and time of the next restock.getId()Unique identifier of the InventoryEntry.getKey()User-defined unique identifier of the InventoryEntry.Date and time (UTC) the InventoryEntry was last updated.IDs and references that last modified the InventoryEntry.Maximum quantity that can be added to a Cart.Minimum quantity that can be added to a Cart.Overall amount of stock (availableQuantity+ reserved).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.Current version of the InventoryEntry.Unique identifier of the InventoryEntry.User-defined unique identifier of the InventoryEntry.lastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the InventoryEntry was last updated.lastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the InventoryEntry.IDs and references that last modified 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 InventoryEntryBuilderof()factory method for an instance of InventoryEntryBuilderstatic InventoryEntryBuilderof(InventoryEntry template) create builder for InventoryEntry instancequantityOnStock(Long quantityOnStock) Overall amount of stock (availableQuantity+ reserved).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(ChannelReference supplyChannel) Channel that supplies this InventoryEntry.Channel that supplies this InventoryEntry.Current version of the InventoryEntry.withCreatedBy(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the InventoryEntry.withCustom(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields of the InventoryEntry.IDs and references that last modified the InventoryEntry.Configuration of stock levels for the InventoryEntry.Channel that supplies this InventoryEntry.
-
Constructor Details
-
InventoryEntryBuilder
public InventoryEntryBuilder()
-
-
Method Details
-
id
Unique identifier of the InventoryEntry.
- Parameters:
id- value to be set- Returns:
- Builder
-
version
Current version of the InventoryEntry.
- Parameters:
version- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the InventoryEntry was initially created.
- Parameters:
createdAt- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the InventoryEntry was last updated.
- Parameters:
lastModifiedAt- value to be set- Returns:
- Builder
-
lastModifiedBy
public InventoryEntryBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) IDs and references that last modified the InventoryEntry.
- Parameters:
builder- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public InventoryEntryBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) IDs and references that last modified the InventoryEntry.
- Parameters:
builder- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the InventoryEntry.
- Parameters:
lastModifiedBy- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the InventoryEntry.
- Parameters:
builder- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the InventoryEntry.
- Parameters:
builder- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the InventoryEntry.
- Parameters:
createdBy- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the InventoryEntry.
- Parameters:
key- value to be set- Returns:
- Builder
-
sku
ProductVariant
skuof the InventoryEntry.- Parameters:
sku- value to be set- Returns:
- Builder
-
supplyChannel
public InventoryEntryBuilder supplyChannel(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Channel that supplies this InventoryEntry.
- Parameters:
builder- function to build the supplyChannel value- Returns:
- Builder
-
withSupplyChannel
public InventoryEntryBuilder withSupplyChannel(Function<ChannelReferenceBuilder, ChannelReference> 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 (
availableQuantity+ reserved). This value is eventually consistent with the internal SKU availability used for reservation logic, with a delay of up to 10 seconds. See Inventory checks and consistency for more information.- Parameters:
quantityOnStock- value to be set- Returns:
- Builder
-
availableQuantity
Available amount of stock (
quantityOnStock- reserved). This value is eventually consistent with the internal SKU availability used for reservation logic, with a delay of up to 10 seconds. See Inventory checks and consistency for more information.- Parameters:
availableQuantity- 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 InventoryEntryBuilder 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 InventoryEntryBuilder 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 InventoryEntryBuilder 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
Custom Fields of the InventoryEntry.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
withCustom
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
-
getId
Unique identifier of the InventoryEntry.
- Returns:
- id
-
getVersion
Current version of the InventoryEntry.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the InventoryEntry was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the InventoryEntry was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the InventoryEntry.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the InventoryEntry.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the InventoryEntry.
- Returns:
- key
-
getSku
ProductVariant
skuof the InventoryEntry.- Returns:
- sku
-
getSupplyChannel
Channel that supplies this InventoryEntry.
- Returns:
- supplyChannel
-
getQuantityOnStock
Overall amount of stock (
availableQuantity+ reserved). This value is eventually consistent with the internal SKU availability used for reservation logic, with a delay of up to 10 seconds. See Inventory checks and consistency for more information.- Returns:
- quantityOnStock
-
getAvailableQuantity
Available amount of stock (
quantityOnStock- reserved). This value is eventually consistent with the internal SKU availability used for reservation logic, with a delay of up to 10 seconds. See Inventory checks and consistency for more information.- Returns:
- availableQuantity
-
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 of the InventoryEntry.
- Returns:
- custom
-
build
builds InventoryEntry with checking for non-null required values- Specified by:
buildin interfaceBuilder<InventoryEntry>- Returns:
- InventoryEntry
-
buildUnchecked
builds InventoryEntry without checking for non-null required values- Returns:
- InventoryEntry
-
of
factory method for an instance of InventoryEntryBuilder- Returns:
- builder
-
of
create builder for InventoryEntry instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-