Giter Club home page Giter Club logo

aggcat's Introduction

Aggcat

Build Status Coverage Status Gem Version

Intuit Customer Account Data API client

Installation

Aggcat is available through Rubygems and can be installed via:

$ gem install aggcat

or add it to your Gemfile like this:

gem 'aggcat'

Start Guide

Register for Intuit Customer Account Data.

Get your OAuth data.

Or

Register for Finicity Facade API

If you want to use the Finicity Facade API set the following additional configuration parameters:

oauth_url: 'https://api.finicity.com/oauth/v1/get_access_token_by_saml'
base_url: 'https://api.finicity.com/financialdatafeed/v1'

See: Finicity Setup

Usage

require 'aggcat'

# Aggcat global configuration
Aggcat.configure do |config|
  config.oauth_url 'oauth url if using Finicity Facade API'
  config.base_url 'base url if using Finicity Facade API'
  config.issuer_id = 'your issuer id'
  config.consumer_key = 'your consumer key'
  config.consumer_secret = 'your consumer secret'
  config.certificate_path = '/path/to/your/certificate/key'
  config.verbose = false # verbose = true will output all raw XML API requests/responses to STDOUT
  # certificate could be provided as a string instead of a path to a file using certificate_value
  # certificate_value takes precedence over certificate_path
  # certificate_value should contain newline characters as appropriate
  # config.certificate_value = "-----BEGIN RSA PRIVATE KEY-----\nasdf123FOO$BAR\n...\n-----END RSA PRIVATE KEY-----"
  # certificate's can contain passwords, put your password here.
  # config.certificate_password = "1234"
end

# alternatively, specify configuration options when instantiating an Aggcat::Client
client = Aggcat::Client.new(
  issuer_id: 'your issuer id',
  consumer_key: 'your consumer key',
  consumer_secret: 'your consumer secret',
  certificate_path: '/path/to/your/certificate/key', # OR certificate_value: "--BEGIN RSA KEY--..."
  customer_id: '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 Bank of America
client.institution(14007)

# add new financial account to aggregate from Bank of America
response = client.discover_and_add_accounts(14007, username, password)

# in case MFA is required
questions = response[:result][:challenges]
answers = ['first answer', 'second answer']
challenge_session_id = response[:challenge_session_id]
challenge_node_id = response[:challenge_node_id]
client.account_confirmation(14007, challenge_session_id, challenge_node_id, answers)

# get already aggregated financial account
client.account(account_id)

# get all aggregated accounts
client.accounts

# get account transactions
start_date = Date.today - 30
end_date = Date.today # optional
client.account_transactions(account_id, start_date, end_date)

# update account type
client.update_account_type(account_id, 'CREDITCARD')

# update login credentials
client.update_login(institution_id, login_id, new_username, new_password)

# in case MFA is required
client.update_login_confirmation(login_id, challenge_session_id, challenge_node_id, answers)

# get position info for an investment account
client.investment_positions(account_id)

# you can set scope inline for any request
Aggcat.scope(customer_id).account(account_id)

# delete account
client.delete_account(account_id)

# delete customer for the current scope
client.delete_customer

Documentation

Please make sure to read Intuit's Account Data API.

API Use Cases.

Testing Calls to the API.

Requirements

  • Ruby 2.2.2 or higher

Copyright

Copyright (c) 2013 Gene Drabkin. See LICENSE for details.

aggcat's People

Contributors

amk-boco avatar ckuhn avatar ckuhn-finicity avatar cloocher avatar sequielo avatar simple10 avatar sogoodday avatar thedavemarshall avatar turlockmike avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aggcat's Issues

discover_and_add and update_login only support 2 auth fields

The methods to initially authenticate as well as update credentials with Intuit only support a username and password. It's possible (such as with institution_id = 2808) for there to be more then 2 params to authenticate with.

This issue is fixed with PR: #12

This issue is effecting our production environment a great deal. Please respond with questions or a merge as soon as possible.

Usage guide has incorrect signature for update_login_confirmation

In the Usage guide it is declared you update_login_confirmation with an institution_id:

# in case MFA is required
client.update_login_confirmation(institution_id, challenge_session_id, challenge_node_id, answers)

In the underlying implementation it's actually a login_id as so:

# in case MFA is required
client.update_login_confirmation(login_id, challenge_session_id, challenge_node_id, answers)

Intuit to Finicity migration

Hi guys! I'm working on the migration of an app using aggcat with intuit to use finicity, so I would like to know if is just necessary to set this tokens to get things up?

oauth_url: 'https://api.finicity.com/oauth/v1/get_access_token_by_saml'
base_url: 'https://api.finicity.com/financialdatafeed/v1'

#configuration parameters to use the appropriate values
issuer_id (SAML Identity Provider ID)
consumer_key
consumer_secret
certificate_path (path to your certificate key)

or some of the methods call have changed?

Links outdated

I've been interested in getting connected up with the customer account data/agg-cat service and it appears that the links in the README are no longer functioning.

I've also been fairly frustrated by my ability to track down newer updates. Did these services get deprecated, or am I just missing something plainly obvious?

Downloading Institution list

What is the recommended way to download the list of institutions from Intuit? Due to the large nature of the list, I'm guessing that I should use pagination (see Intuit's API docs) but does this gem support it?

Aggcat.institutions Timeout Issue

I get a time out error when trying to get institutions using this line: Aggcat.institutions. The configuration are in place. Something wonky is going on.

I was able to retrieve institutions with another aggcat client gem. Would prefer using this one since its more object oriented.

Interested to hear your thoughts on this one. cc: @cloocher

maximum number of customers allowed error parsed as institution_id n is not valid

On sandbox, if we reach the max of users allowed, the API responde with a message like this:

"APP_ERRORapi.max.customersThe offering has reached the maximum number of customers allowed...."

but that error is returned as other exception like "institution_id N is not valid", including in all cases that institution_id is valid.

Update Readme with MFA methods

Hi, this is a wonderful and useful gem.

I needed to implemented MFA in my app, and after digging the code, I noticed the methods account_confirmation and update_login_confirmation to deal with this.

So it would be great if you update the README with this methods for Multiple-Form Authentication.

Thanks!

Errors when using account_confirmation method when presented with challenges

I was working with your gem and running some tests against my Intuit dev account. I was receiving this error:

failed to make API call - undefined method split' for :challengesessionid:Symbol, retrying /Users/clark/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb:1590:incapitalize': undefined method `split' for :challengesessionid:Symbol (NoMethodError)

It turned out that changing the challenge headers to this fixed the problem:
headers = {'challengeSessionId' => challenge_session_id, 'challengeNodeId' => challenge_node_id}

The second problem I noticed was that Intuit's own documentation on the namespace naming had typos in it, and thus coding to their exact specs didn't work. I modified the challenge_answer method to the following, and I was able to run the test using "tfa_text" as username to get MFA login working:

def challenge_answer(answer)
xml = Builder::XmlMarkup.new
xml.InstitutionLogin('xmlns' => LOGIN_NAMESPACE) do |login|
login.challengeResponses do |challenge|
challenge.response(answer, 'xmlns' => CHALLENGE_NAMESPACE)
end
end
end

Lastly, I need to figure out how to get the other MFA types working (tfa_text2, tfa_choice). My thoughts are to make challenge_answer take in an answer array depending on the number of challenge questions presented.

Just wondering if you ran into these problems yet. I can send a pull request with my changes to client.rb.

Tests

Any particular reason you aren't adding test coverage? I'm very much looking at this over another library I've come across, however without test coverage, I'm uneasy about using this in production.

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.