onfido 5.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9d1b25944b1a8260f459e08ea5fa12d445303f25066e75736c3d305ec77b52f
4
- data.tar.gz: 700a5d91654fe610c6b95f206edf1d85366e06dd24ce9ff84fd95c8e89cc6cb1
3
+ metadata.gz: 9a49203489e843d3f2358f39b3b12968476e869f998abc6039c67d8f74a780f4
4
+ data.tar.gz: 69d0b65c65fb24410a0fcfb151fec42aef818a9b48fda1fcd0246d5941ee9e8e
5
5
  SHA512:
6
- metadata.gz: 93a5c47f5302b73dd9666f85741c7c199731e9d6bb703b169d2dd3ec02521fac1fb1c5b1e0ee2402fe279e4e4d66b026ddc591e756dcf2d3da6c59a6c2ee589d
7
- data.tar.gz: 683b92367a3e2ca427c7dbebbb5847927f45d61437786d78dd916d323e42fcebf78966196dc779a32998a6179ec3b49c1a089fb2dd9437c0856b4b9b80bcd9ae
6
+ metadata.gz: 904a4f1343dda90bbe5c556dba5cfb407fa48279deb4b1bc631f705c80b356aed32d75f834448707cf9357359c9be759319036a9c1fe96f2127e241307c5325e
7
+ data.tar.gz: fece926f4d700d55ef99fbda9344b03742c8bf81f6d2a05112577cf7a2142d5f7d7e0220f41f7e6cd56a9ede3cb734101256b566f31c5f1cb17bf0142d012072
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
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
+
9
+ ## v5.2.0 5th June 2025
10
+
11
+ - Release based on Onfido OpenAPI spec version [v5.2.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v5.2.0):
12
+ - [BIO-7260] Add report configuration (including use_case) to checks
13
+
3
14
  ## v5.1.1 19th May 2025
4
15
 
5
16
  - Release based on Onfido OpenAPI spec version [v5.1.1](https://github.com/onfido/onfido-openapi-spec/releases/tag/v5.1.1):
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.2.0'
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]
@@ -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.2.0"
38
+ @user_agent = "onfido-ruby/5.4.0"
39
39
  @default_headers = {
40
40
  'Content-Type' => 'application/json',
41
41
  'User-Agent' => @user_agent
@@ -117,6 +117,9 @@ module Onfido
117
117
  # Comma-separated vehicle classes that the user is qualified for
118
118
  attr_accessor :raw_vehicle_classes
119
119
 
120
+ # True if the user is not qualified to drive a manual transmission
121
+ attr_accessor :manual_transmission_restriction
122
+
120
123
  # Detailed classes/categories information
121
124
  attr_accessor :vehicle_class_details
122
125
 
@@ -196,6 +199,7 @@ module Onfido
196
199
  :'restricted_licence' => :'restricted_licence',
197
200
  :'raw_licence_category' => :'raw_licence_category',
198
201
  :'raw_vehicle_classes' => :'raw_vehicle_classes',
202
+ :'manual_transmission_restriction' => :'manual_transmission_restriction',
199
203
  :'vehicle_class_details' => :'vehicle_class_details',
200
204
  :'passenger_vehicle' => :'passenger_vehicle'
201
205
  }
@@ -258,6 +262,7 @@ module Onfido
258
262
  :'restricted_licence' => :'Boolean',
259
263
  :'raw_licence_category' => :'String',
260
264
  :'raw_vehicle_classes' => :'String',
265
+ :'manual_transmission_restriction' => :'Boolean',
261
266
  :'vehicle_class_details' => :'Array<DocumentWithDriverVerificationReportAllOfPropertiesAllOfVehicleClassDetailsInner>',
262
267
  :'passenger_vehicle' => :'DocumentWithDriverVerificationReportAllOfPropertiesAllOfPassengerVehicle'
263
268
  }
@@ -493,6 +498,10 @@ module Onfido
493
498
  self.raw_vehicle_classes = attributes[:'raw_vehicle_classes']
494
499
  end
495
500
 
501
+ if attributes.key?(:'manual_transmission_restriction')
502
+ self.manual_transmission_restriction = attributes[:'manual_transmission_restriction']
503
+ end
504
+
496
505
  if attributes.key?(:'vehicle_class_details')
497
506
  if (value = attributes[:'vehicle_class_details']).is_a?(Array)
498
507
  self.vehicle_class_details = value
@@ -609,6 +618,7 @@ module Onfido
609
618
  restricted_licence == o.restricted_licence &&
610
619
  raw_licence_category == o.raw_licence_category &&
611
620
  raw_vehicle_classes == o.raw_vehicle_classes &&
621
+ manual_transmission_restriction == o.manual_transmission_restriction &&
612
622
  vehicle_class_details == o.vehicle_class_details &&
