Class: Stripe::CLI::Commands::Tokens

Inherits:
Stripe::CLI::Command show all
Includes:
Utils
Defined in:
lib/stripe/cli/commands/tokens.rb

Instance Method Summary collapse

Methods inherited from Stripe::CLI::Command

#inspect

Instance Method Details

#create(type) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/stripe/cli/commands/tokens.rb', line 23

def create type
  opt_symbol, value_hash = case type
  when 'card', 'credit_card', 'credit card'
    [ :card, credit_card( options ) ]
  when 'account', 'bank_account', 'bank account'
    [ :bank_account, ( options ) ]
  end

  options.delete_if {|option,_| strip_list.include? option }

  options[opt_symbol] = value_hash

  super Stripe::Token, options
end

#find(event_id) ⇒ Object



8
9
10
# File 'lib/stripe/cli/commands/tokens.rb', line 8

def find event_id
  super Stripe::Token, event_id
end