Skip to content

Commit

Permalink
Upgrade after onfido-openapi-spec change 40b86a1
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido authored and github-actions[bot] committed Jul 15, 2024
1 parent 5511bd7 commit ce00433
Show file tree
Hide file tree
Showing 11 changed files with 133 additions and 34 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": "40b86a1",
"long_sha": "40b86a1c8ec8687c15514470f60428b3e7633968",
"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
73 changes: 72 additions & 1 deletion 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(:GET, 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 Expand Up @@ -4030,7 +4101,7 @@ def upload_document_with_http_info(type, applicant_id, file, opts = {})
if @api_client.config.client_side_validation && file.nil?
fail ArgumentError, "Missing the required parameter 'file' when calling DefaultApi.upload_document"
end
allowable_values = ["jpg", "png", "pdf", "unknown_default_open_api"]
allowable_values = ["jpg", "jpeg", "png", "pdf", "unknown_default_open_api"]
if @api_client.config.client_side_validation && opts[:'file_type'] && !allowable_values.include?(opts[:'file_type'])
fail ArgumentError, "invalid value for \"file_type\", must be one of #{allowable_values}"
end
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
4 changes: 2 additions & 2 deletions lib/onfido/models/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def list_invalid_properties
# @return true if the model is valid
def valid?
warn '[DEPRECATED] the `valid?` method is obsolete'
file_type_validator = EnumAttributeValidator.new('String', ["jpg", "png", "pdf", "unknown_default_open_api"])
file_type_validator = EnumAttributeValidator.new('String', ["jpg", "jpeg", "png", "pdf", "unknown_default_open_api"])
return false unless file_type_validator.valid?(@file_type)
side_validator = EnumAttributeValidator.new('String', ["front", "back", "unknown_default_open_api"])
return false unless side_validator.valid?(@side)
Expand All @@ -212,7 +212,7 @@ def valid?
# Custom attribute writer method checking allowed values (enum).
# @param [Object] file_type Object to be assigned
def file_type=(file_type)
validator = EnumAttributeValidator.new('String', ["jpg", "png", "pdf", "unknown_default_open_api"])
validator = EnumAttributeValidator.new('String', ["jpg", "jpeg", "png", "pdf", "unknown_default_open_api"])
unless validator.valid?(file_type)
fail ArgumentError, "invalid value for \"file_type\", must be one of #{validator.allowable_values}."
end
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
4 changes: 2 additions & 2 deletions lib/onfido/models/document_shared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def list_invalid_properties
# @return true if the model is valid
def valid?
warn '[DEPRECATED] the `valid?` method is obsolete'
file_type_validator = EnumAttributeValidator.new('String', ["jpg", "png", "pdf", "unknown_default_open_api"])
file_type_validator = EnumAttributeValidator.new('String', ["jpg", "jpeg", "png", "pdf", "unknown_default_open_api"])
return false unless file_type_validator.valid?(@file_type)
side_validator = EnumAttributeValidator.new('String', ["front", "back", "unknown_default_open_api"])
return false unless side_validator.valid?(@side)
Expand All @@ -143,7 +143,7 @@ def valid?
# Custom attribute writer method checking allowed values (enum).
# @param [Object] file_type Object to be assigned
def file_type=(file_type)
validator = EnumAttributeValidator.new('String', ["jpg", "png", "pdf", "unknown_default_open_api"])
validator = EnumAttributeValidator.new('String', ["jpg", "jpeg", "png", "pdf", "unknown_default_open_api"])
unless validator.valid?(file_type)
fail ArgumentError, "invalid value for \"file_type\", must be one of #{validator.allowable_values}."
end
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
12 changes: 11 additions & 1 deletion lib/onfido/models/webhook_event_payload_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class WebhookEventPayloadObject
# The current state of the object, if available.
attr_accessor :status

# The date and time when the operation was started, if available.
attr_accessor :started_at_iso8601

# The date and time when the operation was completed, if available.
attr_accessor :completed_at_iso8601

Expand All @@ -33,6 +36,7 @@ def self.attribute_map
{
:'id' => :'id',
:'status' => :'status',
:'started_at_iso8601' => :'started_at_iso8601',
:'completed_at_iso8601' => :'completed_at_iso8601',
:'href' => :'href'
}
Expand All @@ -48,6 +52,7 @@ def self.openapi_types
{
:'id' => :'String',
:'status' => :'String',
:'started_at_iso8601' => :'Time',
:'completed_at_iso8601' => :'Time',
:'href' => :'String'
}
Expand Down Expand Up @@ -84,6 +89,10 @@ def initialize(attributes = {})
self.status = attributes[:'status']
end

if attributes.key?(:'started_at_iso8601')
self.started_at_iso8601 = attributes[:'started_at_iso8601']
end

if attributes.key?(:'completed_at_iso8601')
self.completed_at_iso8601 = attributes[:'completed_at_iso8601']
end
Expand Down Expand Up @@ -127,6 +136,7 @@ def ==(o)
self.class == o.class &&
id == o.id &&
status == o.status &&
started_at_iso8601 == o.started_at_iso8601 &&
completed_at_iso8601 == o.completed_at_iso8601 &&
href == o.href
end
Expand All @@ -140,7 +150,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[id, status, completed_at_iso8601, href].hash
[id, status, started_at_iso8601, completed_at_iso8601, href].hash
end

# Builds the object from hash
Expand Down
Loading

0 comments on commit ce00433

Please sign in to comment.