Class: Unit::Resource::InstitutionResource

Inherits:
BaseResource show all
Defined in:
lib/unit/api_resources/institution_resource.rb

Class Method Summary collapse

Methods inherited from BaseResource

file_response_handler, response_handler

Class Method Details

.get_institution(routing_number) ⇒ UnitResponse, UnitError

Get an institution by routing number by calling Unit’s API

Parameters:

  • routing_number (String)

Returns:



16
17
18
19
# File 'lib/unit/api_resources/institution_resource.rb', line 16

def get_institution(routing_number)
  response = HttpHelper.get("#{api_url}/institutions/#{routing_number}", headers: headers)
  response_handler(response)
end