finapps 5.0.27 → 5.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/RELEASES.md +7 -0
- data/lib/finapps.rb +2 -1
- data/lib/finapps/rest/client.rb +2 -0
- data/lib/finapps/rest/verix/verix_documents.rb +21 -0
- data/lib/finapps/rest/verix/verix_pdf_documents.rb +15 -0
- data/lib/finapps/version.rb +1 -1
- data/spec/rest/verix/verix_documents_spec.rb +52 -0
- data/spec/rest/verix/verix_pdf_documents_spec.rb +35 -0
- data/spec/rest/verix/verix_records_spec.rb +3 -14
- data/spec/support/fake_api.rb +17 -8
- data/spec/support/fixtures/verix/document/document.pdf +0 -0
- data/spec/support/fixtures/verix/document/list.json +36 -0
- data/spec/support/fixtures/verix/document/show.json +35 -0
- data/spec/support/fixtures/verix/record/create.json +25 -17
- data/spec/support/fixtures/verix/record/list.json +121 -45
- metadata +11 -6
- data/lib/finapps/rest/statements.rb +0 -16
- data/spec/rest/statements_spec.rb +0 -42
- data/spec/support/fixtures/fake_pdf_statement.json +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41554740a84b37ce897625f30b710b515eac8cc50f8979b5ff7adc626db5c67c
|
4
|
+
data.tar.gz: be701ec37e56af740acdd2a22d4234b1c6108637393527d8dec406d733b46742
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18d3595335d174560dac98c8c559d954a66e745a84ce8d921b727d7381b6bbe92091e162733f851110e78524069469f5a82420fc6636aaef951b4192c8f17127
|
7
|
+
data.tar.gz: 55a19cd9dda94b7e250506833843932542e7f79bbd229161f8b5adc37d07e9403ba30d7f7e229da0da5f0605c065aa3525ad2f0d0e5e660951f5b57bae52c0a1
|
data/RELEASES.md
CHANGED
data/lib/finapps.rb
CHANGED
@@ -19,7 +19,6 @@ require 'finapps/rest/products'
|
|
19
19
|
require 'finapps/rest/order_assignments'
|
20
20
|
require 'finapps/rest/client'
|
21
21
|
require 'finapps/rest/order_refreshes'
|
22
|
-
require 'finapps/rest/statements'
|
23
22
|
require 'finapps/rest/tenant_settings'
|
24
23
|
require 'finapps/rest/tenant_app_settings'
|
25
24
|
require 'finapps/rest/portfolios'
|
@@ -40,6 +39,8 @@ require 'finapps/rest/plaid/plaid_institution_logos'
|
|
40
39
|
|
41
40
|
require 'finapps/rest/verix/verix_metadata'
|
42
41
|
require 'finapps/rest/verix/verix_records'
|
42
|
+
require 'finapps/rest/verix/verix_pdf_documents'
|
43
|
+
require 'finapps/rest/verix/verix_documents'
|
43
44
|
|
44
45
|
require 'finapps/utils/query_builder'
|
45
46
|
require 'finapps/version' unless defined?(FinApps::VERSION)
|
data/lib/finapps/rest/client.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FinApps
|
4
|
+
module REST
|
5
|
+
class VerixDocuments < FinAppsCore::REST::Resources
|
6
|
+
def list(record_id)
|
7
|
+
not_blank(record_id, :record_id)
|
8
|
+
path = "v/record/#{ERB::Util.url_encode(record_id)}/document"
|
9
|
+
super path
|
10
|
+
end
|
11
|
+
|
12
|
+
def show(record_id, document_id)
|
13
|
+
not_blank(record_id, :record_id)
|
14
|
+
not_blank(document_id, :document_id)
|
15
|
+
path =
|
16
|
+
"v/record/#{ERB::Util.url_encode(record_id)}/document/#{ERB::Util.url_encode(document_id)}"
|
17
|
+
super(nil, path)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FinApps
|
4
|
+
module REST
|
5
|
+
class VerixPdfDocuments < FinAppsCore::REST::Resources # :nodoc:
|
6
|
+
def show(record_id, provider_id)
|
7
|
+
not_blank(record_id, :record_id)
|
8
|
+
not_blank(provider_id, :provider_id)
|
9
|
+
path =
|
10
|
+
"v/record/#{ERB::Util.url_encode(record_id)}/file/#{ERB::Util.url_encode(provider_id)}"
|
11
|
+
super(nil, path)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/finapps/version.rb
CHANGED
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helpers/client'
|
4
|
+
require 'rest/api_request'
|
5
|
+
|
6
|
+
RSpec.describe FinApps::REST::VerixDocuments do
|
7
|
+
include SpecHelpers::Client
|
8
|
+
|
9
|
+
let(:api_client) { client }
|
10
|
+
let(:document) { FinApps::REST::VerixDocuments.new(api_client) }
|
11
|
+
|
12
|
+
describe '#list' do
|
13
|
+
context 'when missing parameters' do
|
14
|
+
subject { document.list(nil) }
|
15
|
+
it 'raises an error when missing record id' do
|
16
|
+
expect { subject }.to raise_error(FinAppsCore::MissingArgumentsError)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
subject(:list) do
|
21
|
+
document.list(
|
22
|
+
:record_id
|
23
|
+
)
|
24
|
+
end
|
25
|
+
it_behaves_like 'an API request'
|
26
|
+
it_behaves_like 'a successful request'
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#show' do
|
30
|
+
context 'when missing parameters' do
|
31
|
+
subject { document.show(nil, :document_id) }
|
32
|
+
it 'raises an error when missing record id' do
|
33
|
+
expect { subject }.to raise_error(FinAppsCore::MissingArgumentsError)
|
34
|
+
end
|
35
|
+
|
36
|
+
subject { document.show(:record_id, nil) }
|
37
|
+
it 'raises an error when missing document id' do
|
38
|
+
expect { subject }.to raise_error(FinAppsCore::MissingArgumentsError)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
subject(:show) do
|
43
|
+
document.show(
|
44
|
+
:record_id,
|
45
|
+
:document_id
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
it_behaves_like 'an API request'
|
50
|
+
it_behaves_like 'a successful request'
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helpers/client'
|
4
|
+
require 'rest/api_request'
|
5
|
+
|
6
|
+
RSpec.describe FinApps::REST::VerixPdfDocuments do
|
7
|
+
include SpecHelpers::Client
|
8
|
+
|
9
|
+
let(:api_client) { client }
|
10
|
+
let(:document) { FinApps::REST::VerixPdfDocuments.new(api_client) }
|
11
|
+
|
12
|
+
describe '#show' do
|
13
|
+
context 'when missing parameters' do
|
14
|
+
subject { document.show(nil, :provider_id) }
|
15
|
+
it 'raises an error when missing record id' do
|
16
|
+
expect { subject }.to raise_error(FinAppsCore::MissingArgumentsError)
|
17
|
+
end
|
18
|
+
|
19
|
+
subject { document.show(:record_id, nil) }
|
20
|
+
it 'raises an error when missing provider id' do
|
21
|
+
expect { subject }.to raise_error(FinAppsCore::MissingArgumentsError)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
subject(:show) do
|
26
|
+
document.show(
|
27
|
+
:record_id,
|
28
|
+
:provider_id
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
it_behaves_like 'an API request'
|
33
|
+
it_behaves_like 'a successful request'
|
34
|
+
end
|
35
|
+
end
|
@@ -12,10 +12,7 @@ RSpec.describe FinApps::REST::VerixRecords do
|
|
12
12
|
describe '#create' do
|
13
13
|
subject(:create) do
|
14
14
|
FinApps::REST::VerixRecords.new(api_client).create(
|
15
|
-
code: 'authcode'
|
16
|
-
download: [
|
17
|
-
'form_1040'
|
18
|
-
]
|
15
|
+
code: 'authcode'
|
19
16
|
)
|
20
17
|
end
|
21
18
|
|
@@ -26,11 +23,7 @@ RSpec.describe FinApps::REST::VerixRecords do
|
|
26
23
|
it('returns a status') { expect(create[RESULTS]).to have_key(:status) }
|
27
24
|
it('returns an error node') { expect(create[RESULTS]).to have_key(:error) }
|
28
25
|
it('returns a list of documents') { expect(create[RESULTS]).to have_key(:documents) }
|
29
|
-
it('returns a
|
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) }
|
26
|
+
it('returns a list of downloaded documents') { expect(create[RESULTS]).to have_key(:downloaded_documents) }
|
34
27
|
end
|
35
28
|
|
36
29
|
describe '#list' do
|
@@ -44,10 +37,6 @@ RSpec.describe FinApps::REST::VerixRecords do
|
|
44
37
|
it('returns a consumer id') { expect(list[RESULTS].first).to have_key(:consumer_id) }
|
45
38
|
it('returns an error node') { expect(list[RESULTS].first).to have_key(:error) }
|
46
39
|
it('returns a list of documents') { expect(list[RESULTS].first).to have_key(:documents) }
|
47
|
-
it('returns a
|
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) }
|
40
|
+
it('returns a list of downloaded documents') { expect(list[RESULTS].first).to have_key(:downloaded_documents) }
|
52
41
|
end
|
53
42
|
end
|
data/spec/support/fake_api.rb
CHANGED
@@ -28,6 +28,19 @@ class FakeApi < Sinatra::Base
|
|
28
28
|
json_response 200, 'verix/record/create.json'
|
29
29
|
end
|
30
30
|
|
31
|
+
# verix_pdf_documents
|
32
|
+
get("/#{version}/v/record/:record_id/file/:provider_id") do
|
33
|
+
pdf_response 'verix/document/document.pdf'
|
34
|
+
end
|
35
|
+
|
36
|
+
# verix_documents
|
37
|
+
get("/#{version}/v/record/:record_id/document") do
|
38
|
+
json_response 200, 'verix/document/show.json'
|
39
|
+
end
|
40
|
+
get("/#{version}/v/record/:record_id/document/:document_id") do
|
41
|
+
json_response 200, 'verix/document/list.json'
|
42
|
+
end
|
43
|
+
|
31
44
|
# plaid_webhook/metadata
|
32
45
|
get("/#{version}/p/metadata") do
|
33
46
|
tenant_token = request.env['HTTP_X_TENANT_TOKEN']
|
@@ -224,14 +237,6 @@ class FakeApi < Sinatra::Base
|
|
224
237
|
end
|
225
238
|
post("/#{version}/logout") { status 204 }
|
226
239
|
|
227
|
-
# accounts
|
228
|
-
get("/#{version}/accounts/valid_id/statement/valid_id") do
|
229
|
-
json_response 200, 'fake_pdf_statement.json'
|
230
|
-
end
|
231
|
-
get("/#{version}/accounts/invalid_id/statement/valid_id") do
|
232
|
-
json_response 404, 'resource_not_found.json'
|
233
|
-
end
|
234
|
-
|
235
240
|
# operators
|
236
241
|
get("/#{version}/operators") { json_response 200, 'operator_list.json' }
|
237
242
|
get("/#{version}/operators/invalid_id") do
|
@@ -427,6 +432,10 @@ class FakeApi < Sinatra::Base
|
|
427
432
|
http_response :png, 200, file_name
|
428
433
|
end
|
429
434
|
|
435
|
+
def pdf_response(file_name)
|
436
|
+
http_response 'application/pdf', 200, file_name
|
437
|
+
end
|
438
|
+
|
430
439
|
def http_response(content_type, response_code, file_name)
|
431
440
|
content_type content_type
|
432
441
|
status response_code
|
Binary file
|
@@ -0,0 +1,36 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"_id": "5e4c44a5b778c00001a81277",
|
4
|
+
"consumer_id": "1f50bddc-4cbf-4e16-6782-a2295d695d4e",
|
5
|
+
"date_synced": "2020-02-18T20:10:13.469Z",
|
6
|
+
"document": {
|
7
|
+
"form_type": "schedule_d",
|
8
|
+
"id": 34790,
|
9
|
+
"net_long_term_gain_loss": 1275,
|
10
|
+
"net_short_term_gain_loss": 2,
|
11
|
+
"tax_period_ends_at": "2017-12-31"
|
12
|
+
},
|
13
|
+
"document_id": "5e4c44a5b778c00001a81277",
|
14
|
+
"record_id": "5e4c44a46c20ec0001e3a505",
|
15
|
+
"tax_period_ends_at": "2017-12-31",
|
16
|
+
"tenant_id": "4dd607b1-565f-4da4-722c-2e84c5c87f43",
|
17
|
+
"type": "schedule_d"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"_id": "5e4c44a5b778c00001a81278",
|
21
|
+
"consumer_id": "1f50bddc-4cbf-4e16-6782-a2295d695d4e",
|
22
|
+
"date_synced": "2020-02-18T20:10:13.469Z",
|
23
|
+
"document": {
|
24
|
+
"form_type": "schedule_d",
|
25
|
+
"id": 34793,
|
26
|
+
"net_long_term_gain_loss": 5816,
|
27
|
+
"net_short_term_gain_loss": 0,
|
28
|
+
"tax_period_ends_at": "2018-12-31"
|
29
|
+
},
|
30
|
+
"document_id": "5e4c44a5b778c00001a81278",
|
31
|
+
"record_id": "5e4c44a46c20ec0001e3a505",
|
32
|
+
"tax_period_ends_at": "2018-12-31",
|
33
|
+
"tenant_id": "4dd607b1-565f-4da4-722c-2e84c5c87f43",
|
34
|
+
"type": "schedule_d"
|
35
|
+
}
|
36
|
+
]
|
@@ -0,0 +1,35 @@
|
|
1
|
+
{
|
2
|
+
"_id": "5e4c44a5b778c00001a81275",
|
3
|
+
"consumer_id": "1f50bddc-4cbf-4e16-6782-a2295d695d4e",
|
4
|
+
"date_synced": "2020-02-18T20:10:13.245Z",
|
5
|
+
"document": {
|
6
|
+
"adjusted_gross_income": "",
|
7
|
+
"adjusted_gross_income_per_computer": "",
|
8
|
+
"business_income_or_loss_schedule_c": 0,
|
9
|
+
"farm_income_or_loss_schedule_f": 0,
|
10
|
+
"filer": {
|
11
|
+
"name": "BEN SMIT",
|
12
|
+
"ssn": "XXX-XX-5890"
|
13
|
+
},
|
14
|
+
"filing_status": "Married Filing Jointly",
|
15
|
+
"form_type": "1040",
|
16
|
+
"id": 34789,
|
17
|
+
"ordinary_dividend_income": 934,
|
18
|
+
"other_income": 0,
|
19
|
+
"qualified_dividends": 671,
|
20
|
+
"refunds_of_state_local_taxes": 287,
|
21
|
+
"rent_royalty_partnership_estate_schedule_e": 63561,
|
22
|
+
"tax_period_ends_at": "2017-12-31",
|
23
|
+
"taxable_social_security_benefits": 0,
|
24
|
+
"total_income": 297045,
|
25
|
+
"total_income_per_computer": 297045,
|
26
|
+
"total_social_security_benefits": 0,
|
27
|
+
"unemployment_compensation": 0,
|
28
|
+
"wages_salaries_tips_etc": 230681
|
29
|
+
},
|
30
|
+
"document_id": "5e4c44a5b778c00001a81275",
|
31
|
+
"record_id": "5e4c44a46c20ec0001e3a505",
|
32
|
+
"tax_period_ends_at": "2017-12-31",
|
33
|
+
"tenant_id": "4dd607b1-565f-4da4-722c-2e84c5c87f43",
|
34
|
+
"type": "form_1040"
|
35
|
+
}
|
@@ -1,17 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
1
|
+
|
2
|
+
{
|
3
|
+
"_id": "string",
|
4
|
+
"consumer_id": "string",
|
5
|
+
"date_exchanged": "2020-02-19T14:13:34Z",
|
6
|
+
"date_modified": "2020-02-19T14:13:34Z",
|
7
|
+
"documents": [
|
8
|
+
{
|
9
|
+
"date_synced": "2020-02-19T14:13:34Z",
|
10
|
+
"document_id": "string",
|
11
|
+
"tax_period_ends_at": "string",
|
12
|
+
"type": "string"
|
13
|
+
}
|
14
|
+
],
|
15
|
+
"downloaded_documents": [
|
16
|
+
{
|
17
|
+
"provider_id": 0,
|
18
|
+
"successful": true,
|
19
|
+
"tax_period_ends_at": "string",
|
20
|
+
"type": "string"
|
21
|
+
}
|
22
|
+
],
|
23
|
+
"error": "string",
|
24
|
+
"status": 0
|
25
|
+
}
|
@@ -1,81 +1,157 @@
|
|
1
1
|
[
|
2
2
|
{
|
3
|
-
"_id": "
|
4
|
-
"consumer_id": "
|
3
|
+
"_id": "5e4c44a46c20ec0001e3a505",
|
4
|
+
"consumer_id": "1f50bddc-4cbf-4e16-6782-a2295d695d4e",
|
5
5
|
"status": 2,
|
6
6
|
"error": "",
|
7
|
-
"date_exchanged": "
|
8
|
-
"date_modified": "
|
7
|
+
"date_exchanged": "2020-02-18T20:10:12.887Z",
|
8
|
+
"date_modified": "2020-02-18T20:10:16.321Z",
|
9
9
|
"documents": [
|
10
10
|
{
|
11
11
|
"type": "form_1040",
|
12
|
-
"document_id": "
|
13
|
-
"
|
14
|
-
"
|
15
|
-
"date_synced": "2019-12-16T20:36:43.537Z"
|
12
|
+
"document_id": "5e4c44a5b778c00001a81275",
|
13
|
+
"tax_period_ends_at": "2017-12-31",
|
14
|
+
"date_synced": "2020-02-18T20:10:13.245Z"
|
16
15
|
},
|
17
16
|
{
|
18
|
-
"type": "
|
19
|
-
"document_id": "
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"date_synced": "2019-12-16T20:36:43.613Z"
|
17
|
+
"type": "form_1040",
|
18
|
+
"document_id": "5e4c44a5b778c00001a81276",
|
19
|
+
"tax_period_ends_at": "2018-12-31",
|
20
|
+
"date_synced": "2020-02-18T20:10:13.245Z"
|
23
21
|
},
|
24
22
|
{
|
25
23
|
"type": "schedule_d",
|
26
|
-
"document_id": "
|
27
|
-
"
|
28
|
-
"
|
29
|
-
|
24
|
+
"document_id": "5e4c44a5b778c00001a81277",
|
25
|
+
"tax_period_ends_at": "2017-12-31",
|
26
|
+
"date_synced": "2020-02-18T20:10:13.469Z"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"type": "schedule_d",
|
30
|
+
"document_id": "5e4c44a5b778c00001a81278",
|
31
|
+
"tax_period_ends_at": "2018-12-31",
|
32
|
+
"date_synced": "2020-02-18T20:10:13.469Z"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"type": "schedule_e",
|
36
|
+
"document_id": "5e4c44a5b778c00001a81279",
|
37
|
+
"tax_period_ends_at": "2017-12-31",
|
38
|
+
"date_synced": "2020-02-18T20:10:13.7Z"
|
30
39
|
},
|
31
40
|
{
|
32
41
|
"type": "schedule_e",
|
33
|
-
"document_id": "
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"date_synced": "2019-12-16T20:36:43.737Z"
|
42
|
+
"document_id": "5e4c44a5b778c00001a8127a",
|
43
|
+
"tax_period_ends_at": "2018-12-31",
|
44
|
+
"date_synced": "2020-02-18T20:10:13.7Z"
|
37
45
|
},
|
38
46
|
{
|
39
47
|
"type": "schedule_k1_form_1065",
|
40
|
-
"document_id": "
|
41
|
-
"
|
42
|
-
"
|
43
|
-
|
48
|
+
"document_id": "5e4c44a5b778c00001a8127b",
|
49
|
+
"tax_period_ends_at": "2017-12-31",
|
50
|
+
"date_synced": "2020-02-18T20:10:13.78Z"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"type": "schedule_k1_form_1120s",
|
54
|
+
"document_id": "5e4c44a5b778c00001a8127c",
|
55
|
+
"tax_period_ends_at": "2017-12-31",
|
56
|
+
"date_synced": "2020-02-18T20:10:13.881Z"
|
44
57
|
},
|
45
58
|
{
|
46
59
|
"type": "schedule_k1_form_1120s",
|
47
|
-
"document_id": "
|
48
|
-
"
|
49
|
-
"
|
50
|
-
"date_synced": "2019-12-16T20:36:43.912Z"
|
60
|
+
"document_id": "5e4c44a5b778c00001a8127d",
|
61
|
+
"tax_period_ends_at": "2018-12-31",
|
62
|
+
"date_synced": "2020-02-18T20:10:13.881Z"
|
51
63
|
},
|
52
64
|
{
|
53
65
|
"type": "form_w2",
|
54
|
-
"document_id": "
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"date_synced": "2019-12-16T20:36:44.015Z"
|
66
|
+
"document_id": "5e4c44a5b778c00001a8127e",
|
67
|
+
"tax_period_ends_at": "2017-12-31",
|
68
|
+
"date_synced": "2020-02-18T20:10:13.972Z"
|
58
69
|
},
|
59
70
|
{
|
60
71
|
"type": "form_1099_div",
|
61
|
-
"document_id": "
|
62
|
-
"
|
63
|
-
"
|
64
|
-
|
72
|
+
"document_id": "5e4c44a6b778c00001a8127f",
|
73
|
+
"tax_period_ends_at": "2017-12-31",
|
74
|
+
"date_synced": "2020-02-18T20:10:14.082Z"
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"type": "form_1099_div",
|
78
|
+
"document_id": "5e4c44a6b778c00001a81280",
|
79
|
+
"tax_period_ends_at": "2017-12-31",
|
80
|
+
"date_synced": "2020-02-18T20:10:14.082Z"
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"type": "form_1099_div",
|
84
|
+
"document_id": "5e4c44a6b778c00001a81281",
|
85
|
+
"tax_period_ends_at": "2018-12-31",
|
86
|
+
"date_synced": "2020-02-18T20:10:14.082Z"
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"type": "form_1099_div",
|
90
|
+
"document_id": "5e4c44a6b778c00001a81282",
|
91
|
+
"tax_period_ends_at": "2018-12-31",
|
92
|
+
"date_synced": "2020-02-18T20:10:14.082Z"
|
65
93
|
},
|
66
94
|
{
|
67
95
|
"type": "form_1099_int",
|
68
|
-
"document_id": "
|
69
|
-
"
|
70
|
-
"
|
71
|
-
|
96
|
+
"document_id": "5e4c44a6b778c00001a81283",
|
97
|
+
"tax_period_ends_at": "2017-12-31",
|
98
|
+
"date_synced": "2020-02-18T20:10:14.223Z"
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"type": "form_1099_int",
|
102
|
+
"document_id": "5e4c44a6b778c00001a81284",
|
103
|
+
"tax_period_ends_at": "2018-12-31",
|
104
|
+
"date_synced": "2020-02-18T20:10:14.223Z"
|
105
|
+
},
|
106
|
+
{
|
107
|
+
"type": "form_5498",
|
108
|
+
"document_id": "5e4c44a6b778c00001a81285",
|
109
|
+
"tax_period_ends_at": "2017-12-31",
|
110
|
+
"date_synced": "2020-02-18T20:10:14.34Z"
|
72
111
|
},
|
73
112
|
{
|
74
113
|
"type": "form_5498",
|
75
|
-
"document_id": "
|
76
|
-
"
|
77
|
-
"
|
78
|
-
|
114
|
+
"document_id": "5e4c44a6b778c00001a81286",
|
115
|
+
"tax_period_ends_at": "2017-12-31",
|
116
|
+
"date_synced": "2020-02-18T20:10:14.34Z"
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"type": "form_5498",
|
120
|
+
"document_id": "5e4c44a6b778c00001a81287",
|
121
|
+
"tax_period_ends_at": "2017-12-31",
|
122
|
+
"date_synced": "2020-02-18T20:10:14.34Z"
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"type": "form_5498",
|
126
|
+
"document_id": "5e4c44a6b778c00001a81288",
|
127
|
+
"tax_period_ends_at": "2017-12-31",
|
128
|
+
"date_synced": "2020-02-18T20:10:14.34Z"
|
129
|
+
}
|
130
|
+
],
|
131
|
+
"downloaded_documents": [
|
132
|
+
{
|
133
|
+
"provider_id": 7661,
|
134
|
+
"type": "tax_return",
|
135
|
+
"tax_period_ends_at": "2017-12-31",
|
136
|
+
"successful": false
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"provider_id": 7662,
|
140
|
+
"type": "tax_return",
|
141
|
+
"tax_period_ends_at": "2018-12-31",
|
142
|
+
"successful": false
|
143
|
+
},
|
144
|
+
{
|
145
|
+
"provider_id": 7663,
|
146
|
+
"type": "wage_and_income",
|
147
|
+
"tax_period_ends_at": "2017-12-31",
|
148
|
+
"successful": false
|
149
|
+
},
|
150
|
+
{
|
151
|
+
"provider_id": 7664,
|
152
|
+
"type": "wage_and_income",
|
153
|
+
"tax_period_ends_at": "2018-12-31",
|
154
|
+
"successful": false
|
79
155
|
}
|
80
156
|
]
|
81
157
|
}
|
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.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Quintero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: finapps_core
|
@@ -325,10 +325,11 @@ files:
|
|
325
325
|
- lib/finapps/rest/portfolios_consumers.rb
|
326
326
|
- lib/finapps/rest/products.rb
|
327
327
|
- lib/finapps/rest/sessions.rb
|
328
|
-
- lib/finapps/rest/statements.rb
|
329
328
|
- lib/finapps/rest/tenant_app_settings.rb
|
330
329
|
- lib/finapps/rest/tenant_settings.rb
|
330
|
+
- lib/finapps/rest/verix/verix_documents.rb
|
331
331
|
- lib/finapps/rest/verix/verix_metadata.rb
|
332
|
+
- lib/finapps/rest/verix/verix_pdf_documents.rb
|
332
333
|
- lib/finapps/rest/verix/verix_records.rb
|
333
334
|
- lib/finapps/rest/version.rb
|
334
335
|
- lib/finapps/utils/query_builder.rb
|
@@ -362,10 +363,11 @@ files:
|
|
362
363
|
- spec/rest/portfolios_spec.rb
|
363
364
|
- spec/rest/products_spec.rb
|
364
365
|
- spec/rest/sessions_spec.rb
|
365
|
-
- spec/rest/statements_spec.rb
|
366
366
|
- spec/rest/tenant_app_settings_spec.rb
|
367
367
|
- spec/rest/tenant_settings_spec.rb
|
368
|
+
- spec/rest/verix/verix_documents_spec.rb
|
368
369
|
- spec/rest/verix/verix_metadata_spec.rb
|
370
|
+
- spec/rest/verix/verix_pdf_documents_spec.rb
|
369
371
|
- spec/rest/verix/verix_records_spec.rb
|
370
372
|
- spec/rest/version_spec.rb
|
371
373
|
- spec/spec_helper.rb
|
@@ -375,7 +377,6 @@ files:
|
|
375
377
|
- spec/support/fixtures/alert_definitions.json
|
376
378
|
- spec/support/fixtures/alert_occurrences.json
|
377
379
|
- spec/support/fixtures/error.json
|
378
|
-
- spec/support/fixtures/fake_pdf_statement.json
|
379
380
|
- spec/support/fixtures/invalid_request_body.json
|
380
381
|
- spec/support/fixtures/invalid_tenant_credentials.json
|
381
382
|
- spec/support/fixtures/invalid_user_id.json
|
@@ -419,6 +420,9 @@ files:
|
|
419
420
|
- spec/support/fixtures/unauthorized.json
|
420
421
|
- spec/support/fixtures/user.json
|
421
422
|
- spec/support/fixtures/users.json
|
423
|
+
- spec/support/fixtures/verix/document/document.pdf
|
424
|
+
- spec/support/fixtures/verix/document/list.json
|
425
|
+
- spec/support/fixtures/verix/document/show.json
|
422
426
|
- spec/support/fixtures/verix/metadata.json
|
423
427
|
- spec/support/fixtures/verix/record/create.json
|
424
428
|
- spec/support/fixtures/verix/record/list.json
|
@@ -459,7 +463,6 @@ test_files:
|
|
459
463
|
- spec/rest/operators_password_resets_spec.rb
|
460
464
|
- spec/rest/portfolios_available_consumers_spec.rb
|
461
465
|
- spec/rest/products_spec.rb
|
462
|
-
- spec/rest/statements_spec.rb
|
463
466
|
- spec/rest/alert_definitions_spec.rb
|
464
467
|
- spec/rest/version_spec.rb
|
465
468
|
- spec/rest/consumers_spec.rb
|
@@ -468,7 +471,9 @@ test_files:
|
|
468
471
|
- spec/rest/tenant_app_settings_spec.rb
|
469
472
|
- spec/rest/operators_spec.rb
|
470
473
|
- spec/rest/verix/verix_records_spec.rb
|
474
|
+
- spec/rest/verix/verix_documents_spec.rb
|
471
475
|
- spec/rest/verix/verix_metadata_spec.rb
|
476
|
+
- spec/rest/verix/verix_pdf_documents_spec.rb
|
472
477
|
- spec/rest/client_spec.rb
|
473
478
|
- spec/rest/tenant_settings_spec.rb
|
474
479
|
- spec/rest/api_request.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module FinApps
|
4
|
-
module REST
|
5
|
-
class Statements < FinAppsCore::REST::Resources
|
6
|
-
def show(account_id, document_id)
|
7
|
-
not_blank(account_id, :account_id)
|
8
|
-
not_blank(document_id, :document_id)
|
9
|
-
|
10
|
-
path =
|
11
|
-
"accounts/#{ERB::Util.url_encode(account_id)}/statement/#{ERB::Util.url_encode(document_id)}"
|
12
|
-
super nil, path
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helpers/client'
|
4
|
-
|
5
|
-
RSpec.describe FinApps::REST::Statements do
|
6
|
-
include SpecHelpers::Client
|
7
|
-
subject { FinApps::REST::Statements.new(client) }
|
8
|
-
|
9
|
-
describe '#show' do
|
10
|
-
context 'when missing account_id' do
|
11
|
-
let(:show) { subject.show(nil, 'valid_id') }
|
12
|
-
it { expect { show }.to raise_error(FinAppsCore::MissingArgumentsError) }
|
13
|
-
end
|
14
|
-
|
15
|
-
context 'when missing document_id' do
|
16
|
-
let(:show) { subject.show('valid_id', nil) }
|
17
|
-
it { expect { show }.to raise_error(FinAppsCore::MissingArgumentsError) }
|
18
|
-
end
|
19
|
-
|
20
|
-
context 'when valid ids are provided' do
|
21
|
-
let(:show) { subject.show('valid_id', 'valid_id') }
|
22
|
-
it { expect { show }.not_to raise_error }
|
23
|
-
it('returns an array') { expect(show).to be_a(Array) }
|
24
|
-
it('performs a get and returns the response') do
|
25
|
-
expect(show[RESULTS]).to have_key(:data)
|
26
|
-
end
|
27
|
-
it('returns no error messages') do
|
28
|
-
expect(show[ERROR_MESSAGES]).to be_empty
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
context 'when invalid ids are provided' do
|
33
|
-
let(:show) { subject.show('invalid_id', 'valid_id') }
|
34
|
-
it { expect { show }.not_to raise_error }
|
35
|
-
it('returns an array') { expect(show).to be_a(Array) }
|
36
|
-
it('results is nil') { expect(show[RESULTS]).to be_nil }
|
37
|
-
it('error messages array is populated') do
|
38
|
-
expect(show[ERROR_MESSAGES].first.downcase).to eq('resource not found')
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|