plaid 11.0.0 → 11.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9657c1a46f6444a1cd4360595f92a007878401424702b967e3cf9a96c5337fe
4
- data.tar.gz: b60e691103b431e9abc6bee0f9b93a9753216995fb0508f28f1ba7644833bc48
3
+ metadata.gz: ff4272c5568637ce017b09f9853e64adf63b49ba9fefa576df5e7e07af322c1c
4
+ data.tar.gz: d11aa28f669b2ea349312eac235234e3db149c4ff719a391d90b4b68818ffe72
5
5
  SHA512:
6
- metadata.gz: 04fd20f7ee2e444d83571b1c11bc6c15472337087479d4d6b63a4b8f7ab99491de2d3600463234e758b2725fa76bb7fc6ca0ae7c7d1623cc5c07b44be78ee5b3
7
- data.tar.gz: 66ceaf1ffbe114ca48bdc878dc3d4226e8d55aa1521ad3a49383e7908d2a40a54bfa213b3667daf6e7a31db4b962cab47c2d91e41cba045e5479ab7763c72733
6
+ metadata.gz: 972a79b114065e55c1c2771f535d6f429afd36a56adfc3db2e44b2e796268e61d096355a00d64f5d9f615e76888a3788ca4974cb68ede0d5205186e8eb02b69e
7
+ data.tar.gz: 4f00ef2b44473d75dda5ce4212448cb1db3065ce0de57217f7762bcca818e9447314785dab45d75a0c2c226ad2bd0efec64ace628a2b4c23c238eee70c3e82df
data/.rubocop.yml CHANGED
@@ -8,7 +8,7 @@ Layout/IndentHeredoc:
8
8
  Enabled: false
9
9
 
10
10
  Metrics/AbcSize:
11
- Max: 20
11
+ Enabled: false
12
12
 
13
13
  Metrics/MethodLength:
14
14
  Max: 20
