Class: Stripe::Treasury::FinancialAccountService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::Treasury::FinancialAccountService
- Defined in:
- lib/stripe/services/treasury/financial_account_service.rb
Defined Under Namespace
Classes: CloseParams, CreateParams, ListParams, RetrieveParams, UpdateParams
Instance Attribute Summary collapse
-
#features ⇒ Object
readonly
Returns the value of attribute features.
Instance Method Summary collapse
-
#close(financial_account, params = {}, opts = {}) ⇒ Object
Closes a FinancialAccount.
-
#create(params = {}, opts = {}) ⇒ Object
Creates a new FinancialAccount.
-
#initialize(requestor) ⇒ FinancialAccountService
constructor
A new instance of FinancialAccountService.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of FinancialAccounts.
-
#retrieve(financial_account, params = {}, opts = {}) ⇒ Object
Retrieves the details of a FinancialAccount.
-
#update(financial_account, params = {}, opts = {}) ⇒ Object
Updates the details of a FinancialAccount.
Methods inherited from StripeService
Constructor Details
#initialize(requestor) ⇒ FinancialAccountService
Returns a new instance of FinancialAccountService.
9 10 11 12 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 9 def initialize(requestor) super @features = Stripe::Treasury::FinancialAccountFeaturesService.new(@requestor) end |
Instance Attribute Details
#features ⇒ Object (readonly)
Returns the value of attribute features.
7 8 9 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 7 def features @features end |
Instance Method Details
#close(financial_account, params = {}, opts = {}) ⇒ Object
Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards.
517 518 519 520 521 522 523 524 525 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 517 def close(financial_account, params = {}, opts = {}) request( method: :post, path: format("/v1/treasury/financial_accounts/%<financial_account>s/close", { financial_account: CGI.escape(financial_account) }), params: params, opts: opts, base_address: :api ) end |
#create(params = {}, opts = {}) ⇒ Object
Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default.
528 529 530 531 532 533 534 535 536 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 528 def create(params = {}, opts = {}) request( method: :post, path: "/v1/treasury/financial_accounts", params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of FinancialAccounts.
539 540 541 542 543 544 545 546 547 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 539 def list(params = {}, opts = {}) request( method: :get, path: "/v1/treasury/financial_accounts", params: params, opts: opts, base_address: :api ) end |
#retrieve(financial_account, params = {}, opts = {}) ⇒ Object
Retrieves the details of a FinancialAccount.
550 551 552 553 554 555 556 557 558 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 550 def retrieve(financial_account, params = {}, opts = {}) request( method: :get, path: format("/v1/treasury/financial_accounts/%<financial_account>s", { financial_account: CGI.escape(financial_account) }), params: params, opts: opts, base_address: :api ) end |
#update(financial_account, params = {}, opts = {}) ⇒ Object
Updates the details of a FinancialAccount.
561 562 563 564 565 566 567 568 569 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 561 def update(financial_account, params = {}, opts = {}) request( method: :post, path: format("/v1/treasury/financial_accounts/%<financial_account>s", { financial_account: CGI.escape(financial_account) }), params: params, opts: opts, base_address: :api ) end |