Class: Stripe::FinancialConnections::Account

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

Overview

A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.

Defined Under Namespace

Classes: AccountHolder, AccountNumber, Balance, BalanceRefresh, OwnershipRefresh, StatusDetails, TransactionRefresh

Constant Summary collapse

OBJECT_NAME =
"financial_connections.account"

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

Instance 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?, field_encodings, #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

#account_holderObject (readonly)

The account holder that this account belongs to.



193
194
195
# File 'lib/stripe/resources/financial_connections/account.rb', line 193

def 
  @account_holder
end

#account_numbersObject (readonly)

Details about the account numbers.



195
196
197
# File 'lib/stripe/resources/financial_connections/account.rb', line 195

def 
  @account_numbers
end

#balanceObject (readonly)

The most recent information about the account's balance.



197
198
199
# File 'lib/stripe/resources/financial_connections/account.rb', line 197

def balance
  @balance
end

#balance_refreshObject (readonly)

The state of the most recent attempt to refresh the account balance.



199
200
201
# File 'lib/stripe/resources/financial_connections/account.rb', line 199

def balance_refresh
  @balance_refresh
end

#categoryObject (readonly)

The type of the account. Account category is further divided in subcategory.



201
202
203
# File 'lib/stripe/resources/financial_connections/account.rb', line 201

def category
  @category
end

#createdObject (readonly)

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



203
204
205
# File 'lib/stripe/resources/financial_connections/account.rb', line 203

def created
  @created
end

#display_nameObject (readonly)

A human-readable name that has been assigned to this account, either by the account holder or by the institution.



205
206
207
# File 'lib/stripe/resources/financial_connections/account.rb', line 205

def display_name
  @display_name
end

#idObject (readonly)

Unique identifier for the object.



207
208
209
# File 'lib/stripe/resources/financial_connections/account.rb', line 207

def id
  @id
end

#institution_nameObject (readonly)

The name of the institution that holds this account.



209
210
211
# File 'lib/stripe/resources/financial_connections/account.rb', line 209

def institution_name
  @institution_name
end

#last4Object (readonly)

The last 4 digits of the account number. If present, this will be 4 numeric characters.



211
212
213
# File 'lib/stripe/resources/financial_connections/account.rb', line 211

def last4
  @last4
end

#livemodeObject (readonly)

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.



213
214
215
# File 'lib/stripe/resources/financial_connections/account.rb', line 213

def livemode
  @livemode
end

#objectObject (readonly)

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



215
216
217
# File 'lib/stripe/resources/financial_connections/account.rb', line 215

def object
  @object
end

#ownershipObject (readonly)

The most recent information about the account's owners.



217
218
219
# File 'lib/stripe/resources/financial_connections/account.rb', line 217

def ownership
  @ownership
end

#ownership_refreshObject (readonly)

The state of the most recent attempt to refresh the account owners.



219
220
221
# File 'lib/stripe/resources/financial_connections/account.rb', line 219

def ownership_refresh
  @ownership_refresh
end

#permissionsObject (readonly)

The list of permissions granted by this account.



221
222
223
# File 'lib/stripe/resources/financial_connections/account.rb', line 221

def permissions
  @permissions
end

#statusObject (readonly)

The status of the link to the account.



223
224
225
# File 'lib/stripe/resources/financial_connections/account.rb', line 223

def status
  @status
end

#status_detailsObject (readonly)

Attribute for field status_details



225
226
227
# File 'lib/stripe/resources/financial_connections/account.rb', line 225

def status_details
  @status_details
end

#subcategoryObject (readonly)

If category is cash, one of:

  • checking
  • savings
  • other

If category is credit, one of:

  • mortgage
  • line_of_credit
  • credit_card
  • other

If category is investment or other, this will be other.



240
241
242
# File 'lib/stripe/resources/financial_connections/account.rb', line 240

def subcategory
  @subcategory
end

#subscriptionsObject (readonly)

The list of data refresh subscriptions requested on this account.



242
243
244
# File 'lib/stripe/resources/financial_connections/account.rb', line 242

def subscriptions
  @subscriptions
end

#supported_payment_method_typesObject (readonly)

The PaymentMethod type(s) that can be created from this account.



244
245
246
# File 'lib/stripe/resources/financial_connections/account.rb', line 244

def supported_payment_method_types
  @supported_payment_method_types
end

#transaction_refreshObject (readonly)

