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