Class: Finicity::V1::Request::GetTransactions
- Inherits:
-
Object
- Object
- Finicity::V1::Request::GetTransactions
- Extended by:
- HTTPClient::IncludeClient
- Includes:
- Logger
- Defined in:
- lib/finicity/v1/request/get_transactions.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Attributes.
-
#customer_id ⇒ Object
Attributes.
-
#from_date ⇒ Object
Attributes.
-
#to_date ⇒ Object
Attributes.
-
#token ⇒ Object
Attributes.
Instance Method Summary collapse
- #get_transactions ⇒ Object
- #headers ⇒ Object
-
#initialize(token, customer_id, account_id, from_date, to_date) ⇒ GetTransactions
constructor
Instance Methods.
- #query ⇒ Object
- #url ⇒ Object
Methods included from Logger
Constructor Details
#initialize(token, customer_id, account_id, from_date, to_date) ⇒ GetTransactions
Instance Methods
22 23 24 25 26 27 28 |
# File 'lib/finicity/v1/request/get_transactions.rb', line 22 def initialize(token, customer_id, account_id, from_date, to_date) @account_id = account_id @customer_id = customer_id @from_date = from_date @to_date = to_date @token = token end |
Instance Attribute Details
#account_id ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_transactions.rb', line 13 def account_id @account_id end |
#customer_id ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_transactions.rb', line 13 def customer_id @customer_id end |
#from_date ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_transactions.rb', line 13 def from_date @from_date end |
#to_date ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_transactions.rb', line 13 def to_date @to_date end |
#token ⇒ Object
Attributes
13 14 15 |
# File 'lib/finicity/v1/request/get_transactions.rb', line 13 def token @token end |
Instance Method Details
#get_transactions ⇒ Object
30 31 32 |
# File 'lib/finicity/v1/request/get_transactions.rb', line 30 def get_transactions http_client.get(url, query, headers) end |
#headers ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/finicity/v1/request/get_transactions.rb', line 34 def headers { 'Finicity-App-Key' => ::Finicity.config.app_key, 'Finicity-App-Token' => token, 'Content-Type' => 'application/xml' } end |
#query ⇒ Object
42 43 44 |
# File 'lib/finicity/v1/request/get_transactions.rb', line 42 def query { :fromDate => from_date, :toDate => to_date } end |
#url ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/finicity/v1/request/get_transactions.rb', line 46 def url ::URI.join( ::Finicity.config.base_url, 'v1/', 'customers/', "#{customer_id}/", 'accounts/', "#{account_id}/", 'transactions' ) end |