The state of the most recent attempt to refresh the account transactions.



246
247
248
# File 'lib/stripe/resources/financial_connections/account.rb', line 246

def transaction_refresh
  @transaction_refresh
end

Class Method Details

.disconnect(account, params = {}, opts = {}) ⇒ Object

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).



259
260
261
262
263
264
265
266
# File 'lib/stripe/resources/financial_connections/account.rb', line 259

def self.disconnect(, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/financial_connections/accounts/%<account>s/disconnect", { account: CGI.escape() }),
    params: params,
    opts: opts
  )
end

.field_remappingsObject



370
371
372
# File 'lib/stripe/resources/financial_connections/account.rb', line 370

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



358
359
360
361
362
363
364
365
366
367
368
# File 'lib/stripe/resources/financial_connections/account.rb', line 358

def self.inner_class_types
  @inner_class_types = {
    account_holder: AccountHolder,
    account_numbers: AccountNumber,
    balance: Balance,
    balance_refresh: BalanceRefresh,
    ownership_refresh: OwnershipRefresh,
    status_details: StatusDetails,
    transaction_refresh: TransactionRefresh,
  }
end

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

Returns a list of Financial Connections Account objects.



269
270
271
272
273
274
275
276
# File 'lib/stripe/resources/financial_connections/account.rb', line 269

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

.list_owners(account, params = {}, opts = {}) ⇒ Object

Lists all owners for a given Account



289
290
291
292
293
294
295
296
# File 'lib/stripe/resources/financial_connections/account.rb', line 289

def self.list_owners(, params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: format("/v1/financial_connections/accounts/%<account>s/owners", { account: CGI.escape() }),
    params: params,
    opts: opts
  )
end

.object_nameObject



11
12
13
# File 'lib/stripe/resources/financial_connections/account.rb', line 11

def self.object_name
  "financial_connections.account"
end

.refresh_account(account, params = {}, opts = {}) ⇒ Object

Refreshes the data associated with a Financial Connections Account.



309
310
311
312
313
314
315
316
# File 'lib/stripe/resources/financial_connections/account.rb', line 309

def self.(, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/financial_connections/accounts/%<account>s/refresh", { account: CGI.escape() }),
    params: params,
    opts: opts
  )
end

.subscribe(account, params = {}, opts = {}) ⇒ Object

Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day.



329
330
331
332
333
334
335
336
# File 'lib/stripe/resources/financial_connections/account.rb', line 329

def self.subscribe(, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/financial_connections/accounts/%<account>s/subscribe", { account: CGI.escape() }),
    params: params,
    opts: opts
  )
end

.unsubscribe(account, params = {}, opts = {}) ⇒ Object

Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.



349
350
351
352
353
354
355
356
# File 'lib/stripe/resources/financial_connections/account.rb', line 349

def self.unsubscribe(, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/financial_connections/accounts/%<account>s/unsubscribe", { account: CGI.escape() }),
    params: params,
    opts: opts
  )
end

Instance Method Details

#disconnect(params = {}, opts = {}) ⇒ Object

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).



249
250
251
252
253
254
255
256
# File 'lib/stripe/resources/financial_connections/account.rb', line 249

def disconnect(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/financial_connections/accounts/%<account>s/disconnect", { account: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end

#list_owners(params = {}, opts = {}) ⇒ Object

Lists all owners for a given Account



279
280
281
282
283
284
285
286
# File 'lib/stripe/resources/financial_connections/account.rb', line 279

def list_owners(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: format("/v1/financial_connections/accounts/%<account>s/owners", { account: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end

#refresh_account(params = {}, opts = {}) ⇒ Object

Refreshes the data associated with a Financial Connections Account.



299
300
301
302
303
304
305
306
# File 'lib/stripe/resources/financial_connections/account.rb', line 299

def (params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/financial_connections/accounts/%<account>s/refresh", { account: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end

#subscribe(params = {}, opts = {}) ⇒ Object

Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day.



319
320
321
322
323
324
325
326
# File 'lib/stripe/resources/financial_connections/account.rb', line 319

def subscribe(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/financial_connections/accounts/%<account>s/subscribe", { account: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end

#unsubscribe(params = {}, opts = {}) ⇒ Object

Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.



339
340
341
342
343
344
345
346
# File 'lib/stripe/resources/financial_connections/account.rb', line 339

def unsubscribe(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/financial_connections/accounts/%<account>s/unsubscribe", { account: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end