Class: Stripe::ApplicationFee

Inherits:
APIResource show all
Extended by:
Stripe::APIOperations::List, Stripe::APIOperations::NestedResource
Defined in:
lib/stripe/resources/application_fee.rb

Constant Summary collapse

OBJECT_NAME =
"application_fee".freeze

Instance Attribute Summary

Attributes inherited from APIResource

#save_with_parent

Instance Method Summary collapse

Methods included from Stripe::APIOperations::List

list

Methods included from Stripe::APIOperations::NestedResource

nested_resource_class_methods

Methods inherited from APIResource

class_name, custom_method, #refresh, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from Stripe::APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #refresh_from, serialize_params, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #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

Instance Method Details

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

If you don’t need access to an updated fee object after the refund, it’s more performant to just call ‘fee.refunds.create` directly.

[View source]

15
16
17
18
19
20
21
22
# File 'lib/stripe/resources/application_fee.rb', line 15

def refund(params = {}, opts = {})
  refunds.create(params, opts)

  # now that a refund has been created, we expect the state of this object
  # to change as well (i.e. `refunded` will now be `true`) so refresh it
  # from the server
  refresh
end