Class ProductVariantChannelAvailabilityBuilder
java.lang.Object
com.commercetools.api.models.product.ProductVariantChannelAvailabilityBuilder
- All Implemented Interfaces:
Builder<ProductVariantChannelAvailability>
public class ProductVariantChannelAvailabilityBuilder
extends Object
implements Builder<ProductVariantChannelAvailability>
ProductVariantChannelAvailabilityBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductVariantChannelAvailability productVariantChannelAvailability = ProductVariantChannelAvailability.builder()
.id("{id}")
.version(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionavailableQuantity
(Long availableQuantity) Number of items of this Product Variant that are in stock in a specified Channel.build()
builds ProductVariantChannelAvailability with checking for non-null required valuesbuilds ProductVariantChannelAvailability without checking for non-null required valuesNumber of items of this Product Variant that are in stock in a specified Channel.getId()
Unique identifier of the InventoryEntry.Indicates whether a Product Variant is in stock in a specified Channel.Number of days to restock a Product Variant once it is out of stock in a specified Channel.Current version of the InventoryEntry.Unique identifier of the InventoryEntry.Indicates whether a Product Variant is in stock in a specified Channel.of()
factory method for an instance of ProductVariantChannelAvailabilityBuilderof
(ProductVariantChannelAvailability template) create builder for ProductVariantChannelAvailability instancerestockableInDays
(Long restockableInDays) Number of days to restock a Product Variant once it is out of stock in a specified Channel.Current version of the InventoryEntry.
-
Constructor Details
-
ProductVariantChannelAvailabilityBuilder
public ProductVariantChannelAvailabilityBuilder()
-
-
Method Details
-
isOnStock
Indicates whether a Product Variant is in stock in a specified Channel.
- Parameters:
isOnStock
- value to be set- Returns:
- Builder
-
restockableInDays
Number of days to restock a Product Variant once it is out of stock in a specified Channel.
- Parameters:
restockableInDays
- value to be set- Returns:
- Builder
-
availableQuantity
Number of items of this Product Variant that are in stock in a specified Channel.
- 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
-
getIsOnStock
Indicates whether a Product Variant is in stock in a specified Channel.
- Returns:
- isOnStock
-
getRestockableInDays
Number of days to restock a Product Variant once it is out of stock in a specified Channel.
- Returns:
- restockableInDays
-
getAvailableQuantity
Number of items of this Product Variant that are in stock in a specified Channel.
- Returns:
- availableQuantity
-
getId
Unique identifier of the InventoryEntry.
- Returns:
- id
-
getVersion
Current version of the InventoryEntry.
- Returns:
- version
-
build
builds ProductVariantChannelAvailability with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductVariantChannelAvailability>
- Returns:
- ProductVariantChannelAvailability
-
buildUnchecked
builds ProductVariantChannelAvailability without checking for non-null required values- Returns:
- ProductVariantChannelAvailability
-
of
factory method for an instance of ProductVariantChannelAvailabilityBuilder- Returns:
- builder
-
of
public static ProductVariantChannelAvailabilityBuilder of(ProductVariantChannelAvailability template) create builder for ProductVariantChannelAvailability instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-