Interface ChangeTargetPatternChangeValue
- All Superinterfaces:
ChangeTargetChangeValue
Example to create an instance using the builder pattern
ChangeTargetPatternChangeValue changeTargetPatternChangeValue = ChangeTargetPatternChangeValue.builder()
.plusTriggerPattern(triggerPatternBuilder -> triggerPatternBuilder)
.plusTargetPattern(targetPatternBuilder -> targetPatternBuilder)
.selectionMode(SelectionMode.CHEAPEST)
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for ChangeTargetPatternChangeValuebuilder(ChangeTargetPatternChangeValue template) create builder for ChangeTargetPatternChangeValue instancecopyDeep()deepCopy(ChangeTargetPatternChangeValue template) factory method to create a deep copy of ChangeTargetPatternChangeValueMaximum number of times the Discount applies on a Cart.@NotNull SelectionModeIndicates which of the matching units of (Custom) Line Items were discounted.@NotNull @Valid List<PatternComponent>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.@NotNull @Valid List<PatternComponent>Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.@NotNull StringgetType()of()factory methodof(ChangeTargetPatternChangeValue template) factory method to create a shallow copy ChangeTargetPatternChangeValuevoidsetMaxOccurrence(Integer maxOccurrence) Maximum number of times the Discount applies on a Cart.voidsetSelectionMode(SelectionMode selectionMode) Indicates which of the matching units of (Custom) Line Items were discounted.voidsetTargetPattern(PatternComponent... targetPattern) Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.voidsetTargetPattern(List<PatternComponent> targetPattern) Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.voidsetTriggerPattern(PatternComponent... triggerPattern) Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.voidsetTriggerPattern(List<PatternComponent> triggerPattern) Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.static com.fasterxml.jackson.core.type.TypeReference<ChangeTargetPatternChangeValue>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.history.models.change_value.ChangeTargetChangeValue
withChangeTargetChangeValue
-
Field Details
-
PATTERN
discriminator value for ChangeTargetPatternChangeValue- See Also:
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceChangeTargetChangeValue- Returns:
- type
-
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
Integer 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
-
setTriggerPattern
Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
- Parameters:
triggerPattern- values to be set
-
setTriggerPattern
Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
- Parameters:
triggerPattern- values to be set
-
setTargetPattern
Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
- Parameters:
targetPattern- values to be set
-
setTargetPattern
Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
- Parameters:
targetPattern- values to be set
-
setMaxOccurrence
Maximum number of times the Discount applies on a Cart.
If empty, the Discount applies indefinitely.
- Parameters:
maxOccurrence- value to be set
-
setSelectionMode
Indicates which of the matching units of (Custom) Line Items were discounted.
- Parameters:
selectionMode- value to be set
-
of
factory method- Returns:
- instance of ChangeTargetPatternChangeValue
-
of
factory method to create a shallow copy ChangeTargetPatternChangeValue- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ChangeTargetPatternChangeValue copyDeep()- Specified by:
copyDeepin interfaceChangeTargetChangeValue
-
deepCopy
@Nullable static ChangeTargetPatternChangeValue deepCopy(@Nullable ChangeTargetPatternChangeValue template) factory method to create a deep copy of ChangeTargetPatternChangeValue- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ChangeTargetPatternChangeValue- Returns:
- builder
-
builder
create builder for ChangeTargetPatternChangeValue instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withChangeTargetPatternChangeValue
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<ChangeTargetPatternChangeValue> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-