Interface AddFixedPriceEntryDiscountRAOAction


  • public interface AddFixedPriceEntryDiscountRAOAction
    AddFixedPriceEntryDiscount adds a discount to an cart entry so that the cart entry has a fixed target price.
    • 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 given orderEntryRao such that the final price of the discounted order entry will be the fixedPrice.
        Parameters:
        orderEntryRao - the OrderEntryRAO to apply the discount to
        fixedPrice - the target unit price for the order entry
        result - the result rao
        ruleContext - 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 given orderEntryRao such that the final price of the discounted order entry will be the fixedPrice.
        Parameters:
        orderEntryRao - collection of OrderEntryRAO to apply the discount to
        fixedPrice - the target unit price for the order entry
        result - the result rao
        ruleContext - 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 from entriesSelectionStrategyRPDs which are marked to be target for the action. The discount is such that the final price of the discounted order entry will be fixedPrice.
        Parameters:
        entriesSelectionStrategyRPDs - list of strategies used to select order entries and their applicable quantities. Discounts are created for the entries from the strategies which have isTargetOfAction = true. Other entries are just consumed, but not discounted.
        fixedPrice - the target unit price for the order entry
        result - RuleEngineResultRAO that will be updated with discounts
        ruleContext - an optional context object that can be used to provide additional information for the returned DiscountRAO
        Returns:
        List of created discounts