Interface CartDiscountSetDiscountGroupAction
- All Superinterfaces:
CartDiscountUpdateAction
,ResourceUpdateAction<CartDiscountUpdateAction>
Example to create an instance using the builder pattern
CartDiscountSetDiscountGroupAction cartDiscountSetDiscountGroupAction = CartDiscountSetDiscountGroupAction.builder()
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
discriminator value for CartDiscountSetDiscountGroupAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartDiscountSetDiscountGroupActionbuilder
(CartDiscountSetDiscountGroupAction template) create builder for CartDiscountSetDiscountGroupAction instancecopyDeep()
deepCopy
(CartDiscountSetDiscountGroupAction template) factory method to create a deep copy of CartDiscountSetDiscountGroupActionReference to a DiscountGroup that the Cart Discount must belong to.New value to set (between0
and1
) that determines the order in which the CartDiscounts are applied; a CartDiscount with a higher value is prioritized.of()
factory methodof
(CartDiscountSetDiscountGroupAction template) factory method to create a shallow copy CartDiscountSetDiscountGroupActionvoid
setDiscountGroup
(DiscountGroupResourceIdentifier discountGroup) Reference to a DiscountGroup that the Cart Discount must belong to.void
setSortOrder
(String sortOrder) New value to set (between0
and1
) that determines the order in which the CartDiscounts are applied; a CartDiscount with a higher value is prioritized.static com.fasterxml.jackson.core.type.TypeReference<CartDiscountSetDiscountGroupAction>
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
-
SET_DISCOUNT_GROUP
discriminator value for CartDiscountSetDiscountGroupAction- See Also:
-
-
Method Details
-
getDiscountGroup
Reference to a DiscountGroup that the Cart Discount must belong to. If empty, any existing value will be removed.
- Returns:
- discountGroup
-
getSortOrder
String getSortOrder()New value to set (between
0
and1
) that determines the order in which the CartDiscounts are applied; a CartDiscount with a higher value is prioritized.Required if
discountGroup
is absent. IfdiscountGroup
is set, the CartDiscount will use the sort order of the DiscountGroup.- Returns:
- sortOrder
-
setDiscountGroup
Reference to a DiscountGroup that the Cart Discount must belong to. If empty, any existing value will be removed.
- Parameters:
discountGroup
- value to be set
-
setSortOrder
New value to set (between
0
and1
) that determines the order in which the CartDiscounts are applied; a CartDiscount with a higher value is prioritized.Required if
discountGroup
is absent. IfdiscountGroup
is set, the CartDiscount will use the sort order of the DiscountGroup.- Parameters:
sortOrder
- value to be set
-
of
factory method- Returns:
- instance of CartDiscountSetDiscountGroupAction
-
of
factory method to create a shallow copy CartDiscountSetDiscountGroupAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
CartDiscountSetDiscountGroupAction copyDeep()- Specified by:
copyDeep
in interfaceCartDiscountUpdateAction
-
deepCopy
@Nullable static CartDiscountSetDiscountGroupAction deepCopy(@Nullable CartDiscountSetDiscountGroupAction template) factory method to create a deep copy of CartDiscountSetDiscountGroupAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartDiscountSetDiscountGroupAction- Returns:
- builder
-
builder
static CartDiscountSetDiscountGroupActionBuilder builder(CartDiscountSetDiscountGroupAction template) create builder for CartDiscountSetDiscountGroupAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartDiscountSetDiscountGroupAction
default <T> T withCartDiscountSetDiscountGroupAction(Function<CartDiscountSetDiscountGroupAction, 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<CartDiscountSetDiscountGroupAction> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-