finapps 5.0.4 → 5.0.5

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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/lib/finapps.rb +1 -0
  4. data/lib/finapps/rest/client.rb +1 -0
  5. data/lib/finapps/version.rb +1 -1
  6. data/spec/rest/plaid/plaid_consumer_institutions_spec.rb +76 -0
  7. data/spec/rest/plaid/plaid_webhooks_spec.rb +2 -2
  8. data/spec/support/fake_api.rb +19 -77
  9. data/spec/support/fixtures/plaid/institution/consumer/add-invalid-public-token.json +5 -0
  10. data/spec/support/fixtures/plaid/institution/consumer/add-missing-public-token.json +5 -0
  11. data/spec/support/fixtures/plaid/institution/consumer/add.json +19 -0
  12. data/spec/support/fixtures/plaid/institution/consumer/list.json +21 -0
  13. data/spec/support/fixtures/plaid/webhook.json +1 -1
  14. metadata +45 -54
  15. data/spec/support/fixtures/institution_add.json +0 -12
  16. data/spec/support/fixtures/institution_login_form.json +0 -3
  17. data/spec/support/fixtures/institutions_routing_number.json +0 -6
  18. data/spec/support/fixtures/institutions_search_list.json +0 -74
  19. data/spec/support/fixtures/invalid_institution_id.json +0 -5
  20. data/spec/support/fixtures/refresh_invalid_mfa.json +0 -11
  21. data/spec/support/fixtures/refresh_not_refreshed.json +0 -11
  22. data/spec/support/fixtures/refresh_pending_mfa.json +0 -13
  23. data/spec/support/fixtures/refresh_queued.json +0 -12
  24. data/spec/support/fixtures/user_institution_refresh.json +0 -74
  25. data/spec/support/fixtures/user_institution_refresh_all.json +0 -89
  26. data/spec/support/fixtures/user_institution_status.json +0 -7
  27. data/spec/support/fixtures/user_institutions_list.json +0 -162
  28. data/spec/support/fixtures/user_institutions_show.json +0 -24
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '095e2b6352f9f63b6ad47ff7dc24a5a57badbe81c07395b248cc8d2106b95e2e'
4
- data.tar.gz: 75df3521c3058b8e5693a506b7cd7da232b434e38299aae0a34bc91361f6373a
3
+ metadata.gz: db44bf32241ed4d54bf29dce14836832397136256eb5fe28821a245c16c7b4d6
4
+ data.tar.gz: ff07e6b644f1f7465b359086037069017b9c3b4d16852729dafafbcf706c9423
5
5
  SHA512:
6
- metadata.gz: 471c9ab99b5048b6ccf6fe069b447182e2480b4d4d41923720576ddb580cce693fa9f71f115594aa8d6bc6ade620d0de4b6c2994f6b8851cfbf424b73c368d0c
7
- data.tar.gz: 16fa7ed1754577cb389a5cfad5c511d35ae3b764a57292313a30fb38198e6ab341a6f5fc91c87b44a6c89246938406abfc302734d546da0fac5dd87a219ac0e4
6
+ metadata.gz: 041f8b7b3bd9412a8cc712ba996f727bb78a93128c9fbe384f17460bad73b920f13b7c3063e860a6bf3798616fa406cca6505ee12dab76f0b130b9adef5f4f32
7
+ data.tar.gz: 78fed6e1e88b09e79794ae492bbde7368123c0bfbe0ce790d4f24f849bcd62abf9c76b9cabf958ee01b7dcdc59cfd195b45385cc0f0ff4f1741558f243df47c4
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.5.1
1
+ ruby-2.6.3
data/lib/finapps.rb CHANGED
@@ -32,6 +32,7 @@ require 'finapps/rest/consumers_portfolios'
32
32
  require 'finapps/rest/portfolio_reports'
33
33
 
34
34
  require 'finapps/rest/plaid/plaid_webhooks'
35
+ require 'finapps/rest/plaid/plaid_consumer_institutions'
35
36
 
36
37
  require 'finapps/utils/query_builder'
37
38
  require 'finapps/version' unless defined?(FinApps::VERSION)
@@ -32,6 +32,7 @@ module FinApps
32
32
  tenant_app_settings
33
33
  version
34
34
  plaid_webhooks
35
+ plaid_consumer_institutions
35
36
  ].freeze
36
37
 
