finapps 6.5.0 → 6.6.0

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: 5e80a928ff71e2322588992ecaaccb749ef54da3885b691b7397fc0e78be6061
4
- data.tar.gz: c37736f652f09f2c7066e9a45df9c4718b9c933d914716251d5e3105d9bb465f
3
+ metadata.gz: db026df91582571b3b108a3fd4996f8030941df83b4a606857d3471fb3c4575e
4
+ data.tar.gz: 8debd1ce6537786a5fc593a56daa5385593f698fb24f096f92e6e5e3c01169f2
5
5
  SHA512:
6
- metadata.gz: f7a0e0ca416920b490133e964d36b4a6a86a0c5c759cbf01a30e1b3158ef66abe1c67ecf3fe2d90fb20355824a69839585090bb16fe21448468c28704bab32aa
7
- data.tar.gz: 33788efee5a351ff06001daa933578a54965de86e9b949cc8b1631e93a3c890f888d890a5e5e9af8939679d0bf2ba83702034621ae10503d27885aced872e8a3
6
+ metadata.gz: '08ef11ebbf9618230a9835e90913bfc70d51f1a11752db4dd393f73981c7d8499860c392b4cde94a4df6930a95643c5b1edd11273d75a2aa1ac690e8d0ed7c3e'
7
+ data.tar.gz: 219263a24148d12869c73d032d7fd7b924bf7aedfe13d0e3b8cdc42db6d4afff62bb51acbfa8e29f70beaab72a1dcfec1dbcf78ae24934fb7d9998f64ae30e41
@@ -20,7 +20,7 @@ jobs:
20
20
  runs-on: ${{ matrix.os }}
21
21
  steps:
22
22
  - name: Checkout source code
23
- uses: actions/checkout@v2.3.4
23
+ uses: actions/checkout@v2.3.5
24
24
 
25
25
  - name: Install required ruby version
26
26
  uses: ruby/setup-ruby@v1
@@ -11,7 +11,7 @@ jobs:
11
11
 
12
12
  steps:
13
13
  - name: Checkout source code
14
- uses: actions/checkout@v2.3.4
14
+ uses: actions/checkout@v2.3.5
15
15
  with:
16
16
  persist-credentials: false
17
17
  fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
data/finapps.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'rspec', '~> 3.10', '>= 3.10.0'
28
28
  spec.add_development_dependency 'rubocop-performance', '~> 1.11', '>= 1.11.5'
29
29
  spec.add_development_dependency 'rubocop-rake', '~> 0.5', '>= 0.5.1'
30
- spec.add_development_dependency 'rubocop-rspec', '~> 2.4', '>= 2.4.0'
30
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.5', '>= 2.5.0'
31
31
  spec.add_development_dependency 'simplecov', '~> 0.21', '>= 0.21.2'
32
32
  spec.add_development_dependency 'simplecov-console', '~> 0.9'
33
33
  spec.add_development_dependency 'sinatra', '~> 2.1', '>= 2.1.0'
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FinApps
4
+ module REST
5
+ class Actors < FinAppsCore::REST::Resources
6
+ END_POINT = 'actors/details'
7
+
8
+ def show
9
+ super nil, END_POINT
10
+ end
11
+ end
12
+ end
13
+ end
@@ -7,6 +7,7 @@ module FinApps
7
7
  module REST
8
8
  class Client < FinAppsCore::REST::BaseClient # :nodoc:
