Class ChangeTargetPatternChangeValueBuilder
- All Implemented Interfaces:
Builder<ChangeTargetPatternChangeValue>
Example to create an instance using the builder pattern
ChangeTargetPatternChangeValue changeTargetPatternChangeValue = ChangeTargetPatternChangeValue.builder()
.plusTriggerPattern(triggerPatternBuilder -> triggerPatternBuilder)
.plusTargetPattern(targetPatternBuilder -> targetPatternBuilder)
.selectionMode(SelectionMode.CHEAPEST)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDefines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.build()
builds ChangeTargetPatternChangeValue with checking for non-null required valuesbuilds ChangeTargetPatternChangeValue without checking for non-null required valuesMaximum number of times the Discount applies on a Cart.Indicates which of the matching units of (Custom) Line Items were discounted.Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.maxOccurrence
(Integer maxOccurrence) Maximum number of times the Discount applies on a Cart.of()
factory method for an instance of ChangeTargetPatternChangeValueBuilderof
(ChangeTargetPatternChangeValue template) create builder for ChangeTargetPatternChangeValue instanceplusTargetPattern
(PatternComponent... targetPattern) Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.plusTriggerPattern
(PatternComponent... triggerPattern) Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.selectionMode
(SelectionMode selectionMode) Indicates which of the matching units of (Custom) Line Items were discounted.Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.targetPattern
(PatternComponent... targetPattern) Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.targetPattern
(List<PatternComponent> targetPattern) Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.triggerPattern
(PatternComponent... triggerPattern) Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.triggerPattern
(List<PatternComponent> triggerPattern) Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
-
Constructor Details
-
ChangeTargetPatternChangeValueBuilder
public ChangeTargetPatternChangeValueBuilder()
-
-
Method Details
-
triggerPattern
Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
- Parameters:
triggerPattern
- value to be set- Returns:
- Builder
-
triggerPattern
Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
- Parameters:
triggerPattern
- value to be set- Returns:
- Builder
-
plusTriggerPattern
Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
- Parameters:
triggerPattern
- value to be set- Returns:
- Builder
-
plusTriggerPattern
public ChangeTargetPatternChangeValueBuilder plusTriggerPattern(Function<PatternComponentBuilder, PatternComponentBuilder> builder) Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
- Parameters:
builder
- function to build the triggerPattern value- Returns:
- Builder
-
withTriggerPattern
public ChangeTargetPatternChangeValueBuilder withTriggerPattern(Function<PatternComponentBuilder, PatternComponentBuilder> builder) Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
- Parameters:
builder
- function to build the triggerPattern value- Returns:
- Builder
-
addTriggerPattern
public ChangeTargetPatternChangeValueBuilder addTriggerPattern(Function<PatternComponentBuilder, PatternComponent> builder) Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
- Parameters:
builder
- function to build the triggerPattern value- Returns:
- Builder
-
setTriggerPattern
public ChangeTargetPatternChangeValueBuilder setTriggerPattern(Function<PatternComponentBuilder, PatternComponent> builder) Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
- Parameters:
builder
- function to build the triggerPattern value- Returns:
- Builder
-
targetPattern
Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
- Parameters:
targetPattern
- value to be set- Returns:
- Builder
-
targetPattern
Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
- Parameters:
targetPattern
- value to be set- Returns:
- Builder
-
plusTargetPattern
Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
- Parameters:
targetPattern
- value to be set- Returns:
- Builder
-
plusTargetPattern
public ChangeTargetPatternChangeValueBuilder plusTargetPattern(Function<PatternComponentBuilder, PatternComponentBuilder> builder) Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
- Parameters:
builder
- function to build the targetPattern value- Returns:
- Builder
-
withTargetPattern
public ChangeTargetPatternChangeValueBuilder withTargetPattern(Function<PatternComponentBuilder, PatternComponentBuilder> builder) Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
- Parameters:
builder
- function to build the targetPattern value- Returns:
- Builder
-
addTargetPattern
public ChangeTargetPatternChangeValueBuilder addTargetPattern(Function<PatternComponentBuilder, PatternComponent> builder) Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
- Parameters:
builder
- function to build the targetPattern value- Returns:
- Builder
-
setTargetPattern
public ChangeTargetPatternChangeValueBuilder setTargetPattern(Function<PatternComponentBuilder, PatternComponent> builder) Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
- Parameters:
builder
- function to build the targetPattern value- Returns:
- Builder
-
maxOccurrence
Maximum number of times the Discount applies on a Cart.
If empty, the Discount applies indefinitely.
- Parameters:
maxOccurrence
- value to be set- Returns:
- Builder
-
selectionMode
Indicates which of the matching units of (Custom) Line Items were discounted.
- Parameters:
selectionMode
- value to be set- Returns:
- Builder
-
getTriggerPattern
Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
- Returns:
- triggerPattern
-
getTargetPattern
Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
- Returns:
- targetPattern
-
getMaxOccurrence
Maximum number of times the Discount applies on a Cart.
If empty, the Discount applies indefinitely.
- Returns:
- maxOccurrence
-
getSelectionMode
Indicates which of the matching units of (Custom) Line Items were discounted.
- Returns:
- selectionMode
-
build
builds ChangeTargetPatternChangeValue with checking for non-null required values- Specified by:
build
in interfaceBuilder<ChangeTargetPatternChangeValue>
- Returns:
- ChangeTargetPatternChangeValue
-
buildUnchecked
builds ChangeTargetPatternChangeValue without checking for non-null required values- Returns:
- ChangeTargetPatternChangeValue
-
of
factory method for an instance of ChangeTargetPatternChangeValueBuilder- Returns:
- builder
-
of
create builder for ChangeTargetPatternChangeValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-