onfido 5.3.0 → 5.4.0
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/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/onfido/api/default_api.rb +71 -0
- data/lib/onfido/api_client.rb +1 -1
- data/lib/onfido/version.rb +1 -1
- data/spec/integrations/advanced_electronic_signature_spec.rb +51 -0
- metadata +22 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a49203489e843d3f2358f39b3b12968476e869f998abc6039c67d8f74a780f4
|
4
|
+
data.tar.gz: 69d0b65c65fb24410a0fcfb151fec42aef818a9b48fda1fcd0246d5941ee9e8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 904a4f1343dda90bbe5c556dba5cfb407fa48279deb4b1bc631f705c80b356aed32d75f834448707cf9357359c9be759319036a9c1fe96f2127e241307c5325e
|
7
|
+
data.tar.gz: fece926f4d700d55ef99fbda9344b03742c8bf81f6d2a05112577cf7a2142d5f7d7e0220f41f7e6cd56a9ede3cb734101256b566f31c5f1cb17bf0142d012072
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v5.3.0 11th July 2025
|
4
|
+
|
5
|
+
- Release based on Onfido OpenAPI spec version [v5.3.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v5.3.0):
|
6
|
+
- Release based on Onfido OpenAPI spec version [v5.3.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v5.3.0):
|
7
|
+
- [DEXTV2-9494] Add manual_transmission_restriction to document with driver verification report
|
8
|
+
|
3
9
|
## v5.2.0 5th June 2025
|
4
10
|
|
5
11
|
- Release based on Onfido OpenAPI spec version [v5.2.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v5.2.0):
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ This version uses Onfido API v3.6. Refer to our [API versioning guide](https://d
|
|
14
14
|
### Installation
|
15
15
|
|
16
16
|
```ruby
|
17
|
-
gem 'onfido', '~> 5.
|
17
|
+
gem 'onfido', '~> 5.4.0'
|
18
18
|
```
|
19
19
|
|
20
20
|
Configure with your API token, region and optional timeout (default value is 30):
|
@@ -754,6 +754,77 @@ module Onfido
|
|
754
754
|
return data, status_code, headers
|
755
755
|
end
|
756
756
|
|
757
|
+
# Retrieves the signed document or signing transaction receipt
|
758
|
+
# Retrieves the signed document or signing transaction receipt depending on the id provided.
|
759
|
+
# @param workflow_run_id [String] The unique identifier of the Workflow Run for which you want to retrieve the signed document.
|
760
|
+
# @param id [String] The unique identifier of the file which you want to retrieve.
|
761
|
+
# @param [Hash] opts the optional parameters
|
762
|
+
# @return [File]
|
763
|
+
def download_aes_document(workflow_run_id, id, opts = {})
|
764
|
+
data, _status_code, _headers = download_aes_document_with_http_info(workflow_run_id, id, opts)
|
765
|
+
data
|
766
|
+
end
|
767
|
+
|
768
|
+
# Retrieves the signed document or signing transaction receipt
|
769
|
+
# Retrieves the signed document or signing transaction receipt depending on the id provided.
|
770
|
+
# @param workflow_run_id [String] The unique identifier of the Workflow Run for which you want to retrieve the signed document.
|
771
|
+
# @param id [String] The unique identifier of the file which you want to retrieve.
|
772
|
+
# @param [Hash] opts the optional parameters
|
773
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
774
|
+
def download_aes_document_with_http_info(workflow_run_id, id, opts = {})
|
775
|
+
if @api_client.config.debugging
|
776
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.download_aes_document ...'
|
777
|
+
end
|
778
|
+
# verify the required parameter 'workflow_run_id' is set
|
779
|
+
if @api_client.config.client_side_validation && workflow_run_id.nil?
|
780
|
+
fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.download_aes_document"
|
781
|
+
end
|
782
|
+
# verify the required parameter 'id' is set
|
783
|
+
if @api_client.config.client_side_validation && id.nil?
|
784
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.download_aes_document"
|
785
|
+
end
|
786
|
+
# resource path
|
787
|
+
local_var_path = '/advanced_electronic_signature/documents'
|
788
|
+
|
789
|
+
# query parameters
|
790
|
+
query_params = opts[:query_params] || {}
|
791
|
+
query_params[:'workflow_run_id'] = workflow_run_id
|
792
|
+
query_params[:'id'] = id
|
793
|
+
|
794
|
+
# header parameters
|
795
|
+
header_params = opts[:header_params] || {}
|
796
|
+
# HTTP header 'Accept' (if needed)
|
797
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']
|
798
|
+
|
799
|
+
# form parameters
|
800
|
+
form_params = opts[:form_params] || {}
|
801
|
+
|
802
|
+
# http body (model)
|
803
|
+
post_body = opts[:debug_body]
|
804
|
+
|
805
|
+
# return_type
|
806
|
+
return_type = opts[:debug_return_type] || 'File'
|
807
|
+
|
808
|
+
# auth_names
|
809
|
+
auth_names = opts[:debug_auth_names] || ['Token']
|
810
|
+
|
811
|
+
new_options = opts.merge(
|
812
|
+
:operation => :"DefaultApi.download_aes_document",
|
813
|
+
:header_params => header_params,
|
814
|
+
:query_params => query_params,
|
815
|
+
:form_params => form_params,
|
816
|
+
:body => post_body,
|
817
|
+
:auth_names => auth_names,
|
818
|
+
:return_type => return_type
|
819
|
+
)
|
820
|
+
|
821
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
822
|
+
if @api_client.config.debugging
|
823
|
+
@api_client.config.logger.debug "API called: DefaultApi#download_aes_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
824
|
+
end
|
825
|
+
return data, status_code, headers
|
826
|
+
end
|
827
|
+
|
757
828
|
# Download check
|
758
829
|
# Downloads a PDF of a check with a given check ID. Returns the binary data representing the PDF.
|
759
830
|
# @param check_id [String]
|
data/lib/onfido/api_client.rb
CHANGED
@@ -35,7 +35,7 @@ module Onfido
|
|
35
35
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
36
36
|
def initialize(config = Configuration.default)
|
37
37
|
@config = config
|
38
|
-
@user_agent = "onfido-ruby/5.
|
38
|
+
@user_agent = "onfido-ruby/5.4.0"
|
39
39
|
@default_headers = {
|
40
40
|
'Content-Type' => 'application/json',
|
41
41
|
'User-Agent' => @user_agent
|
data/lib/onfido/version.rb
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../shared_contexts/with_workflow_run'
|
4
|
+
|
5
|
+
describe Onfido::WorkflowRun do
|
6
|
+
include_context 'with applicant'
|
7
|
+
|
8
|
+
let(:workflow_id) { '9554c27e-9886-4052-992d-816467d97d24' }
|
9
|
+
|
10
|
+
let(:workflow_run_builder) do
|
11
|
+
Onfido::WorkflowRunBuilder.new({
|
12
|
+
applicant_id: applicant_id,
|
13
|
+
workflow_id: workflow_id,
|
14
|
+
custom_data: {
|
15
|
+
face_result: "clear",
|
16
|
+
doc_result: "clear",
|
17
|
+
transaction_id: "995bf84c-d708-4977-8b88-d4b66bebdaf6",
|
18
|
+
}
|
19
|
+
})
|
20
|
+
end
|
21
|
+
|
22
|
+
let(:workflow_run) { onfido_api.create_workflow_run(workflow_run_builder) }
|
23
|
+
let!(:workflow_run_id) { workflow_run.id }
|
24
|
+
|
25
|
+
def get_task_output(workflow_run_id, task_index = 1)
|
26
|
+
task = onfido_api.list_tasks(workflow_run_id)[task_index]
|
27
|
+
|
28
|
+
repeat_request_until_task_output_changes(
|
29
|
+
max_retries = 10,
|
30
|
+
interval = 3
|
31
|
+
) { onfido_api.find_task(workflow_run_id, task.id) }.output
|
32
|
+
end
|
33
|
+
|
34
|
+
let(:signed_document_file_id) do
|
35
|
+
get_task_output(workflow_run_id)[:properties][:signed_documents][0][:id]
|
36
|
+
end
|
37
|
+
|
38
|
+
let(:transaction_receipt_file_id) do
|
39
|
+
get_task_output(workflow_run_id)[:properties][:receipt_document][:id]
|
40
|
+
end
|
41
|
+
|
42
|
+
describe 'Workflow run' do
|
43
|
+
it 'downloads aes documents' do
|
44
|
+
signed_document = onfido_api.download_aes_document(workflow_run_id, signed_document_file_id)
|
45
|
+
expect(signed_document.size).to eq 13264
|
46
|
+
|
47
|
+
transaction_receipt = onfido_api.download_aes_document(workflow_run_id, transaction_receipt_file_id)
|
48
|
+
expect(transaction_receipt.size).to eq 13264
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onfido
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAPI-Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -438,6 +438,7 @@ files:
|
|
438
438
|
- onfido.gemspec
|
439
439
|
- spec/classic_webhook_event_verifier_spec.rb
|
440
440
|
- spec/integrations/address_picker_spec.rb
|
441
|
+
- spec/integrations/advanced_electronic_signature_spec.rb
|
441
442
|
- spec/integrations/applicant_spec.rb
|
442
443
|
- spec/integrations/check_spec.rb
|
443
444
|
- spec/integrations/document_spec.rb
|
@@ -493,33 +494,34 @@ specification_version: 4
|
|
493
494
|
summary: The official Ruby library for integrating with the Onfido API.
|
494
495
|
test_files:
|
495
496
|
- spec/classic_webhook_event_verifier_spec.rb
|
496
|
-
- spec/integrations/
|
497
|
-
- spec/integrations/
|
498
|
-
- spec/integrations/
|
499
|
-
- spec/integrations/
|
500
|
-
- spec/integrations/workflow_run_spec.rb
|
501
|
-
- spec/integrations/live_photo_spec.rb
|
502
|
-
- spec/integrations/extraction_spec.rb
|
503
|
-
- spec/integrations/live_video_spec.rb
|
497
|
+
- spec/integrations/address_picker_spec.rb
|
498
|
+
- spec/integrations/report_schema_spec.rb
|
499
|
+
- spec/integrations/media/sample_photo.png
|
500
|
+
- spec/integrations/media/sample_driving_licence.png
|
504
501
|
- spec/integrations/tasks_spec.rb
|
505
502
|
- spec/integrations/document_spec.rb
|
506
|
-
- spec/integrations/
|
503
|
+
- spec/integrations/live_video_spec.rb
|
504
|
+
- spec/integrations/workflow_run_spec.rb
|
505
|
+
- spec/integrations/webhook_spec.rb
|
507
506
|
- spec/integrations/id_photo_spec.rb
|
508
|
-
- spec/integrations/
|
507
|
+
- spec/integrations/applicant_spec.rb
|
508
|
+
- spec/integrations/sdk_token_spec.rb
|
509
509
|
- spec/integrations/workflow_run_output_spec.rb
|
510
|
-
- spec/integrations/
|
510
|
+
- spec/integrations/watchlist_monitor_spec.rb
|
511
|
+
- spec/integrations/qualified_electronic_signature_spec.rb
|
512
|
+
- spec/integrations/extraction_spec.rb
|
513
|
+
- spec/integrations/motion_capture_spec.rb
|
514
|
+
- spec/integrations/advanced_electronic_signature_spec.rb
|
511
515
|
- spec/integrations/report_spec.rb
|
512
|
-
- spec/integrations/
|
513
|
-
- spec/integrations/
|
514
|
-
- spec/integrations/report_schema_spec.rb
|
515
|
-
- spec/integrations/address_picker_spec.rb
|
516
|
-
- spec/media/studio_webhook_event_with_object_in_output.json
|
516
|
+
- spec/integrations/live_photo_spec.rb
|
517
|
+
- spec/integrations/check_spec.rb
|
517
518
|
- spec/media/studio_webhook_event_with_list_in_output.json
|
518
|
-
- spec/
|
519
|
-
- spec/shared_contexts/with_document.rb
|
519
|
+
- spec/media/studio_webhook_event_with_object_in_output.json
|
520
520
|
- spec/shared_contexts/with_check.rb
|
521
|
+
- spec/shared_contexts/with_document.rb
|
521
522
|
- spec/shared_contexts/with_applicant.rb
|
522
523
|
- spec/shared_contexts/with_workflow_run.rb
|
524
|
+
- spec/shared_contexts/with_onfido.rb
|
523
525
|
- spec/shared_contexts/with_live_photo.rb
|
524
526
|
- spec/shared_examples/file_examples.rb
|
525
527
|
- spec/spec_helper.rb
|