GithubHelp home page GithubHelp logo

earnwithdrop / plaid-ruby Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plaid/plaid-ruby

0.0 4.0 0.0 216 KB

Ruby bindings for the Plaid API.

Home Page: https://plaid.com

License: MIT License

Ruby 100.00%

plaid-ruby's Introduction

Plaid Build Status Gem Version

Ruby bindings for the Plaid API

Notes

This version is a beta version that contains failing tests for the new 'info' endpoint. While these have been tested individually on real accounts the tests here will fail with the test accounts supplied. These will be updated soon with test credentials.

Latest stable version: 1.7.1

This version removes the need to use 'type' in each additional call.

**Warning: If you have been using any version < 1 please switch to the correct branch (V0.1.6). Installing without specifying a version from RubyGems results in V1.1 build. **

Installation

Add this line to your application's Gemfile:

gem 'plaid'

And install

$ bundle

Or install it system wide as:

$ gem install plaid

Usage

Please read the great documentation at http://plaid.com/docs/ for more information.

Configuring Plaid

Configure the gem with your customer id, secret key, and the environment path you would like to use.

Plaid.config do |p|
  p.customer_id = 'Plaid provided customer ID here'
  p.secret = 'Plaid provided secret key here'
  p.environment_location = 'URL for the development or production environment'
  # i.e. 'https://tartan.plaid.com/' for development, or
  # 'https://api.plaid.com/' for production
end

Creating a new Plaid User

Authenticate a user to your desired level of api access (auth / connect).

user = Plaid.add_user('auth', 'plaid_test', 'plaid_good', 'wells')

If the authentication requires a pin, you can pass it in as the fifth argument:

user = Plaid.add_user('auth', 'plaid_test', 'plaid_good', 'usaa', '1234')

To add options such as login_only or webhooks, use the sixth argument:

user = Plaid.add_user('auth', 'plaid_test', 'plaid_good', 'wells', nil, { login_only: true, webhooks: 'https://example.org/callbacks/plaid')

Restoring a Plaid User using an access token

user = Plaid.set_user('access_token')
user = Plaid.set_user('access_token', ['connect'])

Exchanging a Link public_token for a Plaid access_token

Plaid.config do |p|
  p.customer_id = 'test_id'
  p.secret = 'test_secret'
  p.environment_location = 'https://tartan.plaid.com'
end

# Exchange a Link public_token for a Plaid access_token
exchangeTokenResponse = Plaid.exchange_token('test,chase,connected')
# Optionally include an account_id
exchangeTokenResponse = Plaid.exchange_token('test,chase,connected', 'account_id')

# Use the API access_token to initialize a user
# Note: This example assumes you are using Link with the "auth" product
user = Plaid.set_user(exchangeTokenResponse.access_token, ['auth'])

# Retrieve the user's accounts
user.get('auth')

# Print the name of each account
user.accounts.each { |account| print account.meta['name'] + "\n"}

Semantic Versioning

Methods marked with API: public are officially supported by the gem maintainers. Since we are using semantic versioning (http://semver.org/spec/v2.0.0.html), the maintainers are committed to backwards-compatibility support for these API calls when we update the Minor version. So for example, going from version 1.4.x to 1.5.x will not change these public API calls.

However, we may change these method signatures or even the gem architecture when updating the Major number. For example, we have some breaking changes in mind with version 2.0

Methods marked with API: semi-private are used internally for consistency. While it is possible to monkey-patch against them for your own use, the maintainers make no guarantees on backwards compatibility.

Learn More

Learn about the full functionality of the library on our Wiki

Contribute

We highly encourage helping out with the gem. Either adding more tests, building new helper classes, fixing bugs, or anything to increase overall quality.

Learn more about best practices, submitting a pull request, and rules for the build on our Wiki

plaid-ruby's People

Contributors

hosh avatar j4ustin avatar drop-darren avatar dontmitch avatar michaelckelly avatar dmerrick avatar codingjester avatar volodymyr-mykhailyk avatar rilian avatar aquach avatar dam13n avatar darthrevan avatar janko avatar supremebeing7 avatar drop-sam avatar soroushjp avatar

Watchers

James Cloos avatar  avatar Daniel Whiffing avatar  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.