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
-
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.Overall amount of stock (availableQuantity
+ reserved).How often the InventoryEntry is restocked (in days).getSku()
ProductVariantsku
of 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.static InventoryEntryBuilder
of()
factory method for an instance of InventoryEntryBuilderstatic InventoryEntryBuilder
of
(InventoryEntry template) create builder for InventoryEntry instancequantityOnStock
(Long quantityOnStock) Overall amount of stock (availableQuantity
+ reserved).restockableInDays
(Long restockableInDays) How often the InventoryEntry is restocked (in days).ProductVariantsku
of 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.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
sku
of 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).- Parameters:
quantityOnStock
- value to be set- Returns:
- Builder
-
availableQuantity
Available amount of stock (
quantityOnStock
- reserved).- Parameters:
availableQuantity
- 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
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
sku
of the InventoryEntry.- Returns:
- sku
-
getSupplyChannel
Channel that supplies this InventoryEntry.
- Returns:
- supplyChannel
-
getQuantityOnStock
Overall amount of stock (
availableQuantity
+ reserved).- Returns:
- quantityOnStock
-
getAvailableQuantity
Available amount of stock (
quantityOnStock
- reserved).- Returns:
- availableQuantity
-
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 InventoryEntry with checking for non-null required values- Specified by:
build
in 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
-