Jemquarie provides an easy way to interact with Macquarie ESI api. For Ruby and Ruby on Rails.
Add this line to your application's Gemfile:
gem 'jemquarie'
And then execute:
$ bundle
Or install it yourself as:
$ gem install jemquarie
Create an initializer file under config/initializers
The api key needs to be the unhashed value.
require 'jemquarie'
Jemquarie::Jemquarie.api_credentials(YOUR_KEY, YOUR_APPLICATION_NAME, LOG_LEVEl = :warn)
The auth code and password need to be the unhashed values.
Jemquarie::Importer.new(username, password).cash_transactions(1.day.ago.to_date, Date.today)
Jemquarie::Importer.new(username, password).cash_transactions(10.years.ago.to_date, Date.today, account_number)
The gem should return an array with formatted data. Here an example:
[
{
:foreign_identifier => "123456",
:date_time => "2013-01-01 00:00:00.000 UTC",
:amount => "-200",
:type_name => "TYPE",
:description => "NARRATIVE",
:meta_data => {
:updated_at => "2013-01-01 03:45:23.876 UTC"
}
]
It just returns an empty Array
It returns an Hash {:error => "Invalid credentials"} .
- client balances
- account details
- expiry of credentials
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request