Interface AddOrderDiscountRAOAction
-
@Deprecated(forRemoval=true, since="2005") public interface AddOrderDiscountRAOActionDeprecated, for removal: This API element is subject to removal in a future version.not used since 6.2 releaseAddOrderDiscountRAOAction adds a discount on order/cart level.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description DiscountRAOaddOrderLevelDiscount(CartRAO cartRao, boolean absolute, java.math.BigDecimal amount, RuleEngineResultRAO result, java.lang.Object ruleContext)Deprecated, for removal: This API element is subject to removal in a future version.Adds an order level discount to the givencartRao, recalculates the cart totals and returns the discount.DiscountRAOaddOrderLevelDiscount(CartRAO cartRao, boolean absolute, java.math.BigDecimal amount, java.lang.String[] excludedProducts, RuleEngineResultRAO result, java.lang.Object ruleContext)Deprecated, for removal: This API element is subject to removal in a future version.Adds an order-level discount to thecartRaoand recalculates cart totals.java.math.BigDecimalcalculateSubTotals(CartRAO cartRao, java.lang.String[] excludedProductCodes)Deprecated, for removal: This API element is subject to removal in a future version.Calculates the cart sub total for CartRao excluding a set of products.
-
-
-
Method Detail
-
addOrderLevelDiscount
DiscountRAO addOrderLevelDiscount(CartRAO cartRao, boolean absolute, java.math.BigDecimal amount, RuleEngineResultRAO result, java.lang.Object ruleContext)
Deprecated, for removal: This API element is subject to removal in a future version.Adds an order level discount to the givencartRao, recalculates the cart totals and returns the discount. Theabsoluteflag determines whether the discount is absolute or percentage based. For absolute values, the cart's currency is used. Theamountspecifies the amount used, e.g. $20 or 10%. TheruleContextcan be used to enhance the returned DiscountRAO.- Parameters:
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 DiscountRAO
-
addOrderLevelDiscount
DiscountRAO addOrderLevelDiscount(CartRAO cartRao, boolean absolute, java.math.BigDecimal amount, java.lang.String[] excludedProducts, RuleEngineResultRAO result, java.lang.Object ruleContext)
Deprecated, for removal: This API element is subject to removal in a future version.Adds an order-level discount to thecartRaoand recalculates cart totals. Takes into account the excluded products so that non-absolute discounts are calculated relative to the total excluding these products- Parameters:
cartRao- 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 environment- Returns:
- order-level DiscountRAO
-
calculateSubTotals
java.math.BigDecimal calculateSubTotals(CartRAO cartRao, java.lang.String[] excludedProductCodes)
Deprecated, for removal: This API element is subject to removal in a future version.Calculates the cart sub total for CartRao excluding a set of products.- Parameters:
cartRao- CartRAO object to be calculatedexcludedProductCodes- Array of product codes that identify cart entries to be excluded- Returns:
- result of the cartSubTotals (without charges like payment or delivery) minus the excluded products
-
-