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 beproduct-discount
orcart-discount
.Discount type that offers the best deal; the value can beproduct-discount
orcart-discount
.static BestDealBuilder
of()
factory method for an instance of BestDealBuilderstatic BestDealBuilder
create builder for BestDeal instance
-
Constructor Details
-
BestDealBuilder
public BestDealBuilder()
-
-
Method Details
-
chosenDiscountType
Discount type that offers the best deal; the value can be
product-discount
orcart-discount
.- Parameters:
chosenDiscountType
- value to be set- Returns:
- Builder
-
getChosenDiscountType
Discount type that offers the best deal; the value can be
product-discount
orcart-discount
.- 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
-