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(requestor)
  @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).



113
114
115
116
117
118
119
120
121
# File 'lib/stripe/services/financial_connections/account_service.rb', line 113

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.



124
125
126
127
128
129
130
131
132
# File 'lib/stripe/services/financial_connections/account_service.rb', line 124

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.



135
136
137
138
139
140
141
142
143
# File 'lib/stripe/services/financial_connections/account_service.rb', line 135

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.



146
147
148
149
150
151
152
153
154
# File 'lib/stripe/services/financial_connections/account_service.rb', line 146

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.



157
158
159
160
161
162
163
164
165
# File 'lib/stripe/services/financial_connections/account_service.rb', line 157

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.



168
169
170
171
172
173
174
175
176
# File 'lib/stripe/services/financial_connections/account_service.rb', line 168

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