Class: Stripe::Treasury::Transaction

Inherits:
APIResource show all
Extended by:
APIOperations::List
Defined in:
lib/stripe/resources/treasury/transaction.rb

Overview

Transactions represent changes to a [FinancialAccount’s](stripe.com/docs/api#financial_accounts) balance.

Defined Under Namespace

Classes: BalanceImpact, FlowDetails, ListParams, StatusTransitions

Constant Summary collapse

OBJECT_NAME =
"treasury.transaction"

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 APIOperations::List

list

Methods inherited from APIResource

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

Methods included from 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

#amountObject (readonly)

Amount (in cents) transferred.



176
177
178
# File 'lib/stripe/resources/treasury/transaction.rb', line 176

def amount
  @amount
end

#balance_impactObject (readonly)

Change to a FinancialAccount’s balance



178
179
180
# File 'lib/stripe/resources/treasury/transaction.rb', line 178

def balance_impact
  @balance_impact
end

#createdObject (readonly)

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



180
181
182
# File 'lib/stripe/resources/treasury/transaction.rb', line 180

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



182
183
184
# File 'lib/stripe/resources/treasury/transaction.rb', line 182

def currency
  @currency
end

#descriptionObject (readonly)

An arbitrary string attached to the object. Often useful for displaying to users.



184
185
186
# File 'lib/stripe/resources/treasury/transaction.rb', line 184

def description
  @description
end

#entriesObject (readonly)

A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.



186
187
188
# File 'lib/stripe/resources/treasury/transaction.rb', line 186

def entries
  @entries
end

#financial_accountObject (readonly)

The FinancialAccount associated with this object.



188
189
190
# File 'lib/stripe/resources/treasury/transaction.rb', line 188

def 
  @financial_account
end

#flowObject (readonly)

ID of the flow that created the Transaction.



190
191
192
# File 'lib/stripe/resources/treasury/transaction.rb', line 190

def flow
  @flow
end

#flow_detailsObject (readonly)

Details of the flow that created the Transaction.



192
193
194
# File 'lib/stripe/resources/treasury/transaction.rb', line 192

def flow_details
  @flow_details
end

#flow_typeObject (readonly)

Type of the flow that created the Transaction.



194
195
196
# File 'lib/stripe/resources/treasury/transaction.rb', line 194

def flow_type
  @flow_type
end

#idObject (readonly)

Unique identifier for the object.



196
197
198
# File 'lib/stripe/resources/treasury/transaction.rb', line 196

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.



198
199
200
# File 'lib/stripe/resources/treasury/transaction.rb', line 198

def livemode
  @livemode
end

#objectObject (readonly)

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



200
201
202
# File 'lib/stripe/resources/treasury/transaction.rb', line 200

def object
  @object
end

#statusObject (readonly)

Status of the Transaction.



202
203
204
# File 'lib/stripe/resources/treasury/transaction.rb', line 202

def status
  @status
end

#status_transitionsObject (readonly)

Attribute for field status_transitions



204
205
206
# File 'lib/stripe/resources/treasury/transaction.rb', line 204

def status_transitions
  @status_transitions
end

Class Method Details

.field_remappingsObject



224
225
226
# File 'lib/stripe/resources/treasury/transaction.rb', line 224

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



216
217
218
219
220
221
222
# File 'lib/stripe/resources/treasury/transaction.rb', line 216

def self.inner_class_types
  @inner_class_types = {
    balance_impact: BalanceImpact,
    flow_details: FlowDetails,
    status_transitions: StatusTransitions,
  }
end

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

Retrieves a list of Transaction objects.



207
208
209
210
211
212
213
214
# File 'lib/stripe/resources/treasury/transaction.rb', line 207

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

.object_nameObject



11
12
13
# File 'lib/stripe/resources/treasury/transaction.rb', line 11

def self.object_name
  "treasury.transaction"
end