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
# File 'lib/stripe/services/financial_connections/account_service.rb', line 9

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

Instance Attribute Details

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



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

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.



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

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.



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

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.



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

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.



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

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.



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

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