Sha256: fa9b3f7caf392c8458df6e04aca1ef44e399fb05162ac51b10f935a53221170d

Contents?: true

Size: 492 Bytes

Versions: 3

Compression:

Stored size: 492 Bytes

Contents

module ThreeScaleToolbox
  module Commands
    module PlansCommand
      module Export
        class ReadPlanPricingRulesStep
          include Step
          ##
          # Reads Application Plan pricing rules
          # add metric system_name out of metric_id
          def call
            result[:pricingrules] = plan.pricing_rules.map do |pr|
              pr.tap { |e| e['metric'] = metric_info(e, 'PricingRule') }
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
3scale_toolbox-0.11.0 lib/3scale_toolbox/commands/plans_command/export/read_plan_pricing_rules_step.rb
3scale_toolbox-0.10.0 lib/3scale_toolbox/commands/plans_command/export/read_plan_pricing_rules_step.rb
3scale_toolbox-0.9.0 lib/3scale_toolbox/commands/plans_command/export/read_plan_pricing_rules_step.rb