finapps 5.0.29 → 5.0.30
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/.codeclimate.yml +2 -1
- data/RELEASES.md +13 -0
- data/lib/finapps.rb +2 -0
- data/lib/finapps/rest/client.rb +2 -0
- data/lib/finapps/rest/documents_orders.rb +2 -1
- data/lib/finapps/rest/documents_orders_notifications.rb +14 -0
- data/lib/finapps/rest/signed_documents_downloads.rb +15 -0
- data/lib/finapps/version.rb +1 -1
- data/spec/rest/documents_orders_notifications_spec.rb +40 -0
- data/spec/rest/documents_orders_spec.rb +5 -4
- data/spec/rest/signed_documents_downloads_spec.rb +35 -0
- data/spec/support/fake_api.rb +11 -0
- data/spec/support/fixtures/signed_document.pdf +0 -0
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c74f2340d52ad3cd13dc2bdf8415e7cf89e48f0993dbb346456546910a69ba9
|
4
|
+
data.tar.gz: 3bdefc2032a2efa241d5cc72ab5d6b74fc44b568599f0054bf5477e473fab81f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cb6732ca1b8ba09cc84920ec7fdd086259cd339f012f72cf19c30387f877f3af1aa495bea47f019ee638e9a32eb3f76bbd0397e89b6e773e108da98e9bc8300
|
7
|
+
data.tar.gz: 5dedcdb78fa82b22011520031aae7aa55b1c6e35a7f5ccd55e16fdaa1c6d3b19bd4d17e300a00849d1768be6528b2396adff43ef96b6c6f060740af4315c857f
|
data/.codeclimate.yml
CHANGED
data/RELEASES.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## [5.0.30] - 2020-05-28
|
2
|
+
|
3
|
+
### Added
|
4
|
+
* New esign endpoints ([#222][i222])
|
5
|
+
|
6
|
+
### Changed
|
7
|
+
* Search query for documents orders ([#221][i221])
|
8
|
+
|
9
|
+
[i221]: https://github.com/finapps/ruby-client/issues/221
|
10
|
+
[i222]: https://github.com/finapps/ruby-client/issues/222
|
11
|
+
|
12
|
+
[5.0.30]: https://github.com/finapps/ruby-client/compare/5.0.29...5.0.30
|
13
|
+
|
1
14
|
## [5.0.29] - 2020-05-08
|
2
15
|
|
3
16
|
### Added
|
data/lib/finapps.rb
CHANGED
@@ -31,6 +31,8 @@ require 'finapps/rest/consumers_portfolios'
|
|
31
31
|
require 'finapps/rest/portfolio_reports'
|
32
32
|
require 'finapps/rest/documents_orders'
|
33
33
|
require 'finapps/rest/esign_templates'
|
34
|
+
require 'finapps/rest/signed_documents_downloads'
|
35
|
+
require 'finapps/rest/documents_orders_notifications'
|
34
36
|
|
35
37
|
require 'finapps/rest/plaid/plaid_resources'
|
36
38
|
require 'finapps/rest/plaid/plaid_webhooks'
|
data/lib/finapps/rest/client.rb
CHANGED
@@ -12,6 +12,7 @@ module FinApps
|
|
12
12
|
consumers
|
13
13
|
consumers_portfolios
|
14
14
|
documents_orders
|
15
|
+
documents_orders_notifications
|
15
16
|
esign_templates
|
16
17
|
orders
|
17
18
|
order_assignments
|
@@ -35,6 +36,7 @@ module FinApps
|
|
35
36
|
portfolio_reports
|
36
37
|
products
|
37
38
|
sessions
|
39
|
+
signed_documents_downloads
|
38
40
|
tenant_settings
|
39
41
|
tenant_app_settings
|
40
42
|
verix_metadata
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FinApps
|
4
|
+
module REST
|
5
|
+
class DocumentsOrdersNotifications < FinAppsCore::REST::Resources
|
6
|
+
def create(id)
|
7
|
+
not_blank(id, :id)
|
8
|
+
|
9
|
+
path = "documents/orders/#{ERB::Util.url_encode(id)}/notify"
|
10
|
+
super nil, path
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FinApps
|
4
|
+
module REST
|
5
|
+
class SignedDocumentsDownloads < FinAppsCore::REST::Resources
|
6
|
+
def show(consumer_id, signature_request_id)
|
7
|
+
not_blank(consumer_id, :consumer_id)
|
8
|
+
not_blank(signature_request_id, :signature_request_id)
|
9
|
+
path =
|
10
|
+
"consumers/#{ERB::Util.url_encode(consumer_id)}/documents/#{ERB::Util.url_encode(signature_request_id)}"
|
11
|
+
super(nil, path)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/finapps/version.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helpers/client'
|
4
|
+
|
5
|
+
RSpec.describe FinApps::REST::DocumentsOrdersNotifications do
|
6
|
+
include SpecHelpers::Client
|
7
|
+
|
8
|
+
describe '#create' do
|
9
|
+
subject(:notifications) { FinApps::REST::DocumentsOrdersNotifications.new(client) }
|
10
|
+
|
11
|
+
context 'when missing id' do
|
12
|
+
let(:create) { subject.create(nil) }
|
13
|
+
it('returns missing argument error') do
|
14
|
+
expect { create }.to raise_error(FinAppsCore::MissingArgumentsError)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'when invalid id is provided' do
|
19
|
+
let(:create) { subject.create(:invalid_id) }
|
20
|
+
let(:results) { create[RESULTS] }
|
21
|
+
let(:error_messages) { create[ERROR_MESSAGES] }
|
22
|
+
|
23
|
+
it { expect { create }.not_to raise_error }
|
24
|
+
it('results is nil') { expect(results).to be_nil }
|
25
|
+
it('error messages array is populated') do
|
26
|
+
expect(error_messages.first.downcase).to eq('order id is invalid')
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'for valid id' do
|
31
|
+
let(:create) { subject.create(:valid_id) }
|
32
|
+
let(:results) { create[RESULTS] }
|
33
|
+
let(:error_messages) { create[ERROR_MESSAGES] }
|
34
|
+
|
35
|
+
it { expect { create }.not_to raise_error }
|
36
|
+
it('results is nil') { expect(results).to be_nil }
|
37
|
+
it('error_messages array is empty') { expect(error_messages).to eq([]) }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -53,10 +53,11 @@ RSpec.describe FinApps::REST::DocumentsOrders do
|
|
53
53
|
it 'builds query and sends proper request' do
|
54
54
|
list
|
55
55
|
url =
|
56
|
-
"#{versioned_api_path}/documents/orders?filter=%7B%22$or%22:%5B%7B%
|
57
|
-
'%22%
|
58
|
-
'%7B%22reference_no%22:%7B%22$regex%22:%22%5Eterm%22,%22$options%22:%22i%22%7D%7D%5D,'\
|
59
|
-
'%22consumer_id%22:%22valid_consumer_id%22%7D&page=2&requested=25&sort=tag'
|
56
|
+
"#{versioned_api_path}/documents/orders?filter=%7B%22$or%22:%5B%7B%22applicant.email%22:"\
|
57
|
+
'%22term%22%7D,%7B%22applicant.first_name%22:%22term%22%7D,%7B%22applicant.last_name%22:'\
|
58
|
+
'%22term%22%7D,%7B%22reference_no%22:%7B%22$regex%22:%22%5Eterm%22,%22$options%22:%22i%22%7D%7D%5D,'\
|
59
|
+
'%22consumer_id%22:%22valid_consumer_id%22%7D&page=2&requested=25&sort=tag '
|
60
|
+
|
60
61
|
expect(WebMock).to have_requested(:get, url)
|
61
62
|
end
|
62
63
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helpers/client'
|
4
|
+
require 'rest/api_request'
|
5
|
+
|
6
|
+
RSpec.describe FinApps::REST::SignedDocumentsDownloads do
|
7
|
+
include SpecHelpers::Client
|
8
|
+
|
9
|
+
let(:api_client) { client }
|
10
|
+
let(:document) { FinApps::REST::SignedDocumentsDownloads.new(api_client) }
|
11
|
+
|
12
|
+
describe '#show' do
|
13
|
+
context 'when missing parameters' do
|
14
|
+
subject { document.show(nil, :signature_request_id) }
|
15
|
+
it 'raises an error when missing consumer id' do
|
16
|
+
expect { subject }.to raise_error(FinAppsCore::MissingArgumentsError)
|
17
|
+
end
|
18
|
+
|
19
|
+
subject { document.show(:consumer_id, nil) }
|
20
|
+
it 'raises an error when missing signature request id' do
|
21
|
+
expect { subject }.to raise_error(FinAppsCore::MissingArgumentsError)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
subject(:show) do
|
26
|
+
document.show(
|
27
|
+
:consumer_id,
|
28
|
+
:signature_request_id
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
it_behaves_like 'an API request'
|
33
|
+
it_behaves_like 'a successful request'
|
34
|
+
end
|
35
|
+
end
|
data/spec/support/fake_api.rb
CHANGED
@@ -245,6 +245,17 @@ class FakeApi < Sinatra::Base
|
|
245
245
|
json_response 404, 'invalid_signature_id.json'
|
246
246
|
end
|
247
247
|
|
248
|
+
# documents orders notifications
|
249
|
+
post("/#{version}/documents/orders/valid_id/notify") { status 204 }
|
250
|
+
post("/#{version}/documents/orders/invalid_id/notify") do
|
251
|
+
json_response 400, 'invalid_order_id.json'
|
252
|
+
end
|
253
|
+
|
254
|
+
# signed documents downloads
|
255
|
+
get("/#{version}/consumers/:consumer_id/documents/:signature_request_id") do
|
256
|
+
pdf_response 'signed_document.pdf'
|
257
|
+
end
|
258
|
+
|
248
259
|
# esign_templates
|
249
260
|
get("/#{version}/esign_templates") { json_response 200, 'esign_templates.json' }
|
250
261
|
|
Binary file
|
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: 5.0.
|
4
|
+
version: 5.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Quintero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: finapps_core
|
@@ -303,6 +303,7 @@ files:
|
|
303
303
|
- lib/finapps/rest/consumers.rb
|
304
304
|
- lib/finapps/rest/consumers_portfolios.rb
|
305
305
|
- lib/finapps/rest/documents_orders.rb
|
306
|
+
- lib/finapps/rest/documents_orders_notifications.rb
|
306
307
|
- lib/finapps/rest/esign_templates.rb
|
307
308
|
- lib/finapps/rest/operators.rb
|
308
309
|
- lib/finapps/rest/operators_password_resets.rb
|
@@ -327,6 +328,7 @@ files:
|
|
327
328
|
- lib/finapps/rest/portfolios_consumers.rb
|
328
329
|
- lib/finapps/rest/products.rb
|
329
330
|
- lib/finapps/rest/sessions.rb
|
331
|
+
- lib/finapps/rest/signed_documents_downloads.rb
|
330
332
|
- lib/finapps/rest/tenant_app_settings.rb
|
331
333
|
- lib/finapps/rest/tenant_settings.rb
|
332
334
|
- lib/finapps/rest/verix/verix_documents.rb
|
@@ -343,6 +345,7 @@ files:
|
|
343
345
|
- spec/rest/client_spec.rb
|
344
346
|
- spec/rest/consumers_portfolios_spec.rb
|
345
347
|
- spec/rest/consumers_spec.rb
|
348
|
+
- spec/rest/documents_orders_notifications_spec.rb
|
346
349
|
- spec/rest/documents_orders_spec.rb
|
347
350
|
- spec/rest/esign_templates_spec.rb
|
348
351
|
- spec/rest/operators_password_resets_spec.rb
|
@@ -367,6 +370,7 @@ files:
|
|
367
370
|
- spec/rest/portfolios_spec.rb
|
368
371
|
- spec/rest/products_spec.rb
|
369
372
|
- spec/rest/sessions_spec.rb
|
373
|
+
- spec/rest/signed_documents_downloads_spec.rb
|
370
374
|
- spec/rest/tenant_app_settings_spec.rb
|
371
375
|
- spec/rest/tenant_settings_spec.rb
|
372
376
|
- spec/rest/verix/verix_documents_spec.rb
|
@@ -424,6 +428,7 @@ files:
|
|
424
428
|
- spec/support/fixtures/resource_not_found.json
|
425
429
|
- spec/support/fixtures/resources.json
|
426
430
|
- spec/support/fixtures/sign_url.json
|
431
|
+
- spec/support/fixtures/signed_document.pdf
|
427
432
|
- spec/support/fixtures/single_consumer_subscribe_error.json
|
428
433
|
- spec/support/fixtures/tenant_app_settings.json
|
429
434
|
- spec/support/fixtures/tenant_settings.json
|
@@ -479,6 +484,7 @@ test_files:
|
|
479
484
|
- spec/rest/portfolios_spec.rb
|
480
485
|
- spec/rest/order_statuses_spec.rb
|
481
486
|
- spec/rest/order_notifications_spec.rb
|
487
|
+
- spec/rest/documents_orders_notifications_spec.rb
|
482
488
|
- spec/rest/operators_password_resets_spec.rb
|
483
489
|
- spec/rest/esign_templates_spec.rb
|
484
490
|
- spec/rest/portfolios_consumers_spec.rb
|
@@ -497,6 +503,7 @@ test_files:
|
|
497
503
|
- spec/rest/verix/verix_records_spec.rb
|
498
504
|
- spec/rest/verix/verix_documents_spec.rb
|
499
505
|
- spec/rest/verix/verix_pdf_documents_spec.rb
|
506
|
+
- spec/rest/signed_documents_downloads_spec.rb
|
500
507
|
- spec/rest/password_resets_spec.rb
|
501
508
|
- spec/rest/portfolio_reports_spec.rb
|
502
509
|
- spec/rest/plaid/plaid_webhooks_spec.rb
|