Class: Stripe::AccountExternalAccountService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::AccountExternalAccountService
- Defined in:
- lib/stripe/services/account_external_account_service.rb
Defined Under Namespace
Classes: CreateParams, DeleteParams, ListParams, RetrieveParams, UpdateParams
Instance Method Summary collapse
-
#create(account, params = {}, opts = {}) ⇒ Object
Create an external account for a given account.
-
#delete(account, id, params = {}, opts = {}) ⇒ Object
Delete a specified external account for a given account.
-
#list(account, params = {}, opts = {}) ⇒ Object
List external accounts for an account.
-
#retrieve(account, id, params = {}, opts = {}) ⇒ Object
Retrieve a specified external account for a given account.
-
#update(account, id, params = {}, opts = {}) ⇒ Object
Updates the metadata, account holder name, account holder type of a bank account belonging to a connected account and optionally sets it as the default for its currency.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(account, params = {}, opts = {}) ⇒ Object
Create an external account for a given account.
257 258 259 260 261 262 263 264 265 |
# File 'lib/stripe/services/account_external_account_service.rb', line 257 def create(account, params = {}, opts = {}) request( method: :post, path: format("/v1/accounts/%<account>s/external_accounts", { account: CGI.escape(account) }), params: params, opts: opts, base_address: :api ) end |
#delete(account, id, params = {}, opts = {}) ⇒ Object
Delete a specified external account for a given account.
268 269 270 271 272 273 274 275 276 |
# File 'lib/stripe/services/account_external_account_service.rb', line 268 def delete(account, id, params = {}, opts = {}) request( method: :delete, path: format("/v1/accounts/%<account>s/external_accounts/%<id>s", { account: CGI.escape(account), id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#list(account, params = {}, opts = {}) ⇒ Object
List external accounts for an account.
279 280 281 282 283 284 285 286 287 |
# File 'lib/stripe/services/account_external_account_service.rb', line 279 def list(account, params = {}, opts = {}) request( method: :get, path: format("/v1/accounts/%<account>s/external_accounts", { account: CGI.escape(account) }), params: params, opts: opts, base_address: :api ) end |
#retrieve(account, id, params = {}, opts = {}) ⇒ Object
Retrieve a specified external account for a given account.
290 291 292 293 294 295 296 297 298 |
# File 'lib/stripe/services/account_external_account_service.rb', line 290 def retrieve(account, id, params = {}, opts = {}) request( method: :get, path: format("/v1/accounts/%<account>s/external_accounts/%<id>s", { account: CGI.escape(account), id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#update(account, id, params = {}, opts = {}) ⇒ Object
Updates the metadata, account holder name, account holder type of a bank account belonging to a connected account and optionally sets it as the default for its currency. Other bank account details are not editable by design.
You can only update bank accounts when [account.controller.requirement_collection is application, which includes <a href=“/connect/custom-accounts”>Custom accounts](stripe.com/api/accounts/object#account_object-controller-requirement_collection).
You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
308 309 310 311 312 313 314 315 316 |
# File 'lib/stripe/services/account_external_account_service.rb', line 308 def update(account, id, params = {}, opts = {}) request( method: :post, path: format("/v1/accounts/%<account>s/external_accounts/%<id>s", { account: CGI.escape(account), id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |