paynet-api is a ruby gem client for the Paynet API. It's currently a work in progress and only supports limited API functionality.
Add this line to your application's Gemfile:
gem 'paynet-api'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install paynet-api
You can pass configuration options as a block to PaynetApi::Client.new.
client = PaynetApi::Client.new do |config|
config.base_url = ENV['BASE_URL']
config.basic_auth_user = ENV['BASIC_AUTH_USER']
config.basic_auth_password = ENV['BASIC_AUTH_PASSWORD']
end
client.search_for_company(company_name: "Acme Co", city: "Durham", state_code: "NC")
client.get_payment_history_report(paynet_id: 123456789, payment_comprehensive: 1)
After checking out the repo, run bin/setup
to install dependencies. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
To run the integration suite you will need credentials from Paynet. Once you have your credentials set them in the following environment variables:
BASIC_AUTH_USER={ your paynet api user name }
BASIC_AUTH_PASSWORD={ your paynet api password }
BASE_URL={ base url for api. Everything before the endpoints }
Bug reports and pull requests are welcome on GitHub at https://github.com/liftforward/paynet-api.
The gem is available as open source under the terms of the MIT License.