Interface ChangeTargetPatternChangeValue
- All Superinterfaces:
ChangeTargetChangeValue
ChangeTargetPatternChangeValue
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ChangeTargetPatternChangeValue changeTargetPatternChangeValue = ChangeTargetPatternChangeValue.builder()
.plusTargetPattern(targetPatternBuilder -> targetPatternBuilder)
.selectionMode(SelectionMode.CHEAPEST)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ChangeTargetPatternChangeValuebuilder
(ChangeTargetPatternChangeValue template) create builder for ChangeTargetPatternChangeValue instancedeepCopy
(ChangeTargetPatternChangeValue template) factory method to create a deep copy of ChangeTargetPatternChangeValueMaximum number of times the Discount applies on a Cart.@NotNull SelectionMode
Indicates which of the matching units of (Custom) Line Items were discounted.@NotNull @Valid List<PatternComponent>
Units of (Custom) Line Items on which the Discount is applied.@Valid List<PatternComponent>
Units of a (Custom) Line Item that triggered the discount application.@NotNull String
getType()
of()
factory methodof
(ChangeTargetPatternChangeValue template) factory method to create a shallow copy ChangeTargetPatternChangeValuevoid
setMaxOccurrence
(Integer maxOccurrence) Maximum number of times the Discount applies on a Cart.void
setSelectionMode
(SelectionMode selectionMode) Indicates which of the matching units of (Custom) Line Items were discounted.void
setTargetPattern
(PatternComponent... targetPattern) Units of (Custom) Line Items on which the Discount is applied.void
setTargetPattern
(List<PatternComponent> targetPattern) Units of (Custom) Line Items on which the Discount is applied.void
setTriggerPattern
(PatternComponent... triggerPattern) Units of a (Custom) Line Item that triggered the discount application.void
setTriggerPattern
(List<PatternComponent> triggerPattern) Units of a (Custom) Line Item that triggered the discount application.static com.fasterxml.jackson.core.type.TypeReference<ChangeTargetPatternChangeValue>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor 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:
getType
in interfaceChangeTargetChangeValue
- Returns:
- type
-
getTriggerPattern
Units of a (Custom) Line Item that triggered the discount application.
- Returns:
- triggerPattern
-
getTargetPattern
Units of (Custom) Line Items 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
Units of a (Custom) Line Item that triggered the discount application.
- Parameters:
triggerPattern
- values to be set
-
setTriggerPattern
Units of a (Custom) Line Item that triggered the discount application.
- Parameters:
triggerPattern
- values to be set
-
setTargetPattern
Units of (Custom) Line Items on which the Discount is applied.
- Parameters:
targetPattern
- values to be set
-
setTargetPattern
Units of (Custom) Line Items 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
-
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
-