lib/onfido/models/check_response.rb in onfido-3.4.0 vs lib/onfido/models/check_response.rb in onfido-4.0.0
- old
+ new
@@ -4,11 +4,11 @@
#The Onfido API (v3.6)
The version of the OpenAPI document: v3.6
Generated by: https://openapi-generator.tech
-Generator version: 7.6.0
+Generator version: 7.9.0
=end
require 'date'
require 'time'
@@ -22,11 +22,10 @@
attr_accessor :created_at
# The uri of this resource.
attr_accessor :href
- # The current state of the check in the checking process.
attr_accessor :status
# The overall result of the check, based on the results of the constituent reports.
attr_accessor :result
@@ -40,10 +39,14 @@
attr_accessor :report_ids
# Indicates whether the object was created in the sandbox or not.
attr_accessor :sandbox
+ attr_accessor :paused
+
+ attr_accessor :version
+
class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values
def initialize(datatype, allowable_values)
@@ -73,11 +76,13 @@
:'status' => :'status',
:'result' => :'result',
:'form_uri' => :'form_uri',
:'results_uri' => :'results_uri',
:'report_ids' => :'report_ids',
- :'sandbox' => :'sandbox'
+ :'sandbox' => :'sandbox',
+ :'paused' => :'paused',
+ :'version' => :'version'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -88,16 +93,18 @@
def self.openapi_types
{
:'id' => :'String',
:'created_at' => :'Time',
:'href' => :'String',
- :'status' => :'String',
+ :'status' => :'CheckStatus',
:'result' => :'String',
:'form_uri' => :'String',
:'results_uri' => :'String',
:'report_ids' => :'Array<String>',
- :'sandbox' => :'Boolean'
+ :'sandbox' => :'Boolean',
+ :'paused' => :'Boolean',
+ :'version' => :'String'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
@@ -157,10 +164,18 @@
end
if attributes.key?(:'sandbox')
self.sandbox = attributes[:'sandbox']
end
+
+ if attributes.key?(:'paused')
+ self.paused = attributes[:'paused']
+ end
+
+ if attributes.key?(:'version')
+ self.version = attributes[:'version']
+ end
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properties with the reasons
def list_invalid_properties
@@ -176,28 +191,16 @@
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
warn '[DEPRECATED] the `valid?` method is obsolete'
return false if @id.nil?
- status_validator = EnumAttributeValidator.new('String', ["in_progress", "awaiting_applicant", "complete", "withdrawn", "paused", "reopened", "unknown_default_open_api"])
- return false unless status_validator.valid?(@status)
result_validator = EnumAttributeValidator.new('String', ["clear", "consider", "unknown_default_open_api"])
return false unless result_validator.valid?(@result)
true
end
# Custom attribute writer method checking allowed values (enum).
- # @param [Object] status Object to be assigned
- def status=(status)
- validator = EnumAttributeValidator.new('String', ["in_progress", "awaiting_applicant", "complete", "withdrawn", "paused", "reopened", "unknown_default_open_api"])
- unless validator.valid?(status)
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
- end
- @status = status
- end
-
- # Custom attribute writer method checking allowed values (enum).
# @param [Object] result Object to be assigned
def result=(result)
validator = EnumAttributeValidator.new('String', ["clear", "consider", "unknown_default_open_api"])
unless validator.valid?(result)
fail ArgumentError, "invalid value for \"result\", must be one of #{validator.allowable_values}."
@@ -216,11 +219,13 @@
status == o.status &&
result == o.result &&
form_uri == o.form_uri &&
results_uri == o.results_uri &&
report_ids == o.report_ids &&
- sandbox == o.sandbox
+ sandbox == o.sandbox &&
+ paused == o.paused &&
+ version == o.version
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -228,10 +233,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [id, created_at, href, status, result, form_uri, results_uri, report_ids, sandbox].hash
+ [id, created_at, href, status, result, form_uri, results_uri, report_ids, sandbox, paused, version].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself