finapps 5.0.10 → 5.0.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0b9775ed8bdf1598984b13c5f799b2a9740dde8dbfcc518b96b900f47278a98
4
- data.tar.gz: bb130677424e512cd13b134e59b0e7eb5d262d1f111ad42642bea1e07a4c592b
3
+ metadata.gz: 1f94e548034a0d15a05f5bafce9e1c96af14e77a3af2241a62610fc7634bae16
4
+ data.tar.gz: 80958a6ad68ab7c130b22d09a792b28e44f444275f8dd2642325239d3ad986a5
5
5
  SHA512:
6
- metadata.gz: 2501b741c714fb24f001d5fcca0252b99a87e71cb57514e0ecc0358eaf6628413e8aacbbbe83da8ab06acb5c9e312884b3d88f8fadb7e0e10d727d28586aeeae
7
- data.tar.gz: 5365f4532836f489dce0d8b35f647ca93df1a34a285e09df6240ad57dd9744502231ec2bed6bd7559bfa4c4d5d945293c17ff80bda41aa8fda2d700e377b924f
6
+ metadata.gz: d799b93bc8e5e6d21745bc2792475861ddc9807be6854f8ebacb47e3cd6b54013c9edef930d5a5c93c35f072368409f32764cc58d879cb5bace3d2565f92794c
7
+ data.tar.gz: a05af43170afe0a6fc2db1d8aa0d02cc3d3548b4374906f4d896eac03a86090898c68d440214ef0b52357a4fd116b20cd2372b0538e1278e4a17bcda8825dcbe
data/finapps.gemspec CHANGED
@@ -29,9 +29,9 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'guard-rspec', '~> 4.7', '>= 4.7.3'
30
30
  spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.2'
31
31
  spec.add_development_dependency 'rspec', '~> 3.8', '>= 3.8.0'
32
- spec.add_development_dependency 'rubocop', '~> 0.73', '>= 0.73.0'
33
- spec.add_development_dependency 'rubocop-performance', '~> 1.4', '>= 1.4.0'
34
- spec.add_development_dependency 'rubocop-rspec', '~> 1.33', '>= 1.33.0'
32
+ spec.add_development_dependency 'rubocop', '~> 0.74', '>= 0.74.0'
33
+ spec.add_development_dependency 'rubocop-performance', '~> 1.4', '>= 1.4.1'
34
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.33', '>= 1.35.0'
35
35
  spec.add_development_dependency 'sinatra', '~> 2.0', '>= 2.0.5'
36
36
  spec.add_development_dependency 'webmock', '~> 3.6', '>= 3.6.0'
37
37
 
@@ -33,6 +33,7 @@ module FinApps
33
33
  version
34
34
  plaid_webhooks
35
35
  plaid_consumer_institutions
36
+ plaid_accounts
36
37
  ].freeze
37
38
 
38
39
  # @param [String] tenant_token
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FinApps
4
+ module REST
5
+ class PlaidAccounts < PlaidResources # :nodoc:
6
+ def show(id)
7
+ super(nil, "p/account/#{id}")
8
+ end
9
+
10
+ def list
11
+ super 'p/account'
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinApps
4
- VERSION = '5.0.10'
4
+ VERSION = '5.0.11'
5
5
  end
data/lib/finapps.rb CHANGED
@@ -34,6 +34,7 @@ require 'finapps/rest/portfolio_reports'
34
34
  require 'finapps/rest/plaid/plaid_resources'
35
35
  require 'finapps/rest/plaid/plaid_webhooks'
36
36
  require 'finapps/rest/plaid/plaid_consumer_institutions'
37
+ require 'finapps/rest/plaid/plaid_accounts'
37
38
 
38
39
  require 'finapps/utils/query_builder'
