finapps 6.10.0 → 6.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/finapps/rest/locations.rb +3 -3
- data/lib/finapps/rest/states.rb +3 -0
- data/lib/finapps/version.rb +1 -1
- data/spec/rest/locations_spec.rb +13 -35
- data/spec/rest/states_spec.rb +3 -1
- data/spec/support/fixtures/locations/get_location.json +1 -0
- data/spec/support/fixtures/locations/get_locations.json +4 -1
- data/spec/support/routes/locations.rb +6 -13
- data/spec/support/routes/states.rb +1 -1
- metadata +53 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b42aeaed6c32c359360c5f40a432723036e7118029003cd6b0d0e2fccad644fd
|
4
|
+
data.tar.gz: 720c838e5da2710309dc6be29e640ba6238c101244145a4eb20b06d765c4387b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b6a365b8057aebefb8431f93e660b133deda0ae94829aa2fdc98d4f59001c9b1cd803af75b44de83bb5c574d940dacb25e13b1e40ff93b2f76893a7bf3001e6
|
7
|
+
data.tar.gz: 7f09473a81677c621c2ebc86e15e346a4d3c5418e3e845c2ac16cf8237c247ccb5aa2b70e46744b1bad3d6f4bb5784be1e9bcca7ecb806dc3fe663e6f050e60d
|
data/lib/finapps/rest/states.rb
CHANGED
data/lib/finapps/version.rb
CHANGED
data/spec/rest/locations_spec.rb
CHANGED
@@ -5,6 +5,8 @@ require 'digest'
|
|
5
5
|
RSpec.describe FinApps::REST::Locations do
|
6
6
|
include SpecHelpers::Client
|
7
7
|
|
8
|
+
let(:id) { :id }
|
9
|
+
|
8
10
|
describe '#list' do
|
9
11
|
subject(:list) { described_class.new(client).list filter }
|
10
12
|
|
@@ -12,6 +14,7 @@ RSpec.describe FinApps::REST::Locations do
|
|
12
14
|
|
13
15
|
it_behaves_like 'an API request'
|
14
16
|
it_behaves_like 'a successful request'
|
17
|
+
it { expect(list[RESULTS]).to all(have_key(:id)) }
|
15
18
|
it { expect(list[RESULTS]).to all(have_key(:name)) }
|
16
19
|
it { expect(list[RESULTS]).to all(have_key(:state)) }
|
17
20
|
|
@@ -41,72 +44,47 @@ RSpec.describe FinApps::REST::Locations do
|
|
41
44
|
end
|
42
45
|
|
43
46
|
describe '#show' do
|
44
|
-
subject(:show) { described_class.new(client).show(
|
45
|
-
|
46
|
-
let(:key) { Digest::SHA256.hexdigest('Quick Mart Urgent CareMD,MD') }
|
47
|
+
subject(:show) { described_class.new(client).show(id) }
|
47
48
|
|
48
49
|
it_behaves_like 'an API request'
|
49
50
|
it_behaves_like 'a successful request'
|
51
|
+
it { expect(show[RESULTS]).to have_key(:id) }
|
50
52
|
it { expect(show[RESULTS]).to have_key(:name) }
|
51
53
|
it { expect(show[RESULTS]).to have_key(:state) }
|
52
54
|
|
53
|
-
context 'when
|
54
|
-
let(:
|
55
|
-
|
56
|
-
it_behaves_like 'a failed request'
|
57
|
-
end
|
55
|
+
context 'when id does not match any location' do
|
56
|
+
let(:id) { 'not_found' }
|
58
57
|
|
59
|
-
context 'when key does not match any location' do
|
60
|
-
let(:key) { 'not_found' }
|
61
|
-
|
62
|
-
it_behaves_like 'a failed request'
|
63
58
|
it_behaves_like 'a request to a not found resource'
|
64
59
|
end
|
65
60
|
end
|
66
61
|
|
67
62
|
describe '#update' do
|
68
|
-
subject(:update) { described_class.new(client).update(
|
63
|
+
subject(:update) { described_class.new(client).update(id, params) }
|
69
64
|
|
70
|
-
let(:key) { Digest::SHA256.hexdigest('Quick Mart Urgent CareMD,MD') }
|
71
65
|
let(:params) { {name: 'Quick Mart Non-Urgent Care', state: {code: 'MD'}} }
|
72
66
|
|
73
67
|
it_behaves_like 'an API request'
|
74
68
|
it_behaves_like 'a successful request'
|
75
69
|
it { expect(update[RESULTS]).to be_nil }
|
76
70
|
|
77
|
-
context 'when
|
78
|
-
let(:
|
79
|
-
|
80
|
-
it_behaves_like 'a failed request'
|
81
|
-
end
|
82
|
-
|
83
|
-
context 'when key does not match any location' do
|
84
|
-
let(:key) { 'not_found' }
|
71
|
+
context 'when id does not match any location' do
|
72
|
+
let(:id) { 'not_found' }
|
85
73
|
|
86
|
-
it_behaves_like 'a failed request'
|
87
74
|
it_behaves_like 'a request to a not found resource'
|
88
75
|
end
|
89
76
|
end
|
90
77
|
|
91
78
|
describe '#destroy' do
|
92
|
-
subject(:destroy) { described_class.new(client).destroy(
|
93
|
-
|
94
|
-
let(:key) { Digest::SHA256.hexdigest('Quick Mart Urgent CareMD,MD') }
|
79
|
+
subject(:destroy) { described_class.new(client).destroy(id) }
|
95
80
|
|
96
81
|
it_behaves_like 'an API request'
|
97
82
|
it_behaves_like 'a successful request'
|
98
83
|
it { expect(destroy[RESULTS]).to be_nil }
|
99
84
|
|
100
|
-
context 'when
|
101
|
-
let(:
|
85
|
+
context 'when id does not match any location' do
|
86
|
+
let(:id) { 'not_found' }
|
102
87
|
|
103
|
-
it_behaves_like 'a failed request'
|
104
|
-
end
|
105
|
-
|
106
|
-
context 'when key does not match any location' do
|
107
|
-
let(:key) { 'not_found' }
|
108
|
-
|
109
|
-
it_behaves_like 'a failed request'
|
110
88
|
it_behaves_like 'a request to a not found resource'
|
111
89
|
end
|
112
90
|
end
|
data/spec/rest/states_spec.rb
CHANGED
@@ -9,6 +9,8 @@ RSpec.describe FinApps::REST::States do
|
|
9
9
|
it_behaves_like 'an API request'
|
10
10
|
it_behaves_like 'a successful request'
|
11
11
|
|
12
|
-
it('returns a list
|
12
|
+
it('returns a list of hashes with the following keys: code, label, type') do
|
13
|
+
expect(list[RESULTS].first.keys).to match_array(%i[code label type])
|
14
|
+
end
|
13
15
|
end
|
14
16
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
[
|
2
2
|
{
|
3
|
+
"id": "2c0c2951-0a5e-463f-abd3-d315e63a62b2",
|
3
4
|
"name": "Quick Mart Urgent Care",
|
4
5
|
"state": {
|
5
6
|
"code": "MD",
|
@@ -8,6 +9,7 @@
|
|
8
9
|
}
|
9
10
|
},
|
10
11
|
{
|
12
|
+
"id": "2c0c2951-0a5e-463f-abd3-d315e63a62b3",
|
11
13
|
"name": "Quick Mart Emergency Room",
|
12
14
|
"state": {
|
13
15
|
"code": "MD",
|
@@ -16,6 +18,7 @@
|
|
16
18
|
}
|
17
19
|
},
|
18
20
|
{
|
21
|
+
"id": "2c0c2951-0a5e-463f-abd3-d315e63a62b4",
|
19
22
|
"name": "Quick Mart - Folsom Business Office",
|
20
23
|
"state": {
|
21
24
|
"code": "CA",
|
@@ -23,4 +26,4 @@
|
|
23
26
|
"type": "state"
|
24
27
|
}
|
25
28
|
}
|
26
|
-
]
|
29
|
+
]
|
@@ -19,18 +19,16 @@ module Fake
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def delete_routes(base)
|
22
|
-
base.delete("/#{base.version}/locations/:
|
23
|
-
return status(404) if params[:
|
24
|
-
return status(400) unless sha256?(params[:key])
|
22
|
+
base.delete("/#{base.version}/locations/:id") do
|
23
|
+
return status(404) if params[:id] == 'not_found'
|
25
24
|
|
26
25
|
status 204
|
27
26
|
end
|
28
27
|
end
|
29
28
|
|
30
29
|
def put_routes(base)
|
31
|
-
base.put("/#{base.version}/locations/:
|
32
|
-
return status(404) if params[:
|
33
|
-
return status(400) unless sha256?(params[:key])
|
30
|
+
base.put("/#{base.version}/locations/:id") do
|
31
|
+
return status(404) if params[:id] == 'not_found'
|
34
32
|
|
35
33
|
status 204
|
36
34
|
end
|
@@ -42,17 +40,12 @@ module Fake
|
|
42
40
|
|
43
41
|
json_response 200, 'locations/get_locations.json'
|
44
42
|
end
|
45
|
-
base.get("/#{base.version}/locations/:
|
46
|
-
return status(404) if params[:
|
47
|
-
return status(400) unless sha256?(params[:key])
|
43
|
+
base.get("/#{base.version}/locations/:id") do
|
44
|
+
return status(404) if params[:id] == 'not_found'
|
48
45
|
|
49
46
|
json_response 200, 'locations/get_location.json'
|
50
47
|
end
|
51
48
|
end
|
52
49
|
end
|
53
|
-
|
54
|
-
def sha256?(key)
|
55
|
-
key.length == 64 && key.match(/^[0-9a-f]+$/)
|
56
|
-
end
|
57
50
|
end
|
58
51
|
end
|
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: 6.10.
|
4
|
+
version: 6.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Quintero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: finapps_core
|
@@ -483,65 +483,65 @@ signing_key:
|
|
483
483
|
specification_version: 4
|
484
484
|
summary: FinApps REST API ruby client.
|
485
485
|
test_files:
|
486
|
-
- spec/utils/query_builder_spec.rb
|
487
|
-
- spec/support/fake_api.rb
|
488
|
-
- spec/support/documents_uploads_routes.rb
|
489
|
-
- spec/support/routes/locations.rb
|
490
|
-
- spec/support/routes/query_screenings.rb
|
491
|
-
- spec/support/routes/states.rb
|
492
|
-
- spec/support/routes/actors.rb
|
493
|
-
- spec/support/routes/screening_metadatas.rb
|
494
|
-
- spec/support/screenings_routes.rb
|
495
486
|
- spec/spec_helper.rb
|
487
|
+
- spec/spec_helpers/api_request.rb
|
488
|
+
- spec/spec_helpers/client.rb
|
489
|
+
- spec/rest/query/screenings_spec.rb
|
490
|
+
- spec/rest/query/base_spec.rb
|
491
|
+
- spec/rest/portfolios_available_consumers_spec.rb
|
496
492
|
- spec/rest/documents_orders_notifications_spec.rb
|
493
|
+
- spec/rest/portfolios_alerts_spec.rb
|
494
|
+
- spec/rest/version_spec.rb
|
495
|
+
- spec/rest/alert_occurrences_spec.rb
|
496
|
+
- spec/rest/products_spec.rb
|
497
497
|
- spec/rest/operator_change_password_email_spec.rb
|
498
|
-
- spec/rest/
|
499
|
-
- spec/rest/
|
500
|
-
- spec/rest/
|
501
|
-
- spec/rest/
|
502
|
-
- spec/rest/verix/verix_pdf_documents_spec.rb
|
503
|
-
- spec/rest/verix/verix_metadata_spec.rb
|
504
|
-
- spec/rest/states_spec.rb
|
505
|
-
- spec/rest/consumers_portfolios_spec.rb
|
506
|
-
- spec/rest/signed_documents_downloads_spec.rb
|
507
|
-
- spec/rest/portfolio_reports_spec.rb
|
508
|
-
- spec/rest/order_statuses_spec.rb
|
509
|
-
- spec/rest/esign_templates_spec.rb
|
498
|
+
- spec/rest/consumers_spec.rb
|
499
|
+
- spec/rest/screenings_spec.rb
|
500
|
+
- spec/rest/order_notifications_spec.rb
|
501
|
+
- spec/rest/tenant_app_settings_spec.rb
|
510
502
|
- spec/rest/order_reports_spec.rb
|
511
|
-
- spec/rest/
|
512
|
-
- spec/rest/portfolios_alerts_spec.rb
|
513
|
-
- spec/rest/orders_spec.rb
|
514
|
-
- spec/rest/consumer_login_tokens_spec.rb
|
503
|
+
- spec/rest/documents_uploads_spec.rb
|
515
504
|
- spec/rest/operators_spec.rb
|
516
|
-
- spec/rest/
|
517
|
-
- spec/rest/plaid/plaid_accounts_spec.rb
|
518
|
-
- spec/rest/plaid/plaid_account_permissions_spec.rb
|
519
|
-
- spec/rest/plaid/plaid_webhooks_spec.rb
|
520
|
-
- spec/rest/plaid/plaid_institution_logos_spec.rb
|
521
|
-
- spec/rest/plaid/plaid_consumer_institutions_spec.rb
|
522
|
-
- spec/rest/tenant_app_settings_spec.rb
|
505
|
+
- spec/rest/portfolios_spec.rb
|
523
506
|
- spec/rest/locations_spec.rb
|
524
|
-
- spec/rest/
|
525
|
-
- spec/rest/
|
526
|
-
- spec/rest/alert_definitions_spec.rb
|
527
|
-
- spec/rest/documents_upload_types_spec.rb
|
528
|
-
- spec/rest/order_notifications_spec.rb
|
507
|
+
- spec/rest/client_spec.rb
|
508
|
+
- spec/rest/actors_spec.rb
|
529
509
|
- spec/rest/documents_orders_spec.rb
|
530
|
-
- spec/rest/
|
531
|
-
- spec/rest/
|
510
|
+
- spec/rest/consumer_login_tokens_spec.rb
|
511
|
+
- spec/rest/documents_upload_types_spec.rb
|
512
|
+
- spec/rest/tenant_settings_spec.rb
|
532
513
|
- spec/rest/screening_metadatas_spec.rb
|
533
|
-
- spec/rest/
|
534
|
-
- spec/rest/
|
535
|
-
- spec/rest/sessions_spec.rb
|
536
|
-
- spec/rest/query/screenings_spec.rb
|
537
|
-
- spec/rest/query/base_spec.rb
|
514
|
+
- spec/rest/order_tokens_spec.rb
|
515
|
+
- spec/rest/order_refreshes_spec.rb
|
538
516
|
- spec/rest/operators_password_resets_spec.rb
|
539
|
-
- spec/rest/
|
540
|
-
- spec/rest/
|
541
|
-
- spec/rest/
|
517
|
+
- spec/rest/order_assignments_spec.rb
|
518
|
+
- spec/rest/alert_definitions_spec.rb
|
519
|
+
- spec/rest/signed_documents_downloads_spec.rb
|
542
520
|
- spec/rest/operators_login_tokens_spec.rb
|
543
|
-
- spec/rest/
|
521
|
+
- spec/rest/verix/verix_metadata_spec.rb
|
522
|
+
- spec/rest/verix/verix_records_spec.rb
|
523
|
+
- spec/rest/verix/verix_pdf_documents_spec.rb
|
524
|
+
- spec/rest/verix/verix_documents_spec.rb
|
525
|
+
- spec/rest/password_resets_spec.rb
|
526
|
+
- spec/rest/plaid/plaid_webhooks_spec.rb
|
527
|
+
- spec/rest/plaid/plaid_account_permissions_spec.rb
|
528
|
+
- spec/rest/plaid/plaid_institution_logos_spec.rb
|
529
|
+
- spec/rest/plaid/plaid_accounts_spec.rb
|
530
|
+
- spec/rest/plaid/plaid_consumer_institutions_spec.rb
|
531
|
+
- spec/rest/states_spec.rb
|
532
|
+
- spec/rest/esign_templates_spec.rb
|
544
533
|
- spec/rest/portfolios_consumers_spec.rb
|
545
|
-
- spec/rest/
|
546
|
-
- spec/
|
547
|
-
- spec/
|
534
|
+
- spec/rest/order_statuses_spec.rb
|
535
|
+
- spec/rest/portfolio_reports_spec.rb
|
536
|
+
- spec/rest/sessions_spec.rb
|
537
|
+
- spec/rest/consumers_portfolios_spec.rb
|
538
|
+
- spec/rest/orders_spec.rb
|
539
|
+
- spec/utils/query_builder_spec.rb
|
540
|
+
- spec/support/screenings_routes.rb
|
541
|
+
- spec/support/documents_uploads_routes.rb
|
542
|
+
- spec/support/routes/screening_metadatas.rb
|
543
|
+
- spec/support/routes/query_screenings.rb
|
544
|
+
- spec/support/routes/states.rb
|
545
|
+
- spec/support/routes/actors.rb
|
546
|
+
- spec/support/routes/locations.rb
|
547
|
+
- spec/support/fake_api.rb
|