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