public interface AddOrderEntryDiscountRAOAction
| Modifier and Type | Method and Description |
|---|---|
java.util.List<DiscountRAO> |
addOrderEntryLevelDiscount(java.util.List<EntriesSelectionStrategyRPD> entriesSelectionStrategyRPDs,
boolean absolute,
java.math.BigDecimal amount,
RuleEngineResultRAO result,
java.lang.Object ruleContext)
Adds order entry level discounts to the order entries selected by strategies from
entriesSelectionStrategyRPDs which are marked to be target for the action. |
DiscountRAO |
addOrderEntryLevelDiscount(OrderEntryRAO orderEntryRao,
boolean absolute,
java.math.BigDecimal amount,
RuleEngineResultRAO result,
java.lang.Object ruleContext)
Adds an order entry level discount to the given
orderEntryRao, recalculates the cart totals and returns
the discount. |
java.util.List<DiscountRAO> |
addOrderEntryLevelDiscounts(java.util.Collection<OrderEntryRAO> orderEntryList,
boolean absolute,
java.math.BigDecimal amount,
RuleEngineResultRAO result,
java.lang.Object ruleContext)
Adds an order entry level discount for each order entry element in
orderEntryList, recalculates the cart
totals and returns the discount. |
DiscountRAO addOrderEntryLevelDiscount(OrderEntryRAO orderEntryRao, boolean absolute, java.math.BigDecimal amount, RuleEngineResultRAO result, java.lang.Object ruleContext)
orderEntryRao, recalculates the cart totals and returns
the discount. The absolute flag determines whether the discount is absolute or percentage based. For
absolute values, the cart's currency is used. The amount specifies the amount used, e.g. $20 or 10%. The
ruleContext can be used to enhance the returned DiscountRAO.orderEntryRao - the OrderEntryRAO to apply the discount toabsolute - the type of discountamount - the amount of the discountresult - the result raoruleContext - an optional context object that can be used to provide additional information for the returned
DiscountRAOjava.util.List<DiscountRAO> addOrderEntryLevelDiscounts(java.util.Collection<OrderEntryRAO> orderEntryList, boolean absolute, java.math.BigDecimal amount, RuleEngineResultRAO result, java.lang.Object ruleContext)
orderEntryList, recalculates the cart
totals and returns the discount. The absolute flag determines whether the discount is absolute or
percentage based. For absolute values, the cart's currency is used. The amount specifies the amount used,
e.g. $20 or 10%. The ruleContext can be used to enhance the returned DiscountRAO.orderEntryList - Collection of OrderEntryRAO to apply the discount toabsolute - the type of discountamount - the amount of the discountresult - the result raoruleContext - an optional context object that can be used to provide additional information for the returned
DiscountRAOjava.util.List<DiscountRAO> addOrderEntryLevelDiscount(java.util.List<EntriesSelectionStrategyRPD> entriesSelectionStrategyRPDs, boolean absolute, java.math.BigDecimal amount, RuleEngineResultRAO result, java.lang.Object ruleContext)
entriesSelectionStrategyRPDs which are marked to be target for the action. The discount is either absolute
or percentage.entriesSelectionStrategyRPDs - list of strategies used to select order entries and their applicable quantities. Discounts are created
for the entries from the strategies which have isTargetOfAction = true. Other entries are just
consumed, but not discounted.absolute - type of discount to be applied. Absolute discount will provide a currency amount discount, rather than a
percentage.amount - amount of discount to apply. Can be currency amount of percentageresult - RuleEngineResultRAO that will be updated with discountsruleContext - an optional context object that can be used to provide additional information for the returned
DiscountRAOCopyright © 2018 SAP SE. All Rights Reserved.