A Ruby SDK for consuming the CorePro API
Add this line to your application's Gemfile:
gem 'corepro'
And then execute:
$ bundle
Or install it yourself as:
$ gem install corepro
Use this object hierarchy as a simple entry point into CorePro. Details of the CorePro API itself are available at https://docs.corepro.io/api. To see all available SDKs, visit https://docs.corepro.io/sdk.
require 'corepro'
# create a connection
# (typical use case is to pull connection info from config.yml, this is for explicitness)
conn = CorePro::Connection.new 'your-api-key-here', 'your-api-secret-here', 'api.corepro.io'
# retrieve a customer by a known tag (pass conn as nil if connection info is in config.yml)
cust = CorePro::Customer.getByTag 'bweaver', conn
# retrieve most recent transactions for that customer's primary account
trans = CorePro::Transaction.list cust.customerId, cust.accounts[0].accountId
- Fork it ( https://github.com/socialmoney/corepro-sdk-ruby/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request