Class: ThreeScaleToolbox::Commands::PlansCommand::Show::ShowSubcommand

Inherits:
Cri::CommandRunner
  • Object
show all
Includes:
ThreeScaleToolbox::Command
Defined in:
lib/3scale_toolbox/commands/plans_command/show_command.rb

Constant Summary collapse

FIELDS_TO_SHOW =
%w[id name system_name approval_required
cost_per_month setup_fee trial_period_days].freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ThreeScaleToolbox::Command

#config, #config_file, #exit_with_message, #fetch_required_option, included, #remotes, #threescale_client, #verbose, #verify_ssl

Class Method Details

.commandObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/3scale_toolbox/commands/plans_command/show_command.rb', line 11

def self.command
  Cri::Command.define do
    name        'show'
    usage       'show [opts] <remote> <service> <plan>'
    summary     'show application plan'
    description 'show application plan'

    ThreeScaleToolbox::CLI.output_flag(self)
    param       :remote
    param       :service_ref
    param       :plan_ref

    runner ShowSubcommand
  end
end

Instance Method Details

#runObject



27
28
29
# File 'lib/3scale_toolbox/commands/plans_command/show_command.rb', line 27

def run
  printer.print_record plan.attrs
end