Class: Stripe::CLI::Commands::Customers
- Inherits:
-
Stripe::CLI::Command
- Object
- Thor
- Stripe::CLI::Command
- Stripe::CLI::Commands::Customers
- Includes:
- Utils
- Defined in:
- lib/stripe/cli/commands/customers.rb
Instance Method Summary collapse
Methods inherited from Stripe::CLI::Command
Instance Method Details
#create ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/stripe/cli/commands/customers.rb', line 43 def create [:email] ||= ask('Customer\'s Email:') [:description] ||= ask('Provide a description:') [:plan] ||= ask('Assign a plan:') if [:plan] == "" .delete :plan else [:coupon] ||= ask('Apply a coupon:') end .delete( :coupon ) if [:coupon] == "" if [:plan] [:card] ||= credit_card( ) [:trial_end] = Chronic.parse([:trial_end]).to_i.to_s if [:trial_end] end super Stripe::Customer, end |
#delete(customer_id) ⇒ Object
24 25 26 |
# File 'lib/stripe/cli/commands/customers.rb', line 24 def delete customer_id super Stripe::Customer, customer_id end |
#find(customer_id) ⇒ Object
19 20 21 |
# File 'lib/stripe/cli/commands/customers.rb', line 19 def find customer_id super Stripe::Customer, customer_id end |
#list ⇒ Object
14 15 16 |
# File 'lib/stripe/cli/commands/customers.rb', line 14 def list super Stripe::Customer, end |