Interface InventoryQuantityValue
public interface InventoryQuantityValue
InventoryQuantityValue
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()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for InventoryQuantityValuebuilder
(InventoryQuantityValue template) create builder for InventoryQuantityValue instancestatic InventoryQuantityValue
deepCopy
(InventoryQuantityValue template) factory method to create a deep copy of InventoryQuantityValue@NotNull Integer
Available amount of stock (quantityOnStock
- reserved).@NotNull Integer
Overall amount of stock (availableQuantity
+ reserved).static InventoryQuantityValue
of()
factory methodstatic InventoryQuantityValue
of
(InventoryQuantityValue template) factory method to create a shallow copy InventoryQuantityValuevoid
setAvailableQuantity
(Integer availableQuantity) Available amount of stock (quantityOnStock
- reserved).void
setQuantityOnStock
(Integer quantityOnStock) Overall amount of stock (availableQuantity
+ reserved).static com.fasterxml.jackson.core.type.TypeReference<InventoryQuantityValue>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map function
-
Method Details
-
getQuantityOnStock
Overall amount of stock (
availableQuantity
+ reserved).- Returns:
- quantityOnStock
-
getAvailableQuantity
Available amount of stock (
quantityOnStock
- reserved).- Returns:
- availableQuantity
-
setQuantityOnStock
Overall amount of stock (
availableQuantity
+ reserved).- Parameters:
quantityOnStock
- value to be set
-
setAvailableQuantity
Available amount of stock (
quantityOnStock
- reserved).- Parameters:
availableQuantity
- value to be set
-
of
factory method- Returns:
- instance of InventoryQuantityValue
-
of
factory method to create a shallow copy InventoryQuantityValue- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of InventoryQuantityValue- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InventoryQuantityValue- Returns:
- builder
-
builder
create builder for InventoryQuantityValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withInventoryQuantityValue
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-