Interface CountOnCustomLineItemUnits
- All Superinterfaces:
PatternComponent
Example to create an instance using the builder pattern
CountOnCustomLineItemUnits countOnCustomLineItemUnits = CountOnCustomLineItemUnits.builder()
.predicate("{predicate}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CountOnCustomLineItemUnits -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CountOnCustomLineItemUnitsbuilder(CountOnCustomLineItemUnits template) create builder for CountOnCustomLineItemUnits instancecopyDeep()static CountOnCustomLineItemUnitsdeepCopy(CountOnCustomLineItemUnits template) factory method to create a deep copy of CountOnCustomLineItemUnitsDeprecated.Maximum number of units of a Custom Line Item that match the predicate.Minimum number of units of a Custom Line Item that match the predicate.@NotNull StringValid CustomLineItem predicate that determines the units participating in the Discount.static CountOnCustomLineItemUnitsof()factory methodstatic CountOnCustomLineItemUnitsof(CountOnCustomLineItemUnits template) factory method to create a shallow copy CountOnCustomLineItemUnitsvoidsetExcludeCount(Integer excludeCount) Deprecated.voidsetMaxCount(Integer maxCount) Maximum number of units of a Custom Line Item that match the predicate.voidsetMinCount(Integer minCount) Minimum number of units of a Custom Line Item that match the predicate.voidsetPredicate(String predicate) Valid CustomLineItem predicate that determines the units participating in the Discount.static com.fasterxml.jackson.core.type.TypeReference<CountOnCustomLineItemUnits>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.cart_discount.PatternComponent
getType, withPatternComponent
-
Field Details
-
COUNT_ON_CUSTOM_LINE_ITEM_UNITS
discriminator value for CountOnCustomLineItemUnits- See Also:
-
-
Method Details
-
getPredicate
Valid CustomLineItem predicate that determines the units participating in the Discount.
- Returns:
- predicate
-
getMinCount
Integer getMinCount()Minimum number of units of a Custom Line Item that match the predicate.
- Returns:
- minCount
-
getMaxCount
Integer getMaxCount()Maximum number of units of a Custom Line Item that match the predicate. There might be more units matching the predicate, but they will not be participating to the resulting set.
The value must be greater than or equal to
minCount. If not provided, the component will match all units that satisfy the predicate.- Returns:
- maxCount
-
getExcludeCount
Deprecated.Number of units of a Custom Line Item to exclude on every application of the Discount.
Set only when configuring the
targetPattern.The units matched first (satisfying the pattern component) will be excluded from the resulting set. The
minCountandmaxCountare considered only after the exclusion. Pattern components are matched only if any further units satisfying the pattern component exist. For example, if 5 jeans are required but only 3 should be discounted, theexcludeCountvalue must be 2.- Returns:
- excludeCount
-
setPredicate
Valid CustomLineItem predicate that determines the units participating in the Discount.
- Parameters:
predicate- value to be set
-
setMinCount
Minimum number of units of a Custom Line Item that match the predicate.
- Parameters:
minCount- value to be set
-
setMaxCount
Maximum number of units of a Custom Line Item that match the predicate. There might be more units matching the predicate, but they will not be participating to the resulting set.
The value must be greater than or equal to
minCount. If not provided, the component will match all units that satisfy the predicate.- Parameters:
maxCount- value to be set
-
setExcludeCount
Deprecated.Number of units of a Custom Line Item to exclude on every application of the Discount.
Set only when configuring the
targetPattern.The units matched first (satisfying the pattern component) will be excluded from the resulting set. The
minCountandmaxCountare considered only after the exclusion. Pattern components are matched only if any further units satisfying the pattern component exist. For example, if 5 jeans are required but only 3 should be discounted, theexcludeCountvalue must be 2.- Parameters:
excludeCount- value to be set
-
of
factory method- Returns:
- instance of CountOnCustomLineItemUnits
-
of
factory method to create a shallow copy CountOnCustomLineItemUnits- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CountOnCustomLineItemUnits copyDeep()- Specified by:
copyDeepin interfacePatternComponent
-
deepCopy
factory method to create a deep copy of CountOnCustomLineItemUnits- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CountOnCustomLineItemUnits- Returns:
- builder
-
builder
create builder for CountOnCustomLineItemUnits instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCountOnCustomLineItemUnits
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
-