Interface ChangeTargetMultiBuyLineItemsChangeValue
- All Superinterfaces:
ChangeTargetChangeValue
ChangeTargetMultiBuyLineItemsChangeValue
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ChangeTargetMultiBuyLineItemsChangeValue changeTargetMultiBuyLineItemsChangeValue = ChangeTargetMultiBuyLineItemsChangeValue.builder()
.predicate("{predicate}")
.triggerQuantity(1)
.discountedQuantity(1)
.maxOccurrence(1)
.selectionMode(SelectionMode.CHEAPEST)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ChangeTargetMultiBuyLineItemsChangeValue -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ChangeTargetMultiBuyLineItemsChangeValuecreate builder for ChangeTargetMultiBuyLineItemsChangeValue instancefactory method to create a deep copy of ChangeTargetMultiBuyLineItemsChangeValue@NotNull Integer
Quantity of Line Items discounted per application of this discount.@NotNull Integer
Maximum number of times the discount is applicable.@NotNull String
Valid LineItem target predicate.@NotNull SelectionMode
SelectionMode based on which particular Line Items were discounted.@NotNull Integer
Quantity of Line Items that triggered the application of the discount.@NotNull String
getType()
of()
factory methodof
(ChangeTargetMultiBuyLineItemsChangeValue template) factory method to create a shallow copy ChangeTargetMultiBuyLineItemsChangeValuevoid
setDiscountedQuantity
(Integer discountedQuantity) Quantity of Line Items discounted per application of this discount.void
setMaxOccurrence
(Integer maxOccurrence) Maximum number of times the discount is applicable.void
setPredicate
(String predicate) Valid LineItem target predicate.void
setSelectionMode
(SelectionMode selectionMode) SelectionMode based on which particular Line Items were discounted.void
setTriggerQuantity
(Integer triggerQuantity) Quantity of Line Items that triggered the application of the discount.static com.fasterxml.jackson.core.type.TypeReference<ChangeTargetMultiBuyLineItemsChangeValue>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withChangeTargetMultiBuyLineItemsChangeValue
(Function<ChangeTargetMultiBuyLineItemsChangeValue, T> helper) accessor map functionMethods inherited from interface com.commercetools.history.models.change_value.ChangeTargetChangeValue
withChangeTargetChangeValue
-
Field Details
-
MULTI_BUY_LINE_ITEMS
discriminator value for ChangeTargetMultiBuyLineItemsChangeValue- See Also:
-
-
Method Details
-
getType
- Specified by:
getType
in interfaceChangeTargetChangeValue
- Returns:
- type
-
getPredicate
Valid LineItem target predicate.
- Returns:
- predicate
-
getTriggerQuantity
Quantity of Line Items that triggered the application of the discount.
- Returns:
- triggerQuantity
-
getDiscountedQuantity
Quantity of Line Items discounted per application of this discount.
- Returns:
- discountedQuantity
-
getMaxOccurrence
Maximum number of times the discount is applicable.
- Returns:
- maxOccurrence
-
getSelectionMode
SelectionMode based on which particular Line Items were discounted.
- Returns:
- selectionMode
-
setPredicate
Valid LineItem target predicate.
- Parameters:
predicate
- value to be set
-
setTriggerQuantity
Quantity of Line Items that triggered the application of the discount.
- Parameters:
triggerQuantity
- value to be set
-
setDiscountedQuantity
Quantity of Line Items discounted per application of this discount.
- Parameters:
discountedQuantity
- value to be set
-
setMaxOccurrence
Maximum number of times the discount is applicable.
- Parameters:
maxOccurrence
- value to be set
-
setSelectionMode
SelectionMode based on which particular Line Items were discounted.
- Parameters:
selectionMode
- value to be set
-
of
factory method- Returns:
- instance of ChangeTargetMultiBuyLineItemsChangeValue
-
of
static ChangeTargetMultiBuyLineItemsChangeValue of(ChangeTargetMultiBuyLineItemsChangeValue template) factory method to create a shallow copy ChangeTargetMultiBuyLineItemsChangeValue- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ChangeTargetMultiBuyLineItemsChangeValue deepCopy(@Nullable ChangeTargetMultiBuyLineItemsChangeValue template) factory method to create a deep copy of ChangeTargetMultiBuyLineItemsChangeValue- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ChangeTargetMultiBuyLineItemsChangeValue- Returns:
- builder
-
builder
static ChangeTargetMultiBuyLineItemsChangeValueBuilder builder(ChangeTargetMultiBuyLineItemsChangeValue template) create builder for ChangeTargetMultiBuyLineItemsChangeValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withChangeTargetMultiBuyLineItemsChangeValue
default <T> T withChangeTargetMultiBuyLineItemsChangeValue(Function<ChangeTargetMultiBuyLineItemsChangeValue, T> helper) 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<ChangeTargetMultiBuyLineItemsChangeValue> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-