Interface DiscountGroupDraft
- All Superinterfaces:
Draft<DiscountGroupDraft>
Example to create an instance using the builder pattern
DiscountGroupDraft discountGroupDraft = DiscountGroupDraft.builder()
.key("{key}")
.sortOrder("{sortOrder}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscountGroupDraftBuilderbuilder()builder factory method for DiscountGroupDraftstatic DiscountGroupDraftBuilderbuilder(DiscountGroupDraft template) create builder for DiscountGroupDraft instancecopyDeep()static DiscountGroupDraftdeepCopy(DiscountGroupDraft template) factory method to create a deep copy of DiscountGroupDraft@Valid LocalizedStringDescription for the DiscountGroup.A DiscountGroup must be active for its CartDiscounts to be considered during discount application.@NotNull StringgetKey()User-defined unique identifier for the DiscountGroup.@Valid LocalizedStringgetName()Name of the DiscountGroup.@NotNull StringValue between0and1that determines the order in which the CartDiscount from the DiscountGroup will be applied; a CartDiscount with a higher value will be prioritized.static DiscountGroupDraftof()factory methodstatic DiscountGroupDraftof(DiscountGroupDraft template) factory method to create a shallow copy DiscountGroupDraftvoidsetDescription(LocalizedString description) Description for the DiscountGroup.voidsetIsActive(Boolean isActive) A DiscountGroup must be active for its CartDiscounts to be considered during discount application.voidUser-defined unique identifier for the DiscountGroup.voidsetName(LocalizedString name) Name of the DiscountGroup.voidsetSortOrder(String sortOrder) Value between0and1that 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> TwithDiscountGroupDraft(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
0and1that 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
-
getIsActive
Boolean getIsActive()A DiscountGroup must be active for its CartDiscounts to be considered during discount application.
- Returns:
- isActive
-
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
0and1that 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
-
setIsActive
A DiscountGroup must be active for its CartDiscounts to be considered during discount application.
- Parameters:
isActive- 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
-