Class InventoryQuantityValueBuilder
java.lang.Object
com.commercetools.history.models.change_value.InventoryQuantityValueBuilder
- All Implemented Interfaces:
Builder<InventoryQuantityValue>
public class InventoryQuantityValueBuilder
extends Object
implements Builder<InventoryQuantityValue>
InventoryQuantityValueBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
InventoryQuantityValue inventoryQuantityValue = InventoryQuantityValue.builder()
.quantityOnStock(1)
.availableQuantity(1)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionavailableQuantity
(Integer availableQuantity) Available amount of stock (quantityOnStock
- reserved).build()
builds InventoryQuantityValue with checking for non-null required valuesbuilds InventoryQuantityValue without checking for non-null required valuesAvailable amount of stock (quantityOnStock
- reserved).Overall amount of stock (availableQuantity
+ reserved).of()
factory method for an instance of InventoryQuantityValueBuilderof
(InventoryQuantityValue template) create builder for InventoryQuantityValue instancequantityOnStock
(Integer quantityOnStock) Overall amount of stock (availableQuantity
+ reserved).
-
Constructor Details
-
InventoryQuantityValueBuilder
public InventoryQuantityValueBuilder()
-
-
Method Details
-
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
-
getQuantityOnStock
Overall amount of stock (
availableQuantity
+ reserved).- Returns:
- quantityOnStock
-
getAvailableQuantity
Available amount of stock (
quantityOnStock
- reserved).- Returns:
- availableQuantity
-
build
builds InventoryQuantityValue with checking for non-null required values- Specified by:
build
in interfaceBuilder<InventoryQuantityValue>
- Returns:
- InventoryQuantityValue
-
buildUnchecked
builds InventoryQuantityValue without checking for non-null required values- Returns:
- InventoryQuantityValue
-
of
factory method for an instance of InventoryQuantityValueBuilder- Returns:
- builder
-
of
create builder for InventoryQuantityValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-