Class BestDealBuilder
java.lang.Object
com.commercetools.api.models.cart.BestDealBuilder
BestDealBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
BestDeal bestDeal = BestDeal.builder()
.chosenDiscountType("{chosenDiscountType}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds BestDeal with checking for non-null required valuesbuilds BestDeal without checking for non-null required valueschosenDiscountType(String chosenDiscountType) Discount type that offers the best deal; the value can beProductDiscountorCartDiscount.Discount type that offers the best deal; the value can beProductDiscountorCartDiscount.static BestDealBuilderof()factory method for an instance of BestDealBuilderstatic BestDealBuildercreate builder for BestDeal instance
-
Constructor Details
-
BestDealBuilder
public BestDealBuilder()
-
-
Method Details
-
chosenDiscountType
Discount type that offers the best deal; the value can be
ProductDiscountorCartDiscount.- Parameters:
chosenDiscountType- value to be set- Returns:
- Builder
-
getChosenDiscountType
Discount type that offers the best deal; the value can be
ProductDiscountorCartDiscount.- Returns:
- chosenDiscountType
-
build
builds BestDeal with checking for non-null required values -
buildUnchecked
builds BestDeal without checking for non-null required values- Returns:
- BestDeal
-
of
factory method for an instance of BestDealBuilder- Returns:
- builder
-
of
create builder for BestDeal instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-