Class: Stripe::FinancialConnections::Account

Inherits:
APIResource show all
Extended by:
APIOperations::List, APIOperations::NestedResource
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, Balance, BalanceRefresh, InferredBalancesRefresh, OwnershipRefresh, 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 included from 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 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

#account_holderObject (readonly)

The account holder that this account belongs to.



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

def 
  @account_holder
end

#balanceObject (readonly)

The most recent information about the account’s balance.



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

def balance
  @balance
end

#balance_refreshObject (readonly)

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



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

def balance_refresh
  @balance_refresh
end

#categoryObject (readonly)

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



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

def category
  @category
end

#createdObject (readonly)

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



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

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.



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

def display_name
  @display_name
end

#idObject (readonly)

Unique identifier for the object.



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

def id
  @id
end

#inferred_balances_refreshObject (readonly)

The state of the most recent attempt to refresh the account’s inferred balance history.



63
64
65
# File 'lib/stripe/resources/financial_connections/account.rb', line 63

def inferred_balances_refresh
  @inferred_balances_refresh
end

#institution_nameObject (readonly)

The name of the institution that holds this account.



65
66
67
# File 'lib/stripe/resources/financial_connections/account.rb', line 65

def institution_name
  @institution_name
end

#last4Object (readonly)

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



67
68
69
# File 'lib/stripe/resources/financial_connections/account.rb', line 67

def last4
  @last4
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.



69
70
71
# File 'lib/stripe/resources/financial_connections/account.rb', line 69

def livemode
  @livemode
end

#objectObject (readonly)

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



71
72
73
# File 'lib/stripe/resources/financial_connections/account.rb', line 71

def object
  @object
end

#ownershipObject (readonly)

The most recent information about the account’s owners.



73
74
75
# File 'lib/stripe/resources/financial_connections/account.rb', line 73

def ownership
  @ownership
end

#ownership_refreshObject (readonly)

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



75
76
77
# File 'lib/stripe/resources/financial_connections/account.rb', line 75

def ownership_refresh
  @ownership_refresh
end

#permissionsObject (readonly)

The list of permissions granted by this account.



77
78
79
# File 'lib/stripe/resources/financial_connections/account.rb', line 77

def permissions
  @permissions
end

#statusObject (readonly)

The status of the link to the account.



79
80
81
# File 'lib/stripe/resources/financial_connections/account.rb', line 79

def status
  @status
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`.



94
95
96
# File 'lib/stripe/resources/financial_connections/account.rb', line 94

def subcategory
  @subcategory
end

#subscriptionsObject (readonly)

The list of data refresh subscriptions requested on this account.



96
97
98
# File 'lib/stripe/resources/financial_connections/account.rb', line 96

def subscriptions
  @subscriptions
end

#supported_payment_method_typesObject (readonly)

The [PaymentMethod type](stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.



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

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.



100
101
102
# File 'lib/stripe/resources/financial_connections/account.rb', line 100

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



113
114
115
116
117
118
119
120
# File 'lib/stripe/resources/financial_connections/account.rb', line 113

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

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

Returns a list of Financial Connections Account objects.



123
124
125
126
127
128
129
130
# File 'lib/stripe/resources/financial_connections/account.rb', line 123

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

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

Lists all owners for a given Account



143
144
145
146
147
148
149
150
# File 'lib/stripe/resources/financial_connections/account.rb', line 143

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



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

def self.object_name
  "financial_connections.account"
end

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

Refreshes the data associated with a Financial Connections Account.



163
164
165
166
167
168
169
170
# File 'lib/stripe/resources/financial_connections/account.rb', line 163

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.



183
184
185
186
187
188
189
190
# File 'lib/stripe/resources/financial_connections/account.rb', line 183

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.



203
204
205
206
207
208
209
210
# File 'lib/stripe/resources/financial_connections/account.rb', line 203

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



103
104
105
106
107
108
109
110
# File 'lib/stripe/resources/financial_connections/account.rb', line 103

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



133
134
135
136
137
138
139
140
# File 'lib/stripe/resources/financial_connections/account.rb', line 133

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.



153
154
155
156
157
158
159
160
# File 'lib/stripe/resources/financial_connections/account.rb', line 153

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.



173
174
175
176
177
178
179
180
# File 'lib/stripe/resources/financial_connections/account.rb', line 173

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.



193
194
195
196
197
198
199
200
# File 'lib/stripe/resources/financial_connections/account.rb', line 193

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