Interface AddFreeProductDiscountAction


  • public interface AddFreeProductDiscountAction
    AddFreeProductDiscountAction class that adds order entry level discounts such that a given quantity of products are free
    • Method Detail

      • addDiscount

        java.util.List<DiscountRAO> addDiscount​(EntriesSelectionStrategyRPD entriesSelectionStrategyRPD,
                                                int quantity,
                                                int consumed,
                                                RuleEngineResultRAO result,
                                                java.lang.Object ruleContext)
        Adds order level discounts to order entries contained within selection strategies. Strategies provide data used for selection of entries that will be discounted.
        Parameters:
        entriesSelectionStrategyRPD - Selection strategy holds information about which order entries should be discounted or consumed
        quantity - Number of free items that are discounted
        consumed - Number of entries that are consumed for each free item
        result - DiscountRAOs generated by the action and added to order
        ruleContext - an optional context object that can be used to provide additional information for the returned DiscountRAOs