class ErpRules::RulesEngine::PricingEngine

Public Class Methods

new() click to toggle source
# File lib/erp_rules/rules_engine/pricing_engine.rb, line 5
def initialize()
end

Public Instance Methods

price_products(execution_context) click to toggle source
# File lib/erp_rules/rules_engine/pricing_engine.rb, line 8
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