37
38
  # @param [String] tenant_token
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinApps
4
- VERSION = '5.0.4'
4
+ VERSION = '5.0.5'
5
5
  end
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helpers/client'
4
+
5
+ RSpec.describe FinApps::REST::PlaidConsumerInstitutions do
6
+ include SpecHelpers::Client
7
+
8
+ # noinspection RubyBlockToMethodReference
9
+ let(:api_client) { client }
10
+
11
+ RSpec.shared_examples 'an API request' do |_parameter|
12
+ # noinspection RubyBlockToMethodReference
13
+ it { expect { subject }.not_to raise_error }
14
+ it('returns an array') { expect(subject).to be_a(Array) }
15
+ end
16
+
17
+ describe '#create' do
18
+ subject(:create) do
19
+ FinApps::REST::PlaidConsumerInstitutions
20
+ .new(api_client)
21
+ .create(public_token: 'le-token')
22
+ end
23
+
24
+ context 'when valid tenant token is provided' do
25
+ it_behaves_like 'an API request'
26
+
27
+ it('performs a post and returns information about the institution') do
28
+ expect(create[RESULTS]).to have_key(:_id)
29
+ end
30
+ it('returns no error messages') do
31
+ expect(create[ERROR_MESSAGES]).to be_empty
32
+ end
33
+ end
34
+
35
+ context 'when invalid tenant token is provided' do
36
+ let(:api_client) { client(:invalid_tenant_token) }
37
+
38
+ it_behaves_like 'an API request'
39
+ it('results is nil') { expect(create[RESULTS]).to be_nil }
40
+ it('error messages array is populated') do
41
+ expect(create[ERROR_MESSAGES].first.downcase).to eq('resource not found')
42
+ end
43
+ end
44
+ end
45
+
46
+ describe '#list' do
47
+ subject(:list) do
48
+ FinApps::REST::PlaidConsumerInstitutions
49
+ .new(api_client)
50
+ .list
51
+ end
52
+
53
+ context 'when valid tenant token is provided' do
54
+ it_behaves_like 'an API request'
55
+
56
+ it('returns an Array of institution data') do
57
+ result = list[RESULTS]
58
+ expect(result).to be_an(Array)
59
+ expect(result.first).to have_key(:_id)
60
+ end
61
+ it('returns no error messages') do
62
+ expect(list[ERROR_MESSAGES]).to be_empty
63
+ end
64
+ end
65
+
66
+ context 'when invalid tenant token is provided' do
67
+ let(:api_client) { client(:invalid_tenant_token) }
68
+
69
+ it_behaves_like 'an API request'
70
+ it('results is nil') { expect(list[RESULTS]).to be_nil }
71
+ it('error messages array is populated') do
72
+ expect(list[ERROR_MESSAGES].first.downcase).to eq('resource not found')
73
+ end
74
+ end
75
+ end
76
+ end
@@ -10,8 +10,8 @@ RSpec.describe FinApps::REST::PlaidWebhooks do
10
10
 
11
11
  describe '#create' do
12
12
  RSpec.shared_examples 'an API request' do |_parameter|
13
- it { expect { create }.not_to raise_error }
14
- it('returns an array') { expect(create).to be_a(Array) }
13
+ it { expect { subject }.not_to raise_error }
14
+ it('returns an array') { expect(subject).to be_a(Array) }
15
15
  end
16
16
 
17
17
  context 'when valid tenant token is provided' do
@@ -15,7 +15,7 @@ class FakeApi < Sinatra::Base
15
15
  put("/#{version}/resources") { json_response 201, 'resource.json' }
16
16
  delete("/#{version}/resources/:id") { status 202 }
17
17
 
18
- # plaid
18
+ # plaid_webhook
19
19
  post("/#{version}/p/webhook") do
20
20
  tenant_token = request.env['HTTP_X_TENANT_TOKEN']
21
21
  if tenant_token == 'invalid_tenant_token'
@@ -25,6 +25,24 @@ class FakeApi < Sinatra::Base
25
25
  end
26
26
  end
27
27
 
28
+ # plaid_institution_consumer
29
+ get("/#{version}/p/institution/consumer") do
30
+ tenant_token = request.env['HTTP_X_TENANT_TOKEN']
31
+ if tenant_token == 'invalid_tenant_token'
32
+ json_response 404, 'resource_not_found.json'
33
+ else
34
+ json_response 200, 'plaid/institution/consumer/list.json'
35
+ end
36
+ end
37
+ post("/#{version}/p/institution/consumer") do
38
+ tenant_token = request.env['HTTP_X_TENANT_TOKEN']
39
+ if tenant_token == 'invalid_tenant_token'
40
+ json_response 404, 'resource_not_found.json'
41
+ else
42
+ json_response 200, 'plaid/institution/consumer/add.json'
43
+ end
44
+ end
45
+
28
46
  # version
29
47
  get("/#{version}/version") { 'Version => 2.1.29-.20161208.172810' }
30
48
 
@@ -111,82 +129,6 @@ class FakeApi < Sinatra::Base
111
129
  end
112
130
  end
113
131
 
114
- # institutions
115
- get("/#{version}/institutions/site/valid_site_id/form") do
116
- json_response 200, 'institution_login_form.json'
117
- end
118
- get("/#{version}/institutions/site/invalid_site_id/form") do
119
- json_response 400, 'invalid_institution_id.json'
120
- end
121
- post("/#{version}/institutions/site/valid_site_id/add") do
122
- json_response 200, 'institution_add.json'
123
- end
124
- get("/#{version}/institutions/search/:search_term") do
125
- json_response 200, 'institutions_search_list.json'
126
- end
127
- get("/#{version}/institutions/routing/:routing_number") do
128
- json_response 200, 'institutions_routing_number.json'
129
- end
130
- get("/#{version}/institutions/site/:site_id") do
131
- json_response 200, 'institutions_routing_number.json'
132
- end
133
-
134
- # user institutions
135
- get("/#{version}/institutions/consumer/valid_id/status") do
136
- json_response 200, 'user_institution_status.json'
137
- end
138
- get("/#{version}/institutions/consumer/invalid_id/status") do
139
- json_response 400, 'invalid_user_institution_id.json'
140
- end
141
- get("/#{version}/institutions/consumer") do
142
- json_response 200, 'user_institutions_list.json'
143
- end
144
- get("/#{version}/institutions/consumer/valid_id") do
145
- json_response 200, 'user_institutions_show.json'
146
- end
147
- get("/#{version}/institutions/consumer/invalid_id") do
148
- json_response 400, 'invalid_user_institution_id.json'
149
- end
150
- put("/#{version}/institutions/consumer/refresh") do
151
- json_response 200, 'user_institutions_refresh_all.json'
152
- end
153
- put("/#{version}/institutions/consumer/valid_id/credentials") do
154
- json_response 200, 'institution_add.json'
155
- end
156
- put("/#{version}/institutions/consumer/invalid_id/credentials") do
157
- json_response 400, 'invalid_user_institution_id.json'
158
- end
159
- put("/#{version}/institutions/consumer/valid_id/mfa") do
160
- json_response 200, 'institution_add.json'
161
- end
162
- put("/#{version}/institutions/consumer/invalid_id/mfa") do
163
- json_response 400, 'invalid_user_institution_id.json'
164
- end
165
- delete("/#{version}/institutions/consumer/valid_id") { status 204 }
166
- delete("/#{version}/institutions/consumer/invalid_id") do
167
- json_response 400, 'invalid_user_institution_id.json'
168
- end
169
- get("/#{version}/institutions/consumer/valid_id/form") do
170
- json_response 200, 'institution_login_form.json'
171
- end
172
- get("/#{version}/institutions/consumer/invalid_id/form") do
173
- json_response 400, 'invalid_institution_id.json'
174
- end
175
- put("/#{version}/institutions/refresh") do
176
- json_response 200, 'user_institution_refresh.json'
177
- end
178
- put(
179
- "/#{version}/institutions/consumer/valid_consumer_institution_id/refresh"
180
- ) do
181
- request.body.rewind
182
- request_payload = JSON.parse request.body.read
183
- if request_payload['token'] == 'invalid_token'
184
- json_response(400, 'refresh_invalid_mfa.json')
185
- else
186
- json_response(200, 'refresh_queued.json')
187
- end
188
- end
189
-
190
132
  # consumers
