Interface CartDiscountChangeValueAction
- All Superinterfaces:
CartDiscountUpdateAction
,ResourceUpdateAction<CartDiscountUpdateAction>
Changes the CartDiscountValue for relative, absolute and fixed price CartDiscounts. Changing to Gift Line Item is not supported.
Example to create an instance using the builder pattern
CartDiscountChangeValueAction cartDiscountChangeValueAction = CartDiscountChangeValueAction.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CartDiscountChangeValueAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartDiscountChangeValueActionbuilder
(CartDiscountChangeValueAction template) create builder for CartDiscountChangeValueAction instancedeepCopy
(CartDiscountChangeValueAction template) factory method to create a deep copy of CartDiscountChangeValueAction@NotNull @Valid CartDiscountValueDraft
getValue()
New value to set.of()
factory methodof
(CartDiscountChangeValueAction template) factory method to create a shallow copy CartDiscountChangeValueActionvoid
setValue
(CartDiscountValueDraft value) New value to set.static com.fasterxml.jackson.core.type.TypeReference<CartDiscountChangeValueAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
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_VALUE
discriminator value for CartDiscountChangeValueAction- See Also:
-
-
Method Details
-
getValue
New value to set. When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.
- Returns:
- value
-
setValue
New value to set. When trying to set a CartDiscountValueGiftLineItemDraft an InvalidInput error is returned.
- Parameters:
value
- value to be set
-
of
factory method- Returns:
- instance of CartDiscountChangeValueAction
-
of
factory method to create a shallow copy CartDiscountChangeValueAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static CartDiscountChangeValueAction deepCopy(@Nullable CartDiscountChangeValueAction template) factory method to create a deep copy of CartDiscountChangeValueAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartDiscountChangeValueAction- Returns:
- builder
-
builder
create builder for CartDiscountChangeValueAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartDiscountChangeValueAction
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-