Class: Increase::Resources::ExternalAccounts
- Inherits:
-
Object
- Object
- Increase::Resources::ExternalAccounts
- Defined in:
- lib/increase/resources/external_accounts.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Increase::Models::ExternalAccount
Create an External Account.
-
#initialize(client:) ⇒ ExternalAccounts
constructor
A new instance of ExternalAccounts.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::ExternalAccount>
List External Accounts.
-
#retrieve(external_account_id, opts = {}) ⇒ Increase::Models::ExternalAccount
Retrieve an External Account.
-
#update(external_account_id, params = {}, opts = {}) ⇒ Increase::Models::ExternalAccount
Update an External Account.
Constructor Details
#initialize(client:) ⇒ ExternalAccounts
Returns a new instance of ExternalAccounts.
6 7 8 |
# File 'lib/increase/resources/external_accounts.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ Increase::Models::ExternalAccount
Create an External Account
23 24 25 26 27 28 29 30 |
# File 'lib/increase/resources/external_accounts.rb', line 23 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/external_accounts" req[:body] = params req[:model] = Increase::Models::ExternalAccount @client.request(req, opts) end |
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::ExternalAccount>
List External Accounts
84 85 86 87 88 89 90 91 92 |
# File 'lib/increase/resources/external_accounts.rb', line 84 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/external_accounts" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::ExternalAccount @client.request(req, opts) end |
#retrieve(external_account_id, opts = {}) ⇒ Increase::Models::ExternalAccount
Retrieve an External Account
38 39 40 41 42 43 44 |
# File 'lib/increase/resources/external_accounts.rb', line 38 def retrieve(external_account_id, opts = {}) req = {} req[:method] = :get req[:path] = "/external_accounts/#{external_account_id}" req[:model] = Increase::Models::ExternalAccount @client.request(req, opts) end |
#update(external_account_id, params = {}, opts = {}) ⇒ Increase::Models::ExternalAccount
Update an External Account
59 60 61 62 63 64 65 66 |
# File 'lib/increase/resources/external_accounts.rb', line 59 def update(external_account_id, params = {}, opts = {}) req = {} req[:method] = :patch req[:path] = "/external_accounts/#{external_account_id}" req[:body] = params req[:model] = Increase::Models::ExternalAccount @client.request(req, opts) end |