191
133
  get("/#{version}/consumers/valid_public_id") do
192
134
  json_response 200, 'user.json'
@@ -0,0 +1,5 @@
1
+ {
2
+ "messages":[
3
+ "Plaid Error - request ID: l2OkRpPk9UP5zms, http status: 400, type: INVALID_INPUT, code: INVALID_PUBLIC_TOKEN, message: provided public token is in an invalid format. expected format: public-<environment>-<identifier>"
4
+ ]
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "messages": [
3
+ "/item/public_token/exchange - public token must be specified"
4
+ ]
5
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "_id": "5d435bb8c80c5c00010d88b1",
3
+ "status": 4,
4
+ "status_text": null,
5
+ "error": null,
6
+ "webhook": null,
7
+ "institution_name": "",
8
+ "plaid_institution_id": "",
9
+ "metrics": {
10
+ "available_products": null,
11
+ "billed_products": null,
12
+ "last_webhook": null,
13
+ "last_webhook_code": null,
14
+ "last_successful_transaction_update": null,
15
+ "last_failed_transaction_update": null
16
+ },
17
+ "created_date": "2019-08-01T21:38:00.261008261Z",
18
+ "modified_date": "2019-08-01T21:38:00.261008261Z"
19
+ }
@@ -0,0 +1,21 @@
1
+ [
2
+ {
3
+ "_id": "5d435bb8c80c5c00010d88b1",
4
+ "status": 4,
5
+ "status_text": null,
6
+ "error": null,
7
+ "webhook": null,
8
+ "institution_name": "",
9
+ "plaid_institution_id": "",
10
+ "metrics": {
11
+ "available_products": [],
12
+ "billed_products": [],
13
+ "last_webhook": null,
14
+ "last_webhook_code": null,
15
+ "last_successful_transaction_update": null,
16
+ "last_failed_transaction_update": null
17
+ },
18
+ "created_date": "2019-08-01T21:38:00.261Z",
19
+ "modified_date": "2019-08-01T21:38:00.261Z"
20
+ }
21
+ ]
@@ -1,3 +1,3 @@
1
1
  {
2
- "url": "https://api.financialapps.com/v3/p/webhook/encodedTenantData"
2
+ "url": "https://qa-api.finclear.io/v4/p/webhook/NGRkNjA3YjEtNTY1Zi00ZGE0LTcyMmMtMmU4NGM1Yzg3ZjQzOpqZ%2FWFetADiFsLZ1Li74R%2FnQ4qZA4tiEGTS12yD6zVk"
3
3
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finapps
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.4
4
+ version: 5.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erich Quintero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-30 00:00:00.000000000 Z
11
+ date: 2019-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: finapps_core
@@ -94,22 +94,22 @@ dependencies:
94
94
  name: guard
95
95
  requirement: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - "~>"
98
- - !ruby/object:Gem::Version
99
- version: '2.15'
100
97
  - - ">="
101
98
  - !ruby/object:Gem::Version
102
99
  version: 2.15.0
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '2.15'
103
103
  type: :development
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '2.15'
110
107
  - - ">="
111
108
  - !ruby/object:Gem::Version
112
109
  version: 2.15.0
110
+ - - "~>"
111
+ - !ruby/object:Gem::Version
112
+ version: '2.15'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: guard-rspec
115
115
  requirement: !ruby/object:Gem::Requirement
@@ -154,82 +154,82 @@ dependencies:
154
154
  name: rspec
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '3.8'
160
157
  - - ">="
161
158
  - !ruby/object:Gem::Version
162
159
  version: 3.8.0
160
+ - - "~>"
161
+ - !ruby/object:Gem::Version
162
+ version: '3.8'
163
163
  type: :development
164
164
  prerelease: false
165
165
  version_requirements: !ruby/object:Gem::Requirement
166
166
  requirements:
167
- - - "~>"
168
- - !ruby/object:Gem::Version
169
- version: '3.8'
170
167
  - - ">="
171
168
  - !ruby/object:Gem::Version
172
169
  version: 3.8.0
170
+ - - "~>"
171
+ - !ruby/object:Gem::Version
172
+ version: '3.8'
173
173
  - !ruby/object:Gem::Dependency
174
174
  name: rubocop
175
175
  requirement: !ruby/object:Gem::Requirement
176
176
  requirements:
177
- - - "~>"
178
- - !ruby/object:Gem::Version
179
- version: '0.73'
180
177
  - - ">="
181
178
  - !ruby/object:Gem::Version
182
179
  version: 0.73.0
180
+ - - "~>"
181
+ - !ruby/object:Gem::Version
182
+ version: '0.73'
183
183
  type: :development
184
184
  prerelease: false
185
185
  version_requirements: !ruby/object:Gem::Requirement
186
186
  requirements:
187
- - - "~>"
188
- - !ruby/object:Gem::Version
189
- version: '0.73'
190
187
  - - ">="
191
188
  - !ruby/object:Gem::Version
192
189
  version: 0.73.0
190
+ - - "~>"
191
+ - !ruby/object:Gem::Version
192
+ version: '0.73'
193
193
  - !ruby/object:Gem::Dependency
194
194
  name: rubocop-performance
195
195
  requirement: !ruby/object:Gem::Requirement
196
196
  requirements:
197
- - - "~>"
198
- - !ruby/object:Gem::Version
199
- version: '1.4'
200
197
  - - ">="
201
198
  - !ruby/object:Gem::Version
202
199
  version: 1.4.0
200
+ - - "~>"
201
+ - !ruby/object:Gem::Version
202
+ version: '1.4'
203
203
  type: :development
204
204
  prerelease: false
205
205
  version_requirements: !ruby/object:Gem::Requirement
206
206
  requirements:
207
- - - "~>"
208
- - !ruby/object:Gem::Version
209
- version: '1.4'
210
207
  - - ">="
211
208
  - !ruby/object:Gem::Version
212
209
  version: 1.4.0
210
+ - - "~>"
211
+ - !ruby/object:Gem::Version
212
+ version: '1.4'
213
213
  - !ruby/object:Gem::Dependency
214
214
  name: rubocop-rspec
215
215
  requirement: !ruby/object:Gem::Requirement
216
216
  requirements:
217
- - - "~>"
218
- - !ruby/object:Gem::Version
219
- version: '1.33'
220
217
  - - ">="
221
218
  - !ruby/object:Gem::Version
222
219
  version: 1.33.0
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: '1.33'
223
223
  type: :development
224
224
  prerelease: false
225
225
  version_requirements: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - "~>"
228
- - !ruby/object:Gem::Version
229
- version: '1.33'
230
227
  - - ">="
231
228
  - !ruby/object:Gem::Version
232
229
  version: 1.33.0
230
+ - - "~>"
231
+ - !ruby/object:Gem::Version
232
+ version: '1.33'
233
233
  - !ruby/object:Gem::Dependency
234
234
  name: sinatra
235
235
  requirement: !ruby/object:Gem::Requirement
@@ -254,22 +254,22 @@ dependencies:
254
254
  name: webmock
255
255
  requirement: !ruby/object:Gem::Requirement
256
256
  requirements:
257
- - - "~>"
258
- - !ruby/object:Gem::Version
259
- version: '3.6'
260
257
  - - ">="
261
258
  - !ruby/object:Gem::Version
262
259
  version: 3.6.0
260
+ - - "~>"
261
+ - !ruby/object:Gem::Version
262
+ version: '3.6'
263
263
  type: :development
264
264
  prerelease: false
265
265
  version_requirements: !ruby/object:Gem::Requirement
266
266
  requirements:
267
- - - "~>"
268
- - !ruby/object:Gem::Version
269
- version: '3.6'
270
267
  - - ">="
271
268
  - !ruby/object:Gem::Version
272
269
  version: 3.6.0
270
+ - - "~>"
271
+ - !ruby/object:Gem::Version
272
+ version: '3.6'
273
273
  description: A simple library for communicating with the FinApps REST API.
274
274
  email:
275
275
  - erich@financialapps.com
@@ -343,6 +343,7 @@ files:
343
343
  - spec/rest/order_tokens_spec.rb
344
344
  - spec/rest/orders_spec.rb
345
345
  - spec/rest/password_resets_spec.rb
346
+ - spec/rest/plaid/plaid_consumer_institutions_spec.rb
346
347
  - spec/rest/plaid/plaid_webhooks_spec.rb
347
348
  - spec/rest/portfolio_reports_spec.rb
348
349
  - spec/rest/portfolios_alerts_spec.rb
@@ -363,11 +364,6 @@ files:
363
364
  - spec/support/fixtures/alert_occurrences.json
364
365
  - spec/support/fixtures/error.json
365
366
  - spec/support/fixtures/fake_pdf_statement.json
366
- - spec/support/fixtures/institution_add.json
367
- - spec/support/fixtures/institution_login_form.json
368
- - spec/support/fixtures/institutions_routing_number.json
369
- - spec/support/fixtures/institutions_search_list.json
370
- - spec/support/fixtures/invalid_institution_id.json
371
367
  - spec/support/fixtures/invalid_request_body.json
372
368
  - spec/support/fixtures/invalid_user_id.json
373
369
  - spec/support/fixtures/invalid_user_institution_id.json
@@ -383,6 +379,10 @@ files:
383
379
  - spec/support/fixtures/order_token.json
384
380
  - spec/support/fixtures/orders.json
385
381
  - spec/support/fixtures/password_reset_token.json
382
+ - spec/support/fixtures/plaid/institution/consumer/add-invalid-public-token.json
383
+ - spec/support/fixtures/plaid/institution/consumer/add-missing-public-token.json
384
+ - spec/support/fixtures/plaid/institution/consumer/add.json
385
+ - spec/support/fixtures/plaid/institution/consumer/list.json
386
386
  - spec/support/fixtures/plaid/webhook.json
387
387
  - spec/support/fixtures/portfolio.json
388
388
  - spec/support/fixtures/portfolio_reports.json
@@ -391,10 +391,6 @@ files:
391
391
  - spec/support/fixtures/portfolios_available_consumers.json
392
392
  - spec/support/fixtures/portfolios_consumers.json
393
393
  - spec/support/fixtures/products.json
394
- - spec/support/fixtures/refresh_invalid_mfa.json
395
- - spec/support/fixtures/refresh_not_refreshed.json
396
- - spec/support/fixtures/refresh_pending_mfa.json
397
- - spec/support/fixtures/refresh_queued.json
398
394
  - spec/support/fixtures/resource.json
399
395
  - spec/support/fixtures/resource_not_found.json
400
396
  - spec/support/fixtures/resources.json
@@ -403,11 +399,6 @@ files:
403
399
  - spec/support/fixtures/tenant_settings.json
404
400
  - spec/support/fixtures/unauthorized.json
405
401
  - spec/support/fixtures/user.json
406
- - spec/support/fixtures/user_institution_refresh.json
407
- - spec/support/fixtures/user_institution_refresh_all.json
408
- - spec/support/fixtures/user_institution_status.json
409
- - spec/support/fixtures/user_institutions_list.json
410
- - spec/support/fixtures/user_institutions_show.json
411
402
  - spec/utils/query_builder_spec.rb
412
403
  - tags
413
404
  homepage: https://github.com/finapps/ruby-client
@@ -435,8 +426,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
435
426
  - !ruby/object:Gem::Version
436
427
  version: '0'
437
428
  requirements: []
438
- rubyforge_project:
439
- rubygems_version: 2.7.7
429
+ rubygems_version: 3.0.3
440
430
  signing_key:
441
431
  specification_version: 4
442
432
  summary: FinApps REST API ruby client.
@@ -462,6 +452,7 @@ test_files:
462
452
  - spec/rest/portfolios_spec.rb
463
453
  - spec/rest/order_statuses_spec.rb
464
454
  - spec/rest/plaid/plaid_webhooks_spec.rb
455
+ - spec/rest/plaid/plaid_consumer_institutions_spec.rb
465
456
  - spec/rest/order_refreshes_spec.rb
466
457
  - spec/rest/order_notifications_spec.rb
467
458
  - spec/rest/portfolios_alerts_spec.rb
@@ -1,12 +0,0 @@
1
- {
2
- "consumer_institution": {
3
- "_id": "58a8901658ee7e000130607b",
4
- "account_id": 10086269,
5
- "institution_id": 16441,
6
- "institution_name": "Dag Site (US)",
7
- "status": 3,
8
- "status_message": "queued",
9
- "last_refreshed": "2017-02-18T18:19:02.748998218Z"
10
- },
11
- "mfa": ""
12
- }
@@ -1,3 +0,0 @@
1
- {
2
- "login_form_html": "<div class='loginField'><label class='loginFieldName'>Catalog</label><input class='loginFieldInput' type='TEXT' name='LOGIN' value='' maxlength='40' size='20'></div><div class='loginField'><label class='loginFieldName'>Password</label><input class='loginFieldInput' type='PASSWORD' name='PASSWORD' value='' maxlength='40' size='20'></div>"
3
- }
@@ -1,6 +0,0 @@
1
- {
2
- "base_url": "https://www.citibank.co.th",
3
- "display_name": "CITIBANK (Thailand)",
4
- "site_id": 20638,
5
- "org_display_name": "Citigroup Inc"
6
- }
@@ -1,74 +0,0 @@
1
- [
2
- {
3
- "base_url": "https://www.citibank.co.th",
4
- "display_name": "CITIBANK (Thailand)",
5
- "site_id": 20638,
6
- "org_display_name": "Citigroup Inc"
7
- },
8
- {
9
- "base_url": "http://www.citibank.com.au/",
10
- "display_name": "Citibank (Australia)",
11
- "site_id": 10388,
12
- "org_display_name": "Citigroup"
13
- },
14
- {
15
- "base_url": "https://www.citibank.com.br/BRGCB/JPS/portal/Index.do",
16
- "display_name": "Citibank (Brazil)",
17
- "site_id": 17781,
18
- "org_display_name": "Citibank (Brazil)"
19
- },
20
- {
21
- "base_url": "https://online.citibank.com/US/Welcome.c",
22
- "display_name": "Citibank (Colombia)",
23
- "site_id": 17780,
24
- "org_display_name": "Citibank (Colombia)"
25
- },
26
- {
27
- "base_url": "https://www.citibank.co.in",
28
- "display_name": "Citibank (India)",
29
- "site_id": 9864,
30
- "org_display_name": "Citigroup"
31
- },
32
- {
33
- "base_url": "http://www.citibank.com.sg/",
34
- "display_name": "Citibank (Singapore)",
35
- "site_id": 18079,
36
- "org_display_name": "Citibank (Singapore)"
37
- },
38
- {
39
- "base_url": "http://www.citibank.com/uk/",
40
- "display_name": "Citibank (UK)",
41
- "site_id": 4057,
42
- "org_display_name": "Citigroup"
43
- },
44
- {
45
- "base_url": "https://online.citibank.com/US/Welcome.c",
46
- "display_name": "Citibank (online.citibank.com) (US)",
47
- "site_id": 1603,
48
- "org_display_name": "Citigroup"
49
- },
50
- {
51
- "base_url": "http://citibankonline.com",
52
- "display_name": "Citibank AT1 (US)",
53
- "site_id": 5732,
54
- "org_display_name": "Citigroup"
55
- },
56
- {
57
- "base_url": "http://hsa.citibank.com/",
58
- "display_name": "Citibank Health Savings Account (US)",
59
- "site_id": 13256,
60
- "org_display_name": "Citigroup"
61
- },
62
- {
63
- "base_url": "http://www.citibank.com.au/",
64
- "display_name": "Citibank Personal Loan (Australia)",
65
- "site_id": 12718,
66
- "org_display_name": "Citigroup"
67
- },
68
- {
69
- "base_url": "http://www.citibank.com/uk/portal/consumer/investments/sharedealing/index_td.htm",
70
- "display_name": "Citibank Sharedealing Service (UK)",
71
- "site_id": 8646,
72
- "org_display_name": "Citigroup"
73
- }
74
- ]
@@ -1,5 +0,0 @@
1
- {
2
- "messages": [
3
- "Invalid Institution Id"
4
- ]
5
- }
@@ -1,11 +0,0 @@
1
- {
2
- "messages": [
3
- "invalid credentials specified for institution"
4
- ],
5
- "status": 6,
6
- "status_message": "login failure",
7
- "user_action": {
8
- "code": 1,
9
- "message": "wrong_credentials"
10
- }
11
- }
@@ -1,11 +0,0 @@
1
- {
2
- "consumer_institution": {
3
- "_id": "5ca354c6ee35e00001481105",
4
- "institution_id": 0,
5
- "institution_name": "Dag Site SecurityQA (US)",
6
- "mfa_type": 0,
7
- "status": 15,
8
- "status_message": "not refreshed - recently refreshed",
9
- "last_refreshed": "2019-04-02T12:26:00Z"
10
- }
11
- }
@@ -1,13 +0,0 @@
1
- {
2
- "consumer_institution": {
3
- "_id": "5ca3778d2fbfd8000130e02c",
4
- "account_id": 10455542,
5
- "institution_id": 16445,
6
- "institution_name": "Dag Site TokenFMPA (US)",
7
- "mfa_type": 1,
8
- "status": 14,
9
- "status_message": "pending mfa information",
10
- "last_refreshed": "2019-04-02T14:54:14Z"
11
- },
12
- "mfa": "<div class=\"mfa\"><div class=\"mfaField\"><label class=\"mfaFieldLabel\">Security Key</label><input class=\"mfaFieldInput\" type=\"text\" name=\"userResponse.token\" value=\"\" max=\"6\" ><input class=\"mfaFieldInput\" type=\"hidden\" name=\"userResponse.objectInstanceType\" value=\"com.yodlee.core.mfarefresh.MFATokenResponse\" ></div></div>"
13
- }
@@ -1,12 +0,0 @@
1
- {
2
- "consumer_institution": {
3
- "_id": "5ca354c6ee35e00001481105",
4
- "account_id": 10455527,
5
- "institution_id": 16486,
6
- "institution_name": "Dag Site SecurityQA (US)",
7
- "mfa_type": 4,
8
- "status": 3,
9
- "status_message": "queued",
10
- "last_refreshed": "2019-04-02T12:26:00Z"
11
- }
12
- }
@@ -1,74 +0,0 @@
1
- [
2
- {
3
- "_id": "57ab7ade83ccfc000172d252",
4
- "name": "Dag Site (US)",
5
- "status": 3,
6
- "status_message": "queued",
7
- "last_refreshed": "2016-08-15T20:41:17.812Z"
8
- },
9
- {
10
- "_id": "57ab7bb083ccfc000172d25a",
11
- "name": "Dag Site (US)",
12
- "status": 3,
13
- "status_message": "queued",
14
- "last_refreshed": "2016-08-15T20:39:38.983Z"
15
- },
16
- {
17
- "_id": "57ade499b0ac9800012b29fc",
18
- "name": "Dag Site (US)",
19
- "status": 3,
20
- "status_message": "queued",
21
- "last_refreshed": "2016-08-15T20:39:43.52Z"
22
- },
23
- {
24
- "_id": "57ae1ed4b0ac9800012b2a16",
25
- "name": "Dag Site (US)",
26
- "status": 3,
27
- "status_message": "queued",
28
- "last_refreshed": "2016-08-15T20:40:02.339Z"
29
- },
30
- {
31
- "_id": "57b32a6124fb4800013043f4",
32
- "name": "Dag Site SecurityQA (US)",
33
- "status": 3,
34
- "status_message": "queued",
35
- "last_refreshed": "2016-08-16T15:12:06.145Z"
36
- },
37
- {
38
- "_id": "57b32e6024fb48000130444f",
39
- "name": "Dag Site SecurityQA (US)",
40
- "status": 3,
41
- "status_message": "queued",
42
- "last_refreshed": "2016-08-16T15:18:33.672Z"
43
- },
44
- {
45
- "_id": "57b32f6924fb480001304454",
46
- "name": "Dag Site SecurityQA (US)",
47
- "status": 3,
48
- "status_message": "queued",
49
- "last_refreshed": "2016-08-16T15:22:15.003Z"
50
- },
51
- {
52
- "_id": "57ae146124fb480001304317",
53
- "name": "DagBank",
54
- "status": 6,
55
- "status_message": "login failure",
56
- "last_refreshed": "2016-08-12T18:24:38.013Z",
57
- "reason": "login failure"
58
- },
59
- {
60
- "_id": "57ae1e13b0ac9800012b2a11",
61
- "name": "DagBank",
62
- "status": 6,
63
- "status_message": "login failure",
64
- "last_refreshed": "2016-08-12T19:05:59.592Z",
65
- "reason": "login failure"
66
- },
67
- {
68
- "_id": "57b1ccd0b0ac9800012b2a2f",
69
- "name": "DagBank",
70
- "status": 3,
71
- "status_message": "queued",
72
- "last_refreshed": "2016-08-15T20:39:54.938Z"
73
- }
74
- ]
@@ -1,89 +0,0 @@
1
- [
2
- {
3
- "_id": "57ade50924fb4800013042de",
4
- "name": "Dag Site (US)",
5
- "status": 3,
6
- "status_message": "queued",
7
- "last_refreshed": "2016-08-12T15:02:33.416Z"
8
- },
9
- {
10
- "_id": "57ae12f1b0ac9800012b2a00",
11
- "name": "Dag Site (US)",
12
- "status": 3,
13
- "status_message": "queued",
14
- "last_refreshed": "2016-08-12T18:18:34.518Z"
15
- },
16
- {
17
- "_id": "57ae12f9b0ac9800012b2a04",
18
- "name": "Dag Site (US)",
19
- "status": 3,
20
- "status_message": "queued",
21
- "last_refreshed": "2016-08-12T18:18:33.952Z"
22
- },
23
- {
24
- "_id": "57ae1304b0ac9800012b2a08",
25
- "name": "Dag Site (US)",
26
- "status": 6,
27
- "status_message": "login failure",
28
- "last_refreshed": "2016-08-12T18:18:48.043Z",
29
- "reason": "login failure"
30
- },
31
- {
32
- "_id": "57ae13a7b0ac9800012b2a0d",
33
- "name": "Dag Site (US)",
34
- "status": 6,
35
- "status_message": "login failure",
36
- "last_refreshed": "2016-08-12T18:21:35.988Z",
37
- "reason": "login failure"
38
- },
39
- {
40
- "_id": "57b1c04624fb48000130432f",
41
- "name": "Dag Site (US)",
42
- "status": 3,
43
- "status_message": "queued",
44
- "last_refreshed": "2016-08-15T13:14:46.019Z"
45
- },
46
- {
47
- "_id": "57b1c06524fb480001304333",
48
- "name": "Dag Site (US)",
49
- "status": 6,
50
- "status_message": "login failure",
51
- "last_refreshed": "2016-08-15T13:15:21.701Z",
52
- "reason": "login failure"
53
- },
54
- {
55
- "_id": "57b1d13324fb48000130437c",
56
- "name": "Dag Site (US)",
57
- "status": 3,
58
- "status_message": "queued",
59
- "last_refreshed": "2016-08-15T14:26:59.886Z"
60
- },
61
- {
62
- "_id": "57ae161924fb480001304327",
63
- "name": "Genesis Credit (US)",
64
- "status": 3,
65
- "status_message": "queued",
66
- "last_refreshed": "2016-08-12T18:32:58.586Z"
67
- },
68
- {
69
- "_id": "57b1c0c6b0ac9800012b2a22",
70
- "name": "Genesis Credit (US)",
71
- "status": 3,
72
- "status_message": "queued",
73
- "last_refreshed": "2016-08-15T13:16:54.964Z"
74
- },
75
- {
76
- "_id": "57ae154224fb48000130431e",
77
- "name": "Pincher Creek CU Limited (Canada)",
78
- "status": 3,
79
- "status_message": "queued",
80
- "last_refreshed": "2016-08-12T18:28:43.752Z"
81
- },
82
- {
83
- "_id": "57ae15b824fb480001304322",
84
- "name": "United Auto Credit (US)",
85
- "status": 3,
86
- "status_message": "queued",
87
- "last_refreshed": "2016-08-12T18:30:26.659Z"
88
- }
89
- ]
@@ -1,7 +0,0 @@
1
- {
2
- "_id": "57b1d13324fb48000130437c",
3
- "institution_name": "Dag Site (US)",
4
- "status": 5,
5
- "status_message": "processing",
6
- "last_refreshed": "2016-08-15T14:26:59.886Z"
7
- }
@@ -1,162 +0,0 @@
1
- [
2
- {
3
- "_id": "57ade50924fb4800013042de",
4
- "account_id": 16412510,
5
- "institution_name": "Dag Site (US)",
6
- "status": 5,
7
- "status_message": "processing",
8
- "last_refreshed": "2016-08-12T15:02:33.416Z",
9
- "accounts": [
10
- {
11
- "_id": "57ade52c6e3b09000af9d91b",
12
- "user_institution_id": "57ade50924fb4800013042de",
13
- "user_institution_name": "Dag Site (US)",
14
- "account_type": "bank",
15
- "account_name": "Wells Fargo Checking",
16
- "account_holder": "FinancialApps",
17
- "account_display_name": "Dag Site - Bank - Wells Fargo Checking",
18
- "details": {
19
- "available_balance": 11673.83,
20
- "current_balance": 11673.83,
21
- "routing_number": ""
22
- }
23
- }
24
- ]
25
- },
26
- {
27
- "_id": "57ae12f1b0ac9800012b2a00",
28
- "account_id": 16414778,
29
- "institution_name": "Dag Site (US)",
30
- "status": 1,
31
- "status_message": "ok",
32
- "last_refreshed": "2016-08-12T18:18:34.518Z"
33
- },
34
- {
35
- "_id": "57ae12f9b0ac9800012b2a04",
36
- "account_id": 16412510,
37
- "institution_name": "Dag Site (US)",
38
- "status": 5,
39
- "status_message": "processing",
40
- "last_refreshed": "2016-08-12T18:18:33.952Z",
41
- "accounts": [
42
- {
43
- "_id": "57ae13086e3b09000a115643",
44
- "user_institution_id": "57ae12f9b0ac9800012b2a04",
45
- "user_institution_name": "Dag Site (US)",
46
- "account_type": "bank",
47
- "account_name": "Wells Fargo Checking",
48
- "account_holder": "FinancialApps",
49
- "account_display_name": "Dag Site - Bank - Wells Fargo Checking",
50
- "details": {
51
- "available_balance": 11673.83,
52
- "current_balance": 11673.83,
53
- "routing_number": ""
54
- }
55
- }
56
- ]
57
- },
58
- {
59
- "_id": "57ae1304b0ac9800012b2a08",
60
- "account_id": 16414779,
61
- "institution_name": "Dag Site (US)",
62
- "status": 6,
63
- "status_message": "login failure",
64
- "last_refreshed": "2016-08-12T18:18:48.043Z"
65
- },
66
- {
67
- "_id": "57ae13a7b0ac9800012b2a0d",
68
- "account_id": 16414781,
69
- "institution_name": "Dag Site (US)",
70
- "status": 6,
71
- "status_message": "login failure",
72
- "last_refreshed": "2016-08-12T18:21:35.988Z"
73
- },
74
- {
75
- "_id": "57b1c04624fb48000130432f",
76
- "account_id": 16412510,
77
- "institution_name": "Dag Site (US)",
78
- "status": 5,
79
- "status_message": "processing",
80
- "last_refreshed": "2016-08-15T13:14:46.019Z",
81
- "accounts": [
82
- {
83
- "_id": "57b1c05512958000094763bb",
84
- "user_institution_id": "57b1c04624fb48000130432f",
85
- "user_institution_name": "Dag Site (US)",
86
- "account_type": "bank",
87
- "account_name": "Wells Fargo Checking",
88
- "account_holder": "FinancialApps",
89
- "account_display_name": "Dag Site - Bank - Wells Fargo Checking",
90
- "details": {
91
- "available_balance": 11673.83,
92
- "current_balance": 11673.83,
93
- "routing_number": ""
94
- }
95
- }
96
- ]
97
- },
98
- {
99
- "_id": "57b1c06524fb480001304333",
100
- "account_id": 16443655,
101
- "institution_name": "Dag Site (US)",
102
- "status": 6,
103
- "status_message": "login failure",
104
- "last_refreshed": "2016-08-15T13:15:21.701Z"
105
- },
106
- {
107
- "_id": "57b1d13324fb48000130437c",
108
- "account_id": 16412510,
109
- "institution_name": "Dag Site (US)",
110
- "status": 5,
111
- "status_message": "processing",
112
- "last_refreshed": "2016-08-15T14:26:59.886Z",
113
- "accounts": [
114
- {
115
- "_id": "57b1d1476e3b09000a73d715",
116
- "user_institution_id": "57b1d13324fb48000130437c",
117
- "user_institution_name": "Dag Site (US)",
118
- "account_type": "bank",
119
- "account_name": "Wells Fargo Checking",
120
- "account_holder": "FinancialApps",
121
- "account_display_name": "Dag Site - Bank - Wells Fargo Checking",
122
- "details": {
123
- "available_balance": 11673.83,
124
- "current_balance": 11673.83,
125
- "routing_number": ""
126
- }
127
- }
128
- ]
129
- },
130
- {
131
- "_id": "57ae161924fb480001304327",
132
- "account_id": 16415373,
133
- "institution_name": "Genesis Credit (US)",
134
- "status": 11,
135
- "status_message": "institution site error",
136
- "last_refreshed": "2016-08-12T18:32:58.586Z"
137
- },
138
- {
139
- "_id": "57b1c0c6b0ac9800012b2a22",
140
- "account_id": 16415373,
141
- "institution_name": "Genesis Credit (US)",
142
- "status": 4,
143
- "status_message": "refreshing",
144
- "last_refreshed": "2016-08-15T13:16:54.964Z"
145
- },
146
- {
147
- "_id": "57ae154224fb48000130431e",
148
- "account_id": 16414784,
149
- "institution_name": "Pincher Creek CU Limited (Canada)",
150
- "status": 11,
151
- "status_message": "institution site error",
152
- "last_refreshed": "2016-08-12T18:28:43.752Z"
153
- },
154
- {
155
- "_id": "57ae15b824fb480001304322",
156
- "account_id": 16415370,
157
- "institution_name": "United Auto Credit (US)",
158
- "status": 11,
159
- "status_message": "institution site error",
160
- "last_refreshed": "2016-08-12T18:30:26.659Z"
161
- }
162
- ]
@@ -1,24 +0,0 @@
1
- {
2
- "_id": "57ade50924fb4800013042de",
3
- "account_id": 16412510,
4
- "institution_name": "Dag Site (US)",
5
- "status": 5,
6
- "status_message": "processing",
7
- "last_refreshed": "2016-08-12T15:02:33.416Z",
8
- "accounts": [
9
- {
10
- "_id": "57ade52c6e3b09000af9d91b",
11
- "user_institution_id": "57ade50924fb4800013042de",
12
- "user_institution_name": "Dag Site (US)",
13
- "account_type": "bank",
14
- "account_name": "Wells Fargo Checking",
15
- "account_holder": "FinancialApps",
16
- "account_display_name": "Dag Site - Bank - Wells Fargo Checking",
17
- "details": {
18
- "available_balance": 11673.83,
19
- "current_balance": 11673.83,
20
- "routing_number": ""
21
- }
22
- }
23
- ]
24
- }