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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d750e401b5d936b5b67144236c47a9969d1007e2777232171b4831b4bebe2b08
4
- data.tar.gz: 3120e93e8acbd4a3b40e946788ab93e86ce064e9530c378d6cf49a91c8826461
3
+ metadata.gz: 9b5ee328bf6ddb3cd7701096b62c41b1a0fb690af5a022ff5db7d92548f319f1
4
+ data.tar.gz: 0b823c3b3df60dc4ecc399c7c5d9071d5866095074dc85125e593f5c8a575679
5
5
  SHA512:
6
- metadata.gz: 800464206ab8c445fa2fe12c7bd2c2a12d74a7fbc8cf384a0fc0573807deb3d4c70115f4eb0f6f930f66cb3c0f777251510903859885c6087cc46cae7501dd59
7
- data.tar.gz: de98785d634e7846cc32dc1fa36f5fdca31443cb379b8cc09d15c780e7a53a8dab9e84ebc0cd7a8458a8afac43cc0309d8c89e3d275d1401efd61298d100e1eb
6
+ metadata.gz: 5cb7810fbf1ca88917776cad3248e695c24291ba2615ab1fe794a21d967e8c08e4de8df46c65294654941561ecc7e20916e413b8518333974443a138159ec5f4
7
+ data.tar.gz: 5a4518232564c587b524110b667b4da0966361b6eac9f1863695e71c31e7acb84d7b80e88eb67b8835e5a8ab84546a9d9cb152eacc3a10f105a2a1f2929427cd
@@ -7,7 +7,7 @@ jobs:
7
7
  label:
8
8
  runs-on: ubuntu-latest
9
9
  steps:
10
- - uses: mheap/github-action-required-labels@v1.2
10
+ - uses: mheap/github-action-required-labels@v2.1
11
11
  with:
12
12
  mode: minimum
13
13
  count: 1
data/.rubocop.yml CHANGED
@@ -52,7 +52,7 @@ Metrics/ClassLength:
52
52
  - app/models/order.rb
53
53
  - spec/support/fake_api.rb
54
54
  Metrics/BlockLength:
55
- IgnoredMethods: ['describe', 'context']
55
+ AllowedMethods: ['describe', 'context']
56
56
  Exclude:
57
57
  - config/environments/**/**
58
58
  - Guardfile
@@ -8,7 +8,7 @@ module FinApps
8
8
  not_blank(doc_id, :doc_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(doc_id)}?thumbnail=#{thumbnail}"
13
13
  super(nil, path)
14
14
  end
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinApps
4
- VERSION = '6.13.0'
4
+ VERSION = '6.13.1'
5
5
  end
@@ -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
@@ -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
@@ -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.0
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-06-20 00:00:00.000000000 Z
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