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}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscountGroupBuilder
builder()
builder factory method for DiscountGroupstatic DiscountGroupBuilder
builder
(DiscountGroup template) create builder for DiscountGroup instancecopyDeep()
static DiscountGroup
deepCopy
(DiscountGroup template) factory method to create a deep copy of DiscountGroup@NotNull ZonedDateTime
Date and time (UTC) the DiscountGroup was initially created.@Valid CreatedBy
IDs and references that created the DiscountGroup.@Valid LocalizedString
Description of the DiscountGroup.@NotNull String
getId()
Unique identifier of the DiscountGroup.@NotNull String
getKey()
User-defined unique identifier of the DiscountGroup.@NotNull ZonedDateTime
Date and time (UTC) the DiscountGroup was last updated.@Valid LastModifiedBy
IDs and references that last modified 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 is applied; a CartDiscount with a higher value is prioritized.@NotNull Long
Current version of the DiscountGroup.static DiscountGroup
of()
factory methodstatic DiscountGroup
of
(DiscountGroup template) factory method to create a shallow copy DiscountGroupvoid
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the DiscountGroup was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the DiscountGroup.void
setDescription
(LocalizedString description) Description of the DiscountGroup.void
Unique identifier of the DiscountGroup.void
User-defined unique identifier of the DiscountGroup.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the DiscountGroup was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified 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 is applied; a CartDiscount with a higher value is prioritized.void
setVersion
(Long version) Current version of the DiscountGroup.static com.fasterxml.jackson.core.type.TypeReference<DiscountGroup>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDiscountGroup
(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:
getId
in interfaceBaseResource
- Returns:
- id
-
getVersion
Current version of the DiscountGroup.
- Specified by:
getVersion
in 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
0
and1
that 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
-
getCreatedAt
Date and time (UTC) the DiscountGroup was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the DiscountGroup was last updated.
- Specified by:
getLastModifiedAt
in 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:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the DiscountGroup.
- Specified by:
setVersion
in 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
0
and1
that 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
-
setCreatedAt
Date and time (UTC) the DiscountGroup was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the DiscountGroup was last updated.
- Specified by:
setLastModifiedAt
in 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:
copyDeep
in 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
-