Class InventoryEntryBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.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.Present on resources created after 1 February 2019 except for events not tracked.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) Present on resources created after 1 February 2019 except for events not tracked.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.Present on resources created after 1 February 2019 except for events not tracked.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.Present on resources created after 1 February 2019 except for events not tracked.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) Present on resources created after 1 February 2019 except for events not tracked.Present on resources created after 1 February 2019 except for events not tracked.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) Present on resources created after 1 February 2019 except for events not tracked.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields of the InventoryEntry.Present on resources created after 1 February 2019 except for events not tracked.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) Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public InventoryEntryBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
Present on resources created after 1 February 2019 except for events not tracked.
- 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
Present on resources created after 1 February 2019 except for events not tracked.
- Returns:
- lastModifiedBy
-
getCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- 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 interfaceio.vrap.rmf.base.client.Builder<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
-