39
40
  require 'finapps/version' unless defined?(FinApps::VERSION)
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helpers/client'
4
+ require 'rest/api_request'
5
+
6
+ RSpec.describe FinApps::REST::PlaidAccounts do
7
+ include SpecHelpers::Client
8
+
9
+ # noinspection RubyBlockToMethodReference
10
+ let(:api_client) { client }
11
+
12
+ RSpec.shared_examples 'a request that returns account data' do |_parameter|
13
+ it('returns accounts data') do
14
+ expect(subject[RESULTS]).to have_key(:balances)
15
+ end
16
+ end
17
+
18
+ describe '#show' do
19
+ subject(:show) do
20
+ FinApps::REST::PlaidAccounts.new(api_client).show(
21
+ :account_id
22
+ )
23
+ end
24
+
25
+ it_behaves_like 'an API request'
26
+ it_behaves_like 'a successful request'
27
+ it_behaves_like 'a request that returns account data'
28
+ end
29
+
30
+ describe '#list' do
31
+ subject(:list) { FinApps::REST::PlaidAccounts.new(api_client).list }
32
+
33
+ it_behaves_like 'an API request'
34
+ it_behaves_like 'a successful request'
35
+ it('returns an Array of institution data') { expect(list[RESULTS].first).to have_key(:plaid_institution_id) }
36
+ it('returns institution account data') { expect(list[RESULTS].first).to have_key(:accounts) }
37
+ end
38
+ end
@@ -10,9 +10,7 @@ RSpec.describe FinApps::REST::PlaidConsumerInstitutions do
10
10
  let(:api_client) { client }
11
11
 
12
12
  RSpec.shared_examples 'a request that returns institution data' do |_parameter|
13
- it('returns institution data') do
14
- expect(subject[RESULTS]).to have_key(:plaid_institution_id)
15
- end
13
+ it('returns institution data') { expect(subject[RESULTS]).to have_key(:plaid_institution_id) }
16
14
  end
17
15
 
18
16
  describe '#create' do
@@ -47,21 +45,15 @@ RSpec.describe FinApps::REST::PlaidConsumerInstitutions do
47
45
  it_behaves_like 'an API request'
48
46
  it_behaves_like 'a successful request'
49
47
  it_behaves_like 'a request that returns institution data'
50
- it('returns institution account data') do
51
- expect(subject[RESULTS]).to have_key(:accounts)
52
- end
48
+ it('returns institution account data') { expect(subject[RESULTS]).to have_key(:accounts) }
53
49
  end
54
50
  end
55
51
 
56
52
  describe '#list' do
57
- subject(:list) do
58
- FinApps::REST::PlaidConsumerInstitutions.new(api_client).list
59
- end
53
+ subject(:list) { FinApps::REST::PlaidConsumerInstitutions.new(api_client).list }
60
54
 
61
55
  it_behaves_like 'an API request'
62
56
  it_behaves_like 'a successful request'
63
- it('returns an Array of institution data') do
64
- expect(list[RESULTS].first).to have_key(:_id)
65
- end
57
+ it('returns an Array of institution data') { expect(list[RESULTS].first).to have_key(:plaid_institution_id) }
66
58
  end
67
59
  end
@@ -49,6 +49,14 @@ class FakeApi < Sinatra::Base
49
49
  end
50
50
  end
51
51
 
52
+ # plaid_accounts
53
+ get("/#{version}/p/account") do
54
+ json_response 200, 'plaid/account/list.json'
55
+ end
56
+ get("/#{version}/p/account/:account_id") do
57
+ json_response 200, 'plaid/account/show.json'
58
+ end
59
+
52
60
  # version
53
61
  get("/#{version}/version") { 'Version => 2.1.29-.20161208.172810' }
54
62
 
