Class MultiBuyCustomLineItemsTargetBuilder
- All Implemented Interfaces:
Builder<MultiBuyCustomLineItemsTarget>
Example to create an instance using the builder pattern
MultiBuyCustomLineItemsTarget multiBuyCustomLineItemsTarget = MultiBuyCustomLineItemsTarget.builder()
.predicate("{predicate}")
.triggerQuantity(1)
.discountedQuantity(1)
.selectionMode(SelectionMode.CHEAPEST)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds MultiBuyCustomLineItemsTarget with checking for non-null required valuesbuilds MultiBuyCustomLineItemsTarget without checking for non-null required valuesdiscountedQuantity
(Integer discountedQuantity) Number of Custom Line Items that are discounted per application of this Discount.Number of Custom Line Items that are discounted per application of this Discount.Maximum number of times this Discount can be applied.Valid CustomLineItems target predicate.Discounts particular Line Items only according to the SelectionMode.Number of Custom Line Items to be present in order to trigger an application of this Discount.maxOccurrence
(Integer maxOccurrence) Maximum number of times this Discount can be applied.of()
factory method for an instance of MultiBuyCustomLineItemsTargetBuilderof
(MultiBuyCustomLineItemsTarget template) create builder for MultiBuyCustomLineItemsTarget instanceValid CustomLineItems target predicate.selectionMode
(SelectionMode selectionMode) Discounts particular Line Items only according to the SelectionMode.triggerQuantity
(Integer triggerQuantity) Number of Custom Line Items to be present in order to trigger an application of this Discount.
-
Constructor Details
-
MultiBuyCustomLineItemsTargetBuilder
public MultiBuyCustomLineItemsTargetBuilder()
-
-
Method Details
-
predicate
Valid CustomLineItems target predicate. The Discount will be applied to Custom Line Items that are matched by the predicate.
- Parameters:
predicate
- value to be set- Returns:
- Builder
-
triggerQuantity
Number of Custom Line Items to be present in order to trigger an application of this Discount.
- Parameters:
triggerQuantity
- value to be set- Returns:
- Builder
-
discountedQuantity
Number of Custom Line Items that are discounted per application of this Discount. It must be less than or equal to the
triggerQuantity
.- Parameters:
discountedQuantity
- value to be set- Returns:
- Builder
-
maxOccurrence
Maximum number of times this Discount can be applied. Do not set if the Discount should be applied an unlimited number of times.
- Parameters:
maxOccurrence
- value to be set- Returns:
- Builder
-
selectionMode
Discounts particular Line Items only according to the SelectionMode.
- Parameters:
selectionMode
- value to be set- Returns:
- Builder
-
getPredicate
Valid CustomLineItems target predicate. The Discount will be applied to Custom Line Items that are matched by the predicate.
- Returns:
- predicate
-
getTriggerQuantity
Number of Custom Line Items to be present in order to trigger an application of this Discount.
- Returns:
- triggerQuantity
-
getDiscountedQuantity
Number of Custom Line Items that are discounted per application of this Discount. It must be less than or equal to the
triggerQuantity
.- Returns:
- discountedQuantity
-
getMaxOccurrence
Maximum number of times this Discount can be applied. Do not set if the Discount should be applied an unlimited number of times.
- Returns:
- maxOccurrence
-
getSelectionMode
Discounts particular Line Items only according to the SelectionMode.
- Returns:
- selectionMode
-
build
builds MultiBuyCustomLineItemsTarget with checking for non-null required values- Specified by:
build
in interfaceBuilder<MultiBuyCustomLineItemsTarget>
- Returns:
- MultiBuyCustomLineItemsTarget
-
buildUnchecked
builds MultiBuyCustomLineItemsTarget without checking for non-null required values- Returns:
- MultiBuyCustomLineItemsTarget
-
of
factory method for an instance of MultiBuyCustomLineItemsTargetBuilder- Returns:
- builder
-
of
create builder for MultiBuyCustomLineItemsTarget instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-