Class: ThreeScaleToolbox::Commands::ApplicationCommand::Delete::DeleteSubcommand

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ThreeScaleToolbox::Command

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

Class Method Details

.commandObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/3scale_toolbox/commands/application_command/delete_command.rb', line 8

def self.command
  Cri::Command.define do
    name        'delete'
    usage       'delete [opts] <remote> <application>'
    summary     'delete application'
    description "    Delete application'\n    \\n Application param allows:\n    \\n * User_key (API key)\n    \\n * App_id (from app_id/app_key pair) or Client ID (for OAuth and OpenID Connect authentication modes)\n    \\n * Application internal id\n    HEREDOC\n\n    param       :remote\n    param       :application_ref\n\n    runner DeleteSubcommand\n  end\nend\n"

Instance Method Details

#runObject



28
29
30
31
# File 'lib/3scale_toolbox/commands/application_command/delete_command.rb', line 28

def run
  application.delete
  puts "Application id: #{application.id} deleted"
end