@@ -0,0 +1,119 @@
1
+ [
2
+ {
3
+ "_id": "string",
4
+ "accounts": [
5
+ {
6
+ "_id": "string",
7
+ "balances": {
8
+ "available": 0,
9
+ "current": 0,
10
+ "iso_currency_code": "string",
11
+ "limit": 0,
12
+ "unofficial_currency_code": "string"
13
+ },
14
+ "consumer_institution_id": "string",
15
+ "created_date": "2019-08-25T22:17:52Z",
16
+ "identifiers": {
17
+ "BACS": [
18
+ {
19
+ "account": "string",
20
+ "plaid_account_id": "string",
21
+ "sort_code": "string"
22
+ }
23
+ ],
24
+ "ach": [
25
+ {
26
+ "account": "string",
27
+ "plaid_account_id": "string",
28
+ "routing": "string",
29
+ "wire_routing": "string"
30
+ }
31
+ ],
32
+ "eft": [
33
+ {
34
+ "account": "string",
35
+ "branch": "string",
36
+ "institution": "string",
37
+ "plaid_account_id": "string"
38
+ }
39
+ ],
40
+ "international": [
41
+ {
42
+ "bic": "string",
43
+ "iban": "string",
44
+ "plaid_account_id": "string"
45
+ }
46
+ ]
47
+ },
48
+ "identities": [
49
+ {
50
+ "addresses": [
51
+ {
52
+ "city": "string",
53
+ "country": "string",
54
+ "postal_code": "string",
55
+ "primary": true,
56
+ "region": "string",
57
+ "street": "string"
58
+ }
59
+ ],
60
+ "emails": [
61
+ {
62
+ "data": "string",
63
+ "primary": true,
64
+ "type": "string"
65
+ }
66
+ ],
67
+ "names": [
68
+ {
69
+ "data": "string"
70
+ }
71
+ ],
72
+ "phones": [
73
+ {
74
+ "data": "string",
75
+ "primary": true,
76
+ "type": "string"
77
+ }
78
+ ]
79
+ }
80
+ ],
81
+ "mask": "string",
82
+ "modified_date": "2019-08-25T22:17:52Z",
83
+ "name": "string",
84
+ "official_name": "string",
85
+ "permissioned": true,
86
+ "provider_id": "string",
87
+ "subtype": "string",
88
+ "type": "string"
89
+ }
90
+ ],
91
+ "created_date": "2019-08-25T22:17:52Z",
92
+ "error": {
93
+ "date": "2019-08-25T22:17:52Z",
94
+ "display_message": "string",
95
+ "error_code": "string",
96
+ "error_message": "string",
97
+ "error_type": "string",
98
+ "status": 0
99
+ },
100
+ "institution_name": "string",
101
+ "metrics": {
102
+ "available_products": [
103
+ "string"
104
+ ],
105
+ "billed_products": [
106
+ "string"
107
+ ],
108
+ "last_failed_transaction_update": "2019-08-25T22:17:52Z",
109
+ "last_successful_transaction_update": "2019-08-25T22:17:52Z",
110
+ "last_webhook": "2019-08-25T22:17:52Z",
111
+ "last_webhook_code": "string"
112
+ },
113
+ "modified_date": "2019-08-25T22:17:52Z",
114
+ "plaid_institution_id": "string",
115
+ "status": 0,
116
+ "status_text": "string",
117
+ "webhook": "string"
118
+ }
119
+ ]
@@ -0,0 +1,85 @@
1
+ {
2
+ "_id": "string",
3
+ "balances": {
4
+ "available": 0,
5
+ "current": 0,
6
+ "iso_currency_code": "string",
7
+ "limit": 0,
8
+ "unofficial_currency_code": "string"
9
+ },
10
+ "consumer_institution_id": "string",
11
+ "created_date": "2019-08-25T22:17:52Z",
12
+ "identifiers": {
13
+ "BACS": [
14
+ {
15
+ "account": "string",
16
+ "plaid_account_id": "string",
17
+ "sort_code": "string"
18
+ }
19
+ ],
20
+ "ach": [
21
+ {
22
+ "account": "string",
23
+ "plaid_account_id": "string",
24
+ "routing": "string",
25
+ "wire_routing": "string"
26
+ }
27
+ ],
28
+ "eft": [
29
+ {
30
+ "account": "string",
31
+ "branch": "string",
32
+ "institution": "string",
33
+ "plaid_account_id": "string"
34
+ }
35
+ ],
36
+ "international": [
37
+ {
38
+ "bic": "string",
39
+ "iban": "string",
40
+ "plaid_account_id": "string"
41
+ }
42
+ ]
43
+ },
44
+ "identities": [
45
+ {
46
+ "addresses": [
47
+ {
48
+ "city": "string",
49
+ "country": "string",
50
+ "postal_code": "string",
51
+ "primary": true,
52
+ "region": "string",
53
+ "street": "string"
54
+ }
55
+ ],
56
+ "emails": [
57
+ {
58
+ "data": "string",
59
+ "primary": true,
60
+ "type": "string"
61
+ }
62
+ ],
63
+ "names": [
64
+ {
65
+ "data": "string"
66
+ }
67
+ ],
68
+ "phones": [
69
+ {
70
+ "data": "string",
71
+ "primary": true,
72
+ "type": "string"
73
+ }
74
+ ]
75
+ }
76
+ ],
77
+ "mask": "string",
78
+ "modified_date": "2019-08-25T22:17:52Z",
79
+ "name": "string",
80
+ "official_name": "string",
81
+ "permissioned": true,
82
+ "provider_id": "string",
83
+ "subtype": "string",
84
+ "type": "string"
85
+ }
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.10
4
+ version: 5.0.11
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-08-15 00:00:00.000000000 Z
11
+ date: 2019-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: finapps_core
@@ -176,60 +176,60 @@ dependencies:
176
176
  requirements:
