Class DiscountGroupBuilder
- All Implemented Interfaces:
Builder<DiscountGroup>
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()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds DiscountGroup with checking for non-null required valuesbuilds DiscountGroup without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the DiscountGroup was initially created.IDs and references that created the DiscountGroup.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the DiscountGroup.description
(LocalizedString description) Description of the DiscountGroup.Description of the DiscountGroup.Date and time (UTC) the DiscountGroup was initially created.IDs and references that created the DiscountGroup.Description of the DiscountGroup.getId()
Unique identifier of the DiscountGroup.getKey()
User-defined unique identifier of the DiscountGroup.Date and time (UTC) the DiscountGroup was last updated.IDs and references that last modified the DiscountGroup.getName()
Name of the DiscountGroup.Value between0
and1
that determines the order in which the CartDiscount from the DiscountGroup is applied; a CartDiscount with a higher value is prioritized.Current version of the DiscountGroup.Unique identifier of the DiscountGroup.User-defined unique identifier of the DiscountGroup.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the DiscountGroup was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the DiscountGroup.IDs and references that last modified the DiscountGroup.name
(LocalizedString name) Name of the DiscountGroup.Name of the DiscountGroup.static DiscountGroupBuilder
of()
factory method for an instance of DiscountGroupBuilderstatic DiscountGroupBuilder
of
(DiscountGroup template) create builder for DiscountGroup instanceValue between0
and1
that determines the order in which the CartDiscount from the DiscountGroup is applied; a CartDiscount with a higher value is prioritized.Current version of the DiscountGroup.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the DiscountGroup.Description of the DiscountGroup.IDs and references that last modified the DiscountGroup.Name of the DiscountGroup.
-
Constructor Details
-
DiscountGroupBuilder
public DiscountGroupBuilder()
-
-
Method Details
-
id
Unique identifier of the DiscountGroup.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the DiscountGroup.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the DiscountGroup was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the DiscountGroup was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
name
Name of the DiscountGroup.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
Name of the DiscountGroup.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the DiscountGroup.
- Parameters:
name
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the DiscountGroup.
- Parameters:
key
- value to be set- Returns:
- Builder
-
description
public DiscountGroupBuilder description(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Description of the DiscountGroup.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
withDescription
public DiscountGroupBuilder withDescription(Function<LocalizedStringBuilder, LocalizedString> builder) Description of the DiscountGroup.
- Parameters:
builder
- function to build the description value- Returns:
- Builder
-
description
Description of the DiscountGroup.
- Parameters:
description
- value to be set- Returns:
- Builder
-
sortOrder
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- Returns:
- Builder
-
lastModifiedBy
public DiscountGroupBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) IDs and references that last modified the DiscountGroup.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public DiscountGroupBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) IDs and references that last modified the DiscountGroup.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the DiscountGroup.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the DiscountGroup.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the DiscountGroup.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the DiscountGroup.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the DiscountGroup.
- Returns:
- id
-
getVersion
Current version of the DiscountGroup.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the DiscountGroup was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the DiscountGroup was last updated.
- Returns:
- lastModifiedAt
-
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
-
getLastModifiedBy
IDs and references that last modified the DiscountGroup.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the DiscountGroup.
- Returns:
- createdBy
-
build
builds DiscountGroup with checking for non-null required values- Specified by:
build
in interfaceBuilder<DiscountGroup>
- Returns:
- DiscountGroup
-
buildUnchecked
builds DiscountGroup without checking for non-null required values- Returns:
- DiscountGroup
-
of
factory method for an instance of DiscountGroupBuilder- Returns:
- builder
-
of
create builder for DiscountGroup instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-