Class ProductVariantAvailabilityBuilder
- All Implemented Interfaces:
Builder<ProductVariantAvailability>
Example to create an instance using the builder pattern
ProductVariantAvailability productVariantAvailability = ProductVariantAvailability.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionavailableQuantity
(Long availableQuantity) Number of items of the Product Variant that are in stock.build()
builds ProductVariantAvailability with checking for non-null required valuesbuilds ProductVariantAvailability without checking for non-null required valueschannels
(ProductVariantChannelAvailabilityMap channels) For each InventoryEntry with a supply Channel, an entry is added tochannels
.channels
(Function<ProductVariantChannelAvailabilityMapBuilder, ProductVariantChannelAvailabilityMapBuilder> builder) For each InventoryEntry with a supply Channel, an entry is added tochannels
.Number of items of the Product Variant that are in stock.For each InventoryEntry with a supply Channel, an entry is added tochannels
.getId()
Unique identifier of the InventoryEntry.Indicates whether a Product Variant is in stock.Number of days to restock a Product Variant once it is out of stock.Current version of the InventoryEntry.Unique identifier of the InventoryEntry.Indicates whether a Product Variant is in stock.of()
factory method for an instance of ProductVariantAvailabilityBuilderof
(ProductVariantAvailability template) create builder for ProductVariantAvailability instancerestockableInDays
(Long restockableInDays) Number of days to restock a Product Variant once it is out of stock.Current version of the InventoryEntry.withChannels
(Function<ProductVariantChannelAvailabilityMapBuilder, ProductVariantChannelAvailabilityMap> builder) For each InventoryEntry with a supply Channel, an entry is added tochannels
.
-
Constructor Details
-
ProductVariantAvailabilityBuilder
public ProductVariantAvailabilityBuilder()
-
-
Method Details
-
channels
public ProductVariantAvailabilityBuilder channels(Function<ProductVariantChannelAvailabilityMapBuilder, ProductVariantChannelAvailabilityMapBuilder> builder) For each InventoryEntry with a supply Channel, an entry is added to
channels
.- Parameters:
builder
- function to build the channels value- Returns:
- Builder
-
withChannels
public ProductVariantAvailabilityBuilder withChannels(Function<ProductVariantChannelAvailabilityMapBuilder, ProductVariantChannelAvailabilityMap> builder) For each InventoryEntry with a supply Channel, an entry is added to
channels
.- Parameters:
builder
- function to build the channels value- Returns:
- Builder
-
channels
public ProductVariantAvailabilityBuilder channels(@Nullable ProductVariantChannelAvailabilityMap channels) For each InventoryEntry with a supply Channel, an entry is added to
channels
.- Parameters:
channels
- value to be set- Returns:
- Builder
-
isOnStock
Indicates whether a Product Variant is in stock.
- Parameters:
isOnStock
- value to be set- Returns:
- Builder
-
restockableInDays
Number of days to restock a Product Variant once it is out of stock.
- Parameters:
restockableInDays
- value to be set- Returns:
- Builder
-
availableQuantity
Number of items of the Product Variant that are in stock.
- Parameters:
availableQuantity
- value to be set- Returns:
- Builder
-
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
-
getChannels
For each InventoryEntry with a supply Channel, an entry is added to
channels
.- Returns:
- channels
-
getIsOnStock
Indicates whether a Product Variant is in stock.
- Returns:
- isOnStock
-
getRestockableInDays
Number of days to restock a Product Variant once it is out of stock.
- Returns:
- restockableInDays
-
getAvailableQuantity
Number of items of the Product Variant that are in stock.
- Returns:
- availableQuantity
-
getId
Unique identifier of the InventoryEntry.
- Returns:
- id
-
getVersion
Current version of the InventoryEntry.
- Returns:
- version
-
build
builds ProductVariantAvailability with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductVariantAvailability>
- Returns:
- ProductVariantAvailability
-
buildUnchecked
builds ProductVariantAvailability without checking for non-null required values- Returns:
- ProductVariantAvailability
-
of
factory method for an instance of ProductVariantAvailabilityBuilder- Returns:
- builder
-
of
create builder for ProductVariantAvailability instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-