Class AbsoluteAllocationDraftBuilder
java.lang.Object
com.commercetools.api.models.cart.AbsoluteAllocationDraftBuilder
- All Implemented Interfaces:
Builder<AbsoluteAllocationDraft>
public class AbsoluteAllocationDraftBuilder
extends Object
implements Builder<AbsoluteAllocationDraft>
AbsoluteAllocationDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
AbsoluteAllocationDraft absoluteAllocationDraft = AbsoluteAllocationDraft.builder()
.amount(amountBuilder -> amountBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionamount(HighPrecisionMoneyDraft amount) Amount of the Order total allocated to the Payment Method.Amount of the Order total allocated to the Payment Method.build()builds AbsoluteAllocationDraft with checking for non-null required valuesbuilds AbsoluteAllocationDraft without checking for non-null required valuesAmount of the Order total allocated to the Payment Method.of()factory method for an instance of AbsoluteAllocationDraftBuilderof(AbsoluteAllocationDraft template) create builder for AbsoluteAllocationDraft instanceAmount of the Order total allocated to the Payment Method.
-
Constructor Details
-
AbsoluteAllocationDraftBuilder
public AbsoluteAllocationDraftBuilder()
-
-
Method Details
-
amount
public AbsoluteAllocationDraftBuilder amount(Function<HighPrecisionMoneyDraftBuilder, HighPrecisionMoneyDraftBuilder> builder) Amount of the Order total allocated to the Payment Method.
- Parameters:
builder- function to build the amount value- Returns:
- Builder
-
withAmount
public AbsoluteAllocationDraftBuilder withAmount(Function<HighPrecisionMoneyDraftBuilder, HighPrecisionMoneyDraft> 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 AbsoluteAllocationDraft with checking for non-null required values- Specified by:
buildin interfaceBuilder<AbsoluteAllocationDraft>- Returns:
- AbsoluteAllocationDraft
-
buildUnchecked
builds AbsoluteAllocationDraft without checking for non-null required values- Returns:
- AbsoluteAllocationDraft
-
of
factory method for an instance of AbsoluteAllocationDraftBuilder- Returns:
- builder
-
of
create builder for AbsoluteAllocationDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-