Interface AddFixedPriceEntryDiscountRAOAction
-
public interface AddFixedPriceEntryDiscountRAOAction
AddFixedPriceEntryDiscount adds a discount to an cart entry so that the cart entry has a fixed target price.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<DiscountRAO>
addFixedPriceEntriesDiscount(java.util.List<EntriesSelectionStrategyRPD> entriesSelectionStrategyRPDs, java.math.BigDecimal fixedPrice, int maxQuantity, RuleEngineResultRAO result, java.lang.Object ruleContext)
Adds order entry level discounts to the order entries selected by strategies fromentriesSelectionStrategyRPDs
which are marked to be target for the action.DiscountRAO
addFixedPriceEntryDiscount(OrderEntryRAO orderEntryRao, java.math.BigDecimal fixedPrice, RuleEngineResultRAO result, java.lang.Object ruleContext)
Adds an order entry level discount to the givenorderEntryRao
such that the final price of the discounted order entry will be thefixedPrice
.java.util.List<DiscountRAO>
addFixedPriceEntryDiscounts(java.util.Collection<OrderEntryRAO> orderEntryRao, java.math.BigDecimal fixedPrice, RuleEngineResultRAO result, java.lang.Object ruleContext)
Adds an order entry level discount to each of the the givenorderEntryRao
such that the final price of the discounted order entry will be thefixedPrice
.
-
-
-
Method Detail
-
addFixedPriceEntryDiscount
DiscountRAO addFixedPriceEntryDiscount(OrderEntryRAO orderEntryRao, java.math.BigDecimal fixedPrice, RuleEngineResultRAO result, java.lang.Object ruleContext)
Adds an order entry level discount to the givenorderEntryRao
such that the final price of the discounted order entry will be thefixedPrice
.- Parameters:
orderEntryRao
- the OrderEntryRAO to apply the discount tofixedPrice
- the target unit price for the order entryresult
- the result raoruleContext
- an optional context object that can be used to provide additional information for the returned DiscountRAO
-
addFixedPriceEntryDiscounts
java.util.List<DiscountRAO> addFixedPriceEntryDiscounts(java.util.Collection<OrderEntryRAO> orderEntryRao, java.math.BigDecimal fixedPrice, RuleEngineResultRAO result, java.lang.Object ruleContext)
Adds an order entry level discount to each of the the givenorderEntryRao
such that the final price of the discounted order entry will be thefixedPrice
.- Parameters:
orderEntryRao
- collection of OrderEntryRAO to apply the discount tofixedPrice
- the target unit price for the order entryresult
- the result raoruleContext
- an optional context object that can be used to provide additional information for the returned DiscountRAO
-
addFixedPriceEntriesDiscount
java.util.List<DiscountRAO> addFixedPriceEntriesDiscount(java.util.List<EntriesSelectionStrategyRPD> entriesSelectionStrategyRPDs, java.math.BigDecimal fixedPrice, int maxQuantity, RuleEngineResultRAO result, java.lang.Object ruleContext)
Adds order entry level discounts to the order entries selected by strategies fromentriesSelectionStrategyRPDs
which are marked to be target for the action. The discount is such that the final price of the discounted order entry will befixedPrice
.- Parameters:
entriesSelectionStrategyRPDs
- list of strategies used to select order entries and their applicable quantities. Discounts are created for the entries from the strategies which haveisTargetOfAction
= true. Other entries are just consumed, but not discounted.fixedPrice
- the target unit price for the order entryresult
- RuleEngineResultRAO that will be updated with discountsruleContext
- an optional context object that can be used to provide additional information for the returned DiscountRAO- Returns:
- List of created discounts
-
-