Class: Finicity::V1::Request::GetInstitutions
- Inherits:
-
Object
- Object
- Finicity::V1::Request::GetInstitutions
- Extended by:
- HTTPClient::IncludeClient
- Includes:
- Logger
- Defined in:
- lib/finicity/v1/request/get_institutions.rb
Instance Attribute Summary collapse
-
#institution_name ⇒ Object
Attributes.
-
#token ⇒ Object
Attributes.
Instance Method Summary collapse
- #get_institutions(start, limit) ⇒ Object
- #headers ⇒ Object
-
#initialize(token, institution_name) ⇒ GetInstitutions
constructor
Instance Methods.
- #url ⇒ Object
Methods included from Logger
Constructor Details
#initialize(token, institution_name) ⇒ GetInstitutions
Instance Methods
19 20 21 22 |
# File 'lib/finicity/v1/request/get_institutions.rb', line 19 def initialize(token, institution_name) @institution_name = institution_name @token = token end |
Instance Attribute Details
#institution_name ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_institutions.rb', line 13 def institution_name @institution_name end |
#token ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_institutions.rb', line 13 def token @token end |
Instance Method Details
#get_institutions(start, limit) ⇒ Object
24 25 26 27 |
# File 'lib/finicity/v1/request/get_institutions.rb', line 24 def get_institutions(start, limit) query = { :start => start, :limit => limit, :search => institution_name } http_client.get(url, query, headers) end |
#headers ⇒ Object
29 30 31 32 33 34 |
# File 'lib/finicity/v1/request/get_institutions.rb', line 29 def headers { 'Finicity-App-Key' => ::Finicity.config.app_key, 'Finicity-App-Token' => token } end |
#url ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/finicity/v1/request/get_institutions.rb', line 36 def url ::URI.join( ::Finicity.config.base_url, 'v1/', 'institutions' ) end |