RAOAction hierarchy instead@Deprecated public class DefaultAddOrderDiscountRAOAction extends AbstractCommerceRAOAction implements AddOrderDiscountRAOAction
| Constructor and Description |
|---|
DefaultAddOrderDiscountRAOAction()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
DiscountRAO |
addOrderLevelDiscount(CartRAO cartRao,
boolean absolute,
BigDecimal amount,
RuleEngineResultRAO result,
Object ruleContext)
Deprecated.
Adds an order level discount to the given
cartRao, recalculates the cart totals and returns the discount. |
DiscountRAO |
addOrderLevelDiscount(CartRAO cartRao,
boolean absolute,
BigDecimal amount,
String[] excludedProducts,
RuleEngineResultRAO result,
Object ruleContext)
Deprecated.
Adds an order-level discount to the
cartRao and recalculates cart totals. |
BigDecimal |
calculateSubTotals(CartRAO cartRao,
String[] excludedProductCodes)
Deprecated.
Calculates the cart sub total for CartRao excluding a set of products.
|
adjustStrategyQuantity, adjustUnitPrice, adjustUnitPrice, consumeOrderEntries, consumeOrderEntries, consumeOrderEntry, consumeOrderEntry, createOrderEntryConsumedRAO, getBeanName, getEntriesSelectionStrategies, getNotExecutableActionStrategy, getRaoUtils, getRuleConfigurationRRD, getRuleEngineCalculationService, getRuleGroupExecutionRRD, getSelectedOrderEntryQuantities, getSelectedOrderEntryRaos, hasEnoughQuantity, hasEnoughQuantity, setBeanName, setEntriesSelectionStrategies, setNotExecutableActionStrategy, setRAOMetaData, setRaoUtils, setRuleEngineCalculationService, splitEntriesSelectionStrategies, trackRuleExecution, trackRuleGroupExecution, trackRuleGroupExecutions, updateActionRAOWithConsumed, validateCurrencyIsoCode, validateSelectionStrategycheckAndGetRuleContext, getConfigurationService, getMetaDataFromRule, getMetaDataFromRule, getRuleCode, insertFacts, insertFacts, setConfigurationService, updateFacts, validateRulepublic DefaultAddOrderDiscountRAOAction()
public BigDecimal calculateSubTotals(CartRAO cartRao, String[] excludedProductCodes)
AddOrderDiscountRAOActioncalculateSubTotals in interface AddOrderDiscountRAOActioncartRao - CartRAO object to be calculatedexcludedProductCodes - Array of product codes that identify cart entries to be excludedpublic DiscountRAO addOrderLevelDiscount(CartRAO cartRao, boolean absolute, BigDecimal amount, String[] excludedProducts, RuleEngineResultRAO result, Object ruleContext)
AddOrderDiscountRAOActioncartRao and recalculates cart totals. Takes into account the excluded
products so that non-absolute discounts are calculated relative to the total excluding these productsaddOrderLevelDiscount in interface AddOrderDiscountRAOActioncartRao - 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 environmentpublic DiscountRAO addOrderLevelDiscount(CartRAO cartRao, boolean absolute, BigDecimal amount, RuleEngineResultRAO result, Object ruleContext)
AddOrderDiscountRAOActioncartRao, 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.addOrderLevelDiscount in interface AddOrderDiscountRAOActioncartRao - 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
DiscountRAOCopyright © 2017 SAP SE. All Rights Reserved.