Giter Club home page Giter Club logo

paynet-api's Introduction

paynet-api Codeship Status for liftforward/paynet-api

paynet-api is a ruby gem client for the Paynet API. It's currently a work in progress and only supports limited API functionality.

Installation

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

Usage

Configuration

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

Working with the API

Search For Company

client.search_for_company(company_name: "Acme Co", city: "Durham", state_code: "NC")

Get Payment History Report

client.get_payment_history_report(paynet_id: 123456789, payment_comprehensive: 1)

Development

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.

Running the integration suite

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 }

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/liftforward/paynet-api.

License

The gem is available as open source under the terms of the MIT License.

paynet-api's People

Contributors

drewnichols avatar andrewcallahan avatar phereford avatar hailuhr avatar

Watchers

Michael Grassotti avatar Franco Barbeite avatar James Cloos avatar I am a robot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.