plaid 8.7.0 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +87 -55
- data/Gemfile.lock +6 -6
- data/PUBLISH.md +19 -0
- data/README.md +3 -1
- data/lib/plaid/errors.rb +7 -2
- data/lib/plaid/models.rb +101 -0
- data/lib/plaid/products/item.rb +18 -19
- data/lib/plaid/products/payment_initiation.rb +8 -1
- data/lib/plaid/products/sandbox.rb +32 -4
- data/lib/plaid/version.rb +1 -1
- metadata +3 -3
- data/PUBLISHING.md +0 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67b2fb1563bb0f5dc21d092bd5ae83e043f7cd1f48728dc47eb094325dbf340d
|
|
4
|
+
data.tar.gz: '09ed65928719206c075b22ccb8dbba5929b2c309bca6f329071dac1a24b4db29'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ede7755a232da3df4d8a464d77ccaa828ffba99e14d6677f0f85edcf21445475bf894a7dc7cbffccca38d9aed6fd3ee75f5591807460b05507213acc2c96cc8b
|
|
7
|
+
data.tar.gz: fc9cd109f8d7ee3fb75c323f10ea726e6cedd76000f260cbdce26b362e069eb1979cd3de853f5c6158e35f0e04546347620f0144a21e7331e0d90f4d1b7c4364
|
data/CHANGELOG.md
CHANGED
|
@@ -1,132 +1,164 @@
|
|
|
1
|
+
# 10.1.0
|
|
2
|
+
|
|
3
|
+
- Add support for more options (`override_username`, `override_password`) in the `/sandbox/public_token/create` endpoint ([219](https://github.com/plaid/plaid-ruby/pull/219))
|
|
4
|
+
|
|
5
|
+
# 10.0.0
|
|
6
|
+
|
|
7
|
+
- Add support for optional user fields for `/item/add_token/create` endpoint ([278](https://github.com/plaid/plaid-ruby/pull/278))
|
|
8
|
+
- Add support for credit card liabilities ([286](https://github.com/plaid/plaid-ruby/pull/286))
|
|
9
|
+
|
|
10
|
+
BREAKING CHANGES:
|
|
11
|
+
|
|
12
|
+
- `RATE_LIMIT_EXCEEDED` Plaid error types will be correctly mapped to `RateLimitExceededError` ([285](https://github.com/plaid/plaid-ruby/pull/285))
|
|
13
|
+
- `INSTITUTION_ERROR` Plaid error types will be correctly mapped to `InstitutionError` ([275](https://github.com/plaid/plaid-ruby/pull/275))
|
|
14
|
+
- Enable payment recipient to be created with BACS ([288](https://github.com/plaid/plaid-ruby/pull/288))
|
|
15
|
+
|
|
16
|
+
# 9.0.0
|
|
17
|
+
|
|
18
|
+
- Adds support for `/sandbox/item/set_verification_status`
|
|
19
|
+
- Removes support for deprecated `/item/access_token/update_version` endpoint
|
|
20
|
+
|
|
21
|
+
BREAKING CHANGES:
|
|
22
|
+
|
|
23
|
+
- Removes `client.item.update_version`
|
|
24
|
+
|
|
25
|
+
# 8.9.0 16-Apr-2020
|
|
26
|
+
|
|
27
|
+
- Add client_user_id to Item add token endpoint ([#274](https://github.com/plaid/plaid-ruby/pull/274))
|
|
28
|
+
|
|
29
|
+
# 8.8.0 02-Apr-2020
|
|
30
|
+
|
|
31
|
+
- Add support for Item add token endpoint (BETA) ([#269](https://github.com/plaid/plaid-ruby/pull/269))
|
|
32
|
+
- `/item/add_token/create`
|
|
33
|
+
|
|
1
34
|
# 8.7.0 05-Mar-2020
|
|
2
35
|
|
|
3
|
-
|
|
4
|
-
|
|
36
|
+
- Add transaction_code to Transaction class ([#264](https://github.com/plaid/plaid-ruby/pull/264))
|
|
37
|
+
- Add OAuth support to /institutions endpoints ([#261](https://github.com/plaid/plaid-ruby/pull/261))
|
|
5
38
|
|
|
6
39
|
# 8.6.0 20-Feb-2020
|
|
7
40
|
|
|
8
|
-
|
|
9
|
-
|
|
41
|
+
- Add support for transactions refresh product ([#258](https://github.com/plaid/plaid-ruby/pull/258))
|
|
42
|
+
- `/transactions/refresh`
|
|
10
43
|
|
|
11
44
|
# 8.5.0 10-Feb-2020
|
|
12
45
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
46
|
+
- Add support for deposit switch product ([#251](https://github.com/plaid/plaid-ruby/pull/251))
|
|
47
|
+
- Add support for generic processor token ([#256](https://github.com/plaid/plaid-ruby/pull/256))
|
|
48
|
+
- Add support for webhook verification ([#249](https://github.com/plaid/plaid-ruby/pull/249))
|
|
16
49
|
|
|
17
50
|
# 8.4.0 23-Jan-2020
|
|
18
51
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
52
|
+
- Add support for new UK Payment Initiation product ([#246](https://github.com/plaid/plaid-ruby/pull/246))
|
|
53
|
+
- `/payment_initiation/recipient/create`
|
|
54
|
+
- `/payment_initiation/recipient/get`
|
|
55
|
+
- `/payment_initiation/recipient/list`
|
|
56
|
+
- `/payment_initiation/payment/create`
|
|
57
|
+
- `/payment_initiation/payment/token/create`
|
|
58
|
+
- `/payment_initiation/payment/get`
|
|
59
|
+
- `/payment_initiation/payment/list`
|
|
60
|
+
- Add `consent_expiration_time` to the Item interface ([#247](https://github.com/plaid/plaid-ruby/pull/247))
|
|
29
61
|
|
|
30
62
|
# 8.3.0 17-Sep-2019
|
|
31
63
|
|
|
32
|
-
|
|
64
|
+
- Add support for new [Ocrolus Partnership](https://plaid.com/docs/ocrolus/)
|
|
33
65
|
|
|
34
66
|
# 8.2.0 16-Sep-2019
|
|
35
67
|
|
|
36
|
-
|
|
68
|
+
- Update Assets schema for international address support
|
|
37
69
|
|
|
38
70
|
# 8.1.0 23-Jul-2019
|
|
39
71
|
|
|
40
|
-
|
|
72
|
+
- Add binding for the new [liabilities product](https://plaid.com/docs/api/#liabilities)
|
|
41
73
|
|
|
42
74
|
# 8.0.0 19-Jun-2019
|
|
43
75
|
|
|
44
|
-
|
|
76
|
+
- Deprecate direct integration as it is no longer supported
|
|
45
77
|
|
|
46
78
|
# 7.1.0 17-Jun-2019
|
|
47
79
|
|
|
48
|
-
|
|
80
|
+
- Add bindings for the new [investments product](https://plaid.com/docs/api/#investments).
|
|
49
81
|
|
|
50
82
|
# 7.0.0 20-May-2019
|
|
51
83
|
|
|
52
|
-
|
|
84
|
+
- Add support for 2019-05-29 API version
|
|
53
85
|
|
|
54
86
|
# 6.3.1 20-Mar-2019
|
|
55
87
|
|
|
56
|
-
|
|
88
|
+
- Remove unnecessary log line
|
|
57
89
|
|
|
58
90
|
# 6.3.0 5-Mar-2019
|
|
59
91
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
92
|
+
- Add support for include_institution_data to /institutions/search endpoint.
|
|
93
|
+
- Add support for include_institution_data to /institutions/get endpoint.
|
|
94
|
+
- Add support for include_institution data to /institutions/get_by_id endpoint.
|
|
63
95
|
|
|
64
96
|
# 6.2.1 14-Feb-2019
|
|
65
97
|
|
|
66
|
-
|
|
98
|
+
- Fix error models to support assets-related errors.
|
|
67
99
|
|
|
68
100
|
# 6.2.0 28-Nov-2018
|
|
69
101
|
|
|
70
|
-
|
|
102
|
+
- Assets + Insights reports
|
|
71
103
|
|
|
72
104
|
# 6.1.0 20-Jun-2018
|
|
73
105
|
|
|
74
|
-
|
|
106
|
+
- Add bindings for the new [assets product](https://plaid.com/docs/api/#assets).
|
|
75
107
|
|
|
76
108
|
# 6.0.0 22-May-2018
|
|
77
109
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
110
|
+
- Use `Plaid-Version` header to request the certain compatible API version.
|
|
111
|
+
- Change Auth-related data structures to conform to the API.
|
|
112
|
+
- Include currency-related fields for transaction and account objects.
|
|
81
113
|
|
|
82
114
|
# 5.0.0 23-Mar-2018
|
|
83
115
|
|
|
84
|
-
|
|
116
|
+
- Introduce true response objects instead of deep nested hashes. Any of the
|
|
85
117
|
three syntaxes can be used interchangeably for any API response:
|
|
86
118
|
`response['foo']['bar']`, `response[:foo][:bar]`, or `response.foo.bar`.
|
|
87
|
-
|
|
119
|
+
- Add Dwolla and Apex products.
|
|
88
120
|
|
|
89
121
|
# 4.1.0 04-Jan-2018
|
|
90
122
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
123
|
+
- Make `/item/remove` the primary Item removal endpoint
|
|
124
|
+
- Add #options parameter to `/institutions/get`
|
|
125
|
+
- Handle network errors with `PlaidServerError`
|
|
94
126
|
|
|
95
127
|
# 4.0.0 09-Mar-2017
|
|
96
128
|
|
|
97
|
-
|
|
129
|
+
- Refactored the entire library to support [Plaid's new API](https://blog.plaid.com/improving-our-api/). Use the [transition guide](https://plaid.com/docs/link/transition-guide) to update your integration. Version 3.x.x of this gem is mirrored at [plaid-legacy](https://github.com/plaid/plaid-ruby-legacy).
|
|
98
130
|
|
|
99
131
|
# 3.0.0. 17-Jan-2017
|
|
100
132
|
|
|
101
|
-
|
|
133
|
+
- Add `/institutions/all` and `/institutions/all/search` endpoints, see [UPGRADING.md](UPGRADING.md#upgrading-from-2xx-to-300)
|
|
102
134
|
|
|
103
135
|
# 2.2.0. 03-Nov-2016
|
|
104
136
|
|
|
105
|
-
|
|
106
|
-
|
|
137
|
+
- Add `Transaction#reference_number` (@ericbirdsall).
|
|
138
|
+
- Fix webhook codes and add risk and income webhooks.
|
|
107
139
|
|
|
108
140
|
# 2.1.0. 19-Oct-2016
|
|
109
141
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
142
|
+
- Documentation fixes (@ishmael).
|
|
143
|
+
- Fix `Transaction#to_s` behavior (@michel-tricot).
|
|
144
|
+
- PATCH `/:product/step` flow.
|
|
145
|
+
- Use the same client in `User#upgrade` (@betesh).
|
|
146
|
+
- Webhook object (@zshannon).
|
|
147
|
+
- `processor_token` access in `User.exchange_token` (@gylaz).
|
|
148
|
+
- Raise `ServerError` in case server returned an empty response body.
|
|
117
149
|
|
|
118
150
|
# 2.0.0. 24-May-2016
|
|
119
151
|
|
|
120
|
-
|
|
121
|
-
|
|
152
|
+
- Use `~> 1.0` spec for multi_json dependency.
|
|
153
|
+
- Support `stripe_bank_account_token` in `User.exchange_token`.
|
|
122
154
|
|
|
123
155
|
# 2.0.0.alpha.2. 14-May-2016
|
|
124
156
|
|
|
125
|
-
|
|
157
|
+
- Use `:production` instead of `:api` to signify production environment
|
|
126
158
|
in `Plaid::Client#env=`.
|
|
127
|
-
|
|
128
|
-
|
|
159
|
+
- `User#mfa_step` allows to specify options now (thanks @gcweeks).
|
|
160
|
+
- Implemented `User#update_webhook`.
|
|
129
161
|
|
|
130
162
|
# 2.0.0.alpha. 06-May-2016
|
|
131
163
|
|
|
132
|
-
|
|
164
|
+
- Rewrite everything.
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
plaid (
|
|
4
|
+
plaid (10.1.0)
|
|
5
5
|
faraday
|
|
6
6
|
faraday_middleware
|
|
7
7
|
hashie (>= 3.4.3)
|
|
@@ -11,11 +11,11 @@ GEM
|
|
|
11
11
|
specs:
|
|
12
12
|
ast (2.4.0)
|
|
13
13
|
dotenv (2.4.0)
|
|
14
|
-
faraday (0.
|
|
14
|
+
faraday (1.0.1)
|
|
15
15
|
multipart-post (>= 1.2, < 3)
|
|
16
|
-
faraday_middleware (0.
|
|
17
|
-
faraday (
|
|
18
|
-
hashie (4.
|
|
16
|
+
faraday_middleware (1.0.0)
|
|
17
|
+
faraday (~> 1.0)
|
|
18
|
+
hashie (4.1.0)
|
|
19
19
|
minitest (5.11.3)
|
|
20
20
|
minitest-around (0.4.1)
|
|
21
21
|
minitest (~> 5.0)
|
|
@@ -25,7 +25,7 @@ GEM
|
|
|
25
25
|
ast (~> 2.4.0)
|
|
26
26
|
powerpack (0.1.1)
|
|
27
27
|
rainbow (3.0.0)
|
|
28
|
-
rake (12.3.
|
|
28
|
+
rake (12.3.3)
|
|
29
29
|
rdoc (6.0.4)
|
|
30
30
|
rubocop (0.53.0)
|
|
31
31
|
parallel (~> 1.10)
|
data/PUBLISH.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Publishing
|
|
2
|
+
|
|
3
|
+
The module is published to [RubyGems][1] under the gem name [plaid][2].
|
|
4
|
+
|
|
5
|
+
Prepare release:
|
|
6
|
+
|
|
7
|
+
1. update `lib/plaid/version.rb`, and `CHANGELOG.md` files.
|
|
8
|
+
2. run `bundle` to bump the version in `Gemfile.lock`
|
|
9
|
+
3. create and merge a PR with the changes from 1 and 2.
|
|
10
|
+
|
|
11
|
+
Publish:
|
|
12
|
+
|
|
13
|
+
1. `git checkout master` and `git pull` (makes sure your `HEAD` is up-to-date).
|
|
14
|
+
2. Check that tests are passing on latest `master` build and (optional) `bundle exec rake test` to run tests locally
|
|
15
|
+
3. `bundle exec rake release` (builds the gem, creates a tag, pushes the gem to RubyGems and tag to GitHub).
|
|
16
|
+
4. `bundle exec rake update_github_docs` (generates RDoc files, updates `gh-pages` branch and pushes it to GitHub). (If you run into a `gh-pages` branch error, you may need to manually run `git checkout gh-pages` to ensure the branch is checked out locally.)
|
|
17
|
+
|
|
18
|
+
[1]: https://rubygems.org/
|
|
19
|
+
[2]: https://rubygems.org/gems/plaid
|
data/README.md
CHANGED
|
@@ -26,7 +26,7 @@ Each major version of `plaid-ruby` targets a specific version of the Plaid API:
|
|
|
26
26
|
|
|
27
27
|
| API version | plaid-ruby release |
|
|
28
28
|
| ----------- | ------------------ |
|
|
29
|
-
| [`2019-05-29`][api-version-2019-05-29] (**latest**) | `8.x.x`, `7.x.x` |
|
|
29
|
+
| [`2019-05-29`][api-version-2019-05-29] (**latest**) | `9.x.x`, `8.x.x`, `7.x.x` |
|
|
30
30
|
| [`2018-05-22`][api-version-2018-05-22] | `6.x.x` |
|
|
31
31
|
| `2017-03-08` | `5.x.x` |
|
|
32
32
|
|
|
@@ -208,6 +208,8 @@ Any methods making API calls will result in an exception raised unless the respo
|
|
|
208
208
|
|
|
209
209
|
`Plaid::ItemError` indicates that information provided for the Item (such as credentials or MFA) may be invalid or that the Item is not supported on Plaid's platform.
|
|
210
210
|
|
|
211
|
+
`Plaid::InstitutionError` is returned when there are errors for the requested financial institution.
|
|
212
|
+
|
|
211
213
|
Read more about response codes and their meaning in the
|
|
212
214
|
[Plaid documentation](https://plaid.com/docs/api).
|
|
213
215
|
|
data/lib/plaid/errors.rb
CHANGED
|
@@ -58,14 +58,19 @@ TEXT
|
|
|
58
58
|
# Plaid's platform.
|
|
59
59
|
class ItemError < PlaidAPIError; end
|
|
60
60
|
|
|
61
|
+
# Public: Returned when there are errors for the requested financial
|
|
62
|
+
# institution.
|
|
63
|
+
class InstitutionError < PlaidAPIError; end
|
|
64
|
+
|
|
61
65
|
# Internal: A module that provides utilities for errors.
|
|
62
66
|
module Error
|
|
63
67
|
ERROR_TYPE_MAP = {
|
|
64
68
|
'INVALID_REQUEST' => Plaid::InvalidRequestError,
|
|
65
69
|
'INVALID_INPUT' => Plaid::InvalidInputError,
|
|
66
|
-
'
|
|
70
|
+
'RATE_LIMIT_EXCEEDED' => Plaid::RateLimitExceededError,
|
|
67
71
|
'API_ERROR' => Plaid::APIError,
|
|
68
|
-
'ITEM_ERROR' => Plaid::ItemError
|
|
72
|
+
'ITEM_ERROR' => Plaid::ItemError,
|
|
73
|
+
'INSTITUTION_ERROR' => Plaid::InstitutionError
|
|
69
74
|
}.freeze
|
|
70
75
|
|
|
71
76
|
# Internal: Map error_type to PlaidAPIError.
|
data/lib/plaid/models.rb
CHANGED
|
@@ -1812,6 +1812,84 @@ module Plaid
|
|
|
1812
1812
|
property :ytd_principal_paid
|
|
1813
1813
|
end
|
|
1814
1814
|
|
|
1815
|
+
# Public: A representation of a credit card liability APR
|
|
1816
|
+
class CreditCardLiabilityAPRs < BaseModel
|
|
1817
|
+
##
|
|
1818
|
+
# :attr_reader:
|
|
1819
|
+
# Public: Annual Percentage Rate applied.
|
|
1820
|
+
property :apr_percentage
|
|
1821
|
+
|
|
1822
|
+
##
|
|
1823
|
+
# :attr_reader:
|
|
1824
|
+
# Public: Enumerated response from the following options:
|
|
1825
|
+
# "balance_transfer_apr", "cash_apr", "purchase_apr", or
|
|
1826
|
+
# "special".
|
|
1827
|
+
property :apr_type
|
|
1828
|
+
|
|
1829
|
+
##
|
|
1830
|
+
# :attr_reader:
|
|
1831
|
+
# Public: Amount of money that is subjected to the APR if a
|
|
1832
|
+
# balance was carried beyond payment due date. How it is
|
|
1833
|
+
# calculated can vary by card issuer. It is often calculated as
|
|
1834
|
+
# an average daily balance.
|
|
1835
|
+
property :balance_subject_to_apr
|
|
1836
|
+
|
|
1837
|
+
##
|
|
1838
|
+
# :attr_reader:
|
|
1839
|
+
# Public: Amount of money charged due to interest from last
|
|
1840
|
+
# statement.
|
|
1841
|
+
property :interest_charge_amount
|
|
1842
|
+
end
|
|
1843
|
+
|
|
1844
|
+
# Public: A representation of a credit card liability
|
|
1845
|
+
class CreditCardLiability < BaseModel
|
|
1846
|
+
##
|
|
1847
|
+
# :attr_reader:
|
|
1848
|
+
# Public: The ID of the account that this liability belongs to.
|
|
1849
|
+
property :account_id
|
|
1850
|
+
|
|
1851
|
+
##
|
|
1852
|
+
# :attr_reader:
|
|
1853
|
+
# Public: See the APR object schema
|
|
1854
|
+
property :aprs, coerce: Array[CreditCardLiabilityAPRs]
|
|
1855
|
+
|
|
1856
|
+
##
|
|
1857
|
+
# :attr_reader:
|
|
1858
|
+
# Public: true if a payment is currently overdue.
|
|
1859
|
+
property :is_overdue
|
|
1860
|
+
|
|
1861
|
+
##
|
|
1862
|
+
# :attr_reader:
|
|
1863
|
+
# Public: The amount of the last payment.
|
|
1864
|
+
property :last_payment_amount
|
|
1865
|
+
|
|
1866
|
+
##
|
|
1867
|
+
# :attr_reader:
|
|
1868
|
+
# Public: The date of the last payment.
|
|
1869
|
+
property :last_payment_date
|
|
1870
|
+
|
|
1871
|
+
##
|
|
1872
|
+
# :attr_reader:
|
|
1873
|
+
# Public: The outstanding balance on the last statement.
|
|
1874
|
+
property :last_statement_balance
|
|
1875
|
+
|
|
1876
|
+
##
|
|
1877
|
+
# :attr_reader:
|
|
1878
|
+
# Public: The date of the last statement.
|
|
1879
|
+
property :last_statement_issue_date
|
|
1880
|
+
|
|
1881
|
+
##
|
|
1882
|
+
# :attr_reader:
|
|
1883
|
+
# Public: The minimum payment due for the next billing cycle.
|
|
1884
|
+
property :minimum_payment_amount
|
|
1885
|
+
|
|
1886
|
+
##
|
|
1887
|
+
# :attr_reader:
|
|
1888
|
+
# Public: The due date for the next payment. The due date is null
|
|
1889
|
+
# if a payment is not expected.
|
|
1890
|
+
property :next_payment_due_date
|
|
1891
|
+
end
|
|
1892
|
+
|
|
1815
1893
|
# Public: A representation of someone's liabilities of all types.
|
|
1816
1894
|
class Liabilities < BaseModel
|
|
1817
1895
|
include Hashie::Extensions::IgnoreUndeclared
|
|
@@ -1820,6 +1898,11 @@ module Plaid
|
|
|
1820
1898
|
# :attr_reader:
|
|
1821
1899
|
# Public: Student loan liabilities associated with the item.
|
|
1822
1900
|
property :student, coerce: Array[StudentLoanLiability]
|
|
1901
|
+
|
|
1902
|
+
##
|
|
1903
|
+
# :attr_reader:
|
|
1904
|
+
# Public: Credit card liabilities associated with the item.
|
|
1905
|
+
property :credit, coerce: Array[CreditCardLiability]
|
|
1823
1906
|
end
|
|
1824
1907
|
|
|
1825
1908
|
# Public: A representation of a payment amount.
|
|
@@ -1858,6 +1941,19 @@ module Plaid
|
|
|
1858
1941
|
property :country
|
|
1859
1942
|
end
|
|
1860
1943
|
|
|
1944
|
+
# Public: A representation of a payment recipient BACS number.
|
|
1945
|
+
class PaymentRecipientBACS < BaseModel
|
|
1946
|
+
##
|
|
1947
|
+
# :attr_reader:
|
|
1948
|
+
# Public: The String account number. E.g. "66374958".
|
|
1949
|
+
property :account
|
|
1950
|
+
|
|
1951
|
+
##
|
|
1952
|
+
# :attr_reader:
|
|
1953
|
+
# Public: The String sort code. E.g. "089999".
|
|
1954
|
+
property :sort_code
|
|
1955
|
+
end
|
|
1956
|
+
|
|
1861
1957
|
# Public: A representation of a payment recipient.
|
|
1862
1958
|
class PaymentRecipient < BaseModel
|
|
1863
1959
|
##
|
|
@@ -1875,6 +1971,11 @@ module Plaid
|
|
|
1875
1971
|
# Public: The recipient IBAN.
|
|
1876
1972
|
property :iban
|
|
1877
1973
|
|
|
1974
|
+
##
|
|
1975
|
+
# :attr_reader:
|
|
1976
|
+
# Public: The recipient BACS number .
|
|
1977
|
+
property :bacs, coerce: PaymentRecipientBACS
|
|
1978
|
+
|
|
1878
1979
|
##
|
|
1879
1980
|
# :attr_reader:
|
|
1880
1981
|
# Public: The recipient address.
|
data/lib/plaid/products/item.rb
CHANGED
|
@@ -23,33 +23,27 @@ module Plaid
|
|
|
23
23
|
# Public: The String new access token.
|
|
24
24
|
property :new_access_token
|
|
25
25
|
end
|
|
26
|
+
end
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
#
|
|
34
|
-
# Returns an UpdateVersionResponse object with new access_token and item
|
|
35
|
-
# ID.
|
|
36
|
-
def update_version(access_token_v1)
|
|
37
|
-
post_with_auth 'item/access_token/update_version',
|
|
38
|
-
UpdateVersionResponse,
|
|
39
|
-
access_token_v1: access_token_v1
|
|
28
|
+
# Public: Class used to call the AddToken sub-product.
|
|
29
|
+
class AddToken < BaseProduct
|
|
30
|
+
def create(user)
|
|
31
|
+
post_with_auth 'item/add_token/create',
|
|
32
|
+
CreateResponse,
|
|
33
|
+
user: user
|
|
40
34
|
end
|
|
41
35
|
|
|
42
|
-
# Public: Response for /item/
|
|
43
|
-
class
|
|
36
|
+
# Public: Response for /item/add_token/create.
|
|
37
|
+
class CreateResponse < Models::BaseResponse
|
|
44
38
|
##
|
|
45
39
|
# :attr_reader:
|
|
46
|
-
# Public: The String
|
|
47
|
-
property :
|
|
40
|
+
# Public: The String token.
|
|
41
|
+
property :add_token
|
|
48
42
|
|
|
49
43
|
##
|
|
50
44
|
# :attr_reader:
|
|
51
|
-
# Public: The String
|
|
52
|
-
property :
|
|
45
|
+
# Public: The String token expiration time.
|
|
46
|
+
property :expiration
|
|
53
47
|
end
|
|
54
48
|
end
|
|
55
49
|
|
|
@@ -152,6 +146,11 @@ module Plaid
|
|
|
152
146
|
# Public: The Plaid::PublicToken product accessor.
|
|
153
147
|
subproduct :public_token
|
|
154
148
|
|
|
149
|
+
##
|
|
150
|
+
# :attr_reader:
|
|
151
|
+
# Public: The Plaid::AddToken product accessor.
|
|
152
|
+
subproduct :add_token
|
|
153
|
+
|
|
155
154
|
##
|
|
156
155
|
# :attr_reader:
|
|
157
156
|
# Public: The Plaid::Webhook product accessor.
|
|
@@ -6,13 +6,15 @@ module Plaid
|
|
|
6
6
|
# name - Recipient name.
|
|
7
7
|
# iban - Recipient IBAN.
|
|
8
8
|
# address - Recipient address.
|
|
9
|
+
# bacs - Recipient BACS (hash with "account" and "sort_code" keys)
|
|
9
10
|
#
|
|
10
11
|
# Returns a PaymentRecipientCreateResponse object.
|
|
11
|
-
def create_recipient(name, iban, address)
|
|
12
|
+
def create_recipient(name, iban, address, bacs)
|
|
12
13
|
post_with_auth 'payment_initiation/recipient/create',
|
|
13
14
|
PaymentRecipientCreateResponse,
|
|
14
15
|
name: name,
|
|
15
16
|
iban: iban,
|
|
17
|
+
bacs: bacs,
|
|
16
18
|
address: address
|
|
17
19
|
end
|
|
18
20
|
|
|
@@ -112,6 +114,11 @@ module Plaid
|
|
|
112
114
|
# Public: The recipient IBAN.
|
|
113
115
|
property :iban
|
|
114
116
|
|
|
117
|
+
##
|
|
118
|
+
# :attr_reader:
|
|
119
|
+
# Public: The recipient IBAN.
|
|
120
|
+
property :bacs, coerce: Models::PaymentRecipientBACS
|
|
121
|
+
|
|
115
122
|
##
|
|
116
123
|
# :attr_reader:
|
|
117
124
|
# Public: The recipient address.
|
|
@@ -44,6 +44,24 @@ module Plaid
|
|
|
44
44
|
# Public: The Boolean webhook fired success flag.
|
|
45
45
|
property :webhook_fired
|
|
46
46
|
end
|
|
47
|
+
|
|
48
|
+
# Public: Sets the verification status for an item
|
|
49
|
+
# created via automated microdeposits
|
|
50
|
+
#
|
|
51
|
+
# Does a POST /sandbox/item/set_verification_status call.
|
|
52
|
+
#
|
|
53
|
+
# access_token - access_token of the item
|
|
54
|
+
# account_id - id of the account to verify
|
|
55
|
+
# verification_status - status to set
|
|
56
|
+
#
|
|
57
|
+
# Returns a Models::BaseResponse object.
|
|
58
|
+
def set_verification_status(access_token, account_id, verification_status)
|
|
59
|
+
post_with_auth '/sandbox/item/set_verification_status',
|
|
60
|
+
Models::BaseResponse,
|
|
61
|
+
access_token: access_token,
|
|
62
|
+
account_id: account_id,
|
|
63
|
+
verification_status: verification_status
|
|
64
|
+
end
|
|
47
65
|
end
|
|
48
66
|
|
|
49
67
|
# Public: Class used to call the SandboxPublicToken sub-product
|
|
@@ -54,10 +72,12 @@ module Plaid
|
|
|
54
72
|
# to generate a public_token given an institution and list of
|
|
55
73
|
# products.
|
|
56
74
|
#
|
|
57
|
-
# institution_id
|
|
58
|
-
# initial_products
|
|
59
|
-
# webhook
|
|
60
|
-
#
|
|
75
|
+
# institution_id - Specific institution id to generate token for.
|
|
76
|
+
# initial_products - Products for which generated token is valid for.
|
|
77
|
+
# webhook - webhook to associate with the item (optional).
|
|
78
|
+
# override_username - Specific test credential username to use
|
|
79
|
+
# override_password - Specific test credential password to use
|
|
80
|
+
# options - Additional options to merge into API request.
|
|
61
81
|
#
|
|
62
82
|
# Returns a SandboxCreateResponse object with a public token and item id.
|
|
63
83
|
def create(institution_id:,
|
|
@@ -65,6 +85,8 @@ module Plaid
|
|
|
65
85
|
transactions_start_date: nil,
|
|
66
86
|
transactions_end_date: nil,
|
|
67
87
|
webhook: nil,
|
|
88
|
+
override_username: nil,
|
|
89
|
+
override_password: nil,
|
|
68
90
|
options: nil)
|
|
69
91
|
|
|
70
92
|
options_payload = {}
|
|
@@ -72,6 +94,12 @@ module Plaid
|
|
|
72
94
|
txn_options = transaction_options transactions_start_date,
|
|
73
95
|
transactions_end_date
|
|
74
96
|
options_payload[:transactions] = txn_options if txn_options != {}
|
|
97
|
+
unless override_username.nil?
|
|
98
|
+
options_payload[:override_username] = override_username
|
|
99
|
+
end
|
|
100
|
+
unless override_password.nil?
|
|
101
|
+
options_payload[:override_password] = override_password
|
|
102
|
+
end
|
|
75
103
|
options_payload = options_payload.merge(options) unless options.nil?
|
|
76
104
|
|
|
77
105
|
post_with_public_key 'sandbox/public_token/create',
|
data/lib/plaid/version.rb
CHANGED
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:
|
|
4
|
+
version: 10.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Edmund Loo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-06-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -180,7 +180,7 @@ files:
|
|
|
180
180
|
- Gemfile
|
|
181
181
|
- Gemfile.lock
|
|
182
182
|
- LICENSE.txt
|
|
183
|
-
-
|
|
183
|
+
- PUBLISH.md
|
|
184
184
|
- README.md
|
|
185
185
|
- Rakefile
|
|
186
186
|
- UPGRADING.md
|
data/PUBLISHING.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Publishing
|
|
2
|
-
|
|
3
|
-
The module is published to [RubyGems][1] under the gem name [plaid][2].
|
|
4
|
-
|
|
5
|
-
To publish:
|
|
6
|
-
|
|
7
|
-
1. `rake test` (runs the test suite locally).
|
|
8
|
-
2. Update, commit, and merge (with review) the `lib/plaid/version.rb` and `CHANGELOG.md` files.
|
|
9
|
-
5. `git pull` (makes sure your `HEAD` is up-to-date).
|
|
10
|
-
6. `rake release` (builds the gem, creates a tag, pushes the gem to RubyGems and tag to GitHub).
|
|
11
|
-
7. `rake update_github_docs` (generates RDoc files, updates `gh-pages` branch and pushes it to GitHub).
|
|
12
|
-
|
|
13
|
-
[1]: https://rubygems.org/
|
|
14
|
-
[2]: https://rubygems.org/gems/plaid
|