class Stripe::CLI::Commands::Tokens

Public Instance Methods

create(type) click to toggle source
Calls superclass method Stripe::CLI::Command#create
# 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, 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) click to toggle source
Calls superclass method Stripe::CLI::Command#find
# File lib/stripe/cli/commands/tokens.rb, line 8
def find event_id
  super Stripe::Token, event_id
end

Private Instance Methods

strip_list() click to toggle source
# File lib/stripe/cli/commands/tokens.rb, line 40
def strip_list
  %i( card card_number card_exp_month card_exp_year card_cvc card_name bank_account country routing_number account_number )
end