Class: Stripe::FinancialConnections::AccountService

Inherits:
StripeService
  • Object
show all
Defined in:
lib/stripe/services/financial_connections/account_service.rb

Defined Under Namespace

Classes: DisconnectParams, ListParams, RefreshParams, RetrieveParams, SubscribeParams, UnsubscribeParams

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from StripeService

#request, #request_stream

Constructor Details

#initialize(requestor) ⇒ AccountService

Returns a new instance of AccountService.



9
10
11
12
13
14
# File 'lib/stripe/services/financial_connections/account_service.rb', line 9

def initialize(requestor)
  super
  @inferred_balances = Stripe::FinancialConnections::AccountInferredBalanceService
                       .new(@requestor)
  @owners = Stripe::FinancialConnections::AccountOwnerService.new(@requestor)
end

Instance Attribute Details

#inferred_balancesObject (readonly)

Returns the value of attribute inferred_balances.



7
8
9
# File 'lib/stripe/services/financial_connections/account_service.rb', line 7

def inferred_balances
  @inferred_balances
end

#ownersObject (readonly)

Returns the value of attribute owners.



7
8
9
# File 'lib/stripe/services/financial_connections/account_service.rb', line 7

def owners
  @owners
end

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



116
117
118
119
120
121
122
123
124
# File 'lib/stripe/services/financial_connections/account_service.rb', line 116

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

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

Returns a list of Financial Connections Account objects.



127
128
129
130
131
132
133
134
135
# File 'lib/stripe/services/financial_connections/account_service.rb', line 127

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v1/financial_connections/accounts",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#refresh(account, params = {}, opts = {}) ⇒ Object

Refreshes the data associated with a Financial Connections Account.



138
139
140
141
142
143
144
145
146
# File 'lib/stripe/services/financial_connections/account_service.rb', line 138

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

#retrieve(account, params = {}, opts = {}) ⇒ Object

Retrieves the details of an Financial Connections Account.



149
150
151
152
153
154
155
156
157
# File 'lib/stripe/services/financial_connections/account_service.rb', line 149

def retrieve(, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/financial_connections/accounts/%<account>s", { account: CGI.escape() }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

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

Subscribes to periodic refreshes of data associated with a Financial Connections Account.



160
161
162
163
164
165
166
167
168
# File 'lib/stripe/services/financial_connections/account_service.rb', line 160

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

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

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



171
172
173
174
175
176
177
178
179
# File 'lib/stripe/services/financial_connections/account_service.rb', line 171

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