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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 765aad4ece03d6e507cd77930fa24fb983911f4773c30adc09399695c62a6c0d
4
- data.tar.gz: 7bd544c214f84ec23c64ddc45a732ad820d5faebda7a1c7591a6c46b145dded8
3
+ metadata.gz: b42aeaed6c32c359360c5f40a432723036e7118029003cd6b0d0e2fccad644fd
4
+ data.tar.gz: 720c838e5da2710309dc6be29e640ba6238c101244145a4eb20b06d765c4387b
5
5
  SHA512:
6
- metadata.gz: 7f7475687fc24f0f4480a0ad229e9ed8fdb9b6a6b4fb7b70117327187678006e3c1476294d2bb2753d2084051bc3350afa81ca892fa9b4d9e9def5e7793e1a40
7
- data.tar.gz: 73f047dfbfb2d3e1df537a69145d88a373d80b27799b3a1bf659b9d84c9603fe8048db6e85fe16bb7b4d3b216ddc8272896bb30e95a0658b9467234c89eaa31b
6
+ metadata.gz: 6b6a365b8057aebefb8431f93e660b133deda0ae94829aa2fdc98d4f59001c9b1cd803af75b44de83bb5c574d940dacb25e13b1e40ff93b2f76893a7bf3001e6
7
+ data.tar.gz: 7f09473a81677c621c2ebc86e15e346a4d3c5418e3e845c2ac16cf8237c247ccb5aa2b70e46744b1bad3d6f4bb5784be1e9bcca7ecb806dc3fe663e6f050e60d
@@ -8,9 +8,9 @@ module FinApps
8
8
  super path
9
9
  end
10
10
 
11
- def update(key, params = {})
12
- path = resource_path(key)
13
- send_request path, :put, params
11
+ def update(id, params)
12
+ path = resource_path(id)
13
+ super params, path
14
14
  end
15
15
  end
16
16
  end
@@ -3,6 +3,9 @@
3
3
  module FinApps
4
4
  module REST
5
5
  class States < FinAppsCore::REST::Resources # :nodoc:
6
+ def end_point
7
+ "references/#{super}"
8
+ end
6
9
  end
7
10
  end
8
11
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinApps
4
- VERSION = '6.10.0'
4
+ VERSION = '6.10.1'
5
5
  end
@@ -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(key) }
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 key is not a valid SHA256' do
54
- let(:key) { 'invalid_SHA256' }
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(key, params) }
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 key is not a valid SHA256' do
78
- let(:key) { 'invalid_SHA256' }
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(key) }
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 key is not a valid SHA256' do
101
- let(:key) { 'invalid_SHA256' }
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
@@ -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') { expect(list[RESULTS]).to be_a(Array) }
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,4 +1,5 @@
1
1
  {
2
+ "id": "2c0c2951-0a5e-463f-abd3-d315e63a62b2",
2
3
  "name": "IK",
3
4
  "state": {
4
5
  "code": "MD",
@@ -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/:key") do
23
- return status(404) if params[:key] == 'not_found'
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/:key") do
32
- return status(404) if params[:key] == 'not_found'
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/:key") do
46
- return status(404) if params[:key] == 'not_found'
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
@@ -4,7 +4,7 @@ module Fake
4
4
  module StateRoutes
5
5
  class << self
6
6
  def included(base)
7
- base.get("/#{base.version}/states") do
7
+ base.get("/#{base.version}/references/states") do
8
8
  json_response 200, 'states/get_states.json'
9
9
  end
10
10
  super
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.0
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-03-17 00:00:00.000000000 Z
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/order_assignments_spec.rb
499
- - spec/rest/order_refreshes_spec.rb
500
- - spec/rest/verix/verix_records_spec.rb
501
- - spec/rest/verix/verix_documents_spec.rb
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/tenant_settings_spec.rb
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/actors_spec.rb
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/consumers_spec.rb
525
- - spec/rest/order_tokens_spec.rb
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/documents_uploads_spec.rb
531
- - spec/rest/portfolios_available_consumers_spec.rb
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/client_spec.rb
534
- - spec/rest/screenings_spec.rb
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/password_resets_spec.rb
540
- - spec/rest/products_spec.rb
541
- - spec/rest/portfolios_spec.rb
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/alert_occurrences_spec.rb
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/version_spec.rb
546
- - spec/spec_helpers/api_request.rb
547
- - spec/spec_helpers/client.rb
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