Class: Stripe::Treasury::FinancialAccountService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::Treasury::FinancialAccountService
- Defined in:
- lib/stripe/services/treasury/financial_account_service.rb
Instance Attribute Summary collapse
-
#features ⇒ Object
readonly
Returns the value of attribute features.
Instance Method Summary collapse
-
#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
#create(params = {}, opts = {}) ⇒ Object
Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.
15 16 17 18 19 20 21 22 23 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 15 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.
26 27 28 29 30 31 32 33 34 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 26 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.
37 38 39 40 41 42 43 44 45 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 37 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.
48 49 50 51 52 53 54 55 56 |
# File 'lib/stripe/services/treasury/financial_account_service.rb', line 48 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 |