Sha256: 03952c5fb18f36a393058be98af18cf9076dd0cd516a7066c67ad6c873e94783

Contents?: true

Size: 407 Bytes

Versions: 2

Compression:

Stored size: 407 Bytes

Contents

module ErpRules
  module RulesEngine
    class PricingEngine

      def initialize()
      end

      def price_products(execution_context)
        execution_context[:product_context][:products].each do |product|
          pricing_plan = PricingPlan.find_by_internal_identifier('default')
          product[:price] = pricing_plan.get_price
        end

        execution_context
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
erp_rules-4.2.0 lib/erp_rules/rules_engine/pricing_engine.rb
erp_rules-4.0.0 lib/erp_rules/rules_engine/pricing_engine.rb