Class: Stripe::V2::MoneyManagement::FinancialAccountService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::V2::MoneyManagement::FinancialAccountService
- Defined in:
- lib/stripe/services/v2/money_management/financial_account_service.rb
Instance Attribute Summary collapse
-
#statements ⇒ Object
readonly
Returns the value of attribute statements.
Instance Method Summary collapse
-
#close(id, params = {}, opts = {}) ⇒ Object
Closes a FinancialAccount with or without forwarding settings.
-
#create(params = {}, opts = {}) ⇒ Object
Creates a new FinancialAccount.
-
#initialize(requestor) ⇒ FinancialAccountService
constructor
A new instance of FinancialAccountService.
-
#list(params = {}, opts = {}) ⇒ Object
Lists FinancialAccounts in this compartment.
-
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves the details of an existing FinancialAccount.
-
#update(id, params = {}, opts = {}) ⇒ Object
Updates an existing FinancialAccount.
Methods inherited from StripeService
Constructor Details
#initialize(requestor) ⇒ FinancialAccountService
Returns a new instance of FinancialAccountService.
10 11 12 13 14 |
# File 'lib/stripe/services/v2/money_management/financial_account_service.rb', line 10 def initialize(requestor) super @statements = Stripe::V2::MoneyManagement::FinancialAccounts::StatementService .new(@requestor) end |
Instance Attribute Details
#statements ⇒ Object (readonly)
Returns the value of attribute statements.
8 9 10 |
# File 'lib/stripe/services/v2/money_management/financial_account_service.rb', line 8 def statements @statements end |
Instance Method Details
#close(id, params = {}, opts = {}) ⇒ Object
Closes a FinancialAccount with or without forwarding settings.
** raises NonZeroBalanceError
19 20 21 22 23 24 25 26 27 |
# File 'lib/stripe/services/v2/money_management/financial_account_service.rb', line 19 def close(id, params = {}, opts = {}) request( method: :post, path: format("/v2/money_management/financial_accounts/%<id>s/close", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#create(params = {}, opts = {}) ⇒ Object
Creates a new FinancialAccount.
** raises AlreadyExistsError ** raises FeatureNotEnabledError
33 34 35 36 37 38 39 40 41 |
# File 'lib/stripe/services/v2/money_management/financial_account_service.rb', line 33 def create(params = {}, opts = {}) request( method: :post, path: "/v2/money_management/financial_accounts", params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Lists FinancialAccounts in this compartment.
44 45 46 47 48 49 50 51 52 |
# File 'lib/stripe/services/v2/money_management/financial_account_service.rb', line 44 def list(params = {}, opts = {}) request( method: :get, path: "/v2/money_management/financial_accounts", params: params, opts: opts, base_address: :api ) end |
#retrieve(id, params = {}, opts = {}) ⇒ Object
Retrieves the details of an existing FinancialAccount.
55 56 57 58 59 60 61 62 63 |
# File 'lib/stripe/services/v2/money_management/financial_account_service.rb', line 55 def retrieve(id, params = {}, opts = {}) request( method: :get, path: format("/v2/money_management/financial_accounts/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |
#update(id, params = {}, opts = {}) ⇒ Object
Updates an existing FinancialAccount.
66 67 68 69 70 71 72 73 74 |
# File 'lib/stripe/services/v2/money_management/financial_account_service.rb', line 66 def update(id, params = {}, opts = {}) request( method: :post, path: format("/v2/money_management/financial_accounts/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts, base_address: :api ) end |