plaid 11.0.0 → 11.1.0

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: 686ab2ca00fca888acdb2df51c73e8c7d69e8392729177b8ffa6fe153b4f12ec
4
+ data.tar.gz: bf6dcb19a57c770fbe22fe9371236d4e080f1cd536d7a0c433e4dfcfc27f991f
5
5
  SHA512:
6
- metadata.gz: 04fd20f7ee2e444d83571b1c11bc6c15472337087479d4d6b63a4b8f7ab99491de2d3600463234e758b2725fa76bb7fc6ca0ae7c7d1623cc5c07b44be78ee5b3
7
- data.tar.gz: 66ceaf1ffbe114ca48bdc878dc3d4226e8d55aa1521ad3a49383e7908d2a40a54bfa213b3667daf6e7a31db4b962cab47c2d91e41cba045e5479ab7763c72733
6
+ metadata.gz: b9da4ab04bf3b21192eb8b102d11deff836dc26e3ffdcb8e786de03763a701d466b3a53afb22b262ac17fad5ee8e60aa37e1b0ce2d88e4183b4519dbc1ec3a94
7
+ data.tar.gz: cd282ef9020162621f103c02c82091b37b79265480284523c04bccee2ffef995127bc94da91b6a3d4468b302ebdffb85c7ba88aeaaac9908ba7ba4c9aead339a
@@ -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
@@ -1,11 +1,16 @@
1
+ # 11.1.0
2
+
3
+ - Add support for Link Token get endpoint ([#301](https://github.com/plaid/plaid-ruby/pull/301))
4
+ - `link/token/get`
5
+
1
6
  # 11.0.0
2
7
 
3
- - Add `merchant_name` to `Transaction` (#294)
8
+ - Add `merchant_name` to `Transaction` (#294)
4
9
 
5
10
  BREAKING CHANGES:
6
11
 
7
12
  - 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)
13
+ - Add link/token/create support (#293)
9
14
 
10
15
  # 10.1.0
11
16
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- plaid (11.0.0)
4
+ plaid (11.1.0)
5
5
  faraday
6
6
  faraday_middleware
7
7
  hashie (>= 3.4.3)
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
@@ -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
  ##
@@ -28,6 +28,12 @@ module Plaid
28
28
  CreateResponse,
29
29
  body
30
30
  end
31
+
32
+ def get(link_token)
33
+ post_with_auth 'link/token/get',
34
+ GetResponse,
35
+ link_token: link_token
36
+ end
31
37
  end
32
38
 
33
39
  # Public: Response for /link/token/create.
@@ -42,4 +48,27 @@ module Plaid
42
48
  # Public: The String token expiration time.
43
49
  property :expiration
44
50
  end
51
+
52
+ # Public: Response for /link/token/get.
53
+ class GetResponse < Models::BaseResponse
54
+ ##
55
+ # :attr_reader:
56
+ # Public: The String token.
57
+ property :link_token
58
+
59
+ ##
60
+ # :attr_reader:
61
+ # Public: The link token expiration time.
62
+ property :expiration
63
+
64
+ ##
65
+ # :attr_reader:
66
+ # Public: The link token created time.
67
+ property :created_at
68
+
69
+ ##
70
+ # :attr_reader:
71
+ # Public: The metadata associated with the link token.
72
+ property :metadata, coerce: Models::LinkTokenMetadata
73
+ end
45
74
  end
@@ -1,4 +1,4 @@
1
1
  module Plaid
2
- VERSION = '11.0.0'.freeze
2
+ VERSION = '11.1.0'.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.0
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: 2020-09-15 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
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
234
234
  version: '0'
235
235
  requirements: []
236
236
  rubygems_version: 3.0.3
237
- signing_key:
237
+ signing_key:
238
238
  specification_version: 4
239
239
  summary: Ruby bindings for Plaid
240
240
  test_files: []