Class: Increase::Resources::ExternalAccounts

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/external_accounts.rb

Instance Method Summary collapse

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.

Parameters:



126
127
128
# File 'lib/increase/resources/external_accounts.rb', line 126

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

Some parameter documentations has been truncated, see Models::ExternalAccountCreateParams for more details.

Create an External Account

Parameters:

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
# File 'lib/increase/resources/external_accounts.rb', line 28

def create(params)
  parsed, options = Increase::ExternalAccountCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "external_accounts",
    body: parsed,
    model: Increase::ExternalAccount,
    options: options
  )
end

#list(cursor: nil, idempotency_key: nil, limit: nil, routing_number: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::ExternalAccount>

Some parameter documentations has been truncated, see Models::ExternalAccountListParams for more details.

List External Accounts

Parameters:

  • cursor (String)

    Return the page of entries after this one.

  • idempotency_key (String)

    Filter records to the one with the specified ‘idempotency_key` you chose for tha

  • limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 ob

  • routing_number (String)

    Filter External Accounts to those with the specified Routing Number.

  • status (Increase::Models::ExternalAccountListParams::Status)
  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



111
112
113
114
115
116
117
118
119
120
121
# File 'lib/increase/resources/external_accounts.rb', line 111

def list(params = {})
  parsed, options = Increase::ExternalAccountListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "external_accounts",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::ExternalAccount,
    options: options
  )
end

#retrieve(external_account_id, request_options: {}) ⇒ Increase::Models::ExternalAccount

Retrieve an External Account

Parameters:

  • external_account_id (String)

    The identifier of the External Account.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



50
51
52
53
54
55
56
57
# File 'lib/increase/resources/external_accounts.rb', line 50

def retrieve(, params = {})
  @client.request(
    method: :get,
    path: ["external_accounts/%1$s", ],
    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

Parameters:

Returns:

See Also:



78
79
80
81
82
83
84
85
86
87
# File 'lib/increase/resources/external_accounts.rb', line 78

def update(, params = {})
  parsed, options = Increase::ExternalAccountUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["external_accounts/%1$s", ],
    body: parsed,
    model: Increase::ExternalAccount,
    options: options
  )
end