Skip to content

Commit

Permalink
Upgrade after onfido-openapi-spec change 62dc554
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido authored and github-actions[bot] committed Jun 4, 2024
1 parent 1bb444e commit 6509ff1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Configure with your API token, region and optional timeout (default value is 30)
require onfido

Onfido.configure do |config|
config.api_token = ENV["ONFIDO_API_TOKEN"]
config.api_token = ENV["ONFIDO_WEBHOOK_SECRET_TOKEN"]
config.region = config.region[:EU]
config.timeout = 30
end
Expand Down
2 changes: 1 addition & 1 deletion lib/onfido.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@
require 'onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_liveness_detected'
require 'onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_spoofing_detection'
require 'onfido/models/facial_similarity_video_report'
require 'onfido/models/id_photos_list'
require 'onfido/models/id_number'
require 'onfido/models/id_photo'
require 'onfido/models/id_photo_response'
require 'onfido/models/id_photos_list'
require 'onfido/models/identity_enhanced_breakdown'
require 'onfido/models/identity_enhanced_breakdown_address'
require 'onfido/models/identity_enhanced_breakdown_address_breakdown'
Expand Down
6 changes: 3 additions & 3 deletions lib/onfido/api/default_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2676,7 +2676,7 @@ def list_documents_with_http_info(applicant_id, opts = {})
# Lists the ID photos that belong to an applicant.
# @param applicant_id [String] The id of the applicant the ID photos belong to.
# @param [Hash] opts the optional parameters
# @return [IDPhotosList]
# @return [IdPhotosList]
def list_id_photos(applicant_id, opts = {})
data, _status_code, _headers = list_id_photos_with_http_info(applicant_id, opts)
data
Expand All @@ -2686,7 +2686,7 @@ def list_id_photos(applicant_id, opts = {})
# Lists the ID photos that belong to an applicant.
# @param applicant_id [String] The id of the applicant the ID photos belong to.
# @param [Hash] opts the optional parameters
# @return [Array<(IDPhotosList, Integer, Hash)>] IDPhotosList data, response status code and response headers
# @return [Array<(IdPhotosList, Integer, Hash)>] IdPhotosList data, response status code and response headers
def list_id_photos_with_http_info(applicant_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.list_id_photos ...'
Expand Down Expand Up @@ -2714,7 +2714,7 @@ def list_id_photos_with_http_info(applicant_id, opts = {})
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'IDPhotosList'
return_type = opts[:debug_return_type] || 'IdPhotosList'

# auth_names
auth_names = opts[:debug_auth_names] || ['Token']
Expand Down
6 changes: 3 additions & 3 deletions lib/onfido/models/id_photos_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require 'time'

module Onfido
class IDPhotosList
class IdPhotosList
attr_accessor :id_photos

# Attribute mapping from ruby-style variable name to JSON key.
Expand Down Expand Up @@ -46,13 +46,13 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::IDPhotosList` initialize method"
fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::IdPhotosList` initialize method"
end

# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::IDPhotosList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::IdPhotosList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down
12 changes: 6 additions & 6 deletions lib/onfido/models/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ def initialize(attributes = {})
def list_invalid_properties
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
invalid_properties = Array.new
pattern = Regexp.new(/^[0-9a-z-_]+$/)
pattern = Regexp.new(/^[0-9a-z_-]+$/)
if !@id.nil? && @id !~ pattern
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
end

pattern = Regexp.new(/^[0-9a-z-_]+$/)
pattern = Regexp.new(/^[0-9a-z_-]+$/)
if !@task_def_id.nil? && @task_def_id !~ pattern
invalid_properties.push("invalid value for \"task_def_id\", must conform to the pattern #{pattern}.")
end
Expand All @@ -150,8 +150,8 @@ def list_invalid_properties
# @return true if the model is valid
def valid?
warn '[DEPRECATED] the `valid?` method is obsolete'
return false if !@id.nil? && @id !~ Regexp.new(/^[0-9a-z-_]+$/)
return false if !@task_def_id.nil? && @task_def_id !~ Regexp.new(/^[0-9a-z-_]+$/)
return false if !@id.nil? && @id !~ Regexp.new(/^[0-9a-z_-]+$/)
return false if !@task_def_id.nil? && @task_def_id !~ Regexp.new(/^[0-9a-z_-]+$/)
true
end

Expand All @@ -162,7 +162,7 @@ def id=(id)
fail ArgumentError, 'id cannot be nil'
end

pattern = Regexp.new(/^[0-9a-z-_]+$/)
pattern = Regexp.new(/^[0-9a-z_-]+$/)
if id !~ pattern
fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
end
Expand All @@ -177,7 +177,7 @@ def task_def_id=(task_def_id)
fail ArgumentError, 'task_def_id cannot be nil'
end

pattern = Regexp.new(/^[0-9a-z-_]+$/)
pattern = Regexp.new(/^[0-9a-z_-]+$/)
if task_def_id !~ pattern
fail ArgumentError, "invalid value for \"task_def_id\", must conform to the pattern #{pattern}."
end
Expand Down
12 changes: 6 additions & 6 deletions lib/onfido/models/task_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ def initialize(attributes = {})
def list_invalid_properties
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
invalid_properties = Array.new
pattern = Regexp.new(/^[0-9a-z-_]+$/)
pattern = Regexp.new(/^[0-9a-z_-]+$/)
if !@id.nil? && @id !~ pattern
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
end

pattern = Regexp.new(/^[0-9a-z-_]+$/)
pattern = Regexp.new(/^[0-9a-z_-]+$/)
if !@task_def_id.nil? && @task_def_id !~ pattern
invalid_properties.push("invalid value for \"task_def_id\", must conform to the pattern #{pattern}.")
end
Expand All @@ -112,8 +112,8 @@ def list_invalid_properties
# @return true if the model is valid
def valid?
warn '[DEPRECATED] the `valid?` method is obsolete'
return false if !@id.nil? && @id !~ Regexp.new(/^[0-9a-z-_]+$/)
return false if !@task_def_id.nil? && @task_def_id !~ Regexp.new(/^[0-9a-z-_]+$/)
return false if !@id.nil? && @id !~ Regexp.new(/^[0-9a-z_-]+$/)
return false if !@task_def_id.nil? && @task_def_id !~ Regexp.new(/^[0-9a-z_-]+$/)
true
end

Expand All @@ -124,7 +124,7 @@ def id=(id)
fail ArgumentError, 'id cannot be nil'
end

pattern = Regexp.new(/^[0-9a-z-_]+$/)
pattern = Regexp.new(/^[0-9a-z_-]+$/)
if id !~ pattern
fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
end
Expand All @@ -139,7 +139,7 @@ def task_def_id=(task_def_id)
fail ArgumentError, 'task_def_id cannot be nil'
end

pattern = Regexp.new(/^[0-9a-z-_]+$/)
pattern = Regexp.new(/^[0-9a-z_-]+$/)
if task_def_id !~ pattern
fail ArgumentError, "invalid value for \"task_def_id\", must conform to the pattern #{pattern}."
end
Expand Down

0 comments on commit 6509ff1

Please sign in to comment.