Class: YousignClient::CheckDocumentIdentitiesOutput
- Inherits:
-
Object
- Object
- YousignClient::CheckDocumentIdentitiesOutput
- Defined in:
- lib/yousign_client/models/check_document_identities_output.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#birth_date ⇒ Object
Birth date to check on document.
-
#birth_name ⇒ Object
Birth name to check on document.
-
#birth_name_valid ⇒ Object
Defines if birth name sent in the input is valid.
-
#created_at ⇒ Object
Created date of the object.
-
#creator ⇒ Object
Creator of the object.
-
#document_type ⇒ Object
Type of document.
-
#expired ⇒ Object
Defines if the document is expired.
-
#extracted_birth_date ⇒ Object
Extracted birth date on the document.
-
#extracted_birth_name ⇒ Object
Extracted birth name on the document.
-
#extracted_expiration_date ⇒ Object
Extracted expiration date on the document.
-
#extracted_first_names ⇒ Object
Extracted firstnames on the document.
-
#extracted_gender ⇒ Object
Extracted gender on the document.
-
#extracted_issuance_date ⇒ Object
Extracted issuance date on the document.
-
#extracted_mrz ⇒ Object
Extracted MRZ on the document.
-
#first_name_valid ⇒ Object
Defines if one firstname sent in the input is valid.
-
#first_names ⇒ Object
List of firstnames to check on document.
-
#id ⇒ Object
Id of the object.
-
#mrz_valid ⇒ Object
Defines if MRZ sent in the input is valid.
-
#updated_at ⇒ Object
Updated date of the object.
-
#valid ⇒ Object
Defines if the document is valid.
-
#workspace ⇒ Object
workspace creator of the object.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CheckDocumentIdentitiesOutput
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ CheckDocumentIdentitiesOutput
Initializes the object
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 158 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'createdAt') self.created_at = attributes[:'createdAt'] end if attributes.has_key?(:'updatedAt') self.updated_at = attributes[:'updatedAt'] end if attributes.has_key?(:'firstNames') if (value = attributes[:'firstNames']).is_a?(Array) self.first_names = value end end if attributes.has_key?(:'birthName') self.birth_name = attributes[:'birthName'] end if attributes.has_key?(:'birthDate') self.birth_date = attributes[:'birthDate'] end if attributes.has_key?(:'workspace') self.workspace = attributes[:'workspace'] end if attributes.has_key?(:'creator') self.creator = attributes[:'creator'] end if attributes.has_key?(:'documentType') self.document_type = attributes[:'documentType'] end if attributes.has_key?(:'extractedFirstNames') if (value = attributes[:'extractedFirstNames']).is_a?(Array) self.extracted_first_names = value end end if attributes.has_key?(:'extractedBirthName') self.extracted_birth_name = attributes[:'extractedBirthName'] end if attributes.has_key?(:'extractedBirthDate') self.extracted_birth_date = attributes[:'extractedBirthDate'] end if attributes.has_key?(:'extractedGender') self.extracted_gender = attributes[:'extractedGender'] end if attributes.has_key?(:'extractedIssuanceDate') self.extracted_issuance_date = attributes[:'extractedIssuanceDate'] end if attributes.has_key?(:'extractedExpirationDate') self.extracted_expiration_date = attributes[:'extractedExpirationDate'] end if attributes.has_key?(:'extractedMrz') if (value = attributes[:'extractedMrz']).is_a?(Array) self.extracted_mrz = value end end if attributes.has_key?(:'firstNameValid') self.first_name_valid = attributes[:'firstNameValid'] end if attributes.has_key?(:'birthNameValid') self.birth_name_valid = attributes[:'birthNameValid'] end if attributes.has_key?(:'mrzValid') self.mrz_valid = attributes[:'mrzValid'] end if attributes.has_key?(:'expired') self.expired = attributes[:'expired'] end if attributes.has_key?(:'valid') self.valid = attributes[:'valid'] end end |
Instance Attribute Details
#birth_date ⇒ Object
Birth date to check on document
33 34 35 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 33 def birth_date @birth_date end |
#birth_name ⇒ Object
Birth name to check on document
30 31 32 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 30 def birth_name @birth_name end |
#birth_name_valid ⇒ Object
Defines if birth name sent in the input is valid
69 70 71 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 69 def birth_name_valid @birth_name_valid end |
#created_at ⇒ Object
Created date of the object
21 22 23 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 21 def created_at @created_at end |
#creator ⇒ Object
Creator of the object
39 40 41 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 39 def creator @creator end |
#document_type ⇒ Object
Type of document
42 43 44 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 42 def document_type @document_type end |
#expired ⇒ Object
Defines if the document is expired
75 76 77 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 75 def expired @expired end |
#extracted_birth_date ⇒ Object
Extracted birth date on the document
51 52 53 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 51 def extracted_birth_date @extracted_birth_date end |
#extracted_birth_name ⇒ Object
Extracted birth name on the document
48 49 50 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 48 def extracted_birth_name @extracted_birth_name end |
#extracted_expiration_date ⇒ Object
Extracted expiration date on the document
60 61 62 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 60 def extracted_expiration_date @extracted_expiration_date end |
#extracted_first_names ⇒ Object
Extracted firstnames on the document
45 46 47 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 45 def extracted_first_names @extracted_first_names end |
#extracted_gender ⇒ Object
Extracted gender on the document
54 55 56 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 54 def extracted_gender @extracted_gender end |
#extracted_issuance_date ⇒ Object
Extracted issuance date on the document
57 58 59 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 57 def extracted_issuance_date @extracted_issuance_date end |
#extracted_mrz ⇒ Object
Extracted MRZ on the document
63 64 65 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 63 def extracted_mrz @extracted_mrz end |
#first_name_valid ⇒ Object
Defines if one firstname sent in the input is valid
66 67 68 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 66 def first_name_valid @first_name_valid end |
#first_names ⇒ Object
List of firstnames to check on document
27 28 29 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 27 def first_names @first_names end |
#id ⇒ Object
Id of the object
18 19 20 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 18 def id @id end |
#mrz_valid ⇒ Object
Defines if MRZ sent in the input is valid
72 73 74 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 72 def mrz_valid @mrz_valid end |
#updated_at ⇒ Object
Updated date of the object
24 25 26 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 24 def updated_at @updated_at end |
#valid ⇒ Object
Defines if the document is valid
78 79 80 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 78 def valid @valid end |
#workspace ⇒ Object
workspace creator of the object
36 37 38 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 36 def workspace @workspace end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 103 def self.attribute_map { :'id' => :'id', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', :'first_names' => :'firstNames', :'birth_name' => :'birthName', :'birth_date' => :'birthDate', :'workspace' => :'workspace', :'creator' => :'creator', :'document_type' => :'documentType', :'extracted_first_names' => :'extractedFirstNames', :'extracted_birth_name' => :'extractedBirthName', :'extracted_birth_date' => :'extractedBirthDate', :'extracted_gender' => :'extractedGender', :'extracted_issuance_date' => :'extractedIssuanceDate', :'extracted_expiration_date' => :'extractedExpirationDate', :'extracted_mrz' => :'extractedMrz', :'first_name_valid' => :'firstNameValid', :'birth_name_valid' => :'birthNameValid', :'mrz_valid' => :'mrzValid', :'expired' => :'expired', :'valid' => :'valid' } end |
.swagger_types ⇒ Object
Attribute type mapping.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 130 def self.swagger_types { :'id' => :'String', :'created_at' => :'DateTime', :'updated_at' => :'DateTime', :'first_names' => :'Array<String>', :'birth_name' => :'String', :'birth_date' => :'Date', :'workspace' => :'String', :'creator' => :'String', :'document_type' => :'String', :'extracted_first_names' => :'Array<String>', :'extracted_birth_name' => :'String', :'extracted_birth_date' => :'Date', :'extracted_gender' => :'String', :'extracted_issuance_date' => :'Date', :'extracted_expiration_date' => :'Date', :'extracted_mrz' => :'Array<String>', :'first_name_valid' => :'BOOLEAN', :'birth_name_valid' => :'BOOLEAN', :'mrz_valid' => :'BOOLEAN', :'expired' => :'BOOLEAN', :'valid' => :'BOOLEAN' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 282 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && created_at == o.created_at && updated_at == o.updated_at && first_names == o.first_names && birth_name == o.birth_name && birth_date == o.birth_date && workspace == o.workspace && creator == o.creator && document_type == o.document_type && extracted_first_names == o.extracted_first_names && extracted_birth_name == o.extracted_birth_name && extracted_birth_date == o.extracted_birth_date && extracted_gender == o.extracted_gender && extracted_issuance_date == o.extracted_issuance_date && extracted_expiration_date == o.extracted_expiration_date && extracted_mrz == o.extracted_mrz && first_name_valid == o.first_name_valid && birth_name_valid == o.birth_name_valid && mrz_valid == o.mrz_valid && expired == o.expired && valid == o.valid end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 344 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = YousignClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 410 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 323 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
310 311 312 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 310 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
316 317 318 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 316 def hash [id, created_at, updated_at, first_names, birth_name, birth_date, workspace, creator, document_type, extracted_first_names, extracted_birth_name, extracted_birth_date, extracted_gender, extracted_issuance_date, extracted_expiration_date, extracted_mrz, first_name_valid, birth_name_valid, mrz_valid, expired, valid].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
257 258 259 260 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 257 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
390 391 392 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 390 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
396 397 398 399 400 401 402 403 404 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 396 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
384 385 386 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 384 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
264 265 266 267 268 |
# File 'lib/yousign_client/models/check_document_identities_output.rb', line 264 def valid? document_type_validator = EnumAttributeValidator.new('String', ['ID_CARD', 'PASSPORT']) return false unless document_type_validator.valid?(@document_type) true end |