Class: Increase::Resources::ExternalAccounts
- Inherits:
-
Object
- Object
- Increase::Resources::ExternalAccounts
- Defined in:
- lib/increase/resources/external_accounts.rb,
sig/increase/resources/external_accounts.rbs
Instance Method Summary collapse
-
#create(account_number:, description:, routing_number:, account_holder: nil, funding: nil, request_options: {}) ⇒ Increase::Models::ExternalAccount
Create an External Account.
-
#initialize(client:) ⇒ ExternalAccounts
constructor
private
A new instance of ExternalAccounts.
-
#list(cursor: nil, idempotency_key: nil, limit: nil, routing_number: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::ExternalAccount>
List External Accounts.
-
#retrieve(external_account_id, request_options: {}) ⇒ Increase::Models::ExternalAccount
Retrieve an External Account.
-
#update(external_account_id, account_holder: nil, description: nil, funding: nil, status: nil, request_options: {}) ⇒ Increase::Models::ExternalAccount
Update an External Account.
Constructor Details
#initialize(client:) ⇒ ExternalAccounts
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ExternalAccounts.
134 135 136 |
# File 'lib/increase/resources/external_accounts.rb', line 134 def initialize(client:) @client = client end |
Instance Method Details
#create(account_number:, description:, routing_number:, account_holder: nil, funding: nil, request_options: {}) ⇒ Increase::Models::ExternalAccount
Create an External Account
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/increase/resources/external_accounts.rb', line 29 def create(params) parsed, = Increase::ExternalAccountCreateParams.dump_request(params) @client.request( method: :post, path: "external_accounts", body: parsed, model: Increase::ExternalAccount, options: ) end |
#list(cursor: nil, idempotency_key: nil, limit: nil, routing_number: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::ExternalAccount>
List External Accounts
118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/increase/resources/external_accounts.rb', line 118 def list(params = {}) parsed, = Increase::ExternalAccountListParams.dump_request(params) query = Increase::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "external_accounts", query: query, page: Increase::Internal::Page, model: Increase::ExternalAccount, options: ) end |
#retrieve(external_account_id, request_options: {}) ⇒ Increase::Models::ExternalAccount
Retrieve an External Account
51 52 53 54 55 56 57 58 |
# File 'lib/increase/resources/external_accounts.rb', line 51 def retrieve(external_account_id, params = {}) @client.request( method: :get, path: ["external_accounts/%1$s", external_account_id], model: Increase::ExternalAccount, options: params[:request_options] ) end |
#update(external_account_id, account_holder: nil, description: nil, funding: nil, status: nil, request_options: {}) ⇒ Increase::Models::ExternalAccount
Update an External Account
82 83 84 85 86 87 88 89 90 91 |
# File 'lib/increase/resources/external_accounts.rb', line 82 def update(external_account_id, params = {}) parsed, = Increase::ExternalAccountUpdateParams.dump_request(params) @client.request( method: :patch, path: ["external_accounts/%1$s", external_account_id], body: parsed, model: Increase::ExternalAccount, options: ) end |