Class: Increase::Resources::AccountNumbers
- Inherits:
-
Object
- Object
- Increase::Resources::AccountNumbers
- Defined in:
- lib/increase/resources/account_numbers.rb
Instance Method Summary collapse
-
#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.
-
#initialize(client:) ⇒ AccountNumbers
constructor
private
A new instance of AccountNumbers.
-
#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.
-
#retrieve(account_number_id, request_options: {}) ⇒ Increase::Models::AccountNumber
Retrieve an Account Number.
-
#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.
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.
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
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/increase/resources/account_numbers.rb', line 26 def create(params) parsed, = Increase::AccountNumberCreateParams.dump_request(params) @client.request( method: :post, path: "account_numbers", body: parsed, model: Increase::AccountNumber, 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
116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/increase/resources/account_numbers.rb', line 116 def list(params = {}) parsed, = Increase::AccountNumberListParams.dump_request(params) @client.request( method: :get, path: "account_numbers", query: parsed, page: Increase::Internal::Page, model: Increase::AccountNumber, options: ) end |
#retrieve(account_number_id, request_options: {}) ⇒ Increase::Models::AccountNumber
Retrieve an Account Number
48 49 50 51 52 53 54 55 |
# File 'lib/increase/resources/account_numbers.rb', line 48 def retrieve(account_number_id, params = {}) @client.request( method: :get, path: ["account_numbers/%1$s", account_number_id], 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
79 80 81 82 83 84 85 86 87 88 |
# File 'lib/increase/resources/account_numbers.rb', line 79 def update(account_number_id, params = {}) parsed, = Increase::AccountNumberUpdateParams.dump_request(params) @client.request( method: :patch, path: ["account_numbers/%1$s", account_number_id], body: parsed, model: Increase::AccountNumber, options: ) end |