plaid 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/plaid.rb +11 -0
- data/lib/plaid/add_user.rb +8 -0
- data/lib/plaid/version.rb +1 -1
- data/spec/add_user_spec.rb +5 -0
- data/spec/user_spec.rb +20 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f39ff944ff6e3e21b2fa3262ef463095349c1491
|
4
|
+
data.tar.gz: 269f0c0a4e6bed37a2ccd57a27ffbcb8efe61d9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 418b1c53390a1eb298a147e6edaae0943f24d11cdcc8b601a1b69a78302d1685778316c53d1c04cd983a364f31fe3bba85d2ef6f47a67bc57e556a40fdfde4d3
|
7
|
+
data.tar.gz: f0641d4ee4df67b075c82cf4f61710f31e9ff36a37fc4509a6408637b920768e15df8a4ea5ee4c8c6e9d74c227ff6884d8a17d9d99efbe3add3b79e4ac1133cd
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ Ruby bindings for the Plaid API
|
|
6
6
|
|
7
7
|
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.
|
8
8
|
|
9
|
-
Latest stable version: **1.4.
|
9
|
+
Latest stable version: **1.4.1**
|
10
10
|
|
11
11
|
This version removes the need to use 'type' in each additional call.
|
12
12
|
|
data/lib/plaid.rb
CHANGED
@@ -24,6 +24,17 @@ module Plaid
|
|
24
24
|
@user.new(res,api_level)
|
25
25
|
end
|
26
26
|
|
27
|
+
def existing_user(token,api_level=[])
|
28
|
+
@user = Plaid::User.new
|
29
|
+
@user.access_token = token
|
30
|
+
api_level.each { |i|
|
31
|
+
@user.get_auth if i == 'auth'
|
32
|
+
@user.get_connect if i == 'connect'
|
33
|
+
@user.get_info if i == 'info'
|
34
|
+
} unless api_level.empty?
|
35
|
+
@user
|
36
|
+
end
|
37
|
+
|
27
38
|
# Builds an institution object and returns when the institution details exist
|
28
39
|
def institution(id=nil)
|
29
40
|
@institution = Plaid::Institution.new
|
data/lib/plaid/add_user.rb
CHANGED
data/lib/plaid/version.rb
CHANGED
data/spec/add_user_spec.rb
CHANGED
@@ -105,4 +105,9 @@ describe '.add_user' do
|
|
105
105
|
user = Plaid.add_user('connect','plaid_test','plaid_good','wells',"{'gte':'05/10/2014' , 'lte':'06/10/2014'}")
|
106
106
|
it{ expect(user.transactions).to be_truthy }
|
107
107
|
end
|
108
|
+
|
109
|
+
context 'sets a user with an existing access token' do
|
110
|
+
user = Plaid.set_user('test')
|
111
|
+
it{ expect(user.access_token).to eq('test')}
|
112
|
+
end
|
108
113
|
end
|
data/spec/user_spec.rb
CHANGED
@@ -19,6 +19,26 @@ describe '#User' do
|
|
19
19
|
user = Plaid.add_user('connect','plaid_test','plaid_good','wells')
|
20
20
|
it { expect(user.accounts.first.type).to eq('depository') }
|
21
21
|
end
|
22
|
+
|
23
|
+
context 'gets a valid user with accounts and transactions' do
|
24
|
+
user = Plaid.set_user('test',['connect'])
|
25
|
+
it{ expect(user.transactions).to be_truthy}
|
26
|
+
end
|
27
|
+
|
28
|
+
context 'gets a valid user with accounts' do
|
29
|
+
user = Plaid.set_user('test',['auth'])
|
30
|
+
it{ expect(user.accounts).to be_truthy}
|
31
|
+
end
|
32
|
+
|
33
|
+
context 'gets a valid user with info' do
|
34
|
+
user = Plaid.set_user('test',['info'])
|
35
|
+
it{ expect(user.accounts).to be_truthy}
|
36
|
+
end
|
37
|
+
|
38
|
+
context 'gets a fully validated user with all access granted' do
|
39
|
+
user = Plaid.set_user('test',['connect','info','auth'])
|
40
|
+
it{ expect(user.transactions).to be_truthy}
|
41
|
+
end
|
22
42
|
end
|
23
43
|
|
24
44
|
# MFA specs - after user is instantiated,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plaid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Crites
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|