Ruby gem for the electio API
Add this line to your application's Gemfile:
gem 'electio'
require 'electio'
Electio.configure do |config|
config.api_key = ENV['API_KEY'] # Your Primary or Secondary developer API key.
end
Summary of a specific consignment:
consignment_reference = 'EC-XXX-XXX-XXX'
consignment = Electio::Consignment.find(consignment_reference) #=> Returns response as an object.
Creating a consignment:
consignment_params = { ... }
consignment = Electio::Consignment.new(consignment_params)
consignment.save #=> Returns response as an object
- Error handling
- Implement 100% of API - #3
Feel free to implement the missing API end points listed above and submit a PR Bug reports and pull requests are welcome on GitHub at https://github.com/krisquigley/electio.