Interface CartDiscountChangeIsActiveAction
- All Superinterfaces:
CartDiscountUpdateAction,ResourceUpdateAction<CartDiscountUpdateAction>
CartDiscountChangeIsActiveAction
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartDiscountChangeIsActiveAction cartDiscountChangeIsActiveAction = CartDiscountChangeIsActiveAction.builder()
.isActive(true)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CartDiscountChangeIsActiveAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartDiscountChangeIsActiveActionbuilder(CartDiscountChangeIsActiveAction template) create builder for CartDiscountChangeIsActiveAction instancecopyDeep()deepCopy(CartDiscountChangeIsActiveAction template) factory method to create a deep copy of CartDiscountChangeIsActiveAction@NotNull BooleanNew value to set.of()factory methodof(CartDiscountChangeIsActiveAction template) factory method to create a shallow copy CartDiscountChangeIsActiveActionvoidsetIsActive(Boolean isActive) New value to set.static com.fasterxml.jackson.core.type.TypeReference<CartDiscountChangeIsActiveAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountUpdateAction
getAction, withCartDiscountUpdateActionMethods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
CHANGE_IS_ACTIVE
discriminator value for CartDiscountChangeIsActiveAction- See Also:
-
-
Method Details
-
getIsActive
New value to set. If set to
true, the Discount will be applied to the Cart.If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.
- Returns:
- isActive
-
setIsActive
New value to set. If set to
true, the Discount will be applied to the Cart.If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.
- Parameters:
isActive- value to be set
-
of
factory method- Returns:
- instance of CartDiscountChangeIsActiveAction
-
of
factory method to create a shallow copy CartDiscountChangeIsActiveAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartDiscountChangeIsActiveAction copyDeep()- Specified by:
copyDeepin interfaceCartDiscountUpdateAction
-
deepCopy
@Nullable static CartDiscountChangeIsActiveAction deepCopy(@Nullable CartDiscountChangeIsActiveAction template) factory method to create a deep copy of CartDiscountChangeIsActiveAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartDiscountChangeIsActiveAction- Returns:
- builder
-
builder
create builder for CartDiscountChangeIsActiveAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartDiscountChangeIsActiveAction
default <T> T withCartDiscountChangeIsActiveAction(Function<CartDiscountChangeIsActiveAction, 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<CartDiscountChangeIsActiveAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-