Class ProductDiscountValueRelativeBuilder
java.lang.Object
com.commercetools.api.models.product_discount.ProductDiscountValueRelativeBuilder
- All Implemented Interfaces:
Builder<ProductDiscountValueRelative>
public class ProductDiscountValueRelativeBuilder
extends Object
implements Builder<ProductDiscountValueRelative>
ProductDiscountValueRelativeBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductDiscountValueRelative productDiscountValueRelative = ProductDiscountValueRelative.builder()
.permyriad(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ProductDiscountValueRelative with checking for non-null required valuesbuilds ProductDiscountValueRelative without checking for non-null required valuesFraction (per ten thousand) the price is reduced by.of()
factory method for an instance of ProductDiscountValueRelativeBuilderof
(ProductDiscountValueRelative template) create builder for ProductDiscountValueRelative instanceFraction (per ten thousand) the price is reduced by.
-
Constructor Details
-
ProductDiscountValueRelativeBuilder
public ProductDiscountValueRelativeBuilder()
-
-
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 ProductDiscountValueRelative with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductDiscountValueRelative>
- Returns:
- ProductDiscountValueRelative
-
buildUnchecked
builds ProductDiscountValueRelative without checking for non-null required values- Returns:
- ProductDiscountValueRelative
-
of
factory method for an instance of ProductDiscountValueRelativeBuilder- Returns:
- builder
-
of
create builder for ProductDiscountValueRelative instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-