177
177
  - - ">="
178
178
  - !ruby/object:Gem::Version
179
- version: 0.73.0
179
+ version: 0.74.0
180
180
  - - "~>"
181
181
  - !ruby/object:Gem::Version
182
- version: '0.73'
182
+ version: '0.74'
183
183
  type: :development
184
184
  prerelease: false
185
185
  version_requirements: !ruby/object:Gem::Requirement
186
186
  requirements:
187
187
  - - ">="
188
188
  - !ruby/object:Gem::Version
189
- version: 0.73.0
189
+ version: 0.74.0
190
190
  - - "~>"
191
191
  - !ruby/object:Gem::Version
192
- version: '0.73'
192
+ version: '0.74'
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.0
200
197
  - - "~>"
201
198
  - !ruby/object:Gem::Version
202
199
  version: '1.4'
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: 1.4.1
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.0
210
207
  - - "~>"
211
208
  - !ruby/object:Gem::Version
212
209
  version: '1.4'
210
+ - - ">="
211
+ - !ruby/object:Gem::Version
212
+ version: 1.4.1
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.0
220
217
  - - "~>"
221
218
  - !ruby/object:Gem::Version
222
219
  version: '1.33'
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: 1.35.0
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.0
230
227
  - - "~>"
231
228
  - !ruby/object:Gem::Version
232
229
  version: '1.33'
230
+ - - ">="
231
+ - !ruby/object:Gem::Version
232
+ version: 1.35.0
233
233
  - !ruby/object:Gem::Dependency
234
234
  name: sinatra
235
235
  requirement: !ruby/object:Gem::Requirement
@@ -312,6 +312,7 @@ files:
312
312
  - lib/finapps/rest/order_tokens.rb
313
313
  - lib/finapps/rest/orders.rb
314
314
  - lib/finapps/rest/password_resets.rb
315
+ - lib/finapps/rest/plaid/plaid_accounts.rb
315
316
  - lib/finapps/rest/plaid/plaid_consumer_institutions.rb
316
317
  - lib/finapps/rest/plaid/plaid_resources.rb
317
318
  - lib/finapps/rest/plaid/plaid_webhooks.rb
@@ -345,6 +346,7 @@ files:
345
346
  - spec/rest/order_tokens_spec.rb
346
347
  - spec/rest/orders_spec.rb
347
348
  - spec/rest/password_resets_spec.rb
349
+ - spec/rest/plaid/plaid_accounts_spec.rb
348
350
  - spec/rest/plaid/plaid_consumer_institutions_spec.rb
349
351
  - spec/rest/plaid/plaid_webhooks_spec.rb
350
352
  - spec/rest/portfolio_reports_spec.rb
@@ -382,6 +384,8 @@ files:
382
384
  - spec/support/fixtures/order_token.json
383
385
  - spec/support/fixtures/orders.json
384
386
  - spec/support/fixtures/password_reset_token.json
