plaid 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/README.md +3 -1
- data/lib/plaid.rb +4 -1
- data/lib/plaid/models/exchange_token_response.rb +2 -0
- data/lib/plaid/version.rb +1 -1
- data/spec/plaid_spec.rb +1 -1
- 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: 331976cd945495c539e38747adbe9c2ff36722c5
|
4
|
+
data.tar.gz: 7f875ded55c1c8deaae0e034f54b49df31121d5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db782030a2e91663aa203212b919fbca03da6839757587aa2b8a59dc99daa0100d1e56e794dbcae558b7ca5257b8ddd07f098cba183ddff1bf8ff9a40b609a65
|
7
|
+
data.tar.gz: ba4af752bcf6d6df50512217878c20aa8414c59fee9f266aff3b752f66cf875cb13b63134e4deb8cfe83ac88da06ed252486bfc49e2ad5242d5d8f5b19ee3902
|
data/.travis.yml
CHANGED
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.7.
|
9
|
+
Latest stable version: **1.7.1**
|
10
10
|
|
11
11
|
This version removes the need to use 'type' in each additional call.
|
12
12
|
|
@@ -85,6 +85,8 @@ end
|
|
85
85
|
|
86
86
|
# Exchange a Link public_token for a Plaid access_token
|
87
87
|
exchangeTokenResponse = Plaid.exchange_token('test,chase,connected')
|
88
|
+
# Optionally include an account_id
|
89
|
+
exchangeTokenResponse = Plaid.exchange_token('test,chase,connected', 'account_id')
|
88
90
|
|
89
91
|
# Use the API access_token to initialize a user
|
90
92
|
# Note: This example assumes you are using Link with the "auth" product
|
data/lib/plaid.rb
CHANGED
@@ -35,8 +35,11 @@ module Plaid
|
|
35
35
|
# Exchange a Plaid Link public_token for a Plaid access_token
|
36
36
|
# Required parameters:
|
37
37
|
# public_token
|
38
|
-
|
38
|
+
# account_id (optional)
|
39
|
+
def exchange_token(public_token, account_id = nil)
|
39
40
|
payload = { public_token: public_token }
|
41
|
+
# include the account id, if set
|
42
|
+
payload[:account_id] = account_id if account_id
|
40
43
|
|
41
44
|
res = Connection.post('exchange_token', payload)
|
42
45
|
ExchangeTokenResponse.new(res)
|
@@ -1,9 +1,11 @@
|
|
1
1
|
module Plaid
|
2
2
|
class ExchangeTokenResponse
|
3
3
|
attr_accessor :access_token
|
4
|
+
attr_accessor :stripe_bank_account_token
|
4
5
|
|
5
6
|
def initialize(fields = {})
|
6
7
|
@access_token = fields['access_token']
|
8
|
+
@stripe_bank_account_token = fields['stripe_bank_account_token']
|
7
9
|
end
|
8
10
|
end
|
9
11
|
end
|
data/lib/plaid/version.rb
CHANGED
data/spec/plaid_spec.rb
CHANGED
@@ -201,7 +201,7 @@ describe Plaid do
|
|
201
201
|
end
|
202
202
|
|
203
203
|
describe '.exchange_token' do
|
204
|
-
subject { Plaid.exchange_token('test,chase,connected') }
|
204
|
+
subject { Plaid.exchange_token('test,chase,connected', 'QPO8Jo8vdDHMepg41PBwckXm4KdK1yUdmXOwK') }
|
205
205
|
|
206
206
|
it { expect(subject.access_token).to eql('test_chase') }
|
207
207
|
end
|
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.7.
|
4
|
+
version: 1.7.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-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|