Class RelativeAllocationBuilder
java.lang.Object
com.commercetools.api.models.cart.RelativeAllocationBuilder
- All Implemented Interfaces:
Builder<RelativeAllocation>
RelativeAllocationBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
RelativeAllocation relativeAllocation = RelativeAllocation.builder()
.percentage(0.3)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds RelativeAllocation with checking for non-null required valuesbuilds RelativeAllocation without checking for non-null required valuesPercentage of the Order total allocated to the Payment Method.static RelativeAllocationBuilderof()factory method for an instance of RelativeAllocationBuilderstatic RelativeAllocationBuilderof(RelativeAllocation template) create builder for RelativeAllocation instancepercentage(Integer percentage) Percentage of the Order total allocated to the Payment Method.
-
Constructor Details
-
RelativeAllocationBuilder
public RelativeAllocationBuilder()
-
-
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 RelativeAllocation with checking for non-null required values- Specified by:
buildin interfaceBuilder<RelativeAllocation>- Returns:
- RelativeAllocation
-
buildUnchecked
builds RelativeAllocation without checking for non-null required values- Returns:
- RelativeAllocation
-
of
factory method for an instance of RelativeAllocationBuilder- Returns:
- builder
-
of
create builder for RelativeAllocation instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-