Class: ColumnApi::AccountNumberResource
- Inherits:
-
Resource
- Object
- Resource
- ColumnApi::AccountNumberResource
show all
- Defined in:
- lib/column_api/resources/account_number_resource.rb
Instance Attribute Summary
Attributes inherited from Resource
#client
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
#create(bank_account_id:, params: {}) ⇒ Object
14
15
16
|
# File 'lib/column_api/resources/account_number_resource.rb', line 14
def create(bank_account_id:, params: {})
AccountNumber.new post_request("bank-accounts/#{bank_account_id}/account-numbers", body: params).body
end
|
#list(bank_account_id:, params: {}) ⇒ Object
5
6
7
8
|
# File 'lib/column_api/resources/account_number_resource.rb', line 5
def list(bank_account_id:, params: {})
response = get_request("bank-accounts/#{bank_account_id}/account-numbers", params: params).body
Collection.from_response(response, key: "account_numbers", type: AccountNumber)
end
|
#retrieve(account_number_id:) ⇒ Object
10
11
12
|
# File 'lib/column_api/resources/account_number_resource.rb', line 10
def retrieve(account_number_id:)
AccountNumber.new get_request("account-numbers/#{account_number_id}").body
end
|