Class ChangeTargetMultiBuyLineItemsChangeValueBuilder
java.lang.Object
com.commercetools.history.models.change_value.ChangeTargetMultiBuyLineItemsChangeValueBuilder
- All Implemented Interfaces:
Builder<ChangeTargetMultiBuyLineItemsChangeValue>
public class ChangeTargetMultiBuyLineItemsChangeValueBuilder
extends Object
implements Builder<ChangeTargetMultiBuyLineItemsChangeValue>
ChangeTargetMultiBuyLineItemsChangeValueBuilder
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()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds ChangeTargetMultiBuyLineItemsChangeValue with checking for non-null required valuesbuilds ChangeTargetMultiBuyLineItemsChangeValue without checking for non-null required valuesdiscountedQuantity
(Integer discountedQuantity) Quantity of Line Items discounted per application of this discount.Quantity of Line Items discounted per application of this discount.Maximum number of times the discount is applicable.Valid LineItem target predicate.SelectionMode based on which particular Line Items were discounted.Quantity of Line Items that triggered the application of the discount.maxOccurrence
(Integer maxOccurrence) Maximum number of times the discount is applicable.of()
factory method for an instance of ChangeTargetMultiBuyLineItemsChangeValueBuilderof
(ChangeTargetMultiBuyLineItemsChangeValue template) create builder for ChangeTargetMultiBuyLineItemsChangeValue instanceValid LineItem target predicate.selectionMode
(SelectionMode selectionMode) SelectionMode based on which particular Line Items were discounted.triggerQuantity
(Integer triggerQuantity) Quantity of Line Items that triggered the application of the discount.
-
Constructor Details
-
ChangeTargetMultiBuyLineItemsChangeValueBuilder
public ChangeTargetMultiBuyLineItemsChangeValueBuilder()
-
-
Method Details
-
predicate
Valid LineItem target predicate.
- Parameters:
predicate
- value to be set- Returns:
- Builder
-
triggerQuantity
Quantity of Line Items that triggered the application of the discount.
- Parameters:
triggerQuantity
- value to be set- Returns:
- Builder
-
discountedQuantity
public ChangeTargetMultiBuyLineItemsChangeValueBuilder discountedQuantity(Integer discountedQuantity) Quantity of Line Items discounted per application of this discount.
- Parameters:
discountedQuantity
- value to be set- Returns:
- Builder
-
maxOccurrence
Maximum number of times the discount is applicable.
- Parameters:
maxOccurrence
- value to be set- Returns:
- Builder
-
selectionMode
SelectionMode based on which particular Line Items were discounted.
- Parameters:
selectionMode
- value to be set- Returns:
- Builder
-
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
-
build
builds ChangeTargetMultiBuyLineItemsChangeValue with checking for non-null required values- Specified by:
build
in interfaceBuilder<ChangeTargetMultiBuyLineItemsChangeValue>
- Returns:
- ChangeTargetMultiBuyLineItemsChangeValue
-
buildUnchecked
builds ChangeTargetMultiBuyLineItemsChangeValue without checking for non-null required values- Returns:
- ChangeTargetMultiBuyLineItemsChangeValue
-
of
factory method for an instance of ChangeTargetMultiBuyLineItemsChangeValueBuilder- Returns:
- builder
-
of
public static ChangeTargetMultiBuyLineItemsChangeValueBuilder of(ChangeTargetMultiBuyLineItemsChangeValue template) create builder for ChangeTargetMultiBuyLineItemsChangeValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-