finapps 6.13.0 → 6.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/verify-pr-labeled.yml +1 -1
- data/.rubocop.yml +1 -1
- data/lib/finapps/rest/documents_uploads.rb +1 -1
- data/lib/finapps/rest/edm_transmissions.rb +7 -0
- data/lib/finapps/rest/signed_documents_downloads.rb +1 -1
- data/lib/finapps/version.rb +1 -1
- data/spec/rest/consumers_spec.rb +14 -14
- data/spec/rest/documents_orders_spec.rb +15 -15
- data/spec/rest/edm_transmissions_spec.rb +9 -0
- data/spec/rest/operators_spec.rb +2 -2
- data/spec/rest/orders_spec.rb +22 -22
- data/spec/support/fixtures/edm_transmissions/show_by_order.json +20 -0
- data/spec/support/routes/edm_transmissions.rb +3 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b5ee328bf6ddb3cd7701096b62c41b1a0fb690af5a022ff5db7d92548f319f1
|
4
|
+
data.tar.gz: 0b823c3b3df60dc4ecc399c7c5d9071d5866095074dc85125e593f5c8a575679
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cb7810fbf1ca88917776cad3248e695c24291ba2615ab1fe794a21d967e8c08e4de8df46c65294654941561ecc7e20916e413b8518333974443a138159ec5f4
|
7
|
+
data.tar.gz: 5a4518232564c587b524110b667b4da0966361b6eac9f1863695e71c31e7acb84d7b80e88eb67b8835e5a8ab84546a9d9cb152eacc3a10f105a2a1f2929427cd
|
data/.rubocop.yml
CHANGED
@@ -16,6 +16,13 @@ module FinApps
|
|
16
16
|
path = "documents/edm/#{ERB::Util.url_encode(transmission_id)}"
|
17
17
|
super transmission_id, path
|
18
18
|
end
|
19
|
+
|
20
|
+
def show_by_order(order_id)
|
21
|
+
not_blank(order_id, :order_id)
|
22
|
+
|
23
|
+
path = "documents/edm/#{ERB::Util.url_encode(order_id)}/status"
|
24
|
+
send_request_for_id path, :get, order_id
|
25
|
+
end
|
19
26
|
end
|
20
27
|
end
|
21
28
|
end
|
@@ -8,7 +8,7 @@ module FinApps
|
|
8
8
|
not_blank(signature_request_id, :signature_request_id)
|
9
9
|
|
10
10
|
path =
|
11
|
-
"consumers/#{ERB::Util.url_encode(consumer_id)}/"\
|
11
|
+
"consumers/#{ERB::Util.url_encode(consumer_id)}/" \
|
12
12
|
"documents/#{ERB::Util.url_encode(signature_request_id)}"
|
13
13
|
super(nil, path)
|
14
14
|
end
|
data/lib/finapps/version.rb
CHANGED
data/spec/rest/consumers_spec.rb
CHANGED
@@ -118,11 +118,11 @@ RSpec.describe FinApps::REST::Consumers do
|
|
118
118
|
|
119
119
|
it 'builds query and sends proper request' do
|
120
120
|
list
|
121
|
-
filter = '{"$or":['\
|
122
|
-
'{"external_id":"term"},'\
|
123
|
-
'{"email":"term"},'\
|
124
|
-
'{"first_name":"term"},'\
|
125
|
-
'{"last_name":"term"}'\
|
121
|
+
filter = '{"$or":[' \
|
122
|
+
'{"external_id":"term"},' \
|
123
|
+
'{"email":"term"},' \
|
124
|
+
'{"first_name":"term"},' \
|
125
|
+
'{"last_name":"term"}' \
|
126
126
|
']}'
|
127
127
|
query = "?filter=#{filter}&page=2&requested=25&sort=date_created"
|
128
128
|
url = "#{versioned_api_path}/consumers#{query}"
|
@@ -141,15 +141,15 @@ RSpec.describe FinApps::REST::Consumers do
|
|
141
141
|
|
142
142
|
it 'treats space as start of a new query for first and last name' do
|
143
143
|
list
|
144
|
-
filter = '{"$or":['\
|
145
|
-
'{"external_id":"Two terms"},'\
|
146
|
-
'{"email":"Two terms"},'\
|
147
|
-
'{"first_name":"Two terms"},'\
|
148
|
-
'{"last_name":"Two terms"},'\
|
149
|
-
'{"first_name":"Two"},'\
|
150
|
-
'{"last_name":"Two"},'\
|
151
|
-
'{"first_name":"terms"},'\
|
152
|
-
'{"last_name":"terms"}'\
|
144
|
+
filter = '{"$or":[' \
|
145
|
+
'{"external_id":"Two terms"},' \
|
146
|
+
'{"email":"Two terms"},' \
|
147
|
+
'{"first_name":"Two terms"},' \
|
148
|
+
'{"last_name":"Two terms"},' \
|
149
|
+
'{"first_name":"Two"},' \
|
150
|
+
'{"last_name":"Two"},' \
|
151
|
+
'{"first_name":"terms"},' \
|
152
|
+
'{"last_name":"terms"}' \
|
153
153
|
']}'
|
154
154
|
query = "?filter=#{filter}&page=2&requested=25&sort=date_created"
|
155
155
|
url = "#{versioned_api_path}/consumers#{query}"
|
@@ -49,12 +49,12 @@ RSpec.describe FinApps::REST::DocumentsOrders do
|
|
49
49
|
it 'builds query and sends proper request' do
|
50
50
|
list
|
51
51
|
url =
|
52
|
-
"#{versioned_api_path}/documents/orders?"\
|
53
|
-
'filter=%7B%22$or%22:%5B%7B%22applicant.email%22:'\
|
54
|
-
'%22term%22%7D,%7B%22applicant.first_name%22:%22term%22%7D,'\
|
55
|
-
'%7B%22applicant.last_name%22:%22term%22%7D,'\
|
56
|
-
'%7B%22applicant.external_id%22:%22term%22%7D,%7B%22reference_no%22:'\
|
57
|
-
'%7B%22$regex%22:%22%5Eterm%22,%22$options%22:%22i%22%7D%7D%5D,'\
|
52
|
+
"#{versioned_api_path}/documents/orders?" \
|
53
|
+
'filter=%7B%22$or%22:%5B%7B%22applicant.email%22:' \
|
54
|
+
'%22term%22%7D,%7B%22applicant.first_name%22:%22term%22%7D,' \
|
55
|
+
'%7B%22applicant.last_name%22:%22term%22%7D,' \
|
56
|
+
'%7B%22applicant.external_id%22:%22term%22%7D,%7B%22reference_no%22:' \
|
57
|
+
'%7B%22$regex%22:%22%5Eterm%22,%22$options%22:%22i%22%7D%7D%5D,' \
|
58
58
|
'%22consumer_id%22:%22valid_consumer_id%22%7D&page=2&requested=25&sort=tag'
|
59
59
|
|
60
60
|
expect(WebMock).to have_requested(:get, url)
|
@@ -66,15 +66,15 @@ RSpec.describe FinApps::REST::DocumentsOrders do
|
|
66
66
|
it 'builds query and sends proper request' do
|
67
67
|
list
|
68
68
|
url =
|
69
|
-
"#{versioned_api_path}/documents/orders?"\
|
70
|
-
'filter=%7B%22$or%22:%5B%7B%22applicant.email%22:'\
|
71
|
-
'%22Blue%20Jay%22%7D,%7B%22applicant.first_name%22:'\
|
72
|
-
'%22Blue%20Jay%22%7D,%7B%22applicant.last_name%22:'\
|
73
|
-
'%22Blue%20Jay%22%7D,%7B%22applicant.external_id%22:'\
|
74
|
-
'%22Blue%20Jay%22%7D,%7B%22reference_no%22:%7B%22$regex%22:'\
|
75
|
-
'%22%5EBlue%20Jay%22,%22$options%22:%22i%22%7D%7D,'\
|
76
|
-
'%7B%22applicant.first_name%22:%22Blue%22%7D,%7B%22'\
|
77
|
-
'applicant.last_name%22:%22Blue%22%7D,%7B%22applicant.first_name%22:'\
|
69
|
+
"#{versioned_api_path}/documents/orders?" \
|
70
|
+
'filter=%7B%22$or%22:%5B%7B%22applicant.email%22:' \
|
71
|
+
'%22Blue%20Jay%22%7D,%7B%22applicant.first_name%22:' \
|
72
|
+
'%22Blue%20Jay%22%7D,%7B%22applicant.last_name%22:' \
|
73
|
+
'%22Blue%20Jay%22%7D,%7B%22applicant.external_id%22:' \
|
74
|
+
'%22Blue%20Jay%22%7D,%7B%22reference_no%22:%7B%22$regex%22:' \
|
75
|
+
'%22%5EBlue%20Jay%22,%22$options%22:%22i%22%7D%7D,' \
|
76
|
+
'%7B%22applicant.first_name%22:%22Blue%22%7D,%7B%22' \
|
77
|
+
'applicant.last_name%22:%22Blue%22%7D,%7B%22applicant.first_name%22:' \
|
78
78
|
'%22Jay%22%7D,%7B%22applicant.last_name%22:%22Jay%22%7D%5D%7D&page=2'
|
79
79
|
|
80
80
|
expect(WebMock).to have_requested(:get, url)
|
@@ -27,4 +27,13 @@ RSpec.describe FinApps::REST::EdmTransmissions do
|
|
27
27
|
|
28
28
|
it_behaves_like 'an EdmTransmission response'
|
29
29
|
end
|
30
|
+
|
31
|
+
describe '#show_by_order' do
|
32
|
+
subject(:show) { described_class.new(client).show_by_order(:order_id) }
|
33
|
+
|
34
|
+
it_behaves_like 'an API request'
|
35
|
+
it_behaves_like 'a successful request'
|
36
|
+
|
37
|
+
it_behaves_like 'an EdmTransmission response'
|
38
|
+
end
|
30
39
|
end
|
data/spec/rest/operators_spec.rb
CHANGED
@@ -75,8 +75,8 @@ RSpec.describe FinApps::REST::Operators do
|
|
75
75
|
list
|
76
76
|
|
77
77
|
filter = {'$or': [{last_name: 't'}], role: {'$in': [2]}}
|
78
|
-
expect(WebMock).to have_requested(:get, "#{versioned_api_path}/operators"\
|
79
|
-
"?filter=#{ERB::Util.url_encode filter.to_json}"\
|
78
|
+
expect(WebMock).to have_requested(:get, "#{versioned_api_path}/operators" \
|
79
|
+
"?filter=#{ERB::Util.url_encode filter.to_json}" \
|
80
80
|
'&page=2&requested=25&sort=date_created')
|
81
81
|
end
|
82
82
|
end
|
data/spec/rest/orders_spec.rb
CHANGED
@@ -132,13 +132,13 @@ RSpec.describe FinApps::REST::Orders do
|
|
132
132
|
|
133
133
|
it 'builds query and sends proper request' do
|
134
134
|
list
|
135
|
-
url = "#{versioned_api_path}/orders?"\
|
136
|
-
'filter=%7B%22$or%22:%5B%7B%22public_id%22:%7B%22$regex%22:%22%5E'\
|
137
|
-
'term%22,%22$options%22:%22i%22%7D%7D,%7B%22assignment.last_name%22:%22'\
|
138
|
-
'term%22%7D,%7B%22applicant.first_name%22:%22term%22%7D,%7B%22'\
|
139
|
-
'applicant.last_name%22:%22term%22%7D,%7B%22requestor.reference_no'\
|
140
|
-
'%22:%7B%22$regex%22:%22%5Eterm%22,%22$options%22:%22i%22%7D%7D%5D,%22'\
|
141
|
-
'status%22:%7B%22$in%22:%5B1,7%5D%7D,%22assignment.operator_id%22:%22'\
|
135
|
+
url = "#{versioned_api_path}/orders?" \
|
136
|
+
'filter=%7B%22$or%22:%5B%7B%22public_id%22:%7B%22$regex%22:%22%5E' \
|
137
|
+
'term%22,%22$options%22:%22i%22%7D%7D,%7B%22assignment.last_name%22:%22' \
|
138
|
+
'term%22%7D,%7B%22applicant.first_name%22:%22term%22%7D,%7B%22' \
|
139
|
+
'applicant.last_name%22:%22term%22%7D,%7B%22requestor.reference_no' \
|
140
|
+
'%22:%7B%22$regex%22:%22%5Eterm%22,%22$options%22:%22i%22%7D%7D%5D,%22' \
|
141
|
+
'status%22:%7B%22$in%22:%5B1,7%5D%7D,%22assignment.operator_id%22:%22' \
|
142
142
|
'valid_operator%22,%22consumer_id%22:%22valid_consumer_id%22%7D&page=2&requested=25&sort=status'
|
143
143
|
expect(WebMock).to have_requested(:get, url)
|
144
144
|
end
|
@@ -146,12 +146,12 @@ RSpec.describe FinApps::REST::Orders do
|
|
146
146
|
it 'builds query and sends proper request with searchTerm/relation exclusivity' do
|
147
147
|
params[:searchTerm] = nil
|
148
148
|
list
|
149
|
-
url = "#{versioned_api_path}/orders?"\
|
149
|
+
url = "#{versioned_api_path}/orders?" \
|
150
150
|
'filter=%7B%22status%22:%7B%22$in%22:%5B1,7%5D%7D,' \
|
151
|
-
'%22assignment.operator_id%22:%22valid_operator%22,'\
|
151
|
+
'%22assignment.operator_id%22:%22valid_operator%22,' \
|
152
152
|
'%22consumer_id%22:%22valid_consumer_id%22,' \
|
153
|
-
'%22$or%22:%5B%7B%22public_id%22:%7B%22$in%22:%5B%22valid_order_id%22%5D%7D%7D,'\
|
154
|
-
'%7B%22original_order_id%22:%7B%22$in%22:%5B%22valid_order_id%22%5D%7D%7D%5D%7D&'\
|
153
|
+
'%22$or%22:%5B%7B%22public_id%22:%7B%22$in%22:%5B%22valid_order_id%22%5D%7D%7D,' \
|
154
|
+
'%7B%22original_order_id%22:%7B%22$in%22:%5B%22valid_order_id%22%5D%7D%7D%5D%7D&' \
|
155
155
|
'page=2&requested=25&sort=status'
|
156
156
|
expect(WebMock).to have_requested(:get, url)
|
157
157
|
end
|
@@ -159,16 +159,16 @@ RSpec.describe FinApps::REST::Orders do
|
|
159
159
|
it 'handles space in search term for consumer' do
|
160
160
|
params[:searchTerm] = 'Spacing Out'
|
161
161
|
list
|
162
|
-
url = "#{versioned_api_path}/orders?"\
|
163
|
-
'filter=%7B%22$or%22:%5B%7B%22public_id%22:%7B%22$regex%22:%22%5E'\
|
164
|
-
'Spacing%20Out%22,%22$options%22:%22i%22%7D%7D,%7B%22assignment.last_name'\
|
165
|
-
'%22:%22Spacing%20Out%22%7D,%7B%22applicant.first_name%22:%22'\
|
166
|
-
'Spacing%20Out%22%7D,%7B%22applicant.last_name%22:%22Spacing%20Out'\
|
167
|
-
'%22%7D,%7B%22requestor.reference_no%22:%7B%22$regex%22:%22%5ESpacing%20Out'\
|
168
|
-
'%22,%22$options%22:%22i%22%7D%7D,%7B%22applicant.first_name%22:%22Spacing'\
|
169
|
-
'%22%7D,%7B%22applicant.last_name%22:%22Spacing%22%7D,%7B%22applicant.first_name'\
|
170
|
-
'%22:%22Out%22%7D,%7B%22applicant.last_name%22:%22Out%22%7D%5D,%22status'\
|
171
|
-
'%22:%7B%22$in%22:%5B1,7%5D%7D,%22assignment.operator_id%22:%22valid_operator'\
|
162
|
+
url = "#{versioned_api_path}/orders?" \
|
163
|
+
'filter=%7B%22$or%22:%5B%7B%22public_id%22:%7B%22$regex%22:%22%5E' \
|
164
|
+
'Spacing%20Out%22,%22$options%22:%22i%22%7D%7D,%7B%22assignment.last_name' \
|
165
|
+
'%22:%22Spacing%20Out%22%7D,%7B%22applicant.first_name%22:%22' \
|
166
|
+
'Spacing%20Out%22%7D,%7B%22applicant.last_name%22:%22Spacing%20Out' \
|
167
|
+
'%22%7D,%7B%22requestor.reference_no%22:%7B%22$regex%22:%22%5ESpacing%20Out' \
|
168
|
+
'%22,%22$options%22:%22i%22%7D%7D,%7B%22applicant.first_name%22:%22Spacing' \
|
169
|
+
'%22%7D,%7B%22applicant.last_name%22:%22Spacing%22%7D,%7B%22applicant.first_name' \
|
170
|
+
'%22:%22Out%22%7D,%7B%22applicant.last_name%22:%22Out%22%7D%5D,%22status' \
|
171
|
+
'%22:%7B%22$in%22:%5B1,7%5D%7D,%22assignment.operator_id%22:%22valid_operator' \
|
172
172
|
'%22,%22consumer_id%22:%22valid_consumer_id%22%7D&page=2&requested=25&sort=status'
|
173
173
|
expect(WebMock).to have_requested(:get, url)
|
174
174
|
end
|
@@ -176,7 +176,7 @@ RSpec.describe FinApps::REST::Orders do
|
|
176
176
|
it 'builds null assignment query properly when supplied w/ empty string' do
|
177
177
|
described_class.new(client).list(assignment: '')
|
178
178
|
|
179
|
-
url = "#{versioned_api_path}/orders?"\
|
179
|
+
url = "#{versioned_api_path}/orders?" \
|
180
180
|
'filter=%7B%22assignment.operator_id%22:null%7D'
|
181
181
|
expect(WebMock).to have_requested(:get, url)
|
182
182
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"date_created": "2022-08-04T19:52:32Z",
|
3
|
+
"date_modified": "2022-08-04T19:52:32Z",
|
4
|
+
"document_order_id": "0c272b3d-3c8c-43ab-beff-f5964835a591",
|
5
|
+
"documents": [
|
6
|
+
{
|
7
|
+
"date_modified": "2022-08-04T19:52:32Z",
|
8
|
+
"document_id": "string",
|
9
|
+
"edm_filename": "string",
|
10
|
+
"file_id": "string",
|
11
|
+
"path": "string",
|
12
|
+
"status": 1,
|
13
|
+
"template_data": {
|
14
|
+
"external_id": "28489213"
|
15
|
+
}
|
16
|
+
}
|
17
|
+
],
|
18
|
+
"status": 1,
|
19
|
+
"transmission_id": "7829e171-4d39-4270-8969-7729038953d2"
|
20
|
+
}
|
@@ -14,6 +14,9 @@ module Fake
|
|
14
14
|
base.get("/#{base.version}/documents/edm/:transmission_id") do
|
15
15
|
json_response 200, 'edm_transmissions/show.json'
|
16
16
|
end
|
17
|
+
base.get("/#{base.version}/documents/edm/:order_id/status") do
|
18
|
+
json_response 200, 'edm_transmissions/show_by_order.json'
|
19
|
+
end
|
17
20
|
end
|
18
21
|
|
19
22
|
def post_routes(base)
|
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.13.
|
4
|
+
version: 6.13.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-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: finapps_core
|
@@ -381,6 +381,7 @@ files:
|
|
381
381
|
- spec/support/fixtures/documents_orders_none.json
|
382
382
|
- spec/support/fixtures/edm_transmissions/create.json
|
383
383
|
- spec/support/fixtures/edm_transmissions/show.json
|
384
|
+
- spec/support/fixtures/edm_transmissions/show_by_order.json
|
384
385
|
- spec/support/fixtures/error.json
|
385
386
|
- spec/support/fixtures/esign_templates.json
|
386
387
|
- spec/support/fixtures/invalid_order_id.json
|