Class: Stripe::ApplicationFeeRefund
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::ApplicationFeeRefund
- Includes:
- Stripe::APIOperations::Save
- Defined in:
- lib/stripe/resources/application_fee_refund.rb
Overview
‘Application Fee Refund` objects allow you to refund an application fee that has previously been created but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected.
Related guide: [Refunding application fees](stripe.com/docs/connect/destination-charges#refunding-app-fee)
Constant Summary collapse
- OBJECT_NAME =
"fee_refund"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Amount, in cents (or local equivalent).
-
#balance_transaction ⇒ Object
readonly
Balance transaction that describes the impact on your account balance.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#currency ⇒ Object
readonly
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase.
-
#fee ⇒ Object
readonly
ID of the application fee that was refunded.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
- .object_name ⇒ Object
- .retrieve(_id, _api_key = nil) ⇒ Object
- .update(_id, _params = nil, _opts = nil) ⇒ Object
Instance Method Summary collapse
Methods included from Stripe::APIOperations::Save
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, save_nested_resource
Methods included from Stripe::APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #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 Attribute Details
#amount ⇒ Object (readonly)
Amount, in cents (or local equivalent).
19 20 21 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 19 def amount @amount end |
#balance_transaction ⇒ Object (readonly)
Balance transaction that describes the impact on your account balance.
21 22 23 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 21 def balance_transaction @balance_transaction end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
23 24 25 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 23 def created @created end |
#currency ⇒ Object (readonly)
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).
25 26 27 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 25 def currency @currency end |
#fee ⇒ Object (readonly)
ID of the application fee that was refunded.
27 28 29 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 27 def fee @fee end |
#id ⇒ Object (readonly)
Unique identifier for the object.
29 30 31 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 29 def id @id end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
31 32 33 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 31 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
33 34 35 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 33 def object @object end |
Class Method Details
.field_remappings ⇒ Object
59 60 61 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 59 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
55 56 57 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 55 def self.inner_class_types @inner_class_types = {} end |
.object_name ⇒ Object
14 15 16 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 14 def self.object_name "fee_refund" end |
.retrieve(_id, _api_key = nil) ⇒ Object
48 49 50 51 52 53 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 48 def self.retrieve(_id, _api_key = nil) raise NotImplementedError, "Application fee refunds cannot be retrieved without an " \ "application fee ID. Retrieve an application fee refund using " \ "`ApplicationFee.retrieve_refund('fee_id', 'refund_id')`" end |
.update(_id, _params = nil, _opts = nil) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 40 def self.update(_id, _params = nil, _opts = nil) raise NotImplementedError, "Application fee refunds cannot be updated without an " \ "application fee ID. Update an application fee refund using " \ "`ApplicationFee.update_refund('fee_id', 'refund_id', " \ "update_params)`" end |
Instance Method Details
#resource_url ⇒ Object
35 36 37 38 |
# File 'lib/stripe/resources/application_fee_refund.rb', line 35 def resource_url "#{ApplicationFee.resource_url}/#{CGI.escape(fee)}/refunds" \ "/#{CGI.escape(id)}" end |