9
9
  RESOURCES = %i[
10
+ actors
10
11
  alert_definitions
11
12
  alert_occurrences
12
13
  consumers
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinApps
4
- VERSION = '6.5.0'
4
+ VERSION = '6.6.0'
5
5
  end
data/lib/finapps.rb CHANGED
@@ -4,6 +4,7 @@ require 'faraday'
4
4
  require 'faraday_middleware'
5
5
 
6
6
  require 'finapps_core'
7
+ require 'finapps/rest/actors'
7
8
  require 'finapps/rest/version'
8
9
  require 'finapps/rest/consumers'
9
10
  require 'finapps/rest/consumer_login_tokens'
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helpers/client'
4
+ require 'spec_helpers/api_request'
5
+
6
+ RSpec.describe FinApps::REST::Actors do
7
+ include SpecHelpers::Client
8
+
9
+ let(:results) { subject[RESULTS] }
10
+ let(:error_messages) { subject[ERROR_MESSAGES] }
11
+
12
+ describe '#show' do
13
+ subject(:show) { described_class.new(client).show }
14
+
15
+ context 'when authorization is not valid' do
16
+ before { stub_unauthorized_request }
17
+
18
+ it { expect { show }.to raise_error(FinAppsCore::ApiUnauthenticatedError) }
19
+ end
20
+
21
+ context 'when authorization is valid' do
22
+ it_behaves_like 'an API request'
23
+ it_behaves_like 'a successful request'
24
+
25
+ it('returns a valid actor') { expect(results).to be_a(Hash) }
26
+ end
27
+ end
28
+
29
+ def stub_unauthorized_request
30
+ stub_request(:get, %r{/actors/details}).to_return(
31
+ status: 401,
32
+ body: {
33
+ error_messages: ['Unauthorized'],
34
+ results: nil
35
+ }.to_json,
36
+ headers: {}
37
+ )
38
+ end
39
+ end
@@ -3,6 +3,7 @@
3
3
  require 'sinatra/base'
4
4
  require_relative 'documents_uploads_routes'
5
5
  require_relative 'screenings_routes'
6
+ require_relative 'routes/actors'
6
7
 
7
8
  module Fake
8
9
  # the FakeApi class is used to mock API requests while testing.
@@ -18,6 +19,10 @@ module Fake
18
19
  put("/#{version}/resources") { json_response 201, 'resource.json' }
19
20
  delete("/#{version}/resources/:id") { status 202 }
20
21
 
22
+ include ActorsRoutes
23
+ include DocumentsUploadsRoutes
24
+ include ScreeningsRoutes
25
+
21
26
  # verix_metadata
22
27
  get("/#{version}/v/metadata") do
23
28
  json_response 200, 'verix/metadata.json'
@@ -257,9 +262,6 @@ module Fake
257
262
  json_response 404, 'invalid_signature_id.json'
258
263
  end
259
264
 
260
- # documents_uploads
261
- include DocumentsUploadsRoutes
262
-
263
265
  # documents orders notifications
264
266
  post("/#{version}/documents/orders/valid_id/notify") { status 204 }
265
267
  post("/#{version}/documents/orders/invalid_id/notify") do
@@ -277,9 +279,6 @@ module Fake
277
279
  # document_upload_types
278
280
  get("/#{version}/documents/upload_types") { json_response 200, 'upload_types.json' }
279
281
 
280
- # screenings
281
- include ScreeningsRoutes
282
-
283
282
  # consumers
284
283
  get("/#{version}/consumers") do
285
284
  json_response 200, 'users.json'
@@ -0,0 +1,19 @@
1
+ {
2
+ "auth0_id": "string",
3
+ "date_created": "2021-10-27T02:36:01Z",
4
+ "date_modified": "2021-10-27T02:36:01Z",
5
+ "email": "string",
6
+ "external_id": "string",
7
+ "first_name": "string",
8
+ "language": "string",
9
+ "last_name": "string",
10
+ "locked": true,
11
+ "memo": "string",
12
+ "phone": "string",
13
+ "phone_country_code": "string",
14
+ "public_id": "string",
15
+ "role": 0,
16
+ "status": 0,
17
+ "tenant_id": "string",
18
+ "token": "string"
19
+ }
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Fake
4
+ module ActorsRoutes
5
+ class << self
6
+ def included(base)
7
+ base.get("/#{base.version}/actors/details") do
8
+ json_response 200, 'actors/details.json'
9
+ end
10
+ super
11
+ end
12
+ end
13
+ end
14
+ 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.5.0
4
+ version: 6.6.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: 2021-09-27 00:00:00.000000000 Z
11
+ date: 2021-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: finapps_core
@@ -136,20 +136,20 @@ dependencies:
136
136
  requirements:
137
137
  - - "~>"
138
138
  - !ruby/object:Gem::Version
139
- version: '2.4'
139
+ version: '2.5'
140
140
  - - ">="
141
141
  - !ruby/object:Gem::Version
142
- version: 2.4.0
142
+ version: 2.5.0
143
143
  type: :development
144
144
  prerelease: false
145
145
  version_requirements: !ruby/object:Gem::Requirement
146
146
  requirements:
147
147
  - - "~>"
148
148
  - !ruby/object:Gem::Version
149
- version: '2.4'
149
+ version: '2.5'
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: 2.4.0
152
+ version: 2.5.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: simplecov
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -258,6 +258,7 @@ files:
258
258
  - Rakefile
259
259
  - finapps.gemspec
260
260
  - lib/finapps.rb
261
+ - lib/finapps/rest/actors.rb
261
262
  - lib/finapps/rest/alert_definitions.rb
262
263
  - lib/finapps/rest/alert_occurrences.rb
263
264
  - lib/finapps/rest/client.rb
@@ -305,6 +306,7 @@ files:
305
306
  - lib/finapps/rest/version.rb
306
307
  - lib/finapps/utils/query_builder.rb
307
308
  - lib/finapps/version.rb
309
+ - spec/rest/actors_spec.rb
308
310
  - spec/rest/alert_definitions_spec.rb
309
311
  - spec/rest/alert_occurrences_spec.rb
310
312
  - spec/rest/client_spec.rb
@@ -354,6 +356,7 @@ files:
354
356
  - spec/spec_helpers/client.rb
355
357
  - spec/support/documents_uploads_routes.rb
356
358
  - spec/support/fake_api.rb
359
+ - spec/support/fixtures/actors/details.json
357
360
  - spec/support/fixtures/alert_definition.json
358
361
  - spec/support/fixtures/alert_definitions.json
359
362
  - spec/support/fixtures/alert_occurrences.json
@@ -426,6 +429,7 @@ files:
426
429
  - spec/support/fixtures/verix/metadata.json
427
430
  - spec/support/fixtures/verix/record/create.json
428
431
  - spec/support/fixtures/verix/record/list.json
432
+ - spec/support/routes/actors.rb
429
433
  - spec/support/screenings_routes.rb
430
434
  - spec/utils/query_builder_spec.rb
431
435
  - tags
@@ -459,54 +463,56 @@ signing_key:
459
463
  specification_version: 4
460
464
  summary: FinApps REST API ruby client.
461
465
  test_files:
462
- - spec/support/screenings_routes.rb
463
- - spec/support/fake_api.rb
464
- - spec/support/documents_uploads_routes.rb
465
- - spec/spec_helper.rb
466
- - spec/spec_helpers/api_request.rb
467
- - spec/spec_helpers/client.rb
468
- - spec/rest/portfolios_alerts_spec.rb
466
+ - spec/rest/portfolio_reports_spec.rb
467
+ - spec/rest/screenings_spec.rb
468
+ - spec/rest/sessions_spec.rb
469
+ - spec/rest/consumers_portfolios_spec.rb
470
+ - spec/rest/documents_uploads_spec.rb
471
+ - spec/rest/portfolios_consumers_spec.rb
472
+ - spec/rest/actors_spec.rb
473
+ - spec/rest/documents_orders_notifications_spec.rb
474
+ - spec/rest/alert_definitions_spec.rb
475
+ - spec/rest/client_spec.rb
476
+ - spec/rest/operators_spec.rb
477
+ - spec/rest/esign_templates_spec.rb
478
+ - spec/rest/consumers_spec.rb
479
+ - spec/rest/order_refreshes_spec.rb
480
+ - spec/rest/order_reports_spec.rb
481
+ - spec/rest/order_statuses_spec.rb
482
+ - spec/rest/signed_documents_downloads_spec.rb
469
483
  - spec/rest/products_spec.rb
470
- - spec/rest/documents_orders_spec.rb
484
+ - spec/rest/consumer_login_tokens_spec.rb
471
485
  - spec/rest/password_resets_spec.rb
472
- - spec/rest/order_statuses_spec.rb
473
- - spec/rest/operators_spec.rb
474
486
  - spec/rest/operator_change_password_email_spec.rb
475
- - spec/rest/esign_templates_spec.rb
487
+ - spec/rest/version_spec.rb
488
+ - spec/rest/operators_password_resets_spec.rb
489
+ - spec/rest/portfolios_alerts_spec.rb
490
+ - spec/rest/alert_occurrences_spec.rb
491
+ - spec/rest/plaid/plaid_consumer_institutions_spec.rb
492
+ - spec/rest/plaid/plaid_webhooks_spec.rb
493
+ - spec/rest/plaid/plaid_institution_logos_spec.rb
494
+ - spec/rest/plaid/plaid_accounts_spec.rb
495
+ - spec/rest/plaid/plaid_account_permissions_spec.rb
476
496
  - spec/rest/order_tokens_spec.rb
477
- - spec/rest/order_reports_spec.rb
497
+ - spec/rest/order_assignments_spec.rb
498
+ - spec/rest/tenant_app_settings_spec.rb
478
499
  - spec/rest/documents_upload_types_spec.rb
479
- - spec/rest/consumers_portfolios_spec.rb
480
- - spec/rest/portfolios_consumers_spec.rb
481
- - spec/rest/verix/verix_metadata_spec.rb
482
500
  - spec/rest/verix/verix_documents_spec.rb
501
+ - spec/rest/verix/verix_metadata_spec.rb
483
502
  - spec/rest/verix/verix_records_spec.rb
484
503
  - spec/rest/verix/verix_pdf_documents_spec.rb
504
+ - spec/rest/operators_login_tokens_spec.rb
505
+ - spec/rest/portfolios_spec.rb
506
+ - spec/rest/documents_orders_spec.rb
507
+ - spec/rest/order_notifications_spec.rb
485
508
  - spec/rest/tenant_settings_spec.rb
486
- - spec/rest/consumers_spec.rb
487
- - spec/rest/client_spec.rb
488
509
  - spec/rest/portfolios_available_consumers_spec.rb
489
- - spec/rest/alert_definitions_spec.rb
490
- - spec/rest/order_notifications_spec.rb
491
- - spec/rest/operators_password_resets_spec.rb
492
- - spec/rest/version_spec.rb
493
- - spec/rest/portfolios_spec.rb
494
- - spec/rest/sessions_spec.rb
495
- - spec/rest/documents_orders_notifications_spec.rb
496
- - spec/rest/tenant_app_settings_spec.rb
497
- - spec/rest/documents_uploads_spec.rb
498
- - spec/rest/screenings_spec.rb
499
- - spec/rest/signed_documents_downloads_spec.rb
500
- - spec/rest/plaid/plaid_account_permissions_spec.rb
501
- - spec/rest/plaid/plaid_webhooks_spec.rb
502
- - spec/rest/plaid/plaid_accounts_spec.rb
503
- - spec/rest/plaid/plaid_institution_logos_spec.rb
504
- - spec/rest/plaid/plaid_consumer_institutions_spec.rb
505
- - spec/rest/order_assignments_spec.rb
506
- - spec/rest/consumer_login_tokens_spec.rb
507
- - spec/rest/alert_occurrences_spec.rb
508
- - spec/rest/operators_login_tokens_spec.rb
509
- - spec/rest/order_refreshes_spec.rb
510
- - spec/rest/portfolio_reports_spec.rb
511
510
  - spec/rest/orders_spec.rb
511
+ - spec/spec_helper.rb
512
+ - spec/support/screenings_routes.rb
513
+ - spec/support/fake_api.rb
514
+ - spec/support/documents_uploads_routes.rb
515
+ - spec/support/routes/actors.rb
512
516
  - spec/utils/query_builder_spec.rb
517
+ - spec/spec_helpers/api_request.rb
518
+ - spec/spec_helpers/client.rb