Interface PromotionEngineService

    • Method Detail

      • evaluate

        RuleEvaluationResult evaluate​(ProductModel product,
                                      java.util.Collection<PromotionGroupModel> promotionGroups)
        Evaluates promotion against a product taking into context which is set by promotions group
        Parameters:
        product - to evaluate promotions for
        promotionGroups - collection of promotion groups to apply promotions for
        Returns:
        Map containing Promotion data as its values along with corresponding identifiers as its keys
      • evaluate

        RuleEvaluationResult evaluate​(AbstractOrderModel order,
                                      java.util.Collection<PromotionGroupModel> promotionGroups)
        evaluate the promotions for the given cart or order and for now. This does not apply the result to the cart/order.
        Parameters:
        order - the cart or order to evaluate
        promotionGroups - collection of promotion groups to apply promotions for
        Returns:
        the result of the evaluation
      • evaluate

        RuleEvaluationResult evaluate​(AbstractOrderModel order,
                                      java.util.Collection<PromotionGroupModel> promotionGroups,
                                      java.util.Date date)
        evaluate the promotions for the given cart or order and for the date. This does not apply the result to the cart/order.
        Parameters:
        order - the cart or order to evaluate
        promotionGroups - collection of promotion groups to apply promotions for
        date - the moment of evaluation
        Returns:
        the result of the evaluation