finapps 6.9.2 → 6.10.2
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 +4 -4
- data/.github/workflows/ci.yaml +1 -1
- data/.github/workflows/release.yml +1 -1
- data/.gitignore +1 -0
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/lib/finapps/rest/client.rb +2 -0
- data/lib/finapps/rest/locations.rb +17 -0
- data/lib/finapps/rest/operators.rb +6 -5
- data/lib/finapps/rest/states.rb +11 -0
- data/lib/finapps/version.rb +1 -1
- data/lib/finapps.rb +2 -0
- data/spec/rest/locations_spec.rb +95 -0
- data/spec/rest/operators_spec.rb +12 -3
- data/spec/rest/states_spec.rb +16 -0
- data/spec/spec_helper.rb +3 -1
- data/spec/spec_helpers/api_request.rb +12 -11
- data/spec/support/fake_api.rb +6 -1
- data/spec/support/fixtures/locations/get_location.json +9 -0
- data/spec/support/fixtures/locations/get_locations.json +29 -0
- data/spec/support/fixtures/states/get_states.json +287 -0
- data/spec/support/routes/locations.rb +51 -0
- data/spec/support/routes/states.rb +14 -0
- metadata +59 -46
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d55e0e0252d632b2a68bdf279f4a4e33181bcf1d8be6ca5513399e0cb34fd08b
|
|
4
|
+
data.tar.gz: 311a8cbe50f22112ddbf0360567ad10ef36967d4247d973b6275c2054ba67a82
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e24379649d976509c222127152ddf7d98cd5fcbcffc0a3ed5700295b418685c21bf2a51e7e91804c8ff066fa1e1e0da155762710dfbbb12061bc23d1458fa68
|
|
7
|
+
data.tar.gz: df2ab06514a0a5bc3fac7b0e880e370d321fe2261f522945dc00f0ab656d289b91609b45274c4a743e0b795c8139e236e5c54311dc4e0e96cf7d3985dd1ef414
|
data/.github/workflows/ci.yaml
CHANGED
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ruby-2.7.
|
|
1
|
+
ruby-2.7.5
|
data/.travis.yml
CHANGED
data/lib/finapps/rest/client.rb
CHANGED
|
@@ -19,6 +19,7 @@ module FinApps
|
|
|
19
19
|
documents_uploads
|
|
20
20
|
esign_templates
|
|
21
21
|
orders
|
|
22
|
+
locations
|
|
22
23
|
order_assignments
|
|
23
24
|
order_notifications
|
|
24
25
|
order_refreshes
|
|
@@ -45,6 +46,7 @@ module FinApps
|
|
|
45
46
|
screening_metadatas
|
|
46
47
|
sessions
|
|
47
48
|
signed_documents_downloads
|
|
49
|
+
states
|
|
48
50
|
tenant_settings
|
|
49
51
|
tenant_app_settings
|
|
50
52
|
verix_metadata
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module FinApps
|
|
4
|
+
module REST
|
|
5
|
+
class Locations < FinAppsCore::REST::Resources # :nodoc:
|
|
6
|
+
def list(filter = nil)
|
|
7
|
+
path = "#{end_point}?filter=#{filter}" unless filter.nil?
|
|
8
|
+
super path
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def update(id, params)
|
|
12
|
+
path = resource_path(id)
|
|
13
|
+
super params, path
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -67,10 +67,11 @@ module FinApps
|
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
def term_array(term)
|
|
70
|
-
|
|
71
|
-
{email: term}
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
if term.include?('@')
|
|
71
|
+
[{email: term}]
|
|
72
|
+
else
|
|
73
|
+
[{last_name: term}]
|
|
74
|
+
end
|
|
74
75
|
end
|
|
75
76
|
|
|
76
77
|
def role_filter(role)
|
|
@@ -83,7 +84,7 @@ module FinApps
|
|
|
83
84
|
end
|
|
84
85
|
|
|
85
86
|
def to_integers_array(role)
|
|
86
|
-
(role.respond_to?(:map) ? role : [role]).
|
|
87
|
+
(role.respond_to?(:map) ? role : [role]).filter_map {|i| Integer(i) }
|
|
87
88
|
end
|
|
88
89
|
end
|
|
89
90
|
end
|
data/lib/finapps/version.rb
CHANGED
data/lib/finapps.rb
CHANGED
|
@@ -6,6 +6,7 @@ require 'faraday_middleware'
|
|
|
6
6
|
require 'finapps_core'
|
|
7
7
|
require 'finapps/rest/actors'
|
|
8
8
|
require 'finapps/rest/version'
|
|
9
|
+
require 'finapps/rest/locations'
|
|
9
10
|
require 'finapps/rest/consumers'
|
|
10
11
|
require 'finapps/rest/consumer_login_tokens'
|
|
11
12
|
require 'finapps/rest/sessions'
|
|
@@ -40,6 +41,7 @@ require 'finapps/rest/documents_upload_types'
|
|
|
40
41
|
require 'finapps/rest/signed_documents_downloads'
|
|
41
42
|
require 'finapps/rest/documents_orders_notifications'
|
|
42
43
|
require 'finapps/rest/screenings'
|
|
44
|
+
require 'finapps/rest/states'
|
|
43
45
|
require 'finapps/rest/screening_metadatas'
|
|
44
46
|
|
|
45
47
|
require 'finapps/rest/plaid/plaid_resources'
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'digest'
|
|
4
|
+
|
|
5
|
+
RSpec.describe FinApps::REST::Locations do
|
|
6
|
+
include SpecHelpers::Client
|
|
7
|
+
|
|
8
|
+
let(:id) { :id }
|
|
9
|
+
|
|
10
|
+
params = {name: 'Quick Mart Non-Urgent Care', state: {code: 'MD'}}
|
|
11
|
+
|
|
12
|
+
RSpec::Matchers.define :have_keys do |*keys|
|
|
13
|
+
match {|actual| keys.all? {|key| actual.key? key } }
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
RSpec.shared_examples 'a request to a not found resource' do
|
|
17
|
+
it_behaves_like 'a failed request'
|
|
18
|
+
it('returns a 404 error') do
|
|
19
|
+
expect(subject[ERROR_MESSAGES].first)
|
|
20
|
+
.to(eq('the server responded with status 404'))
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
RSpec.shared_examples 'a successful API request returning an empty body' do
|
|
25
|
+
it_behaves_like 'an API request'
|
|
26
|
+
it_behaves_like 'a successful request'
|
|
27
|
+
it { expect(subject[RESULTS]).to be_nil }
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe '#list' do
|
|
31
|
+
subject(:list) { described_class.new(client).list filter }
|
|
32
|
+
|
|
33
|
+
let(:filter) { nil }
|
|
34
|
+
|
|
35
|
+
it_behaves_like 'an API request'
|
|
36
|
+
it_behaves_like 'a successful request'
|
|
37
|
+
it { expect(list[RESULTS]).to all(have_keys(:id, :name, :state)) }
|
|
38
|
+
|
|
39
|
+
context 'when the JMESPath filter is invalid' do
|
|
40
|
+
let(:filter) { 'invalid' }
|
|
41
|
+
|
|
42
|
+
it_behaves_like 'a failed request'
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe '#show' do
|
|
47
|
+
subject(:show) { described_class.new(client).show(id) }
|
|
48
|
+
|
|
49
|
+
context 'when the location exists' do
|
|
50
|
+
it_behaves_like 'an API request'
|
|
51
|
+
it_behaves_like 'a successful request'
|
|
52
|
+
it { expect(show[RESULTS]).to have_keys(:id, :name, :state) }
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
context 'when id does not match any location' do
|
|
56
|
+
let(:id) { 'not_found' }
|
|
57
|
+
|
|
58
|
+
it_behaves_like 'a request to a not found resource'
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
describe '#create' do
|
|
63
|
+
subject(:create) { described_class.new(client).create(params) }
|
|
64
|
+
|
|
65
|
+
it_behaves_like 'a successful API request returning an empty body'
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
describe '#update' do
|
|
69
|
+
subject(:update) { described_class.new(client).update(id, params) }
|
|
70
|
+
|
|
71
|
+
context 'when the location exists' do
|
|
72
|
+
it_behaves_like 'a successful API request returning an empty body'
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
context 'when id does not match any location' do
|
|
76
|
+
let(:id) { 'not_found' }
|
|
77
|
+
|
|
78
|
+
it_behaves_like 'a request to a not found resource'
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
describe '#destroy' do
|
|
83
|
+
subject(:destroy) { described_class.new(client).destroy(id) }
|
|
84
|
+
|
|
85
|
+
context 'when the location exists' do
|
|
86
|
+
it_behaves_like 'a successful API request returning an empty body'
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
context 'when id does not match any location' do
|
|
90
|
+
let(:id) { 'not_found' }
|
|
91
|
+
|
|
92
|
+
it_behaves_like 'a request to a not found resource'
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
data/spec/rest/operators_spec.rb
CHANGED
|
@@ -25,12 +25,21 @@ RSpec.describe FinApps::REST::Operators do
|
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
context 'with searchTerm' do
|
|
28
|
+
context 'with email searchTerm' do
|
|
29
|
+
let(:params) { {searchTerm: 'term@example.com'} }
|
|
30
|
+
|
|
31
|
+
it_behaves_like 'a filtereable GET index request', {
|
|
32
|
+
'$or': [
|
|
33
|
+
{email: 'term@example.com'}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
context 'with non email searchTerm' do
|
|
29
39
|
let(:params) { {searchTerm: 'le term'} }
|
|
30
40
|
|
|
31
41
|
it_behaves_like 'a filtereable GET index request', {
|
|
32
42
|
'$or': [
|
|
33
|
-
{email: 'le term'},
|
|
34
43
|
{last_name: 'le term'}
|
|
35
44
|
]
|
|
36
45
|
}
|
|
@@ -65,7 +74,7 @@ RSpec.describe FinApps::REST::Operators do
|
|
|
65
74
|
it 'builds a full filter and query and sends the request' do
|
|
66
75
|
list
|
|
67
76
|
|
|
68
|
-
filter = {'$or': [{
|
|
77
|
+
filter = {'$or': [{last_name: 't'}], role: {'$in': [2]}}
|
|
69
78
|
expect(WebMock).to have_requested(:get, "#{versioned_api_path}/operators"\
|
|
70
79
|
"?filter=#{ERB::Util.url_encode filter.to_json}"\
|
|
71
80
|
'&page=2&requested=25&sort=date_created')
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
RSpec.describe FinApps::REST::States do
|
|
4
|
+
include SpecHelpers::Client
|
|
5
|
+
|
|
6
|
+
describe '#list' do
|
|
7
|
+
subject(:list) { described_class.new(client).list }
|
|
8
|
+
|
|
9
|
+
it_behaves_like 'an API request'
|
|
10
|
+
it_behaves_like 'a successful request'
|
|
11
|
+
|
|
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
|
|
15
|
+
end
|
|
16
|
+
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
if ENV
|
|
3
|
+
if ENV.fetch('COVERAGE', nil) == 'true'
|
|
4
4
|
require 'simplecov'
|
|
5
5
|
require 'simplecov-console'
|
|
6
6
|
|
|
@@ -24,6 +24,8 @@ require 'webmock/rspec'
|
|
|
24
24
|
|
|
25
25
|
# noinspection RubyResolve
|
|
26
26
|
require File.join(File.dirname(__dir__), 'spec/support/fake_api')
|
|
27
|
+
require File.join(File.dirname(__dir__), 'spec/spec_helpers/client')
|
|
28
|
+
require File.join(File.dirname(__dir__), 'spec/spec_helpers/api_request')
|
|
27
29
|
|
|
28
30
|
RSpec.configure do |config|
|
|
29
31
|
config.expect_with(:rspec) do |expectations|
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
RSpec.shared_examples 'an API request' do
|
|
3
|
+
RSpec.shared_examples 'an API request' do
|
|
4
4
|
it { expect { subject }.not_to raise_error }
|
|
5
|
-
|
|
6
5
|
it('returns an array') { expect(subject).to be_a(Array) }
|
|
7
6
|
end
|
|
8
7
|
|
|
9
|
-
RSpec.shared_examples 'a successful request' do
|
|
8
|
+
RSpec.shared_examples 'a successful request' do
|
|
10
9
|
it('returns no error messages') do
|
|
11
10
|
expect(subject[ERROR_MESSAGES]).to be_empty
|
|
12
11
|
end
|
|
13
12
|
end
|
|
14
13
|
|
|
15
|
-
RSpec.shared_examples 'a request
|
|
16
|
-
it
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
RSpec.shared_examples 'a failed request' do
|
|
15
|
+
it { expect(subject[RESULTS]).to be_nil }
|
|
16
|
+
it { expect(subject[ERROR_MESSAGES]).not_to be_empty }
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
RSpec.shared_examples 'a request that raises an error' do |err|
|
|
20
|
+
err = FinAppsCore::MissingArgumentsError if err.nil?
|
|
21
|
+
it { expect { subject }.to raise_error(err) }
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
RSpec.shared_examples 'a GET index request' do
|
|
24
|
-
it { expect(
|
|
25
|
+
it { expect(subject[RESULTS]).to have_key(:records) }
|
|
25
26
|
|
|
26
27
|
it('returns an array of records') do
|
|
27
|
-
expect(
|
|
28
|
+
expect(subject[RESULTS][:records]).to be_a(Array)
|
|
28
29
|
end
|
|
29
30
|
end
|
data/spec/support/fake_api.rb
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'sinatra/base'
|
|
4
|
+
|
|
4
5
|
require_relative 'documents_uploads_routes'
|
|
5
6
|
require_relative 'screenings_routes'
|
|
6
7
|
require_relative 'routes/actors'
|
|
8
|
+
require_relative 'routes/locations'
|
|
7
9
|
require_relative 'routes/screening_metadatas'
|
|
8
10
|
require_relative 'routes/query_screenings'
|
|
11
|
+
require_relative 'routes/states'
|
|
9
12
|
|
|
10
13
|
module Fake
|
|
11
14
|
# the FakeApi class is used to mock API requests while testing.
|
|
@@ -23,9 +26,11 @@ module Fake
|
|
|
23
26
|
|
|
24
27
|
include ActorsRoutes
|
|
25
28
|
include DocumentsUploadsRoutes
|
|
29
|
+
include LocationsRoutes
|
|
30
|
+
include QueryScreeningRoutes
|
|
26
31
|
include ScreeningsRoutes
|
|
27
32
|
include ScreeningMetadatasRoutes
|
|
28
|
-
include
|
|
33
|
+
include StateRoutes
|
|
29
34
|
|
|
30
35
|
# verix_metadata
|
|
31
36
|
get("/#{version}/v/metadata") do
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "2c0c2951-0a5e-463f-abd3-d315e63a62b2",
|
|
4
|
+
"name": "Quick Mart Urgent Care",
|
|
5
|
+
"state": {
|
|
6
|
+
"code": "MD",
|
|
7
|
+
"label": "Maryland",
|
|
8
|
+
"type": "state"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "2c0c2951-0a5e-463f-abd3-d315e63a62b3",
|
|
13
|
+
"name": "Quick Mart Emergency Room",
|
|
14
|
+
"state": {
|
|
15
|
+
"code": "MD",
|
|
16
|
+
"label": "Maryland",
|
|
17
|
+
"type": "state"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "2c0c2951-0a5e-463f-abd3-d315e63a62b4",
|
|
22
|
+
"name": "Quick Mart - Folsom Business Office",
|
|
23
|
+
"state": {
|
|
24
|
+
"code": "CA",
|
|
25
|
+
"label": "California",
|
|
26
|
+
"type": "state"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"code": "AL",
|
|
4
|
+
"label": "Alabama",
|
|
5
|
+
"type": "state"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"code": "AK",
|
|
9
|
+
"label": "Alaska",
|
|
10
|
+
"type": "state"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"code": "AZ",
|
|
14
|
+
"label": "Arizona",
|
|
15
|
+
"type": "state"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"code": "AR",
|
|
19
|
+
"label": "Arkansas",
|
|
20
|
+
"type": "state"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"code": "CA",
|
|
24
|
+
"label": "California",
|
|
25
|
+
"type": "state"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"code": "CO",
|
|
29
|
+
"label": "Colorado",
|
|
30
|
+
"type": "state"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"code": "CT",
|
|
34
|
+
"label": "Connecticut",
|
|
35
|
+
"type": "state"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"code": "DE",
|
|
39
|
+
"label": "Delaware",
|
|
40
|
+
"type": "state"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"code": "FL",
|
|
44
|
+
"label": "Florida",
|
|
45
|
+
"type": "state"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"code": "GA",
|
|
49
|
+
"label": "Georgia",
|
|
50
|
+
"type": "state"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"code": "HI",
|
|
54
|
+
"label": "Hawaii",
|
|
55
|
+
"type": "state"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"code": "ID",
|
|
59
|
+
"label": "Idaho",
|
|
60
|
+
"type": "state"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"code": "IL",
|
|
64
|
+
"label": "Illinois",
|
|
65
|
+
"type": "state"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"code": "IN",
|
|
69
|
+
"label": "Indiana",
|
|
70
|
+
"type": "state"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"code": "IA",
|
|
74
|
+
"label": "Iowa",
|
|
75
|
+
"type": "state"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"code": "KS",
|
|
79
|
+
"label": "Kansas",
|
|
80
|
+
"type": "state"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"code": "KY",
|
|
84
|
+
"label": "Kentucky",
|
|
85
|
+
"type": "state"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"code": "LA",
|
|
89
|
+
"label": "Louisiana",
|
|
90
|
+
"type": "state"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"code": "ME",
|
|
94
|
+
"label": "Maine",
|
|
95
|
+
"type": "state"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"code": "MD",
|
|
99
|
+
"label": "Maryland",
|
|
100
|
+
"type": "state"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"code": "MA",
|
|
104
|
+
"label": "Massachusetts",
|
|
105
|
+
"type": "state"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"code": "MI",
|
|
109
|
+
"label": "Michigan",
|
|
110
|
+
"type": "state"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"code": "MN",
|
|
114
|
+
"label": "Minnesota",
|
|
115
|
+
"type": "state"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"code": "MS",
|
|
119
|
+
"label": "Mississippi",
|
|
120
|
+
"type": "state"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"code": "MO",
|
|
124
|
+
"label": "Missouri",
|
|
125
|
+
"type": "state"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"code": "MT",
|
|
129
|
+
"label": "Montana",
|
|
130
|
+
"type": "state"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"code": "NE",
|
|
134
|
+
"label": "Nebraska",
|
|
135
|
+
"type": "state"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"code": "NV",
|
|
139
|
+
"label": "Nevada",
|
|
140
|
+
"type": "state"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"code": "NH",
|
|
144
|
+
"label": "New Hampshire",
|
|
145
|
+
"type": "state"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"code": "NJ",
|
|
149
|
+
"label": "New Jersey",
|
|
150
|
+
"type": "state"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"code": "NM",
|
|
154
|
+
"label": "New Mexico",
|
|
155
|
+
"type": "state"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"code": "NY",
|
|
159
|
+
"label": "New York",
|
|
160
|
+
"type": "state"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"code": "NC",
|
|
164
|
+
"label": "North Carolina",
|
|
165
|
+
"type": "state"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"code": "ND",
|
|
169
|
+
"label": "North Dakota",
|
|
170
|
+
"type": "state"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"code": "OH",
|
|
174
|
+
"label": "Ohio",
|
|
175
|
+
"type": "state"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"code": "OK",
|
|
179
|
+
"label": "Oklahoma",
|
|
180
|
+
"type": "state"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"code": "OR",
|
|
184
|
+
"label": "Oregon",
|
|
185
|
+
"type": "state"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"code": "PA",
|
|
189
|
+
"label": "Pennsylvania",
|
|
190
|
+
"type": "state"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"code": "RI",
|
|
194
|
+
"label": "Rhode Island",
|
|
195
|
+
"type": "state"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"code": "SC",
|
|
199
|
+
"label": "South Carolina",
|
|
200
|
+
"type": "state"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"code": "SD",
|
|
204
|
+
"label": "South Dakota",
|
|
205
|
+
"type": "state"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"code": "TN",
|
|
209
|
+
"label": "Tennessee",
|
|
210
|
+
"type": "state"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"code": "TX",
|
|
214
|
+
"label": "Texas",
|
|
215
|
+
"type": "state"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"code": "UT",
|
|
219
|
+
"label": "Utah",
|
|
220
|
+
"type": "state"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"code": "VT",
|
|
224
|
+
"label": "Vermont",
|
|
225
|
+
"type": "state"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"code": "VA",
|
|
229
|
+
"label": "Virginia",
|
|
230
|
+
"type": "state"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"code": "WA",
|
|
234
|
+
"label": "Washington",
|
|
235
|
+
"type": "state"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"code": "WV",
|
|
239
|
+
"label": "West Virginia",
|
|
240
|
+
"type": "state"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"code": "WI",
|
|
244
|
+
"label": "Wisconsin",
|
|
245
|
+
"type": "state"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"code": "WY",
|
|
249
|
+
"label": "Wyoming",
|
|
250
|
+
"type": "state"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"code": "DC",
|
|
254
|
+
"label": "District of Columbia",
|
|
255
|
+
"type": "state"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"code": "AS",
|
|
259
|
+
"label": "American Samoa",
|
|
260
|
+
"type": "territory"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"code": "GU",
|
|
264
|
+
"label": "Guam",
|
|
265
|
+
"type": "territory"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"code": "MP",
|
|
269
|
+
"label": "Northern Mariana Islands",
|
|
270
|
+
"type": "territory"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"code": "PR",
|
|
274
|
+
"label": "Puerto Rico",
|
|
275
|
+
"type": "territory"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"code": "UM",
|
|
279
|
+
"label": "United states Minor Outlying Islands",
|
|
280
|
+
"type": "territory"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"code": "VI",
|
|
284
|
+
"label": "U.S. Virgin Islands",
|
|
285
|
+
"type": "territory"
|
|
286
|
+
}
|
|
287
|
+
]
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fake
|
|
4
|
+
module LocationsRoutes
|
|
5
|
+
class << self
|
|
6
|
+
def included(base)
|
|
7
|
+
get_routes base
|
|
8
|
+
post_routes base
|
|
9
|
+
put_routes base
|
|
10
|
+
delete_routes base
|
|
11
|
+
|
|
12
|
+
super
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def post_routes(base)
|
|
16
|
+
base.post("/#{base.version}/locations") do
|
|
17
|
+
status 204
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def delete_routes(base)
|
|
22
|
+
base.delete("/#{base.version}/locations/:id") do
|
|
23
|
+
return status(404) if params[:id] == 'not_found'
|
|
24
|
+
|
|
25
|
+
status 204
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def put_routes(base)
|
|
30
|
+
base.put("/#{base.version}/locations/:id") do
|
|
31
|
+
return status(404) if params[:id] == 'not_found'
|
|
32
|
+
|
|
33
|
+
status 204
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def get_routes(base)
|
|
38
|
+
base.get("/#{base.version}/locations") do
|
|
39
|
+
return status(400) if params[:filter] == 'invalid'
|
|
40
|
+
|
|
41
|
+
json_response 200, 'locations/get_locations.json'
|
|
42
|
+
end
|
|
43
|
+
base.get("/#{base.version}/locations/:id") do
|
|
44
|
+
return status(404) if params[:id] == 'not_found'
|
|
45
|
+
|
|
46
|
+
json_response 200, 'locations/get_location.json'
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
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.
|
|
4
|
+
version: 6.10.2
|
|
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-05-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: finapps_core
|
|
@@ -270,6 +270,7 @@ files:
|
|
|
270
270
|
- lib/finapps/rest/documents_upload_types.rb
|
|
271
271
|
- lib/finapps/rest/documents_uploads.rb
|
|
272
272
|
- lib/finapps/rest/esign_templates.rb
|
|
273
|
+
- lib/finapps/rest/locations.rb
|
|
273
274
|
- lib/finapps/rest/operator_change_password_email.rb
|
|
274
275
|
- lib/finapps/rest/operator_login_tokens.rb
|
|
275
276
|
- lib/finapps/rest/operators.rb
|
|
@@ -300,6 +301,7 @@ files:
|
|
|
300
301
|
- lib/finapps/rest/screenings.rb
|
|
301
302
|
- lib/finapps/rest/sessions.rb
|
|
302
303
|
- lib/finapps/rest/signed_documents_downloads.rb
|
|
304
|
+
- lib/finapps/rest/states.rb
|
|
303
305
|
- lib/finapps/rest/tenant_app_settings.rb
|
|
304
306
|
- lib/finapps/rest/tenant_settings.rb
|
|
305
307
|
- lib/finapps/rest/verix/verix_documents.rb
|
|
@@ -321,6 +323,7 @@ files:
|
|
|
321
323
|
- spec/rest/documents_upload_types_spec.rb
|
|
322
324
|
- spec/rest/documents_uploads_spec.rb
|
|
323
325
|
- spec/rest/esign_templates_spec.rb
|
|
326
|
+
- spec/rest/locations_spec.rb
|
|
324
327
|
- spec/rest/operator_change_password_email_spec.rb
|
|
325
328
|
- spec/rest/operators_login_tokens_spec.rb
|
|
326
329
|
- spec/rest/operators_password_resets_spec.rb
|
|
@@ -350,6 +353,7 @@ files:
|
|
|
350
353
|
- spec/rest/screenings_spec.rb
|
|
351
354
|
- spec/rest/sessions_spec.rb
|
|
352
355
|
- spec/rest/signed_documents_downloads_spec.rb
|
|
356
|
+
- spec/rest/states_spec.rb
|
|
353
357
|
- spec/rest/tenant_app_settings_spec.rb
|
|
354
358
|
- spec/rest/tenant_settings_spec.rb
|
|
355
359
|
- spec/rest/verix/verix_documents_spec.rb
|
|
@@ -379,6 +383,8 @@ files:
|
|
|
379
383
|
- spec/support/fixtures/invalid_tenant_credentials.json
|
|
380
384
|
- spec/support/fixtures/invalid_user_id.json
|
|
381
385
|
- spec/support/fixtures/invalid_user_institution_id.json
|
|
386
|
+
- spec/support/fixtures/locations/get_location.json
|
|
387
|
+
- spec/support/fixtures/locations/get_locations.json
|
|
382
388
|
- spec/support/fixtures/mfa_timeout.json
|
|
383
389
|
- spec/support/fixtures/multiple_consumer_subscribe_error.json
|
|
384
390
|
- spec/support/fixtures/operator.json
|
|
@@ -426,6 +432,7 @@ files:
|
|
|
426
432
|
- spec/support/fixtures/sign_url.json
|
|
427
433
|
- spec/support/fixtures/signed_document.pdf
|
|
428
434
|
- spec/support/fixtures/single_consumer_subscribe_error.json
|
|
435
|
+
- spec/support/fixtures/states/get_states.json
|
|
429
436
|
- spec/support/fixtures/tenant_app_settings.json
|
|
430
437
|
- spec/support/fixtures/tenant_settings.json
|
|
431
438
|
- spec/support/fixtures/unauthorized.json
|
|
@@ -439,8 +446,10 @@ files:
|
|
|
439
446
|
- spec/support/fixtures/verix/record/create.json
|
|
440
447
|
- spec/support/fixtures/verix/record/list.json
|
|
441
448
|
- spec/support/routes/actors.rb
|
|
449
|
+
- spec/support/routes/locations.rb
|
|
442
450
|
- spec/support/routes/query_screenings.rb
|
|
443
451
|
- spec/support/routes/screening_metadatas.rb
|
|
452
|
+
- spec/support/routes/states.rb
|
|
444
453
|
- spec/support/screenings_routes.rb
|
|
445
454
|
- spec/utils/query_builder_spec.rb
|
|
446
455
|
- tags
|
|
@@ -469,66 +478,70 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
469
478
|
- !ruby/object:Gem::Version
|
|
470
479
|
version: '0'
|
|
471
480
|
requirements: []
|
|
472
|
-
rubygems_version: 3.1.
|
|
481
|
+
rubygems_version: 3.1.6
|
|
473
482
|
signing_key:
|
|
474
483
|
specification_version: 4
|
|
475
484
|
summary: FinApps REST API ruby client.
|
|
476
485
|
test_files:
|
|
477
|
-
- spec/utils/query_builder_spec.rb
|
|
478
|
-
- spec/support/fake_api.rb
|
|
479
486
|
- spec/support/documents_uploads_routes.rb
|
|
487
|
+
- spec/support/fake_api.rb
|
|
480
488
|
- spec/support/routes/query_screenings.rb
|
|
489
|
+
- spec/support/routes/locations.rb
|
|
490
|
+
- spec/support/routes/states.rb
|
|
481
491
|
- spec/support/routes/actors.rb
|
|
482
492
|
- spec/support/routes/screening_metadatas.rb
|
|
483
493
|
- spec/support/screenings_routes.rb
|
|
484
|
-
- spec/spec_helper.rb
|
|
485
|
-
- spec/rest/documents_orders_notifications_spec.rb
|
|
486
|
-
- spec/rest/operator_change_password_email_spec.rb
|
|
487
494
|
- spec/rest/order_assignments_spec.rb
|
|
488
|
-
- spec/rest/
|
|
489
|
-
- spec/rest/
|
|
490
|
-
- spec/rest/
|
|
491
|
-
- spec/rest/
|
|
492
|
-
- spec/rest/
|
|
493
|
-
- spec/rest/
|
|
494
|
-
- spec/rest/signed_documents_downloads_spec.rb
|
|
495
|
-
- spec/rest/portfolio_reports_spec.rb
|
|
496
|
-
- spec/rest/order_statuses_spec.rb
|
|
497
|
-
- spec/rest/esign_templates_spec.rb
|
|
498
|
-
- spec/rest/order_reports_spec.rb
|
|
499
|
-
- spec/rest/tenant_settings_spec.rb
|
|
500
|
-
- spec/rest/portfolios_alerts_spec.rb
|
|
501
|
-
- spec/rest/orders_spec.rb
|
|
502
|
-
- spec/rest/consumer_login_tokens_spec.rb
|
|
495
|
+
- spec/rest/query/base_spec.rb
|
|
496
|
+
- spec/rest/query/screenings_spec.rb
|
|
497
|
+
- spec/rest/alert_occurrences_spec.rb
|
|
498
|
+
- spec/rest/operator_change_password_email_spec.rb
|
|
499
|
+
- spec/rest/consumers_spec.rb
|
|
500
|
+
- spec/rest/documents_uploads_spec.rb
|
|
503
501
|
- spec/rest/operators_spec.rb
|
|
504
|
-
- spec/rest/
|
|
505
|
-
- spec/rest/
|
|
506
|
-
- spec/rest/
|
|
507
|
-
- spec/rest/plaid/plaid_webhooks_spec.rb
|
|
502
|
+
- spec/rest/portfolios_spec.rb
|
|
503
|
+
- spec/rest/alert_definitions_spec.rb
|
|
504
|
+
- spec/rest/consumers_portfolios_spec.rb
|
|
508
505
|
- spec/rest/plaid/plaid_institution_logos_spec.rb
|
|
509
506
|
- spec/rest/plaid/plaid_consumer_institutions_spec.rb
|
|
507
|
+
- spec/rest/plaid/plaid_account_permissions_spec.rb
|
|
508
|
+
- spec/rest/plaid/plaid_accounts_spec.rb
|
|
509
|
+
- spec/rest/plaid/plaid_webhooks_spec.rb
|
|
510
|
+
- spec/rest/actors_spec.rb
|
|
511
|
+
- spec/rest/client_spec.rb
|
|
512
|
+
- spec/rest/signed_documents_downloads_spec.rb
|
|
510
513
|
- spec/rest/tenant_app_settings_spec.rb
|
|
511
|
-
- spec/rest/
|
|
514
|
+
- spec/rest/operators_login_tokens_spec.rb
|
|
512
515
|
- spec/rest/order_tokens_spec.rb
|
|
513
|
-
- spec/rest/
|
|
516
|
+
- spec/rest/consumer_login_tokens_spec.rb
|
|
517
|
+
- spec/rest/products_spec.rb
|
|
518
|
+
- spec/rest/password_resets_spec.rb
|
|
514
519
|
- spec/rest/documents_upload_types_spec.rb
|
|
515
|
-
- spec/rest/
|
|
516
|
-
- spec/rest/
|
|
517
|
-
- spec/rest/
|
|
518
|
-
- spec/rest/portfolios_available_consumers_spec.rb
|
|
519
|
-
- spec/rest/screening_metadatas_spec.rb
|
|
520
|
-
- spec/rest/client_spec.rb
|
|
521
|
-
- spec/rest/screenings_spec.rb
|
|
522
|
-
- spec/rest/sessions_spec.rb
|
|
523
|
-
- spec/rest/query/screenings_spec.rb
|
|
524
|
-
- spec/rest/query/base_spec.rb
|
|
520
|
+
- spec/rest/tenant_settings_spec.rb
|
|
521
|
+
- spec/rest/order_reports_spec.rb
|
|
522
|
+
- spec/rest/locations_spec.rb
|
|
525
523
|
- spec/rest/operators_password_resets_spec.rb
|
|
526
|
-
- spec/rest/
|
|
527
|
-
- spec/rest/
|
|
528
|
-
- spec/rest/
|
|
529
|
-
- spec/rest/
|
|
530
|
-
- spec/rest/
|
|
531
|
-
- spec/rest/portfolios_consumers_spec.rb
|
|
524
|
+
- spec/rest/sessions_spec.rb
|
|
525
|
+
- spec/rest/portfolios_alerts_spec.rb
|
|
526
|
+
- spec/rest/esign_templates_spec.rb
|
|
527
|
+
- spec/rest/portfolios_available_consumers_spec.rb
|
|
528
|
+
- spec/rest/portfolio_reports_spec.rb
|
|
532
529
|
- spec/rest/version_spec.rb
|
|
533
|
-
- spec/
|
|
530
|
+
- spec/rest/verix/verix_documents_spec.rb
|
|
531
|
+
- spec/rest/verix/verix_pdf_documents_spec.rb
|
|
532
|
+
- spec/rest/verix/verix_records_spec.rb
|
|
533
|
+
- spec/rest/verix/verix_metadata_spec.rb
|
|
534
|
+
- spec/rest/portfolios_consumers_spec.rb
|
|
535
|
+
- spec/rest/screenings_spec.rb
|
|
536
|
+
- spec/rest/screening_metadatas_spec.rb
|
|
537
|
+
- spec/rest/states_spec.rb
|
|
538
|
+
- spec/rest/documents_orders_notifications_spec.rb
|
|
539
|
+
- spec/rest/order_refreshes_spec.rb
|
|
540
|
+
- spec/rest/order_statuses_spec.rb
|
|
541
|
+
- spec/rest/orders_spec.rb
|
|
542
|
+
- spec/rest/documents_orders_spec.rb
|
|
543
|
+
- spec/rest/order_notifications_spec.rb
|
|
544
|
+
- spec/utils/query_builder_spec.rb
|
|
534
545
|
- spec/spec_helpers/client.rb
|
|
546
|
+
- spec/spec_helpers/api_request.rb
|
|
547
|
+
- spec/spec_helper.rb
|