387
+ - spec/support/fixtures/plaid/account/list.json
388
+ - spec/support/fixtures/plaid/account/show.json
385
389
  - spec/support/fixtures/plaid/institution/consumer/add-invalid-public-token.json
386
390
  - spec/support/fixtures/plaid/institution/consumer/add-missing-public-token.json
387
391
  - spec/support/fixtures/plaid/institution/consumer/add.json
@@ -431,41 +435,42 @@ required_rubygems_version: !ruby/object:Gem::Requirement
431
435
  - !ruby/object:Gem::Version
432
436
  version: '0'
433
437
  requirements: []
434
- rubygems_version: 3.0.3
438
+ rubygems_version: 3.0.4
435
439
  signing_key:
436
440
  specification_version: 4
437
441
  summary: FinApps REST API ruby client.
438
442
  test_files:
439
- - spec/rest/portfolios_consumers_spec.rb
440
- - spec/rest/consumers_portfolios_spec.rb
441
- - spec/rest/operators_password_resets_spec.rb
442
- - spec/rest/portfolios_available_consumers_spec.rb
443
- - spec/rest/products_spec.rb
444
- - spec/rest/statements_spec.rb
445
- - spec/rest/alert_definitions_spec.rb
446
- - spec/rest/version_spec.rb
447
- - spec/rest/consumers_spec.rb
448
- - spec/rest/orders_spec.rb
449
- - spec/rest/order_tokens_spec.rb
443
+ - spec/spec_helper.rb
444
+ - spec/spec_helpers/client.rb
445
+ - spec/utils/query_builder_spec.rb
446
+ - spec/support/fake_api.rb
450
447
  - spec/rest/tenant_app_settings_spec.rb
451
- - spec/rest/operators_spec.rb
452
- - spec/rest/client_spec.rb
453
- - spec/rest/tenant_settings_spec.rb
454
- - spec/rest/api_request.rb
455
- - spec/rest/alert_occurrences_spec.rb
456
- - spec/rest/password_resets_spec.rb
457
448
  - spec/rest/order_reports_spec.rb
449
+ - spec/rest/client_spec.rb
450
+ - spec/rest/consumers_spec.rb
458
451
  - spec/rest/portfolios_spec.rb
459
452
  - spec/rest/order_statuses_spec.rb
460
- - spec/rest/plaid/plaid_webhooks_spec.rb
461
- - spec/rest/plaid/plaid_consumer_institutions_spec.rb
462
- - spec/rest/order_refreshes_spec.rb
463
453
  - spec/rest/order_notifications_spec.rb
464
- - spec/rest/portfolios_alerts_spec.rb
454
+ - spec/rest/operators_password_resets_spec.rb
455
+ - spec/rest/portfolios_consumers_spec.rb
456
+ - spec/rest/operators_spec.rb
457
+ - spec/rest/version_spec.rb
458
+ - spec/rest/statements_spec.rb
465
459
  - spec/rest/order_assignments_spec.rb
460
+ - spec/rest/api_request.rb
461
+ - spec/rest/order_refreshes_spec.rb
462
+ - spec/rest/alert_definitions_spec.rb
463
+ - spec/rest/order_tokens_spec.rb
464
+ - spec/rest/products_spec.rb
466
465
  - spec/rest/sessions_spec.rb
466
+ - spec/rest/portfolios_available_consumers_spec.rb
467
+ - spec/rest/portfolios_alerts_spec.rb
468
+ - spec/rest/password_resets_spec.rb
467
469
  - spec/rest/portfolio_reports_spec.rb
468
- - spec/support/fake_api.rb
469
- - spec/utils/query_builder_spec.rb
470
- - spec/spec_helpers/client.rb
471
- - spec/spec_helper.rb
470
+ - spec/rest/plaid/plaid_webhooks_spec.rb
471
+ - spec/rest/plaid/plaid_consumer_institutions_spec.rb
472
+ - spec/rest/plaid/plaid_accounts_spec.rb
473
+ - spec/rest/consumers_portfolios_spec.rb
474
+ - spec/rest/alert_occurrences_spec.rb
475
+ - spec/rest/tenant_settings_spec.rb
476
+ - spec/rest/orders_spec.rb