Class: Stripe::ApplicationFee

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

Defined Under Namespace

Classes: FeeSource, ListParams, RetrieveParams

Constant Summary collapse

OBJECT_NAME =
"application_fee"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class 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, #request_stripe_object, 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, #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

#accountObject (readonly)

ID of the Stripe account this fee was taken from.



92
93
94
# File 'lib/stripe/resources/application_fee.rb', line 92

def 
  @account
end

#amountObject (readonly)

Amount earned, in cents (or local equivalent).



95
96
97
# File 'lib/stripe/resources/application_fee.rb', line 95

def amount
  @amount
end

#amount_refundedObject (readonly)

Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued)



98
99
100
# File 'lib/stripe/resources/application_fee.rb', line 98

def amount_refunded
  @amount_refunded
end

#applicationObject (readonly)

ID of the Connect application that earned the fee.



101
102
103
# File 'lib/stripe/resources/application_fee.rb', line 101

def application
  @application
end

#balance_transactionObject (readonly)

Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).



104
105
106
# File 'lib/stripe/resources/application_fee.rb', line 104

def balance_transaction
  @balance_transaction
end

#chargeObject (readonly)

ID of the charge that the application fee was taken from.



107
108
109
# File 'lib/stripe/resources/application_fee.rb', line 107

def charge
  @charge
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



110
111
112
# File 'lib/stripe/resources/application_fee.rb', line 110

def created
  @created
end

#currencyObject (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).



113
114
115
# File 'lib/stripe/resources/application_fee.rb', line 113

def currency
  @currency
end

#fee_sourceObject (readonly)

Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.



116
117
118
# File 'lib/stripe/resources/application_fee.rb', line 116

def fee_source
  @fee_source
end

#idObject (readonly)

Unique identifier for the object.



119
120
121
# File 'lib/stripe/resources/application_fee.rb', line 119

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



122
123
124
# File 'lib/stripe/resources/application_fee.rb', line 122

def livemode
  @livemode
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



125
126
127
# File 'lib/stripe/resources/application_fee.rb', line 125

def object
  @object
end

#originating_transactionObject (readonly)

ID of the corresponding charge on the platform account, if this fee was the result of a charge using the ‘destination` parameter.



128
129
130
# File 'lib/stripe/resources/application_fee.rb', line 128

def originating_transaction
  @originating_transaction
end

#refundedObject (readonly)

Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.



131
132
133
# File 'lib/stripe/resources/application_fee.rb', line 131

def refunded
  @refunded
end

#refundsObject (readonly)

A list of refunds that have been applied to the fee.



134
135
136
# File 'lib/stripe/resources/application_fee.rb', line 134

def refunds
  @refunds
end

Class Method Details

.list(params = {}, opts = {}) ⇒ Object

Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.



137
138
139
# File 'lib/stripe/resources/application_fee.rb', line 137

def self.list(params = {}, opts = {})
  request_stripe_object(method: :get, path: "/v1/application_fees", params: params, opts: opts)
end

.object_nameObject



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

def self.object_name
  "application_fee"
end