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

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

#==, #[], #[]=, #_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

#accountObject (readonly)

ID of the Stripe account this fee was taken from.



81
82
83
# File 'lib/stripe/resources/application_fee.rb', line 81

def 
  @account
end

#amountObject (readonly)

Amount earned, in cents (or local equivalent).



83
84
85
# File 'lib/stripe/resources/application_fee.rb', line 83

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)



85
86
87
# File 'lib/stripe/resources/application_fee.rb', line 85

def amount_refunded
  @amount_refunded
end

#applicationObject (readonly)

ID of the Connect application that earned the fee.



87
88
89
# File 'lib/stripe/resources/application_fee.rb', line 87

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).



89
90
91
# File 'lib/stripe/resources/application_fee.rb', line 89

def balance_transaction
  @balance_transaction
end

#chargeObject (readonly)

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



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

def charge
  @charge
end

#createdObject (readonly)

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



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

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).



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

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.



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

def fee_source
  @fee_source
end

#idObject (readonly)

Unique identifier for the object.



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

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.



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

def livemode
  @livemode
end

#objectObject (readonly)

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



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

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.



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

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.



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

def refunded
  @refunded
end

#refundsObject (readonly)

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



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

def refunds
  @refunds
end

Class Method Details

.field_remappingsObject



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

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



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

def self.inner_class_types
  @inner_class_types = { fee_source: FeeSource }
end

.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.



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

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