Plaider
Plaid API client
Installation
Plaider is available through Rubygems and can be installed via:
$ gem install plaider
or add it to your Gemfile like this:
gem 'plaider'
Start Guide
Register for Plaid.
Usage
require 'plaider'
# Plaider global configuration
Plaider.configure do |config|
config.client_id = 'client id'
config.secret = 'secret'
end
# alternatively, specify configuration options when instantiating an Aggcat::Client
client = Plaider::Client.new(
client_id: 'client id',
secret: 'secret',
access_token: 'scope for all requests'
)
# create an scoped client by customer_id
client = Aggcat.scope(customer_id)
# get all supported financial institutions
client.institutions
# get details for Chase
client.institution('5301a99504977c52b60000d0')
# add new financial account to aggregate from Chase
response = client.add_user('chase', username, password, email)
# in case MFA is required
questions = response[:mfa]
answer = 'answer'
client.user_confirmation(answer)
# get already aggregated financial accounts and transactions
client.transactions
# get all aggregated account balances
client.balance
# get account transactions
start_date = Date.today - 30
end_date = Date.today # optional
pending = true # include pending transactions
client.transactions(account_id, start_date, end_date, pending)
# update user credentials
client.update_user(new_username, new_password)
# you can set scope inline for any request
Aggcat.scope(access_request).transactions
# delete user
client.delete_user
Requirements
- Ruby 1.9.3 or higher
Copyright
Copyright (c) 2014 Gene Drabkin. See LICENSE for details.