Interface DiscountGroupDraft
- All Superinterfaces:
Draft<DiscountGroupDraft>
DiscountGroupDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DiscountGroupDraft discountGroupDraft = DiscountGroupDraft.builder()
.key("{key}")
.sortOrder("{sortOrder}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscountGroupDraftBuilder
builder()
builder factory method for DiscountGroupDraftstatic DiscountGroupDraftBuilder
builder
(DiscountGroupDraft template) create builder for DiscountGroupDraft instancecopyDeep()
static DiscountGroupDraft
deepCopy
(DiscountGroupDraft template) factory method to create a deep copy of DiscountGroupDraft@Valid LocalizedString
Description for the DiscountGroup.@NotNull String
getKey()
User-defined unique identifier for the DiscountGroup.@Valid LocalizedString
getName()
Name of the DiscountGroup.@NotNull String
Value between0
and1
that determines the order in which the CartDiscount from the DiscountGroup will be applied; a CartDiscount with a higher value will be prioritized.static DiscountGroupDraft
of()
factory methodstatic DiscountGroupDraft
of
(DiscountGroupDraft template) factory method to create a shallow copy DiscountGroupDraftvoid
setDescription
(LocalizedString description) Description for the DiscountGroup.void
User-defined unique identifier for the DiscountGroup.void
setName
(LocalizedString name) Name of the DiscountGroup.void
setSortOrder
(String sortOrder) Value between0
and1
that determines the order in which the CartDiscount from the DiscountGroup will be applied; a CartDiscount with a higher value will be prioritized.static com.fasterxml.jackson.core.type.TypeReference<DiscountGroupDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDiscountGroupDraft
(Function<DiscountGroupDraft, T> helper) accessor map function
-
Method Details
-
getName
Name of the DiscountGroup.
- Returns:
- name
-
getKey
User-defined unique identifier for the DiscountGroup.
- Returns:
- key
-
getDescription
Description for the DiscountGroup.
- Returns:
- description
-
getSortOrder
Value between
0
and1
that determines the order in which the CartDiscount from the DiscountGroup will be applied; a CartDiscount with a higher value will be prioritized.The sort order must be unique among all DiscountGroups and CartDiscounts.
- Returns:
- sortOrder
-
setName
Name of the DiscountGroup.
- Parameters:
name
- value to be set
-
setKey
User-defined unique identifier for the DiscountGroup.
- Parameters:
key
- value to be set
-
setDescription
Description for the DiscountGroup.
- Parameters:
description
- value to be set
-
setSortOrder
Value between
0
and1
that determines the order in which the CartDiscount from the DiscountGroup will be applied; a CartDiscount with a higher value will be prioritized.The sort order must be unique among all DiscountGroups and CartDiscounts.
- Parameters:
sortOrder
- value to be set
-
of
factory method- Returns:
- instance of DiscountGroupDraft
-
of
factory method to create a shallow copy DiscountGroupDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
DiscountGroupDraft copyDeep() -
deepCopy
factory method to create a deep copy of DiscountGroupDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DiscountGroupDraft- Returns:
- builder
-
builder
create builder for DiscountGroupDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDiscountGroupDraft
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
-