Class: Stripe::ApplicationFee

Inherits:
APIResource show all
Includes:
Stripe::APIOperations::List
Defined in:
lib/stripe/application_fee.rb

Instance Attribute Summary

Attributes inherited from StripeObject

#api_key

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Stripe::APIOperations::List

included

Methods inherited from APIResource

class_name, #refresh, retrieve, #url

Methods inherited from StripeObject

#[], #[]=, #_dump, _load, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #respond_to?, #to_hash, #to_json, #to_s, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Class Method Details

.urlObject



5
6
7
# File 'lib/stripe/application_fee.rb', line 5

def self.url
  '/v1/application_fees'
end

Instance Method Details

#refund(params = {}, opts = {}) ⇒ Object



9
10
11
12
13
# File 'lib/stripe/application_fee.rb', line 9

def refund(params={}, opts={})
  api_key, headers = Util.parse_opts(opts)
  response, api_key = Stripe.request(:post, refund_url, api_key || @api_key, params, headers)
  refresh_from(response, api_key)
end