From df285988299763b5be2187d7d11207150ebc42a7 Mon Sep 17 00:00:00 2001 From: dvacca-onfido <134616519+dvacca-onfido@users.noreply.github.com> Date: Wed, 10 Jul 2024 10:09:29 +0000 Subject: [PATCH] Upgrade after onfido-openapi-spec change 6c4e429 --- .release.json | 8 +-- CHANGELOG.md | 2 +- README.md | 2 +- lib/onfido/api/default_api.rb | 71 +++++++++++++++++++ lib/onfido/api_client.rb | 2 +- lib/onfido/models/document_properties.rb | 29 +++++--- ...r_verification_report_all_of_properties.rb | 29 +++++--- lib/onfido/version.rb | 2 +- 8 files changed, 117 insertions(+), 28 deletions(-) diff --git a/.release.json b/.release.json index 6556ea1..9aecdd6 100644 --- a/.release.json +++ b/.release.json @@ -1,9 +1,9 @@ { "source": { "repo_url": "https://github.com/onfido/onfido-openapi-spec", - "short_sha": "01ed1b5", - "long_sha": "01ed1b5fe0f7490bfce54816504a9fec13b33862", - "version": "v3.1.0" + "short_sha": "6c4e429", + "long_sha": "6c4e4292c7f692f73e178003c3086e352b0809aa", + "version": "v3.2.0" }, - "release": "v3.1.0" + "release": "v3.2.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 244b745..29600de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## v3.1.0 5th July 2024 - Release based on Onfido OpenAPI spec version [v3.1.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v3.1.0): - - Add missing fields in document report's properties + - Add missing fields in document report's properties ## v3.0.0 24th June 2024 diff --git a/README.md b/README.md index 7a9d1d5..c2f1338 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ This version uses Onfido API v3.6. Refer to our [API versioning guide](https://d ### Installation ```ruby -gem onfido, '~> 3.1.0' +gem onfido, '~> 3.2.0' ``` Configure with your API token, region and optional timeout (default value is 30): diff --git a/lib/onfido/api/default_api.rb b/lib/onfido/api/default_api.rb index df67989..8bdc04d 100644 --- a/lib/onfido/api/default_api.rb +++ b/lib/onfido/api/default_api.rb @@ -1321,6 +1321,77 @@ def download_motion_capture_frame_with_http_info(motion_capture_id, opts = {}) return data, status_code, headers end + # Retrieves the signed document or application form + # Retrieves the signed document or application form depending on the file_id provided. + # @param workflow_run_id [String] The unique identifier of the Workflow Run for which you want to retrieve the signed document. + # @param file_id [String] The unique identifier of the file which you want to retrieve. + # @param [Hash] opts the optional parameters + # @return [File] + def download_qes_document(workflow_run_id, file_id, opts = {}) + data, _status_code, _headers = download_qes_document_with_http_info(workflow_run_id, file_id, opts) + data + end + + # Retrieves the signed document or application form + # Retrieves the signed document or application form depending on the file_id provided. + # @param workflow_run_id [String] The unique identifier of the Workflow Run for which you want to retrieve the signed document. + # @param file_id [String] The unique identifier of the file which you want to retrieve. + # @param [Hash] opts the optional parameters + # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers + def download_qes_document_with_http_info(workflow_run_id, file_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.download_qes_document ...' + end + # verify the required parameter 'workflow_run_id' is set + if @api_client.config.client_side_validation && workflow_run_id.nil? + fail ArgumentError, "Missing the required parameter 'workflow_run_id' when calling DefaultApi.download_qes_document" + end + # verify the required parameter 'file_id' is set + if @api_client.config.client_side_validation && file_id.nil? + fail ArgumentError, "Missing the required parameter 'file_id' when calling DefaultApi.download_qes_document" + end + # resource path + local_var_path = '/qualified_electronic_signature/documents' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'workflow_run_id'] = workflow_run_id + query_params[:'file_id'] = file_id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'File' + + # auth_names + auth_names = opts[:debug_auth_names] || ['Token'] + + new_options = opts.merge( + :operation => :"DefaultApi.download_qes_document", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#download_qes_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Retrieve Workflow Run Evidence Summary File # Retrieves the signed evidence file for the designated Workflow Run # @param workflow_run_id [String] Workflow Run ID diff --git a/lib/onfido/api_client.rb b/lib/onfido/api_client.rb index a308156..cbb99c3 100644 --- a/lib/onfido/api_client.rb +++ b/lib/onfido/api_client.rb @@ -34,7 +34,7 @@ class ApiClient # @option config [Configuration] Configuration for initializing the object, default to Configuration.default def initialize(config = Configuration.default) @config = config - @user_agent = "onfido-ruby/3.1.0" + @user_agent = "onfido-ruby/3.2.0" @default_headers = { 'Content-Type' => 'application/json', 'User-Agent' => @user_agent diff --git a/lib/onfido/models/document_properties.rb b/lib/onfido/models/document_properties.rb index 1fbd7c3..c7d4e0d 100644 --- a/lib/onfido/models/document_properties.rb +++ b/lib/onfido/models/document_properties.rb @@ -27,12 +27,14 @@ class DocumentProperties attr_accessor :first_name + attr_accessor :middle_name + + attr_accessor :last_name + attr_accessor :gender attr_accessor :issuing_country - attr_accessor :last_name - attr_accessor :nationality attr_accessor :issuing_state @@ -134,9 +136,10 @@ def self.attribute_map :'document_numbers' => :'document_numbers', :'document_type' => :'document_type', :'first_name' => :'first_name', + :'middle_name' => :'middle_name', + :'last_name' => :'last_name', :'gender' => :'gender', :'issuing_country' => :'issuing_country', - :'last_name' => :'last_name', :'nationality' => :'nationality', :'issuing_state' => :'issuing_state', :'issuing_date' => :'issuing_date', @@ -189,9 +192,10 @@ def self.openapi_types :'document_numbers' => :'Array', :'document_type' => :'String', :'first_name' => :'String', + :'middle_name' => :'String', + :'last_name' => :'String', :'gender' => :'String', :'issuing_country' => :'String', - :'last_name' => :'String', :'nationality' => :'String', :'issuing_state' => :'String', :'issuing_date' => :'Date', @@ -277,6 +281,14 @@ def initialize(attributes = {}) self.first_name = attributes[:'first_name'] end + if attributes.key?(:'middle_name') + self.middle_name = attributes[:'middle_name'] + end + + if attributes.key?(:'last_name') + self.last_name = attributes[:'last_name'] + end + if attributes.key?(:'gender') self.gender = attributes[:'gender'] end @@ -285,10 +297,6 @@ def initialize(attributes = {}) self.issuing_country = attributes[:'issuing_country'] end - if attributes.key?(:'last_name') - self.last_name = attributes[:'last_name'] - end - if attributes.key?(:'nationality') self.nationality = attributes[:'nationality'] end @@ -494,9 +502,10 @@ def ==(o) document_numbers == o.document_numbers && document_type == o.document_type && first_name == o.first_name && + middle_name == o.middle_name && + last_name == o.last_name && gender == o.gender && issuing_country == o.issuing_country && - last_name == o.last_name && nationality == o.nationality && issuing_state == o.issuing_state && issuing_date == o.issuing_date && @@ -543,7 +552,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [date_of_birth, date_of_expiry, personal_number, document_numbers, document_type, first_name, gender, issuing_country, last_name, 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].hash + [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].hash end # Builds the object from hash diff --git a/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb b/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb index 79766a6..11c180a 100644 --- a/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb +++ b/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb @@ -27,12 +27,14 @@ class DocumentWithDriverVerificationReportAllOfProperties attr_accessor :first_name + attr_accessor :middle_name + + attr_accessor :last_name + attr_accessor :gender attr_accessor :issuing_country - attr_accessor :last_name - attr_accessor :nationality attr_accessor :issuing_state @@ -151,9 +153,10 @@ def self.attribute_map :'document_numbers' => :'document_numbers', :'document_type' => :'document_type', :'first_name' => :'first_name', + :'middle_name' => :'middle_name', + :'last_name' => :'last_name', :'gender' => :'gender', :'issuing_country' => :'issuing_country', - :'last_name' => :'last_name', :'nationality' => :'nationality', :'issuing_state' => :'issuing_state', :'issuing_date' => :'issuing_date', @@ -212,9 +215,10 @@ def self.openapi_types :'document_numbers' => :'Array', :'document_type' => :'String', :'first_name' => :'String', + :'middle_name' => :'String', + :'last_name' => :'String', :'gender' => :'String', :'issuing_country' => :'String', - :'last_name' => :'String', :'nationality' => :'String', :'issuing_state' => :'String', :'issuing_date' => :'Date', @@ -313,6 +317,14 @@ def initialize(attributes = {}) self.first_name = attributes[:'first_name'] end + if attributes.key?(:'middle_name') + self.middle_name = attributes[:'middle_name'] + end + + if attributes.key?(:'last_name') + self.last_name = attributes[:'last_name'] + end + if attributes.key?(:'gender') self.gender = attributes[:'gender'] end @@ -321,10 +333,6 @@ def initialize(attributes = {}) self.issuing_country = attributes[:'issuing_country'] end - if attributes.key?(:'last_name') - self.last_name = attributes[:'last_name'] - end - if attributes.key?(:'nationality') self.nationality = attributes[:'nationality'] end @@ -556,9 +564,10 @@ def ==(o) document_numbers == o.document_numbers && document_type == o.document_type && first_name == o.first_name && + middle_name == o.middle_name && + last_name == o.last_name && gender == o.gender && issuing_country == o.issuing_country && - last_name == o.last_name && nationality == o.nationality && issuing_state == o.issuing_state && issuing_date == o.issuing_date && @@ -611,7 +620,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [date_of_birth, date_of_expiry, personal_number, document_numbers, document_type, first_name, gender, issuing_country, last_name, 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 + [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 end # Builds the object from hash diff --git a/lib/onfido/version.rb b/lib/onfido/version.rb index d5bad99..b56dfab 100644 --- a/lib/onfido/version.rb +++ b/lib/onfido/version.rb @@ -11,5 +11,5 @@ =end module Onfido - VERSION = '3.1.0' + VERSION = '3.2.0' end