Class CartDiscountValueRelativeBuilder
java.lang.Object
com.commercetools.api.models.cart_discount.CartDiscountValueRelativeBuilder
- All Implemented Interfaces:
Builder<CartDiscountValueRelative>
public class CartDiscountValueRelativeBuilder
extends Object
implements Builder<CartDiscountValueRelative>
CartDiscountValueRelativeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartDiscountValueRelative cartDiscountValueRelative = CartDiscountValueRelative.builder()
.permyriad(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartDiscountValueRelative with checking for non-null required valuesbuilds CartDiscountValueRelative without checking for non-null required valuesFraction (per ten thousand) the price is reduced by.of()
factory method for an instance of CartDiscountValueRelativeBuilderof
(CartDiscountValueRelative template) create builder for CartDiscountValueRelative instanceFraction (per ten thousand) the price is reduced by.
-
Constructor Details
-
CartDiscountValueRelativeBuilder
public CartDiscountValueRelativeBuilder()
-
-
Method Details
-
permyriad
Fraction (per ten thousand) the price is reduced by. For example,
1000
will result in a 10% price reduction.- Parameters:
permyriad
- value to be set- Returns:
- Builder
-
getPermyriad
Fraction (per ten thousand) the price is reduced by. For example,
1000
will result in a 10% price reduction.- Returns:
- permyriad
-
build
builds CartDiscountValueRelative with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartDiscountValueRelative>
- Returns:
- CartDiscountValueRelative
-
buildUnchecked
builds CartDiscountValueRelative without checking for non-null required values- Returns:
- CartDiscountValueRelative
-
of
factory method for an instance of CartDiscountValueRelativeBuilder- Returns:
- builder
-
of
create builder for CartDiscountValueRelative instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-