Interface CartDiscountChangeRequiresDiscountCodeAction
- All Superinterfaces:
CartDiscountUpdateAction
,ResourceUpdateAction<CartDiscountUpdateAction>
CartDiscountChangeRequiresDiscountCodeAction
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()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CartDiscountChangeRequiresDiscountCodeAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartDiscountChangeRequiresDiscountCodeActioncreate builder for CartDiscountChangeRequiresDiscountCodeAction instancefactory method to create a deep copy of CartDiscountChangeRequiresDiscountCodeAction@NotNull Boolean
New value to set.of()
factory methodfactory method to create a shallow copy CartDiscountChangeRequiresDiscountCodeActionvoid
setRequiresDiscountCode
(Boolean requiresDiscountCode) New value to set.static com.fasterxml.jackson.core.type.TypeReference<CartDiscountChangeRequiresDiscountCodeAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCartDiscountChangeRequiresDiscountCodeAction
(Function<CartDiscountChangeRequiresDiscountCodeAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountUpdateAction
getAction, withCartDiscountUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
CHANGE_REQUIRES_DISCOUNT_CODE
discriminator value for CartDiscountChangeRequiresDiscountCodeAction- See Also:
-
-
Method Details
-
getRequiresDiscountCode
New value to set. If set to
true
, the Discount can only be used in connection with a DiscountCode.- Returns:
- requiresDiscountCode
-
setRequiresDiscountCode
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
-
of
factory method- Returns:
- instance of CartDiscountChangeRequiresDiscountCodeAction
-
of
static CartDiscountChangeRequiresDiscountCodeAction of(CartDiscountChangeRequiresDiscountCodeAction template) factory method to create a shallow copy CartDiscountChangeRequiresDiscountCodeAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static CartDiscountChangeRequiresDiscountCodeAction deepCopy(@Nullable CartDiscountChangeRequiresDiscountCodeAction template) factory method to create a deep copy of CartDiscountChangeRequiresDiscountCodeAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartDiscountChangeRequiresDiscountCodeAction- Returns:
- builder
-
builder
static CartDiscountChangeRequiresDiscountCodeActionBuilder builder(CartDiscountChangeRequiresDiscountCodeAction template) create builder for CartDiscountChangeRequiresDiscountCodeAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartDiscountChangeRequiresDiscountCodeAction
default <T> T withCartDiscountChangeRequiresDiscountCodeAction(Function<CartDiscountChangeRequiresDiscountCodeAction, T> helper) accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<CartDiscountChangeRequiresDiscountCodeAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-