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