class Stripe::CLI::Commands::Customers

Public Instance Methods

create() click to toggle source
Calls superclass method Stripe::CLI::Command#create
# File lib/stripe/cli/commands/customers.rb, line 43
def create
  options[:email]       ||= ask('Customer\'s Email:')
  options[:description] ||= ask('Provide a description:')
  options[:plan]        ||= ask('Assign a plan:')
  if options[:plan] == ""
    options.delete :plan
  else
    options[:coupon]    ||= ask('Apply a coupon:')
  end
  options.delete( :coupon ) if options[:coupon] == ""

  if options[:plan]
    options[:card] ||= credit_card( options )
    options[:trial_end] = Chronic.parse(options[:trial_end]).to_i.to_s if options[:trial_end]
  end

  super Stripe::Customer, options
end
delete(customer_id) click to toggle source
Calls superclass method Stripe::CLI::Command#delete
# File lib/stripe/cli/commands/customers.rb, line 24
def delete customer_id
  super Stripe::Customer, customer_id
end
find(customer_id) click to toggle source
Calls superclass method Stripe::CLI::Command#find
# File lib/stripe/cli/commands/customers.rb, line 19
def find customer_id
  super Stripe::Customer, customer_id
end
list() click to toggle source
Calls superclass method Stripe::CLI::Command#list
# File lib/stripe/cli/commands/customers.rb, line 14
def list
  super Stripe::Customer, options
end