plaid 8.6.0 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +86 -53
- 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 +111 -0
- data/lib/plaid/products/item.rb +18 -19
- data/lib/plaid/products/payment_initiation.rb +8 -1
- data/lib/plaid/products/sandbox.rb +18 -0
- 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: faecc884c6c66ec104dda0a142bff5968dcfff6bbf205a5cd4ec9d02d69644e4
|
4
|
+
data.tar.gz: 63abb65cc3d5c5bf9bb9fd85bb78770fb54214161505e2575e890406363e62d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26a5e5ba54760e4c7193fc426e6f4187ef68250364fb16bea231a15ed9cf6a3a92d62743318613700470118699d0bc2ce91871ba3b74d931994c04ed0fccf6a4
|
7
|
+
data.tar.gz: e7a469afdd3bad0b6788f8f6de647065ce8bb1187375ba3595e694529959eaab871819a95767fdd5a769b147c21b0f7620ae9bb5de4f8a010c3773923aa55737
|
data/CHANGELOG.md
CHANGED
@@ -1,127 +1,160 @@
|
|
1
|
+
# 10.0.0
|
2
|
+
|
3
|
+
- Add support for optional user fields for `/item/add_token/create` endpoint ([278](https://github.com/plaid/plaid-ruby/pull/278))
|
4
|
+
- Add support for credit card liabilities ([286](https://github.com/plaid/plaid-ruby/pull/286))
|
5
|
+
|
6
|
+
BREAKING CHANGES:
|
7
|
+
|
8
|
+
- `RATE_LIMIT_EXCEEDED` Plaid error types will be correctly mapped to `RateLimitExceededError` ([285](https://github.com/plaid/plaid-ruby/pull/285))
|
9
|
+
- `INSTITUTION_ERROR` Plaid error types will be correctly mapped to `InstitutionError` ([275](https://github.com/plaid/plaid-ruby/pull/275))
|
10
|
+
- Enable payment recipient to be created with BACS ([288](https://github.com/plaid/plaid-ruby/pull/288))
|
11
|
+
|
12
|
+
# 9.0.0
|
13
|
+
|
14
|
+
- Adds support for `/sandbox/item/set_verification_status`
|
15
|
+
- Removes support for deprecated `/item/access_token/update_version` endpoint
|
16
|
+
|
17
|
+
BREAKING CHANGES:
|
18
|
+
|
19
|
+
- Removes `client.item.update_version`
|
20
|
+
|
21
|
+
# 8.9.0 16-Apr-2020
|
22
|
+
|
23
|
+
- Add client_user_id to Item add token endpoint ([#274](https://github.com/plaid/plaid-ruby/pull/274))
|
24
|
+
|
25
|
+
# 8.8.0 02-Apr-2020
|
26
|
+
|
27
|
+
- Add support for Item add token endpoint (BETA) ([#269](https://github.com/plaid/plaid-ruby/pull/269))
|
28
|
+
- `/item/add_token/create`
|
29
|
+
|
30
|
+
# 8.7.0 05-Mar-2020
|
31
|
+
|
32
|
+
- Add transaction_code to Transaction class ([#264](https://github.com/plaid/plaid-ruby/pull/264))
|
33
|
+
- Add OAuth support to /institutions endpoints ([#261](https://github.com/plaid/plaid-ruby/pull/261))
|
34
|
+
|
1
35
|
# 8.6.0 20-Feb-2020
|
2
36
|
|
3
|
-
|
4
|
-
|
37
|
+
- Add support for transactions refresh product ([#258](https://github.com/plaid/plaid-ruby/pull/258))
|
38
|
+
- `/transactions/refresh`
|
5
39
|
|
6
40
|
# 8.5.0 10-Feb-2020
|
7
41
|
|
8
|
-
|
9
|
-
|
10
|
-
|
42
|
+
- Add support for deposit switch product ([#251](https://github.com/plaid/plaid-ruby/pull/251))
|
43
|
+
- Add support for generic processor token ([#256](https://github.com/plaid/plaid-ruby/pull/256))
|
44
|
+
- Add support for webhook verification ([#249](https://github.com/plaid/plaid-ruby/pull/249))
|
11
45
|
|
12
46
|
# 8.4.0 23-Jan-2020
|
13
47
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
48
|
+
- Add support for new UK Payment Initiation product ([#246](https://github.com/plaid/plaid-ruby/pull/246))
|
49
|
+
- `/payment_initiation/recipient/create`
|
50
|
+
- `/payment_initiation/recipient/get`
|
51
|
+
- `/payment_initiation/recipient/list`
|
52
|
+
- `/payment_initiation/payment/create`
|
53
|
+
- `/payment_initiation/payment/token/create`
|
54
|
+
- `/payment_initiation/payment/get`
|
55
|
+
- `/payment_initiation/payment/list`
|
56
|
+
- Add `consent_expiration_time` to the Item interface ([#247](https://github.com/plaid/plaid-ruby/pull/247))
|
24
57
|
|
25
58
|
# 8.3.0 17-Sep-2019
|
26
59
|
|
27
|
-
|
60
|
+
- Add support for new [Ocrolus Partnership](https://plaid.com/docs/ocrolus/)
|
28
61
|
|
29
62
|
# 8.2.0 16-Sep-2019
|
30
63
|
|
31
|
-
|
64
|
+
- Update Assets schema for international address support
|
32
65
|
|
33
66
|
# 8.1.0 23-Jul-2019
|
34
67
|
|
35
|
-
|
68
|
+
- Add binding for the new [liabilities product](https://plaid.com/docs/api/#liabilities)
|
36
69
|
|
37
70
|
# 8.0.0 19-Jun-2019
|
38
71
|
|
39
|
-
|
72
|
+
- Deprecate direct integration as it is no longer supported
|
40
73
|
|
41
74
|
# 7.1.0 17-Jun-2019
|
42
75
|
|
43
|
-
|
76
|
+
- Add bindings for the new [investments product](https://plaid.com/docs/api/#investments).
|
44
77
|
|
45
78
|
# 7.0.0 20-May-2019
|
46
79
|
|
47
|
-
|
80
|
+
- Add support for 2019-05-29 API version
|
48
81
|
|
49
82
|
# 6.3.1 20-Mar-2019
|
50
83
|
|
51
|
-
|
84
|
+
- Remove unnecessary log line
|
52
85
|
|
53
86
|
# 6.3.0 5-Mar-2019
|
54
87
|
|
55
|
-
|
56
|
-
|
57
|
-
|
88
|
+
- Add support for include_institution_data to /institutions/search endpoint.
|
89
|
+
- Add support for include_institution_data to /institutions/get endpoint.
|
90
|
+
- Add support for include_institution data to /institutions/get_by_id endpoint.
|
58
91
|
|
59
92
|
# 6.2.1 14-Feb-2019
|
60
93
|
|
61
|
-
|
94
|
+
- Fix error models to support assets-related errors.
|
62
95
|
|
63
96
|
# 6.2.0 28-Nov-2018
|
64
97
|
|
65
|
-
|
98
|
+
- Assets + Insights reports
|
66
99
|
|
67
100
|
# 6.1.0 20-Jun-2018
|
68
101
|
|
69
|
-
|
102
|
+
- Add bindings for the new [assets product](https://plaid.com/docs/api/#assets).
|
70
103
|
|
71
104
|
# 6.0.0 22-May-2018
|
72
105
|
|
73
|
-
|
74
|
-
|
75
|
-
|
106
|
+
- Use `Plaid-Version` header to request the certain compatible API version.
|
107
|
+
- Change Auth-related data structures to conform to the API.
|
108
|
+
- Include currency-related fields for transaction and account objects.
|
76
109
|
|
77
110
|
# 5.0.0 23-Mar-2018
|
78
111
|
|
79
|
-
|
112
|
+
- Introduce true response objects instead of deep nested hashes. Any of the
|
80
113
|
three syntaxes can be used interchangeably for any API response:
|
81
114
|
`response['foo']['bar']`, `response[:foo][:bar]`, or `response.foo.bar`.
|
82
|
-
|
115
|
+
- Add Dwolla and Apex products.
|
83
116
|
|
84
117
|
# 4.1.0 04-Jan-2018
|
85
118
|
|
86
|
-
|
87
|
-
|
88
|
-
|
119
|
+
- Make `/item/remove` the primary Item removal endpoint
|
120
|
+
- Add #options parameter to `/institutions/get`
|
121
|
+
- Handle network errors with `PlaidServerError`
|
89
122
|
|
90
123
|
# 4.0.0 09-Mar-2017
|
91
124
|
|
92
|
-
|
125
|
+
- 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).
|
93
126
|
|
94
127
|
# 3.0.0. 17-Jan-2017
|
95
128
|
|
96
|
-
|
129
|
+
- Add `/institutions/all` and `/institutions/all/search` endpoints, see [UPGRADING.md](UPGRADING.md#upgrading-from-2xx-to-300)
|
97
130
|
|
98
131
|
# 2.2.0. 03-Nov-2016
|
99
132
|
|
100
|
-
|
101
|
-
|
133
|
+
- Add `Transaction#reference_number` (@ericbirdsall).
|
134
|
+
- Fix webhook codes and add risk and income webhooks.
|
102
135
|
|
103
136
|
# 2.1.0. 19-Oct-2016
|
104
137
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
138
|
+
- Documentation fixes (@ishmael).
|
139
|
+
- Fix `Transaction#to_s` behavior (@michel-tricot).
|
140
|
+
- PATCH `/:product/step` flow.
|
141
|
+
- Use the same client in `User#upgrade` (@betesh).
|
142
|
+
- Webhook object (@zshannon).
|
143
|
+
- `processor_token` access in `User.exchange_token` (@gylaz).
|
144
|
+
- Raise `ServerError` in case server returned an empty response body.
|
112
145
|
|
113
146
|
# 2.0.0. 24-May-2016
|
114
147
|
|
115
|
-
|
116
|
-
|
148
|
+
- Use `~> 1.0` spec for multi_json dependency.
|
149
|
+
- Support `stripe_bank_account_token` in `User.exchange_token`.
|
117
150
|
|
118
151
|
# 2.0.0.alpha.2. 14-May-2016
|
119
152
|
|
120
|
-
|
153
|
+
- Use `:production` instead of `:api` to signify production environment
|
121
154
|
in `Plaid::Client#env=`.
|
122
|
-
|
123
|
-
|
155
|
+
- `User#mfa_step` allows to specify options now (thanks @gcweeks).
|
156
|
+
- Implemented `User#update_webhook`.
|
124
157
|
|
125
158
|
# 2.0.0.alpha. 06-May-2016
|
126
159
|
|
127
|
-
|
160
|
+
- Rewrite everything.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
plaid (
|
4
|
+
plaid (9.0.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
@@ -813,6 +813,11 @@ module Plaid
|
|
813
813
|
# :attr_reader:
|
814
814
|
# Public: The array of routing numbers associated with this institution.
|
815
815
|
property :routing_numbers
|
816
|
+
|
817
|
+
##
|
818
|
+
# :attr_reader:
|
819
|
+
# Public: Indicates that the institution has an OAuth login flow.
|
820
|
+
property :oauth
|
816
821
|
end
|
817
822
|
|
818
823
|
module MFA
|
@@ -1024,6 +1029,11 @@ module Plaid
|
|
1024
1029
|
# Public: The String date that the transaction was authorized,
|
1025
1030
|
# e.g. "2017-01-01".
|
1026
1031
|
property :authorized_date
|
1032
|
+
|
1033
|
+
##
|
1034
|
+
# :attr_reader:
|
1035
|
+
# Public: The String transaction code, e.g. "direct debit".
|
1036
|
+
property :transaction_code
|
1027
1037
|
end
|
1028
1038
|
|
1029
1039
|
# Public: A representation of an InvestmentTransaction in an investment
|
@@ -1802,6 +1812,84 @@ module Plaid
|
|
1802
1812
|
property :ytd_principal_paid
|
1803
1813
|
end
|
1804
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
|
+
|
1805
1893
|
# Public: A representation of someone's liabilities of all types.
|
1806
1894
|
class Liabilities < BaseModel
|
1807
1895
|
include Hashie::Extensions::IgnoreUndeclared
|
@@ -1810,6 +1898,11 @@ module Plaid
|
|
1810
1898
|
# :attr_reader:
|
1811
1899
|
# Public: Student loan liabilities associated with the item.
|
1812
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]
|
1813
1906
|
end
|
1814
1907
|
|
1815
1908
|
# Public: A representation of a payment amount.
|
@@ -1848,6 +1941,19 @@ module Plaid
|
|
1848
1941
|
property :country
|
1849
1942
|
end
|
1850
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
|
+
|
1851
1957
|
# Public: A representation of a payment recipient.
|
1852
1958
|
class PaymentRecipient < BaseModel
|
1853
1959
|
##
|
@@ -1865,6 +1971,11 @@ module Plaid
|
|
1865
1971
|
# Public: The recipient IBAN.
|
1866
1972
|
property :iban
|
1867
1973
|
|
1974
|
+
##
|
1975
|
+
# :attr_reader:
|
1976
|
+
# Public: The recipient BACS number .
|
1977
|
+
property :bacs, coerce: PaymentRecipientBACS
|
1978
|
+
|
1868
1979
|
##
|
1869
1980
|
# :attr_reader:
|
1870
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
|
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.0.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-11 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
|