Interface DiscountGroup
- All Superinterfaces:
BaseResource
Example to create an instance using the builder pattern
DiscountGroup discountGroup = DiscountGroup.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.key("{key}")
.sortOrder("{sortOrder}")
.isActive(true)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscountGroupBuilderbuilder()builder factory method for DiscountGroupstatic DiscountGroupBuilderbuilder(DiscountGroup template) create builder for DiscountGroup instancecopyDeep()static DiscountGroupdeepCopy(DiscountGroup template) factory method to create a deep copy of DiscountGroup@NotNull ZonedDateTimeDate and time (UTC) the DiscountGroup was initially created.@Valid CreatedByIDs and references that created the DiscountGroup.@Valid LocalizedStringDescription of the DiscountGroup.@NotNull StringgetId()Unique identifier of the DiscountGroup.@NotNull BooleanA DiscountGroup must be active for its CartDiscounts to be considered during discount application.@NotNull StringgetKey()User-defined unique identifier of the DiscountGroup.@NotNull ZonedDateTimeDate and time (UTC) the DiscountGroup was last updated.@Valid LastModifiedByIDs and references that last modified the DiscountGroup.@Valid LocalizedStringgetName()Name of the DiscountGroup.@NotNull StringValue between0and1that determines the order in which the CartDiscount from the DiscountGroup is applied; a CartDiscount with a higher value is prioritized.@NotNull LongCurrent version of the DiscountGroup.static DiscountGroupof()factory methodstatic DiscountGroupof(DiscountGroup template) factory method to create a shallow copy DiscountGroupvoidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the DiscountGroup was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the DiscountGroup.voidsetDescription(LocalizedString description) Description of the DiscountGroup.voidUnique identifier of the DiscountGroup.voidsetIsActive(Boolean isActive) A DiscountGroup must be active for its CartDiscounts to be considered during discount application.voidUser-defined unique identifier of the DiscountGroup.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the DiscountGroup was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the DiscountGroup.voidsetName(LocalizedString name) Name of the DiscountGroup.voidsetSortOrder(String sortOrder) Value between0and1that determines the order in which the CartDiscount from the DiscountGroup is applied; a CartDiscount with a higher value is prioritized.voidsetVersion(Long version) Current version of the DiscountGroup.static com.fasterxml.jackson.core.type.TypeReference<DiscountGroup>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithDiscountGroup(Function<DiscountGroup, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
-
Method Details
-
getId
Unique identifier of the DiscountGroup.
- Specified by:
getIdin interfaceBaseResource- Returns:
- id
-
getVersion
Current version of the DiscountGroup.
- Specified by:
getVersionin interfaceBaseResource- Returns:
- version
-
getName
Name of the DiscountGroup.
- Returns:
- name
-
getKey
User-defined unique identifier of the DiscountGroup.
- Returns:
- key
-
getDescription
Description of the DiscountGroup.
- Returns:
- description
-
getSortOrder
Value between
0and1that determines the order in which the CartDiscount from the DiscountGroup is applied; a CartDiscount with a higher value is prioritized.The sort order is unique among all DiscountGroups and CartDiscounts.
- Returns:
- sortOrder
-
getIsActive
A DiscountGroup must be active for its CartDiscounts to be considered during discount application.
- Returns:
- isActive
-
getCreatedAt
Date and time (UTC) the DiscountGroup was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the DiscountGroup was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the DiscountGroup.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the DiscountGroup.
- Returns:
- createdBy
-
setId
Unique identifier of the DiscountGroup.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the DiscountGroup.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setName
Name of the DiscountGroup.
- Parameters:
name- value to be set
-
setKey
User-defined unique identifier of the DiscountGroup.
- Parameters:
key- value to be set
-
setDescription
Description of the DiscountGroup.
- Parameters:
description- value to be set
-
setSortOrder
Value between
0and1that determines the order in which the CartDiscount from the DiscountGroup is applied; a CartDiscount with a higher value is prioritized.The sort order is 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
-
setCreatedAt
Date and time (UTC) the DiscountGroup was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the DiscountGroup was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the DiscountGroup.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the DiscountGroup.
- Parameters:
createdBy- value to be set
-
of
factory method- Returns:
- instance of DiscountGroup
-
of
factory method to create a shallow copy DiscountGroup- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
DiscountGroup copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of DiscountGroup- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DiscountGroup- Returns:
- builder
-
builder
create builder for DiscountGroup instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withDiscountGroup
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
-