data/CHANGELOG.md CHANGED
@@ -1,11 +1,19 @@
1
+ # 11.1.1
2
+ - Add support for Link token parameter `institution_id`
3
+
4
+ # 11.1.0
5
+
6
+ - Add support for Link Token get endpoint ([#301](https://github.com/plaid/plaid-ruby/pull/301))
7
+ - `link/token/get`
8
+
1
9
  # 11.0.0
2
10
 
3
- - Add `merchant_name` to `Transaction` (#294)
11
+ - Add `merchant_name` to `Transaction` (#294)
4
12
 
5
13
  BREAKING CHANGES:
6
14
 
7
15
  - Removes the public key as input to `Client`. The public key is no longer needed by the API. (#287)
8
- - Add link/token/create support (#293)
16
+ - Add link/token/create support (#293)
9
17
 
10
18
  # 10.1.0
11
19
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- plaid (11.0.0)
4
+ plaid (11.1.1)
5
5
  faraday
6
6
  faraday_middleware
7
7
  hashie (>= 3.4.3)
@@ -11,15 +11,36 @@ GEM
11
11
  specs:
12
12
  ast (2.4.0)
13
13
  dotenv (2.4.0)
14
- faraday (1.0.1)
15
- multipart-post (>= 1.2, < 3)
16
- faraday_middleware (1.0.0)
14
+ faraday (1.10.3)
15
+ faraday-em_http (~> 1.0)
16
+ faraday-em_synchrony (~> 1.0)
17
+ faraday-excon (~> 1.1)
18
+ faraday-httpclient (~> 1.0)
19
+ faraday-multipart (~> 1.0)
20
+ faraday-net_http (~> 1.0)
21
+ faraday-net_http_persistent (~> 1.0)
22
+ faraday-patron (~> 1.0)
23
+ faraday-rack (~> 1.0)
24
+ faraday-retry (~> 1.0)
25
+ ruby2_keywords (>= 0.0.4)
26
+ faraday-em_http (1.0.0)
27
+ faraday-em_synchrony (1.0.0)
28
+ faraday-excon (1.1.0)
29
+ faraday-httpclient (1.0.1)
30
+ faraday-multipart (1.0.4)
31
+ multipart-post (~> 2)
32
+ faraday-net_http (1.0.1)
33
+ faraday-net_http_persistent (1.2.0)
34
+ faraday-patron (1.0.0)
35
+ faraday-rack (1.0.0)
36
+ faraday-retry (1.0.3)
37
+ faraday_middleware (1.2.0)
17
38
  faraday (~> 1.0)
18
- hashie (4.1.0)
39
+ hashie (5.0.0)
19
40
  minitest (5.11.3)
20
41
  minitest-around (0.4.1)
21
42
  minitest (~> 5.0)
22
- multipart-post (2.1.1)
43
+ multipart-post (2.3.0)
23
44
  parallel (1.12.1)
24
45
  parser (2.5.1.0)
25
46
  ast (~> 2.4.0)
@@ -35,6 +56,7 @@ GEM
35
56
  ruby-progressbar (~> 1.7)
36
57
  unicode-display_width (~> 1.0, >= 1.0.1)
37
58
  ruby-progressbar (1.9.0)
59
+ ruby2_keywords (0.0.5)
38
60
  sdoc (1.0.0)
39
61
  rdoc (>= 5.0)
40
62
  unicode-display_width (1.3.2)
data/README.md CHANGED
@@ -72,6 +72,27 @@ end
72
72
 
73
73
  ## Examples
74
74
 
75
+ ### Create a new link_token
76
+
77
+ ```ruby
78
+ # Grab the client_user_id by searching for the current user in your database
79
+ user = User.find_by!(email: '***')
80
+ client_user_id = user.id
81
+
82
+ # Create the link_token with all of your configurations
83
+ link_token_response = client.link_token.create(
84
+ user: { client_user_id: client_user_id.to_s },
85
+ client_name: 'My app',
86
+ products: %w[auth transactions],
87
+ country_codes: ['US'],
88
+ language: 'en'
89
+ )
90
+
91
+ # Pass the result to your client-side app to initialize Link
92
+ # and retrieve a public_token
93
+ link_token = link_token_response.link_token
94
+ ```
95
+
75
96
  ### Exchanging a Link public_token for a Plaid access_token
76
97
 
77
98
  If you have a [Link](https://github.com/plaid/link) `public token`, use this function to get an `access_token`: `client.item.public_token.exchange(public_token)`
@@ -83,6 +104,7 @@ response = client.item.public_token.exchange(public_token)
83
104
  access_token = response.access_token
84
105
  ```
85
106
 
107
+
86
108
  ### Deleting an item
87
109
 
88
110
  ```ruby
data/lib/plaid/models.rb CHANGED
@@ -2031,6 +2031,44 @@ module Plaid
2031
2031
  property :recipient_id
2032
2032
  end
2033
2033
 
2034
+ # Public: Metadata associated with a link token.
2035
+ class LinkTokenMetadata < BaseModel
2036
+ ##
2037
+ # :attr_reader:
2038
+ # Public: List of products associated with the link token.
2039
+ property :initial_products
2040
+
2041
+ ##
2042
+ # :attr_reader:
2043
+ # Public: The webhook associated with the link token.
2044
+ property :webhook
2045
+
2046
+ ##
2047
+ # :attr_reader:
2048
+ # Public: The country codes associated with the link token.
2049
+ property :country_codes
2050
+
2051
+ ##
2052
+ # :attr_reader:
2053
+ # Public: The language associated with the link token.
2054
+ property :language
2055
+
2056
+ ##
2057
+ # :attr_reader:
2058
+ # Public: The account filters associated with the link token.
2059
+ property :account_filters
2060
+
2061
+ ##
2062
+ # :attr_reader:
2063
+ # Public: The redirect URI associated with the link token.
2064
+ property :redirect_uri
2065
+
2066
+ ##
2067
+ # :attr_reader:
2068
+ # Public: The client name associated with the link token.
2069
+ property :client_name
2070
+ end
2071
+
2034
2072
  # Public: A representation of a payment amount.
2035
2073
  class WebhookVerificationKey < BaseModel
2036
2074
  ##
@@ -12,6 +12,7 @@ LINK_TOKEN_FIELD_NAMES = %i[
12
12
  account_filters
13
13
  cross_app_item_add
14
14
  payment_initiation
15
+ institution_id
15
16
  ].freeze
16
17
 
17
18
  module Plaid
@@ -28,6 +29,12 @@ module Plaid
28
29
  CreateResponse,
29
30
  body
30
31
  end
32
+
33
+ def get(link_token)
34
+ post_with_auth 'link/token/get',
35
+ GetResponse,
36
+ link_token: link_token
37
+ end
31
38
  end
32
39
 
33
40
  # Public: Response for /link/token/create.
@@ -42,4 +49,27 @@ module Plaid
42
49
  # Public: The String token expiration time.
43
50
  property :expiration
44
51
  end
52
+
53
+ # Public: Response for /link/token/get.
54
+ class GetResponse < Models::BaseResponse
55
+ ##
56
+ # :attr_reader:
57
+ # Public: The String token.
58
+ property :link_token
59
+
60
+ ##
61
+ # :attr_reader:
62
+ # Public: The link token expiration time.
63
+ property :expiration
64
+
65
+ ##
66
+ # :attr_reader:
67
+ # Public: The link token created time.
68
+ property :created_at
69
+
70
+ ##
71
+ # :attr_reader:
72
+ # Public: The metadata associated with the link token.
73
+ property :metadata, coerce: Models::LinkTokenMetadata
74
+ end
45
75
  end
data/lib/plaid/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Plaid
2
- VERSION = '11.0.0'.freeze
2
+ VERSION = '11.1.1'.freeze
3
3
  API_VERSION = '2019-05-29'.freeze
4
4
  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: 11.0.0
4
+ version: 11.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Loo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-20 00:00:00.000000000 Z
11
+ date: 2023-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -218,7 +218,7 @@ licenses:
218
218
  - MIT
219
219
  metadata:
220
220
  allowed_push_host: https://rubygems.org
221
- post_install_message:
221
+ post_install_message:
222
222
  rdoc_options: []
223
223
  require_paths:
224
224
  - lib
@@ -233,8 +233,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  - !ruby/object:Gem::Version
234
234
  version: '0'
235
235
  requirements: []
236
- rubygems_version: 3.0.3
237
- signing_key:
236
+ rubygems_version: 3.0.3.1
237
+ signing_key:
238
238
  specification_version: 4
239
239
  summary: Ruby bindings for Plaid
240
240
  test_files: []