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(requestor) @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.
499 500 501 502 503 504 505 506 507 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 499 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.
510 511 512 513 514 515 516 517 518 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 510 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.
521 522 523 524 525 526 527 528 529 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 521 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.
532 533 534 535 536 537 538 539 540 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 532 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.
543 544 545 546 547 548 549 550 551 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 543 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 |