finapps 6.10.2 → 6.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/finapps.gemspec +0 -1
- data/lib/finapps/rest/client.rb +2 -1
- data/lib/finapps/rest/edm_transmissions.rb +21 -0
- data/lib/finapps/rest/query/users.rb +10 -0
- data/lib/finapps/version.rb +1 -1
- data/lib/finapps.rb +2 -0
- data/spec/rest/edm_transmissions_spec.rb +30 -0
- data/spec/rest/query/users_spec.rb +23 -0
- data/spec/support/fake_api.rb +4 -0
- data/spec/support/fixtures/edm_transmissions/create.json +17 -0
- data/spec/support/fixtures/edm_transmissions/show.json +17 -0
- data/spec/support/fixtures/query/users.json +21 -0
- data/spec/support/routes/edm_transmissions.rb +26 -0
- data/spec/support/routes/query_users.rb +14 -0
- metadata +12 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d750e401b5d936b5b67144236c47a9969d1007e2777232171b4831b4bebe2b08
|
4
|
+
data.tar.gz: 3120e93e8acbd4a3b40e946788ab93e86ce064e9530c378d6cf49a91c8826461
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 800464206ab8c445fa2fe12c7bd2c2a12d74a7fbc8cf384a0fc0573807deb3d4c70115f4eb0f6f930f66cb3c0f777251510903859885c6087cc46cae7501dd59
|
7
|
+
data.tar.gz: de98785d634e7846cc32dc1fa36f5fdca31443cb379b8cc09d15c780e7a53a8dab9e84ebc0cd7a8458a8afac43cc0309d8c89e3d275d1401efd61298d100e1eb
|
data/finapps.gemspec
CHANGED
@@ -17,7 +17,6 @@ Gem::Specification.new do |spec|
|
|
17
17
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0")
|
19
19
|
spec.executables = spec.files.grep(%r{^bin/}) {|f| File.basename(f) }
|
20
|
-
spec.test_files = Dir['spec/**/*.rb']
|
21
20
|
spec.require_paths = ['lib']
|
22
21
|
|
23
22
|
spec.add_runtime_dependency 'finapps_core', '~> 6.0', '>= 6.0.2'
|
data/lib/finapps/rest/client.rb
CHANGED
@@ -17,6 +17,7 @@ module FinApps
|
|
17
17
|
documents_orders_notifications
|
18
18
|
documents_upload_types
|
19
19
|
documents_uploads
|
20
|
+
edm_transmissions
|
20
21
|
esign_templates
|
21
22
|
orders
|
22
23
|
locations
|
@@ -66,7 +67,7 @@ module FinApps
|
|
66
67
|
end
|
67
68
|
end
|
68
69
|
|
69
|
-
QUERY_RESOURCES =
|
70
|
+
QUERY_RESOURCES = %i(query_screenings query_users).freeze
|
70
71
|
|
71
72
|
QUERY_RESOURCES.each do |method|
|
72
73
|
define_method(method) do
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FinApps
|
4
|
+
module REST
|
5
|
+
class EdmTransmissions < FinAppsCore::REST::Resources # :nodoc:
|
6
|
+
def create(order_id, params)
|
7
|
+
not_blank(order_id, :order_id)
|
8
|
+
|
9
|
+
path = "documents/edm/#{ERB::Util.url_encode(order_id)}/transmit"
|
10
|
+
super(params, path)
|
11
|
+
end
|
12
|
+
|
13
|
+
def show(transmission_id)
|
14
|
+
not_blank(transmission_id, :transmission_id)
|
15
|
+
|
16
|
+
path = "documents/edm/#{ERB::Util.url_encode(transmission_id)}"
|
17
|
+
super transmission_id, path
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/finapps/version.rb
CHANGED
data/lib/finapps.rb
CHANGED
@@ -5,6 +5,7 @@ require 'faraday_middleware'
|
|
5
5
|
|
6
6
|
require 'finapps_core'
|
7
7
|
require 'finapps/rest/actors'
|
8
|
+
require 'finapps/rest/edm_transmissions'
|
8
9
|
require 'finapps/rest/version'
|
9
10
|
require 'finapps/rest/locations'
|
10
11
|
require 'finapps/rest/consumers'
|
@@ -58,6 +59,7 @@ require 'finapps/rest/verix/verix_documents'
|
|
58
59
|
|
59
60
|
require 'finapps/rest/query/base'
|
60
61
|
require 'finapps/rest/query/screenings'
|
62
|
+
require 'finapps/rest/query/users'
|
61
63
|
|
62
64
|
require 'finapps/utils/query_builder'
|
63
65
|
require 'finapps/version' unless defined?(FinApps::VERSION)
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe FinApps::REST::EdmTransmissions do
|
4
|
+
include SpecHelpers::Client
|
5
|
+
|
6
|
+
RSpec.shared_examples 'an EdmTransmission response' do
|
7
|
+
it_behaves_like 'an API request'
|
8
|
+
it_behaves_like 'a successful request'
|
9
|
+
|
10
|
+
it('returns a hash with the correct keys') do
|
11
|
+
expect(subject[RESULTS].keys)
|
12
|
+
.to(match_array(%i[transmission_id date_created date_modified status
|
13
|
+
document_order_id documents]))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe '#create' do
|
18
|
+
subject(:list) { described_class.new(client).create(:order_id, params) }
|
19
|
+
|
20
|
+
let(:params) { {external_id: '12345'} }
|
21
|
+
|
22
|
+
it_behaves_like 'an EdmTransmission response'
|
23
|
+
end
|
24
|
+
|
25
|
+
describe '#show' do
|
26
|
+
subject(:show) { described_class.new(client).show(:transmission_id) }
|
27
|
+
|
28
|
+
it_behaves_like 'an EdmTransmission response'
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helpers/client'
|
4
|
+
require 'spec_helpers/api_request'
|
5
|
+
|
6
|
+
RSpec.describe FinApps::REST::Query::Users do
|
7
|
+
include SpecHelpers::Client
|
8
|
+
|
9
|
+
subject(:create) { described_class.new(client).create('string') }
|
10
|
+
|
11
|
+
describe '#create' do
|
12
|
+
context 'when valid tenant token is provided' do
|
13
|
+
it_behaves_like 'an API request'
|
14
|
+
it_behaves_like 'a successful request'
|
15
|
+
it 'sends the params in the body of the request' do
|
16
|
+
create
|
17
|
+
url = "#{versioned_api_path}/query/users"
|
18
|
+
|
19
|
+
expect(WebMock).to have_requested(:post, url).with(body: 'string')
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/spec/support/fake_api.rb
CHANGED
@@ -5,9 +5,11 @@ require 'sinatra/base'
|
|
5
5
|
require_relative 'documents_uploads_routes'
|
6
6
|
require_relative 'screenings_routes'
|
7
7
|
require_relative 'routes/actors'
|
8
|
+
require_relative 'routes/edm_transmissions'
|
8
9
|
require_relative 'routes/locations'
|
9
10
|
require_relative 'routes/screening_metadatas'
|
10
11
|
require_relative 'routes/query_screenings'
|
12
|
+
require_relative 'routes/query_users'
|
11
13
|
require_relative 'routes/states'
|
12
14
|
|
13
15
|
module Fake
|
@@ -25,9 +27,11 @@ module Fake
|
|
25
27
|
delete("/#{version}/resources/:id") { status 202 }
|
26
28
|
|
27
29
|
include ActorsRoutes
|
30
|
+
include EdmTransmissionsRoutes
|
28
31
|
include DocumentsUploadsRoutes
|
29
32
|
include LocationsRoutes
|
30
33
|
include QueryScreeningRoutes
|
34
|
+
include QueryUserRoutes
|
31
35
|
include ScreeningsRoutes
|
32
36
|
include ScreeningMetadatasRoutes
|
33
37
|
include StateRoutes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"transmission_id": "7829e171-4d39-4270-8969-7729038953d2",
|
3
|
+
"date_created": "2022-05-18T21:05:48.076809156Z",
|
4
|
+
"date_modified": "2022-05-18T21:05:48.07680924Z",
|
5
|
+
"status": 0,
|
6
|
+
"document_order_id": "0c272b3d-3c8c-43ab-beff-f5964835a591",
|
7
|
+
"documents": [
|
8
|
+
{
|
9
|
+
"template_data": null,
|
10
|
+
"path": "",
|
11
|
+
"file_id": "",
|
12
|
+
"status": 0,
|
13
|
+
"edm_filename": "",
|
14
|
+
"date_modified": "0001-01-01T00:00:00Z"
|
15
|
+
}
|
16
|
+
]
|
17
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"transmission_id": "7829e171-4d39-4270-8969-7729038953d2",
|
3
|
+
"date_created": "2022-05-18T21:05:48.076Z",
|
4
|
+
"date_modified": "2022-06-08T20:46:05.839936446Z",
|
5
|
+
"status": 1,
|
6
|
+
"document_order_id": "0c272b3d-3c8c-43ab-beff-f5964835a591",
|
7
|
+
"documents": [
|
8
|
+
{
|
9
|
+
"template_data": {},
|
10
|
+
"path": "",
|
11
|
+
"file_id": "",
|
12
|
+
"status": 0,
|
13
|
+
"edm_filename": "",
|
14
|
+
"date_modified": "0001-01-01T00:00:00Z"
|
15
|
+
}
|
16
|
+
]
|
17
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"auth0_id": "string",
|
4
|
+
"date_created": "2022-06-20T21:02:25Z",
|
5
|
+
"date_modified": "2022-06-20T21:02:25Z",
|
6
|
+
"email": "string",
|
7
|
+
"external_id": "string",
|
8
|
+
"first_name": "string",
|
9
|
+
"language": "string",
|
10
|
+
"last_name": "string",
|
11
|
+
"locations": [],
|
12
|
+
"memo": "string",
|
13
|
+
"metadata": {},
|
14
|
+
"phone": [],
|
15
|
+
"postal_code": "string",
|
16
|
+
"public_id": "string",
|
17
|
+
"role": 0,
|
18
|
+
"tenant_id": "string",
|
19
|
+
"type": "string"
|
20
|
+
}
|
21
|
+
]
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Fake
|
4
|
+
module EdmTransmissionsRoutes
|
5
|
+
class << self
|
6
|
+
def included(base)
|
7
|
+
get_routes base
|
8
|
+
post_routes base
|
9
|
+
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
def get_routes(base)
|
14
|
+
base.get("/#{base.version}/documents/edm/:transmission_id") do
|
15
|
+
json_response 200, 'edm_transmissions/show.json'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def post_routes(base)
|
20
|
+
base.post("/#{base.version}/documents/edm/:order_id/transmit") do
|
21
|
+
json_response 200, 'edm_transmissions/create.json'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
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.13.0
|
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-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: finapps_core
|
@@ -269,6 +269,7 @@ files:
|
|
269
269
|
- lib/finapps/rest/documents_orders_notifications.rb
|
270
270
|
- lib/finapps/rest/documents_upload_types.rb
|
271
271
|
- lib/finapps/rest/documents_uploads.rb
|
272
|
+
- lib/finapps/rest/edm_transmissions.rb
|
272
273
|
- lib/finapps/rest/esign_templates.rb
|
273
274
|
- lib/finapps/rest/locations.rb
|
274
275
|
- lib/finapps/rest/operator_change_password_email.rb
|
@@ -297,6 +298,7 @@ files:
|
|
297
298
|
- lib/finapps/rest/products.rb
|
298
299
|
- lib/finapps/rest/query/base.rb
|
299
300
|
- lib/finapps/rest/query/screenings.rb
|
301
|
+
- lib/finapps/rest/query/users.rb
|
300
302
|
- lib/finapps/rest/screening_metadatas.rb
|
301
303
|
- lib/finapps/rest/screenings.rb
|
302
304
|
- lib/finapps/rest/sessions.rb
|
@@ -322,6 +324,7 @@ files:
|
|
322
324
|
- spec/rest/documents_orders_spec.rb
|
323
325
|
- spec/rest/documents_upload_types_spec.rb
|
324
326
|
- spec/rest/documents_uploads_spec.rb
|
327
|
+
- spec/rest/edm_transmissions_spec.rb
|
325
328
|
- spec/rest/esign_templates_spec.rb
|
326
329
|
- spec/rest/locations_spec.rb
|
327
330
|
- spec/rest/operator_change_password_email_spec.rb
|
@@ -349,6 +352,7 @@ files:
|
|
349
352
|
- spec/rest/products_spec.rb
|
350
353
|
- spec/rest/query/base_spec.rb
|
351
354
|
- spec/rest/query/screenings_spec.rb
|
355
|
+
- spec/rest/query/users_spec.rb
|
352
356
|
- spec/rest/screening_metadatas_spec.rb
|
353
357
|
- spec/rest/screenings_spec.rb
|
354
358
|
- spec/rest/sessions_spec.rb
|
@@ -375,6 +379,8 @@ files:
|
|
375
379
|
- spec/support/fixtures/documents_order.json
|
376
380
|
- spec/support/fixtures/documents_orders.json
|
377
381
|
- spec/support/fixtures/documents_orders_none.json
|
382
|
+
- spec/support/fixtures/edm_transmissions/create.json
|
383
|
+
- spec/support/fixtures/edm_transmissions/show.json
|
378
384
|
- spec/support/fixtures/error.json
|
379
385
|
- spec/support/fixtures/esign_templates.json
|
380
386
|
- spec/support/fixtures/invalid_order_id.json
|
@@ -417,6 +423,7 @@ files:
|
|
417
423
|
- spec/support/fixtures/portfolios_consumers.json
|
418
424
|
- spec/support/fixtures/products.json
|
419
425
|
- spec/support/fixtures/query/screenings.json
|
426
|
+
- spec/support/fixtures/query/users.json
|
420
427
|
- spec/support/fixtures/resource.json
|
421
428
|
- spec/support/fixtures/resource_not_found.json
|
422
429
|
- spec/support/fixtures/resources.json
|
@@ -446,8 +453,10 @@ files:
|
|
446
453
|
- spec/support/fixtures/verix/record/create.json
|
447
454
|
- spec/support/fixtures/verix/record/list.json
|
448
455
|
- spec/support/routes/actors.rb
|
456
|
+
- spec/support/routes/edm_transmissions.rb
|
449
457
|
- spec/support/routes/locations.rb
|
450
458
|
- spec/support/routes/query_screenings.rb
|
459
|
+
- spec/support/routes/query_users.rb
|
451
460
|
- spec/support/routes/screening_metadatas.rb
|
452
461
|
- spec/support/routes/states.rb
|
453
462
|
- spec/support/screenings_routes.rb
|
@@ -482,66 +491,4 @@ rubygems_version: 3.1.6
|
|
482
491
|
signing_key:
|
483
492
|
specification_version: 4
|
484
493
|
summary: FinApps REST API ruby client.
|
485
|
-
test_files:
|
486
|
-
- spec/support/documents_uploads_routes.rb
|
487
|
-
- spec/support/fake_api.rb
|
488
|
-
- spec/support/routes/query_screenings.rb
|
489
|
-
- spec/support/routes/locations.rb
|
490
|
-
- spec/support/routes/states.rb
|
491
|
-
- spec/support/routes/actors.rb
|
492
|
-
- spec/support/routes/screening_metadatas.rb
|
493
|
-
- spec/support/screenings_routes.rb
|
494
|
-
- spec/rest/order_assignments_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
|
501
|
-
- spec/rest/operators_spec.rb
|
502
|
-
- spec/rest/portfolios_spec.rb
|
503
|
-
- spec/rest/alert_definitions_spec.rb
|
504
|
-
- spec/rest/consumers_portfolios_spec.rb
|
505
|
-
- spec/rest/plaid/plaid_institution_logos_spec.rb
|
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
|
513
|
-
- spec/rest/tenant_app_settings_spec.rb
|
514
|
-
- spec/rest/operators_login_tokens_spec.rb
|
515
|
-
- spec/rest/order_tokens_spec.rb
|
516
|
-
- spec/rest/consumer_login_tokens_spec.rb
|
517
|
-
- spec/rest/products_spec.rb
|
518
|
-
- spec/rest/password_resets_spec.rb
|
519
|
-
- spec/rest/documents_upload_types_spec.rb
|
520
|
-
- spec/rest/tenant_settings_spec.rb
|
521
|
-
- spec/rest/order_reports_spec.rb
|
522
|
-
- spec/rest/locations_spec.rb
|
523
|
-
- spec/rest/operators_password_resets_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
|
529
|
-
- spec/rest/version_spec.rb
|
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
|
545
|
-
- spec/spec_helpers/client.rb
|
546
|
-
- spec/spec_helpers/api_request.rb
|
547
|
-
- spec/spec_helper.rb
|
494
|
+
test_files: []
|