Sha256: 181bdd3e34c3788681e18a039c91bcbe23368768a63434ae6fc37d48bf6eca13

Contents?: true

Size: 558 Bytes

Versions: 18

Compression:

Stored size: 558 Bytes

Contents

module Brightbox
  command [:accounts] do |cmd|
    cmd.desc I18n.t("accounts.remove.desc")
    cmd.arg_name "account_id"
    cmd.command [:remove] do |c|
      c.action do |global_options, _options, args|
        account_id = args.first

        # Find the collaboration for that account
        collaboration = UserCollaboration.get_for_account(account_id)
        raise "Couldn't find an invite for account #{account_id}" unless collaboration

        collaboration.remove
        render_table([collaboration], global_options)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
brightbox-cli-5.0.0 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-5.0.0.rc2 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-5.0.0.rc1 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-5.0.0.alpha lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.8.0 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.7.0 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.6.0 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.5.0 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.5.0.rc1 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.4.0 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.3.2 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.3.1 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.3.0 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.2.1 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.2.0 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.1.0 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.0.0 lib/brightbox-cli/commands/accounts/remove.rb
brightbox-cli-4.0.0.rc2 lib/brightbox-cli/commands/accounts/remove.rb