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

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.



33
34
35
# File 'lib/stripe/resources/application_fee.rb', line 33

def 
  @account
end

#amountObject (readonly)

Amount earned, in cents (or local equivalent).



35
36
37
# File 'lib/stripe/resources/application_fee.rb', line 35

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)



37
38
39
# File 'lib/stripe/resources/application_fee.rb', line 37

def amount_refunded
  @amount_refunded
end

#applicationObject (readonly)

ID of the Connect application that earned the fee.



39
40
41
# File 'lib/stripe/resources/application_fee.rb', line 39

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



41
42
43
# File 'lib/stripe/resources/application_fee.rb', line 41

def balance_transaction
  @balance_transaction
end

#chargeObject (readonly)

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



43
44
45
# File 'lib/stripe/resources/application_fee.rb', line 43

def charge
  @charge
end

#createdObject (readonly)

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



45
46
47
# File 'lib/stripe/resources/application_fee.rb', line 45

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



47
48
49
# File 'lib/stripe/resources/application_fee.rb', line 47

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.



49
50
51
# File 'lib/stripe/resources/application_fee.rb', line 49

def fee_source
  @fee_source
end

#idObject (readonly)

Unique identifier for the object.



51
52
53
# File 'lib/stripe/resources/application_fee.rb', line 51

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.



53
54
55
# File 'lib/stripe/resources/application_fee.rb', line 53

def livemode
  @livemode
end

#objectObject (readonly)

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



55
56
57
# File 'lib/stripe/resources/application_fee.rb', line 55

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.



57
58
59
# File 'lib/stripe/resources/application_fee.rb', line 57

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.



59
60
61
# File 'lib/stripe/resources/application_fee.rb', line 59

def refunded
  @refunded
end

#refundsObject (readonly)

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



61
62
63
# File 'lib/stripe/resources/application_fee.rb', line 61

def refunds
  @refunds
end

Class Method Details

.field_remappingsObject



72
73
74
# File 'lib/stripe/resources/application_fee.rb', line 72

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



68
69
70
# File 'lib/stripe/resources/application_fee.rb', line 68

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.



64
65
66
# File 'lib/stripe/resources/application_fee.rb', line 64

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