Skip to content

Commit

Permalink
Upgrade after onfido-openapi-spec change 6c4e429
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido authored and github-actions[bot] committed Jul 10, 2024
1 parent 5511bd7 commit df28598
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 28 deletions.
8 changes: 4 additions & 4 deletions .release.json
Original file line number Diff line number Diff line change
@@ -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"
}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
71 changes: 71 additions & 0 deletions lib/onfido/api/default_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/onfido/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 19 additions & 10 deletions lib/onfido/models/document_properties.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -189,9 +192,10 @@ def self.openapi_types
:'document_numbers' => :'Array<DocumentPropertiesDocumentNumbersInner>',
:'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',
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -212,9 +215,10 @@ def self.openapi_types
:'document_numbers' => :'Array<DocumentPropertiesDocumentNumbersInner>',
:'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',
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 &&
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/onfido/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
=end

module Onfido
VERSION = '3.1.0'
VERSION = '3.2.0'
end

0 comments on commit df28598

Please sign in to comment.