public interface AddOrderDiscountRAOAction
| Modifier and Type | Method and Description |
|---|---|
DiscountRAO |
addOrderLevelDiscount(CartRAO cartRao,
boolean absolute,
java.math.BigDecimal amount,
RuleEngineResultRAO result,
java.lang.Object ruleContext)
Adds an order level discount to the given
cartRao, recalculates the cart totals and returns the discount. |
DiscountRAO |
addOrderLevelDiscount(CartRAO cartRao,
boolean absolute,
java.math.BigDecimal amount,
java.lang.String[] excludedProducts,
RuleEngineResultRAO result,
java.lang.Object ruleContext)
Adds an order-level discount to the
cartRao and recalculates cart totals. |
java.math.BigDecimal |
calculateSubTotals(CartRAO cartRao,
java.lang.String[] excludedProductCodes)
Calculates the cart sub total for CartRao excluding a set of products.
|
DiscountRAO addOrderLevelDiscount(CartRAO cartRao, boolean absolute, java.math.BigDecimal amount, RuleEngineResultRAO result, java.lang.Object ruleContext)
cartRao, 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.cartRao - the CartRAO 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
DiscountRAODiscountRAO addOrderLevelDiscount(CartRAO cartRao, boolean absolute, java.math.BigDecimal amount, java.lang.String[] excludedProducts, RuleEngineResultRAO result, java.lang.Object ruleContext)
cartRao and recalculates cart totals. Takes into account the excluded
products so that non-absolute discounts are calculated relative to the total excluding these productscartRao - Cart to apply the discount to.absolute - true if the discount is a definite currency amount, rather than a percentage discountamount - currency amount or percentage to be discountedresult - resultRAO containing information from evaluation actionruleContext - additional info for the rule execution environmentjava.math.BigDecimal calculateSubTotals(CartRAO cartRao, java.lang.String[] excludedProductCodes)
cartRao - CartRAO object to be calculatedexcludedProductCodes - Array of product codes that identify cart entries to be excludedCopyright © 2018 SAP SE. All Rights Reserved.