finapps 5.0.17 → 5.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +7 -4
- data/.rubocop.yml +1 -10
- data/.travis.yml +1 -3
- data/lib/finapps.rb +3 -0
- data/lib/finapps/rest/client.rb +2 -0
- data/lib/finapps/rest/sessions.rb +1 -1
- data/lib/finapps/rest/verix/verix_metadata.rb +11 -0
- data/lib/finapps/rest/verix/verix_records.rb +15 -0
- data/lib/finapps/version.rb +1 -1
- data/spec/rest/verix/verix_metadata_spec.rb +20 -0
- data/spec/rest/verix/verix_records_spec.rb +53 -0
- data/spec/support/fake_api.rb +13 -0
- data/spec/support/fixtures/verix/metadata.json +4 -0
- data/spec/support/fixtures/verix/record/create.json +17 -0
- data/spec/support/fixtures/verix/record/list.json +82 -0
- metadata +40 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0149d16f03d34730c867cecd5403eafa545a86409873c53486d0de8389d6a24
|
4
|
+
data.tar.gz: 9e1d672c3b64ef9e403b8fa049ab10757ecdc5dd475e34c7b2547275b8f8d773
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff86485841923122273e9edd26ce173f852f3de9df705825659f3c72cb10cddd633b0520133a9dcda15ba51df2c5c4abdb6b8ad44dfd50d9a3841ab05966f772
|
7
|
+
data.tar.gz: 57897eb362e78eb67cad51f8d3d130485006e4d61e01899f13b7fdcfa4e250091a67e1111ae60384c80497dcacd730a0aba20e424394cfc14f04ab1a44dd5580
|
data/.codeclimate.yml
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
|
1
|
+
---
|
2
|
+
version: "2"
|
3
|
+
plugins:
|
2
4
|
rubocop:
|
3
5
|
enabled: true
|
4
|
-
|
5
|
-
enabled: false
|
6
|
+
channel: rubocop-0-74 # Minimum version to support ruby 2.6
|
6
7
|
eslint:
|
7
8
|
enabled: false
|
8
9
|
csslint:
|
@@ -12,10 +13,12 @@ engines:
|
|
12
13
|
config:
|
13
14
|
languages:
|
14
15
|
- ruby
|
16
|
+
|
15
17
|
ratings:
|
16
18
|
paths:
|
17
19
|
- lib/**
|
18
20
|
- "**.rb"
|
21
|
+
|
19
22
|
exclude_paths:
|
20
23
|
- spec/**/*
|
21
|
-
- "**/vendor/**/*"
|
24
|
+
- "**/vendor/**/*"
|
data/.rubocop.yml
CHANGED
@@ -8,11 +8,6 @@ AllCops:
|
|
8
8
|
Metrics/LineLength:
|
9
9
|
Max: 120
|
10
10
|
|
11
|
-
# Re-enable this when the following is resolved:
|
12
|
-
# https://github.com/rubocop-hq/rubocop/issues/5953
|
13
|
-
Style/AccessModifierDeclarations:
|
14
|
-
Enabled: false
|
15
|
-
|
16
11
|
Style/CollectionMethods:
|
17
12
|
Description: Preferred collection methods.
|
18
13
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
@@ -34,7 +29,7 @@ Naming/PredicateName:
|
|
34
29
|
- is_
|
35
30
|
- has_
|
36
31
|
- have_
|
37
|
-
|
32
|
+
ForbiddenPrefixes:
|
38
33
|
- is_
|
39
34
|
Exclude:
|
40
35
|
- spec/**/*
|
@@ -89,7 +84,3 @@ Style/VariableInterpolation:
|
|
89
84
|
strings.
|
90
85
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
91
86
|
Enabled: false
|
92
|
-
Lint/HandleExceptions:
|
93
|
-
Description: Don't suppress exception.
|
94
|
-
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
95
|
-
Enabled: false
|
data/.travis.yml
CHANGED
data/lib/finapps.rb
CHANGED
@@ -38,5 +38,8 @@ require 'finapps/rest/plaid/plaid_accounts'
|
|
38
38
|
require 'finapps/rest/plaid/plaid_account_permissions'
|
39
39
|
require 'finapps/rest/plaid/plaid_institution_logos'
|
40
40
|
|
41
|
+
require 'finapps/rest/verix/verix_metadata'
|
42
|
+
require 'finapps/rest/verix/verix_records'
|
43
|
+
|
41
44
|
require 'finapps/utils/query_builder'
|
42
45
|
require 'finapps/version' unless defined?(FinApps::VERSION)
|
data/lib/finapps/rest/client.rb
CHANGED
data/lib/finapps/version.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helpers/client'
|
4
|
+
require 'rest/api_request'
|
5
|
+
|
6
|
+
RSpec.describe FinApps::REST::VerixMetadata do
|
7
|
+
include SpecHelpers::Client
|
8
|
+
|
9
|
+
# noinspection RubyBlockToMethodReference
|
10
|
+
let(:api_client) { client }
|
11
|
+
|
12
|
+
describe '#show' do
|
13
|
+
subject(:show) { FinApps::REST::VerixMetadata.new(api_client).show }
|
14
|
+
|
15
|
+
it_behaves_like 'an API request'
|
16
|
+
it_behaves_like 'a successful request'
|
17
|
+
it('returns the verix environment') { expect(show[RESULTS]).to have_key(:environment) }
|
18
|
+
it('returns the verix client id') { expect(show[RESULTS]).to have_key(:client_id) }
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helpers/client'
|
4
|
+
require 'rest/api_request'
|
5
|
+
|
6
|
+
RSpec.describe FinApps::REST::VerixRecords do
|
7
|
+
include SpecHelpers::Client
|
8
|
+
|
9
|
+
# noinspection RubyBlockToMethodReference
|
10
|
+
let(:api_client) { client }
|
11
|
+
|
12
|
+
describe '#create' do
|
13
|
+
subject(:create) do
|
14
|
+
FinApps::REST::VerixRecords.new(api_client).create(
|
15
|
+
code: 'authcode',
|
16
|
+
download: [
|
17
|
+
'form_1040'
|
18
|
+
]
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
it_behaves_like 'an API request'
|
23
|
+
it_behaves_like 'a successful request'
|
24
|
+
it('returns an id') { expect(create[RESULTS]).to have_key(:_id) }
|
25
|
+
it('returns a consumer id') { expect(create[RESULTS]).to have_key(:consumer_id) }
|
26
|
+
it('returns a status') { expect(create[RESULTS]).to have_key(:status) }
|
27
|
+
it('returns an error node') { expect(create[RESULTS]).to have_key(:error) }
|
28
|
+
it('returns a list of documents') { expect(create[RESULTS]).to have_key(:documents) }
|
29
|
+
it('returns a document count') { expect(create[RESULTS][:documents].first).to have_key(:count) }
|
30
|
+
it('returns a document date sycned node') { expect(create[RESULTS][:documents].first).to have_key(:date_synced) }
|
31
|
+
it('returns a document id') { expect(create[RESULTS][:documents].first).to have_key(:document_id) }
|
32
|
+
it('returns a document downloaded bool') { expect(create[RESULTS][:documents].first).to have_key(:downloaded) }
|
33
|
+
it('returns a document type') { expect(create[RESULTS][:documents].first).to have_key(:type) }
|
34
|
+
end
|
35
|
+
|
36
|
+
describe '#list' do
|
37
|
+
subject(:list) { FinApps::REST::VerixRecords.new(api_client).list }
|
38
|
+
|
39
|
+
it_behaves_like 'an API request'
|
40
|
+
it_behaves_like 'a successful request'
|
41
|
+
it('returns an array') { expect(list[RESULTS]).to be_an_instance_of(Array) }
|
42
|
+
it('returns an id') { expect(list[RESULTS].first).to have_key(:_id) }
|
43
|
+
it('returns a status') { expect(list[RESULTS].first).to have_key(:status) }
|
44
|
+
it('returns a consumer id') { expect(list[RESULTS].first).to have_key(:consumer_id) }
|
45
|
+
it('returns an error node') { expect(list[RESULTS].first).to have_key(:error) }
|
46
|
+
it('returns a list of documents') { expect(list[RESULTS].first).to have_key(:documents) }
|
47
|
+
it('returns a document type') { expect(list[RESULTS].first[:documents].first).to have_key(:type) }
|
48
|
+
it('returns a document id') { expect(list[RESULTS].first[:documents].first).to have_key(:document_id) }
|
49
|
+
it('returns a document count') { expect(list[RESULTS].first[:documents].first).to have_key(:count) }
|
50
|
+
it('returns a document downloaded bool') { expect(list[RESULTS].first[:documents].first).to have_key(:downloaded) }
|
51
|
+
it('returns a document date_synced') { expect(list[RESULTS].first[:documents].first).to have_key(:date_synced) }
|
52
|
+
end
|
53
|
+
end
|
data/spec/support/fake_api.rb
CHANGED
@@ -15,6 +15,19 @@ 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
|
+
# verix_metadata
|
19
|
+
get("/#{version}/v/metadata") do
|
20
|
+
json_response 200, 'verix/metadata.json'
|
21
|
+
end
|
22
|
+
|
23
|
+
# verix_records
|
24
|
+
get("/#{version}/v/record") do
|
25
|
+
json_response 200, 'verix/record/list.json'
|
26
|
+
end
|
27
|
+
post("/#{version}/v/record") do
|
28
|
+
json_response 200, 'verix/record/create.json'
|
29
|
+
end
|
30
|
+
|
18
31
|
# plaid_webhook
|
19
32
|
get("/#{version}/p/webhook") do
|
20
33
|
tenant_token = request.env['HTTP_X_TENANT_TOKEN']
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"_id": "string",
|
3
|
+
"consumer_id": "string",
|
4
|
+
"date_exchanged": "2019-12-17T14:50:00Z",
|
5
|
+
"date_modified": "2019-12-17T14:50:00Z",
|
6
|
+
"documents": [
|
7
|
+
{
|
8
|
+
"count": 0,
|
9
|
+
"date_synced": "2019-12-17T14:50:00Z",
|
10
|
+
"document_id": "string",
|
11
|
+
"downloaded": true,
|
12
|
+
"type": "string"
|
13
|
+
}
|
14
|
+
],
|
15
|
+
"error": "string",
|
16
|
+
"status": 0
|
17
|
+
}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"_id": "5df7eadbfe13f5000148ca0e",
|
4
|
+
"consumer_id": "594625b4-e8fe-40b7-422f-f758bb877ae7",
|
5
|
+
"status": 2,
|
6
|
+
"error": "",
|
7
|
+
"date_exchanged": "2019-12-16T20:36:43.342Z",
|
8
|
+
"date_modified": "2019-12-16T20:36:45.59Z",
|
9
|
+
"documents": [
|
10
|
+
{
|
11
|
+
"type": "form_1040",
|
12
|
+
"document_id": "5df7eadbc496df0001e9daa0",
|
13
|
+
"count": 2,
|
14
|
+
"downloaded": false,
|
15
|
+
"date_synced": "2019-12-16T20:36:43.537Z"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"type": "schedule_c",
|
19
|
+
"document_id": "5df7eadbc496df0001e9daa1",
|
20
|
+
"count": 0,
|
21
|
+
"downloaded": false,
|
22
|
+
"date_synced": "2019-12-16T20:36:43.613Z"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"type": "schedule_d",
|
26
|
+
"document_id": "5df7eadbc496df0001e9daa2",
|
27
|
+
"count": 2,
|
28
|
+
"downloaded": false,
|
29
|
+
"date_synced": "2019-12-16T20:36:43.676Z"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"type": "schedule_e",
|
33
|
+
"document_id": "5df7eadbc496df0001e9daa3",
|
34
|
+
"count": 2,
|
35
|
+
"downloaded": false,
|
36
|
+
"date_synced": "2019-12-16T20:36:43.737Z"
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"type": "schedule_k1_form_1065",
|
40
|
+
"document_id": "5df7eadbc496df0001e9daa4",
|
41
|
+
"count": 1,
|
42
|
+
"downloaded": false,
|
43
|
+
"date_synced": "2019-12-16T20:36:43.807Z"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"type": "schedule_k1_form_1120s",
|
47
|
+
"document_id": "5df7eadbc496df0001e9daa5",
|
48
|
+
"count": 2,
|
49
|
+
"downloaded": false,
|
50
|
+
"date_synced": "2019-12-16T20:36:43.912Z"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"type": "form_w2",
|
54
|
+
"document_id": "5df7eadcc496df0001e9daa6",
|
55
|
+
"count": 1,
|
56
|
+
"downloaded": false,
|
57
|
+
"date_synced": "2019-12-16T20:36:44.015Z"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"type": "form_1099_div",
|
61
|
+
"document_id": "5df7eaddc496df0001e9daa9",
|
62
|
+
"count": 4,
|
63
|
+
"downloaded": false,
|
64
|
+
"date_synced": "2019-12-16T20:36:45.441Z"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"type": "form_1099_int",
|
68
|
+
"document_id": "5df7eaddc496df0001e9daaa",
|
69
|
+
"count": 2,
|
70
|
+
"downloaded": false,
|
71
|
+
"date_synced": "2019-12-16T20:36:45.501Z"
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"type": "form_5498",
|
75
|
+
"document_id": "5df7eaddc496df0001e9daab",
|
76
|
+
"count": 4,
|
77
|
+
"downloaded": false,
|
78
|
+
"date_synced": "2019-12-16T20:36:45.587Z"
|
79
|
+
}
|
80
|
+
]
|
81
|
+
}
|
82
|
+
]
|
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
|
+
version: 5.0.19
|
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-
|
11
|
+
date: 2019-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: finapps_core
|
@@ -328,6 +328,8 @@ files:
|
|
328
328
|
- lib/finapps/rest/statements.rb
|
329
329
|
- lib/finapps/rest/tenant_app_settings.rb
|
330
330
|
- lib/finapps/rest/tenant_settings.rb
|
331
|
+
- lib/finapps/rest/verix/verix_metadata.rb
|
332
|
+
- lib/finapps/rest/verix/verix_records.rb
|
331
333
|
- lib/finapps/rest/version.rb
|
332
334
|
- lib/finapps/utils/query_builder.rb
|
333
335
|
- lib/finapps/version.rb
|
@@ -363,6 +365,8 @@ files:
|
|
363
365
|
- spec/rest/statements_spec.rb
|
364
366
|
- spec/rest/tenant_app_settings_spec.rb
|
365
367
|
- spec/rest/tenant_settings_spec.rb
|
368
|
+
- spec/rest/verix/verix_metadata_spec.rb
|
369
|
+
- spec/rest/verix/verix_records_spec.rb
|
366
370
|
- spec/rest/version_spec.rb
|
367
371
|
- spec/spec_helper.rb
|
368
372
|
- spec/spec_helpers/client.rb
|
@@ -413,6 +417,9 @@ files:
|
|
413
417
|
- spec/support/fixtures/tenant_settings.json
|
414
418
|
- spec/support/fixtures/unauthorized.json
|
415
419
|
- spec/support/fixtures/user.json
|
420
|
+
- spec/support/fixtures/verix/metadata.json
|
421
|
+
- spec/support/fixtures/verix/record/create.json
|
422
|
+
- spec/support/fixtures/verix/record/list.json
|
416
423
|
- spec/utils/query_builder_spec.rb
|
417
424
|
- tags
|
418
425
|
homepage: https://github.com/finapps/ruby-client
|
@@ -445,39 +452,41 @@ signing_key:
|
|
445
452
|
specification_version: 4
|
446
453
|
summary: FinApps REST API ruby client.
|
447
454
|
test_files:
|
448
|
-
- spec/
|
449
|
-
- spec/
|
450
|
-
- spec/
|
451
|
-
- spec/
|
452
|
-
- spec/rest/
|
453
|
-
- spec/rest/statements_spec.rb
|
454
|
-
- spec/rest/alert_definitions_spec.rb
|
455
|
-
- spec/rest/version_spec.rb
|
455
|
+
- spec/utils/query_builder_spec.rb
|
456
|
+
- spec/spec_helpers/client.rb
|
457
|
+
- spec/spec_helper.rb
|
458
|
+
- spec/support/fake_api.rb
|
459
|
+
- spec/rest/alert_occurrences_spec.rb
|
456
460
|
- spec/rest/consumers_spec.rb
|
461
|
+
- spec/rest/order_statuses_spec.rb
|
462
|
+
- spec/rest/api_request.rb
|
457
463
|
- spec/rest/orders_spec.rb
|
458
|
-
- spec/rest/order_tokens_spec.rb
|
459
|
-
- spec/rest/tenant_app_settings_spec.rb
|
460
|
-
- spec/rest/operators_spec.rb
|
461
464
|
- spec/rest/client_spec.rb
|
462
|
-
- spec/rest/tenant_settings_spec.rb
|
463
|
-
- spec/rest/api_request.rb
|
464
|
-
- spec/rest/alert_occurrences_spec.rb
|
465
465
|
- spec/rest/password_resets_spec.rb
|
466
|
-
- spec/rest/
|
467
|
-
- spec/rest/
|
468
|
-
- spec/rest/
|
469
|
-
- spec/rest/
|
470
|
-
- spec/rest/
|
471
|
-
- spec/rest/
|
472
|
-
- spec/rest/
|
473
|
-
- spec/rest/plaid/plaid_consumer_institutions_spec.rb
|
474
|
-
- spec/rest/order_refreshes_spec.rb
|
475
|
-
- spec/rest/order_notifications_spec.rb
|
476
|
-
- spec/rest/portfolios_alerts_spec.rb
|
466
|
+
- spec/rest/version_spec.rb
|
467
|
+
- spec/rest/operators_spec.rb
|
468
|
+
- spec/rest/tenant_app_settings_spec.rb
|
469
|
+
- spec/rest/operators_password_resets_spec.rb
|
470
|
+
- spec/rest/portfolios_consumers_spec.rb
|
471
|
+
- spec/rest/portfolios_available_consumers_spec.rb
|
472
|
+
- spec/rest/products_spec.rb
|
477
473
|
- spec/rest/order_assignments_spec.rb
|
474
|
+
- spec/rest/order_refreshes_spec.rb
|
475
|
+
- spec/rest/order_tokens_spec.rb
|
476
|
+
- spec/rest/consumers_portfolios_spec.rb
|
477
|
+
- spec/rest/verix/verix_records_spec.rb
|
478
|
+
- spec/rest/verix/verix_metadata_spec.rb
|
478
479
|
- spec/rest/sessions_spec.rb
|
479
480
|
- spec/rest/portfolio_reports_spec.rb
|
480
|
-
- spec/
|
481
|
-
- spec/
|
482
|
-
- spec/
|
483
|
-
- spec/
|
481
|
+
- spec/rest/portfolios_alerts_spec.rb
|
482
|
+
- spec/rest/plaid/plaid_webhooks_spec.rb
|
483
|
+
- spec/rest/plaid/plaid_account_permissions_spec.rb
|
484
|
+
- spec/rest/plaid/plaid_consumer_institutions_spec.rb
|
485
|
+
- spec/rest/plaid/plaid_institution_logos_spec.rb
|
486
|
+
- spec/rest/plaid/plaid_accounts_spec.rb
|
487
|
+
- spec/rest/order_reports_spec.rb
|
488
|
+
- spec/rest/statements_spec.rb
|
489
|
+
- spec/rest/alert_definitions_spec.rb
|
490
|
+
- spec/rest/order_notifications_spec.rb
|
491
|
+
- spec/rest/tenant_settings_spec.rb
|
492
|
+
- spec/rest/portfolios_spec.rb
|