Class: Increase::Resources::AccountNumbers

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ AccountNumbers

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 AccountNumbers.

Parameters:



131
132
133
# File 'lib/increase/resources/account_numbers.rb', line 131

def initialize(client:)
  @client = client
end

Instance Method Details

#create(account_id: , name: , inbound_ach: nil, inbound_checks: nil, request_options: {}) ⇒ Increase::Models::AccountNumber

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

Create an Account Number

Parameters:

Returns:

See Also:



26
27
28
29
30
31
32
33
34
35
# File 'lib/increase/resources/account_numbers.rb', line 26

def create(params)
  parsed, options = Increase::AccountNumberCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "account_numbers",
    body: parsed,
    model: Increase::AccountNumber,
    options: options
  )
end

#list(account_id: nil, ach_debit_status: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::AccountNumber>

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

List Account Numbers

Parameters:

Returns:

See Also:



116
117
118
119
120
121
122
123
124
125
126
# File 'lib/increase/resources/account_numbers.rb', line 116

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

#retrieve(account_number_id, request_options: {}) ⇒ Increase::Models::AccountNumber

Retrieve an Account Number

Parameters:

  • account_number_id (String)

    The identifier of the Account Number to retrieve.

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

Returns:

See Also:



48
49
50
51
52
53
54
55
# File 'lib/increase/resources/account_numbers.rb', line 48

def retrieve(, params = {})
  @client.request(
    method: :get,
    path: ["account_numbers/%1$s", ],
    model: Increase::AccountNumber,
    options: params[:request_options]
  )
end

#update(account_number_id, inbound_ach: nil, inbound_checks: nil, name: nil, status: nil, request_options: {}) ⇒ Increase::Models::AccountNumber

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

Update an Account Number

Parameters:

Returns:

See Also:



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

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