613
623
  passenger_vehicle == o.passenger_vehicle
614
624
  end
@@ -622,7 +632,7 @@ module Onfido
622
632
  # Calculates hash code according to all attributes.
623
633
  # @return [Integer] Hash code
624
634
  def hash
625
- [date_of_birth, date_of_expiry, personal_number, document_numbers, document_type, first_name, middle_name, last_name, gender, issuing_country, nationality, issuing_state, issuing_date, categorisation, mrz_line1, mrz_line2, mrz_line3, address, place_of_birth, spouse_name, widow_name, alias_name, issuing_authority, remarks, civil_state, expatriation, father_name, mother_name, religion, type_of_permit, version_number, document_subtype, profession, security_document_number, tax_number, nist_identity_evidence_strength, has_issuance_confirmation, real_id_compliance, security_tier, address_lines, barcode, nfc, driving_licence_information, document_classification, extracted_data, drivers_licence, restricted_licence, raw_licence_category, raw_vehicle_classes, vehicle_class_details, passenger_vehicle].hash
635
+ [date_of_birth, date_of_expiry, personal_number, document_numbers, document_type, first_name, middle_name, last_name, gender, issuing_country, nationality, issuing_state, issuing_date, categorisation, mrz_line1, mrz_line2, mrz_line3, address, place_of_birth, spouse_name, widow_name, alias_name, issuing_authority, remarks, civil_state, expatriation, father_name, mother_name, religion, type_of_permit, version_number, document_subtype, profession, security_document_number, tax_number, nist_identity_evidence_strength, has_issuance_confirmation, real_id_compliance, security_tier, address_lines, barcode, nfc, driving_licence_information, document_classification, extracted_data, drivers_licence, restricted_licence, raw_licence_category, raw_vehicle_classes, manual_transmission_restriction, vehicle_class_details, passenger_vehicle].hash
626
636
  end
627
637
 
628
638
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.11.0
11
11
  =end
12
12
 
13
13
  module Onfido
14
- VERSION = '5.2.0'
14
+ VERSION = '5.4.0'
15
15
  end
@@ -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.2.0
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-06-05 00:00:00.000000000 Z
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,34 +494,35 @@ 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
497
+ - spec/integrations/address_picker_spec.rb
496
498
  - spec/integrations/report_schema_spec.rb
497
- - spec/integrations/extraction_spec.rb
499
+ - spec/integrations/media/sample_photo.png
500
+ - spec/integrations/media/sample_driving_licence.png
501
+ - spec/integrations/tasks_spec.rb
502
+ - spec/integrations/document_spec.rb
503
+ - spec/integrations/live_video_spec.rb
498
504
  - spec/integrations/workflow_run_spec.rb
499
- - spec/integrations/live_photo_spec.rb
500
- - spec/integrations/watchlist_monitor_spec.rb
505
+ - spec/integrations/webhook_spec.rb
506
+ - spec/integrations/id_photo_spec.rb
507
+ - spec/integrations/applicant_spec.rb
501
508
  - spec/integrations/sdk_token_spec.rb
502
- - spec/integrations/document_spec.rb
503
- - spec/integrations/tasks_spec.rb
504
- - spec/integrations/media/sample_driving_licence.png
505
- - spec/integrations/media/sample_photo.png
506
509
  - spec/integrations/workflow_run_output_spec.rb
507
- - spec/integrations/id_photo_spec.rb
508
- - spec/integrations/address_picker_spec.rb
509
- - spec/integrations/live_video_spec.rb
510
+ - spec/integrations/watchlist_monitor_spec.rb
510
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
516
+ - spec/integrations/live_photo_spec.rb
512
517
  - spec/integrations/check_spec.rb
513
- - spec/integrations/webhook_spec.rb
514
- - spec/integrations/applicant_spec.rb
515
- - spec/integrations/motion_capture_spec.rb
516
518
  - spec/media/studio_webhook_event_with_list_in_output.json
517
519
  - spec/media/studio_webhook_event_with_object_in_output.json
518
520
  - spec/shared_contexts/with_check.rb
521
+ - spec/shared_contexts/with_document.rb
519
522
  - spec/shared_contexts/with_applicant.rb
520
- - spec/shared_contexts/with_live_photo.rb
521
- - spec/shared_contexts/with_onfido.rb
522
523
  - spec/shared_contexts/with_workflow_run.rb
523
- - spec/shared_contexts/with_document.rb
524
+ - spec/shared_contexts/with_onfido.rb
525
+ - spec/shared_contexts/with_live_photo.rb
524
526
  - spec/shared_examples/file_examples.rb
525
527
  - spec/spec_helper.rb
526
528
  - spec/studio_webhook_event_verifier_spec.rb