Class: Stripe::CLI::Commands::Plans

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

Instance Method Summary collapse

Methods inherited from Stripe::CLI::Command

#inspect

Instance Method Details

#createObject



36
37
38
39
40
41
42
# File 'lib/stripe/cli/commands/plans.rb', line 36

def create
  options[:amount]   = convert_amount(options[:amount])
  options[:name]   ||= ask('Plan name:')
  options[:id]     ||= ask('Plan id:')

  super Stripe::Plan, options
end

#delete(plan_id) ⇒ Object



23
24
25
# File 'lib/stripe/cli/commands/plans.rb', line 23

def delete plan_id
  super Stripe::Plan, plan_id
end

#find(plan_id) ⇒ Object



18
19
20
# File 'lib/stripe/cli/commands/plans.rb', line 18

def find plan_id
  super Stripe::Plan, plan_id
end

#listObject



13
14
15
# File 'lib/stripe/cli/commands/plans.rb', line 13

def list
  super Stripe::Plan, options
end