Class RelativeAllocationDraftBuilder
java.lang.Object
com.commercetools.api.models.cart.RelativeAllocationDraftBuilder
- All Implemented Interfaces:
Builder<RelativeAllocationDraft>
public class RelativeAllocationDraftBuilder
extends Object
implements Builder<RelativeAllocationDraft>
RelativeAllocationDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
RelativeAllocationDraft relativeAllocationDraft = RelativeAllocationDraft.builder()
.percentage(0.3)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds RelativeAllocationDraft with checking for non-null required valuesbuilds RelativeAllocationDraft without checking for non-null required valuesPercentage of the Order total allocated to the Payment Method.of()factory method for an instance of RelativeAllocationDraftBuilderof(RelativeAllocationDraft template) create builder for RelativeAllocationDraft instancepercentage(Integer percentage) Percentage of the Order total allocated to the Payment Method.
-
Constructor Details
-
RelativeAllocationDraftBuilder
public RelativeAllocationDraftBuilder()
-
-
Method Details
-
percentage
Percentage of the Order total allocated to the Payment Method. For example,
100allocates the entire Order total.- Parameters:
percentage- value to be set- Returns:
- Builder
-
getPercentage
Percentage of the Order total allocated to the Payment Method. For example,
100allocates the entire Order total.- Returns:
- percentage
-
build
builds RelativeAllocationDraft with checking for non-null required values- Specified by:
buildin interfaceBuilder<RelativeAllocationDraft>- Returns:
- RelativeAllocationDraft
-
buildUnchecked
builds RelativeAllocationDraft without checking for non-null required values- Returns:
- RelativeAllocationDraft
-
of
factory method for an instance of RelativeAllocationDraftBuilder- Returns:
- builder
-
of
create builder for RelativeAllocationDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-