class Stripe::CLI::Commands::Charges
Public Instance Methods
capture(charge_id)
click to toggle source
# File lib/stripe/cli/commands/charges.rb, line 35 def capture charge_id request Stripe::Charge.new(charge_id, api_key), :capture end
create()
click to toggle source
Calls superclass method
Stripe::CLI::Command#create
# File lib/stripe/cli/commands/charges.rb, line 54 def create options[:amount] = convert_amount(options[:amount]) options[:card] ||= credit_card( options ) unless options[:customer] super Stripe::Charge, options end
find(charge_id)
click to toggle source
Calls superclass method
Stripe::CLI::Command#find
# File lib/stripe/cli/commands/charges.rb, line 19 def find charge_id super Stripe::Charge, charge_id end
list()
click to toggle source
Calls superclass method
Stripe::CLI::Command#list
# File lib/stripe/cli/commands/charges.rb, line 14 def list super Stripe::Charge, options end
refund(charge_id)
click to toggle source
# File lib/stripe/cli/commands/charges.rb, line 27 def refund charge_id options[:amount] = convert_amount(options[:amount]) if options[:amount] if charge = retrieve_charge(charge_id) request charge.refunds, :create, options end end