Class CartDiscountChangeRequiresDiscountCodeActionBuilder
java.lang.Object
com.commercetools.api.models.cart_discount.CartDiscountChangeRequiresDiscountCodeActionBuilder
- All Implemented Interfaces:
Builder<CartDiscountChangeRequiresDiscountCodeAction>
public class CartDiscountChangeRequiresDiscountCodeActionBuilder
extends Object
implements Builder<CartDiscountChangeRequiresDiscountCodeAction>
CartDiscountChangeRequiresDiscountCodeActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartDiscountChangeRequiresDiscountCodeAction cartDiscountChangeRequiresDiscountCodeAction = CartDiscountChangeRequiresDiscountCodeAction.builder()
.requiresDiscountCode(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartDiscountChangeRequiresDiscountCodeAction with checking for non-null required valuesbuilds CartDiscountChangeRequiresDiscountCodeAction without checking for non-null required valuesNew value to set.of()
factory method for an instance of CartDiscountChangeRequiresDiscountCodeActionBuildercreate builder for CartDiscountChangeRequiresDiscountCodeAction instancerequiresDiscountCode
(Boolean requiresDiscountCode) New value to set.
-
Constructor Details
-
CartDiscountChangeRequiresDiscountCodeActionBuilder
public CartDiscountChangeRequiresDiscountCodeActionBuilder()
-
-
Method Details
-
requiresDiscountCode
public CartDiscountChangeRequiresDiscountCodeActionBuilder requiresDiscountCode(Boolean requiresDiscountCode) New value to set. If set to
true
, the Discount can only be used in connection with a DiscountCode.- Parameters:
requiresDiscountCode
- value to be set- Returns:
- Builder
-
getRequiresDiscountCode
New value to set. If set to
true
, the Discount can only be used in connection with a DiscountCode.- Returns:
- requiresDiscountCode
-
build
builds CartDiscountChangeRequiresDiscountCodeAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartDiscountChangeRequiresDiscountCodeAction>
- Returns:
- CartDiscountChangeRequiresDiscountCodeAction
-
buildUnchecked
builds CartDiscountChangeRequiresDiscountCodeAction without checking for non-null required values- Returns:
- CartDiscountChangeRequiresDiscountCodeAction
-
of
factory method for an instance of CartDiscountChangeRequiresDiscountCodeActionBuilder- Returns:
- builder
-
of
public static CartDiscountChangeRequiresDiscountCodeActionBuilder of(CartDiscountChangeRequiresDiscountCodeAction template) create builder for CartDiscountChangeRequiresDiscountCodeAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-