class ThreeScaleToolbox::Commands::PlansCommand::Export::ReadPlanPricingRulesStep
Public Instance Methods
call()
click to toggle source
Reads Application Plan pricing rules add metric system_name out of metric_id
# File lib/3scale_toolbox/commands/plans_command/export/read_plan_pricing_rules_step.rb, line 10 def call result[:pricingrules] = plan.pricing_rules.map do |pr| pr.attrs.merge('metric' => metric_info(pr, 'PricingRule'), 'cost_per_unit' => pr.cost_per_unit.to_f) end end