Class: ColumnApi::AccountNumberResource

Inherits:
Resource
  • Object
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

Constructor Details

This class inherits a constructor from ColumnApi::Resource

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/#{}/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/#{}/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/#{}").body
end