Class ProductVariantChannelAvailabilityBuilder
java.lang.Object
com.commercetools.history.models.common.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()
.isOnStock(true)
.restockableInDays(1)
.availableQuantity(1)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionavailableQuantity
(Integer availableQuantity) set the value to the availableQuantitybuild()
builds ProductVariantChannelAvailability with checking for non-null required valuesbuilds ProductVariantChannelAvailability without checking for non-null required valuesvalue of availableQuantity}value of isOnStock}value of restockableInDays}set the value to the isOnStockof()
factory method for an instance of ProductVariantChannelAvailabilityBuilderof
(ProductVariantChannelAvailability template) create builder for ProductVariantChannelAvailability instancerestockableInDays
(Integer restockableInDays) set the value to the restockableInDays
-
Constructor Details
-
ProductVariantChannelAvailabilityBuilder
public ProductVariantChannelAvailabilityBuilder()
-
-
Method Details
-
isOnStock
set the value to the isOnStock- Parameters:
isOnStock
- value to be set- Returns:
- Builder
-
restockableInDays
set the value to the restockableInDays- Parameters:
restockableInDays
- value to be set- Returns:
- Builder
-
availableQuantity
set the value to the availableQuantity- Parameters:
availableQuantity
- value to be set- Returns:
- Builder
-
getIsOnStock
value of isOnStock}- Returns:
- isOnStock
-
getRestockableInDays
value of restockableInDays}- Returns:
- restockableInDays
-
getAvailableQuantity
value of availableQuantity}- Returns:
- availableQuantity
-
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
-