Class AbsoluteAllocationBuilder
java.lang.Object
com.commercetools.api.models.cart.AbsoluteAllocationBuilder
- All Implemented Interfaces:
Builder<AbsoluteAllocation>
AbsoluteAllocationBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AbsoluteAllocation absoluteAllocation = AbsoluteAllocation.builder()
.amount(amountBuilder -> amountBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionamount(HighPrecisionMoney amount) Amount of the Order total allocated to the Payment Method.Amount of the Order total allocated to the Payment Method.build()builds AbsoluteAllocation with checking for non-null required valuesbuilds AbsoluteAllocation without checking for non-null required valuesAmount of the Order total allocated to the Payment Method.static AbsoluteAllocationBuilderof()factory method for an instance of AbsoluteAllocationBuilderstatic AbsoluteAllocationBuilderof(AbsoluteAllocation template) create builder for AbsoluteAllocation instanceAmount of the Order total allocated to the Payment Method.
-
Constructor Details
-
AbsoluteAllocationBuilder
public AbsoluteAllocationBuilder()
-
-
Method Details
-
amount
public AbsoluteAllocationBuilder amount(Function<HighPrecisionMoneyBuilder, HighPrecisionMoneyBuilder> builder) Amount of the Order total allocated to the Payment Method.
- Parameters:
builder- function to build the amount value- Returns:
- Builder
-
withAmount
public AbsoluteAllocationBuilder withAmount(Function<HighPrecisionMoneyBuilder, HighPrecisionMoney> builder) Amount of the Order total allocated to the Payment Method.
- Parameters:
builder- function to build the amount value- Returns:
- Builder
-
amount
Amount of the Order total allocated to the Payment Method.
- Parameters:
amount- value to be set- Returns:
- Builder
-
getAmount
Amount of the Order total allocated to the Payment Method.
- Returns:
- amount
-
build
builds AbsoluteAllocation with checking for non-null required values- Specified by:
buildin interfaceBuilder<AbsoluteAllocation>- Returns:
- AbsoluteAllocation
-
buildUnchecked
builds AbsoluteAllocation without checking for non-null required values- Returns:
- AbsoluteAllocation
-
of
factory method for an instance of AbsoluteAllocationBuilder- Returns:
- builder
-
of
create builder for AbsoluteAllocation instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-