Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .release.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"source": {
"repo_url": "https://github.com/onfido/onfido-openapi-spec",
"short_sha": "d9d749d",
"long_sha": "d9d749dfbd3873524400efe236f7d398bb9e948e",
"short_sha": "ad80494",
"long_sha": "ad8049477731f42993257dd8cbbbd4a193f06c92",
"version": "v6.2.0"
},
"release": "v6.3.0"
Expand Down
8 changes: 5 additions & 3 deletions lib/onfido.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
require 'onfido/models/applicants_list'
require 'onfido/models/biometric_token'
require 'onfido/models/biometric_token_data'
require 'onfido/models/biometric_token_response'
require 'onfido/models/biometric_token_updater'
require 'onfido/models/biometric_tokens_list'
require 'onfido/models/biometric_tokens_response'
require 'onfido/models/check'
require 'onfido/models/check_builder'
require 'onfido/models/check_request'
Expand Down Expand Up @@ -205,9 +206,10 @@
require 'onfido/models/india_pan_report_all_of_breakdown_device_breakdown_pan_valid'
require 'onfido/models/india_pan_report_all_of_properties'
require 'onfido/models/india_pan_report_all_of_properties_device'
require 'onfido/models/invalidated_biometric_token_response'
require 'onfido/models/invalidated_biometric_token_summary'
require 'onfido/models/invalidated_biometric_token_summary_deleted_items'
require 'onfido/models/invalidated_biometric_tokens_summary'
require 'onfido/models/invalidated_biometric_tokens_response'
require 'onfido/models/known_faces_breakdown'
require 'onfido/models/known_faces_breakdown_image_integrity'
require 'onfido/models/known_faces_breakdown_previously_seen_faces'
Expand Down Expand Up @@ -262,7 +264,7 @@
require 'onfido/models/task'
require 'onfido/models/task_item'
require 'onfido/models/timeline_file_reference'
require 'onfido/models/update_biometric_token200_response'
require 'onfido/models/updated_biometric_token_response'
require 'onfido/models/us_driving_licence_breakdown'
require 'onfido/models/us_driving_licence_breakdown_address'
require 'onfido/models/us_driving_licence_breakdown_address_breakdown'
Expand Down
30 changes: 15 additions & 15 deletions lib/onfido/api/default_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2181,7 +2181,7 @@ def find_applicant_consents_with_http_info(applicant_id, opts = {})
# @param user_id [String] Customer user ID that owns the biometric token.
# @param token_uuid [String] Biometric token UUID.
# @param [Hash] opts the optional parameters
# @return [BiometricToken]
# @return [BiometricTokenResponse]
def find_biometric_token(user_id, token_uuid, opts = {})
data, _status_code, _headers = find_biometric_token_with_http_info(user_id, token_uuid, opts)
data
Expand All @@ -2192,7 +2192,7 @@ def find_biometric_token(user_id, token_uuid, opts = {})
# @param user_id [String] Customer user ID that owns the biometric token.
# @param token_uuid [String] Biometric token UUID.
# @param [Hash] opts the optional parameters
# @return [Array<(BiometricToken, Integer, Hash)>] BiometricToken data, response status code and response headers
# @return [Array<(BiometricTokenResponse, Integer, Hash)>] BiometricTokenResponse data, response status code and response headers
def find_biometric_token_with_http_info(user_id, token_uuid, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.find_biometric_token ...'
Expand Down Expand Up @@ -2223,7 +2223,7 @@ def find_biometric_token_with_http_info(user_id, token_uuid, opts = {})
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'BiometricToken'
return_type = opts[:debug_return_type] || 'BiometricTokenResponse'

# auth_names
auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials', 'Token']
Expand Down Expand Up @@ -3281,7 +3281,7 @@ def generate_sdk_token_with_http_info(sdk_token_builder, opts = {})
# @param user_id [String] Customer user ID that owns the biometric token.
# @param token_uuid [String] Biometric token UUID.
# @param [Hash] opts the optional parameters
# @return [InvalidatedBiometricTokenSummary]
# @return [InvalidatedBiometricTokenResponse]
def invalidate_biometric_token(user_id, token_uuid, opts = {})
data, _status_code, _headers = invalidate_biometric_token_with_http_info(user_id, token_uuid, opts)
data
Expand All @@ -3292,7 +3292,7 @@ def invalidate_biometric_token(user_id, token_uuid, opts = {})
# @param user_id [String] Customer user ID that owns the biometric token.
# @param token_uuid [String] Biometric token UUID.
# @param [Hash] opts the optional parameters
# @return [Array<(InvalidatedBiometricTokenSummary, Integer, Hash)>] InvalidatedBiometricTokenSummary data, response status code and response headers
# @return [Array<(InvalidatedBiometricTokenResponse, Integer, Hash)>] InvalidatedBiometricTokenResponse data, response status code and response headers
def invalidate_biometric_token_with_http_info(user_id, token_uuid, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.invalidate_biometric_token ...'
Expand Down Expand Up @@ -3323,7 +3323,7 @@ def invalidate_biometric_token_with_http_info(user_id, token_uuid, opts = {})
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'InvalidatedBiometricTokenSummary'
return_type = opts[:debug_return_type] || 'InvalidatedBiometricTokenResponse'

# auth_names
auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials', 'Token']
Expand All @@ -3349,7 +3349,7 @@ def invalidate_biometric_token_with_http_info(user_id, token_uuid, opts = {})
# Invalidates every biometric token associated with the supplied customer user ID.
# @param user_id [String] Customer user ID whose biometric tokens will be invalidated.
# @param [Hash] opts the optional parameters
# @return [InvalidatedBiometricTokensSummary]
# @return [InvalidatedBiometricTokensResponse]
def invalidate_biometric_tokens(user_id, opts = {})
data, _status_code, _headers = invalidate_biometric_tokens_with_http_info(user_id, opts)
data
Expand All @@ -3359,7 +3359,7 @@ def invalidate_biometric_tokens(user_id, opts = {})
# Invalidates every biometric token associated with the supplied customer user ID.
# @param user_id [String] Customer user ID whose biometric tokens will be invalidated.
# @param [Hash] opts the optional parameters
# @return [Array<(InvalidatedBiometricTokensSummary, Integer, Hash)>] InvalidatedBiometricTokensSummary data, response status code and response headers
# @return [Array<(InvalidatedBiometricTokensResponse, Integer, Hash)>] InvalidatedBiometricTokensResponse data, response status code and response headers
def invalidate_biometric_tokens_with_http_info(user_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.invalidate_biometric_tokens ...'
Expand All @@ -3386,7 +3386,7 @@ def invalidate_biometric_tokens_with_http_info(user_id, opts = {})
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'InvalidatedBiometricTokensSummary'
return_type = opts[:debug_return_type] || 'InvalidatedBiometricTokensResponse'

# auth_names
auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials', 'Token']
Expand Down Expand Up @@ -3478,7 +3478,7 @@ def list_applicants_with_http_info(opts = {})
# Returns the biometric tokens associated with the supplied customer user ID.
# @param user_id [String] Customer user ID that owns the biometric tokens.
# @param [Hash] opts the optional parameters
# @return [BiometricTokensList]
# @return [BiometricTokensResponse]
def list_biometric_tokens(user_id, opts = {})
data, _status_code, _headers = list_biometric_tokens_with_http_info(user_id, opts)
data
Expand All @@ -3488,7 +3488,7 @@ def list_biometric_tokens(user_id, opts = {})
# Returns the biometric tokens associated with the supplied customer user ID.
# @param user_id [String] Customer user ID that owns the biometric tokens.
# @param [Hash] opts the optional parameters
# @return [Array<(BiometricTokensList, Integer, Hash)>] BiometricTokensList data, response status code and response headers
# @return [Array<(BiometricTokensResponse, Integer, Hash)>] BiometricTokensResponse data, response status code and response headers
def list_biometric_tokens_with_http_info(user_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.list_biometric_tokens ...'
Expand All @@ -3515,7 +3515,7 @@ def list_biometric_tokens_with_http_info(user_id, opts = {})
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'BiometricTokensList'
return_type = opts[:debug_return_type] || 'BiometricTokensResponse'

# auth_names
auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials', 'Token']
Expand Down Expand Up @@ -4969,7 +4969,7 @@ def update_applicant_with_http_info(applicant_id, applicant_updater, opts = {})
# @param token_uuid [String] Biometric token UUID.
# @param biometric_token_updater [BiometricTokenUpdater] Biometric token update payload.
# @param [Hash] opts the optional parameters
# @return [UpdateBiometricToken200Response]
# @return [UpdatedBiometricTokenResponse]
def update_biometric_token(user_id, token_uuid, biometric_token_updater, opts = {})
data, _status_code, _headers = update_biometric_token_with_http_info(user_id, token_uuid, biometric_token_updater, opts)
data
Expand All @@ -4981,7 +4981,7 @@ def update_biometric_token(user_id, token_uuid, biometric_token_updater, opts =
# @param token_uuid [String] Biometric token UUID.
# @param biometric_token_updater [BiometricTokenUpdater] Biometric token update payload.
# @param [Hash] opts the optional parameters
# @return [Array<(UpdateBiometricToken200Response, Integer, Hash)>] UpdateBiometricToken200Response data, response status code and response headers
# @return [Array<(UpdatedBiometricTokenResponse, Integer, Hash)>] UpdatedBiometricTokenResponse data, response status code and response headers
def update_biometric_token_with_http_info(user_id, token_uuid, biometric_token_updater, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DefaultApi.update_biometric_token ...'
Expand Down Expand Up @@ -5021,7 +5021,7 @@ def update_biometric_token_with_http_info(user_id, token_uuid, biometric_token_u
post_body = opts[:debug_body] || @api_client.object_to_http_body(biometric_token_updater)

# return_type
return_type = opts[:debug_return_type] || 'UpdateBiometricToken200Response'
return_type = opts[:debug_return_type] || 'UpdatedBiometricTokenResponse'

# auth_names
auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials', 'Token']
Expand Down
60 changes: 44 additions & 16 deletions lib/onfido/models/biometric_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@
require 'time'

module Onfido
# Biometric token.
class BiometricToken
attr_accessor :biometric_token
# The biometric token's unique identifier.
attr_accessor :uuid

attr_accessor :data

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'biometric_token' => :'biometric_token'
:'uuid' => :'uuid',
:'data' => :'data'
}
end

Expand All @@ -37,7 +42,8 @@ def self.acceptable_attributes
# Attribute type mapping.
def self.openapi_types
{
:'biometric_token' => :'BiometricToken'
:'uuid' => :'String',
:'data' => :'BiometricTokenData'
}
end

Expand All @@ -63,10 +69,16 @@ def initialize(attributes = {})
h[k.to_sym] = v
}

if attributes.key?(:'biometric_token')
self.biometric_token = attributes[:'biometric_token']
if attributes.key?(:'uuid')
self.uuid = attributes[:'uuid']
else
self.uuid = nil
end

if attributes.key?(:'data')
self.data = attributes[:'data']
else
self.biometric_token = nil
self.data = nil
end
end

Expand All @@ -75,8 +87,12 @@ def initialize(attributes = {})
def list_invalid_properties
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
invalid_properties = Array.new
if @biometric_token.nil?
invalid_properties.push('invalid value for "biometric_token", biometric_token cannot be nil.')
if @uuid.nil?
invalid_properties.push('invalid value for "uuid", uuid cannot be nil.')
end

if @data.nil?
invalid_properties.push('invalid value for "data", data cannot be nil.')
end

invalid_properties
Expand All @@ -86,26 +102,38 @@ def list_invalid_properties
# @return true if the model is valid
def valid?
warn '[DEPRECATED] the `valid?` method is obsolete'
return false if @biometric_token.nil?
return false if @uuid.nil?
return false if @data.nil?
true
end

# Custom attribute writer method with validation
# @param [Object] biometric_token Value to be assigned
def biometric_token=(biometric_token)
if biometric_token.nil?
fail ArgumentError, 'biometric_token cannot be nil'
# @param [Object] uuid Value to be assigned
def uuid=(uuid)
if uuid.nil?
fail ArgumentError, 'uuid cannot be nil'
end

@uuid = uuid
end

# Custom attribute writer method with validation
# @param [Object] data Value to be assigned
def data=(data)
if data.nil?
fail ArgumentError, 'data cannot be nil'
end

@biometric_token = biometric_token
@data = data
end

# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
biometric_token == o.biometric_token
uuid == o.uuid &&
data == o.data
end

# @see the `==` method
Expand All @@ -117,7 +145,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[biometric_token].hash
[uuid, data].hash
end

# Builds the object from hash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require 'time'

module Onfido
class UpdateBiometricToken200Response
class BiometricTokenResponse
attr_accessor :biometric_token

# Attribute mapping from ruby-style variable name to JSON key.
Expand Down Expand Up @@ -51,14 +51,14 @@ 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::UpdateBiometricToken200Response` initialize method"
fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::BiometricTokenResponse` initialize method"
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!acceptable_attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::UpdateBiometricToken200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::BiometricTokenResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require 'time'

module Onfido
class BiometricTokensList
class BiometricTokensResponse
attr_accessor :biometric_tokens

# Attribute mapping from ruby-style variable name to JSON key.
Expand Down Expand Up @@ -51,14 +51,14 @@ 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::BiometricTokensList` initialize method"
fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::BiometricTokensResponse` initialize method"
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!acceptable_attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::BiometricTokensList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::BiometricTokensResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down
Loading
Loading