Class: TrinsicApi::PolandMobywatelMatchProviderOutput

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb

Overview

Exposed properties for the ‘poland-mobywatel-match` Provider which do not directly map to the normalized IdentityData model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ PolandMobywatelMatchProviderOutput

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
254
255
256
257
258
259
260
261
262
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 169

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::PolandMobywatelMatchProviderOutput` 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 `TrinsicApi::PolandMobywatelMatchProviderOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#age_estimation_thresholdObject

Number of years allowed between the individual’s age in digital wallet and the individual’s age estimated from the selfie.



74
75
76
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 74

def age_estimation_threshold
  @age_estimation_threshold
end

#date_of_birthObject

Date of birth as provided by the individual.



29
30
31
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 29

def date_of_birth
  @date_of_birth
end

#estimated_age_from_selfieObject

Estimated age from the selfie, if provided.



77
78
79
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 77

def estimated_age_from_selfie
  @estimated_age_from_selfie
end

#expiration_dateObject

Expiration date as provided by the individual.



35
36
37
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 35

def expiration_date
  @expiration_date
end

#family_nameObject

Current legal family name (nazwisko) as provided by the individual. In Poland the current legal family name (nazwisko) is a separate concept from your birth family name (nazwisko rodowe). They often match, but they can differ after marriage, adoption, or a court-ordered change.



23
24
25
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 23

def family_name
  @family_name
end

#given_nameObject

Given name as provided by the individual.



20
21
22
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 20

def given_name
  @given_name
end

#is_age_estimation_match_for_selfieObject

True when the individual’s age estimated from the selfie matches the individual’s age in digital wallet.



71
72
73
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 71

def is_age_estimation_match_for_selfie
  @is_age_estimation_match_for_selfie
end

#is_match_for_birth_dateObject

True when the provided birth date matches mObywatel wallet data.



53
54
55
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 53

def is_match_for_birth_date
  @is_match_for_birth_date
end

#is_match_for_expiration_dateObject

True when the provided document expiration date matches mObywatel wallet data.



44
45
46
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 44

def is_match_for_expiration_date
  @is_match_for_expiration_date
end

#is_match_for_family_nameObject

True when the provided family name matches mObywatel wallet data.



41
42
43
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 41

def is_match_for_family_name
  @is_match_for_family_name
end

#is_match_for_given_namesObject

True when the provided given name matches mObywatel wallet data.



38
39
40
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 38

def is_match_for_given_names
  @is_match_for_given_names
end

#is_match_for_nationalityObject

True when the provided nationality matches mObywatel wallet data.



50
51
52
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 50

def is_match_for_nationality
  @is_match_for_nationality
end

#is_match_for_personal_numberObject

True when the provided personal number (PESEL) matches mObywatel wallet data.



47
48
49
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 47

def is_match_for_personal_number
  @is_match_for_personal_number
end

#is_match_for_selfieObject

True when the face in the provided selfie matches the face in the document photo in mObywatel wallet.



56
57
58
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 56

def is_match_for_selfie
  @is_match_for_selfie
end

#is_not_different_faceObject

True when no other person’s face has been used to verify this document (good). False when another person’s face has been used to verify this document (possible fraud).



62
63
64
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 62

def is_not_different_face
  @is_not_different_face
end

#is_not_too_similar_to_document_portraitObject

True when the uploaded face and wallet portrait are not suspiciously identical. Often fails when using a document photo as a selfie.



59
60
61
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 59

def is_not_too_similar_to_document_portrait
  @is_not_too_similar_to_document_portrait
end

#is_over_ageObject

True when the individual’s age in digital wallet is over 18.



68
69
70
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 68

def is_over_age
  @is_over_age
end

#is_single_faceObject

True when exactly one face was detected on the selfie image (good). False when multiple faces were detected on the selfie image (ambiguous result).



65
66
67
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 65

def is_single_face
  @is_single_face
end

#nationalityObject

Nationality as provided by the individual.



26
27
28
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 26

def nationality
  @nationality
end

#personal_numberObject

Personal number (PESEL) as provided by the individual.



32
33
34
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 32

def personal_number
  @personal_number
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



106
107
108
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 106

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



111
112
113
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 111

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 80

def self.attribute_map
  {
    :'given_name' => :'givenName',
    :'family_name' => :'familyName',
    :'nationality' => :'nationality',
    :'date_of_birth' => :'dateOfBirth',
    :'personal_number' => :'personalNumber',
    :'expiration_date' => :'expirationDate',
    :'is_match_for_given_names' => :'isMatchForGivenNames',
    :'is_match_for_family_name' => :'isMatchForFamilyName',
    :'is_match_for_expiration_date' => :'isMatchForExpirationDate',
    :'is_match_for_personal_number' => :'isMatchForPersonalNumber',
    :'is_match_for_nationality' => :'isMatchForNationality',
    :'is_match_for_birth_date' => :'isMatchForBirthDate',
    :'is_match_for_selfie' => :'isMatchForSelfie',
    :'is_not_too_similar_to_document_portrait' => :'isNotTooSimilarToDocumentPortrait',
    :'is_not_different_face' => :'isNotDifferentFace',
    :'is_single_face' => :'isSingleFace',
    :'is_over_age' => :'isOverAge',
    :'is_age_estimation_match_for_selfie' => :'isAgeEstimationMatchForSelfie',
    :'age_estimation_threshold' => :'ageEstimationThreshold',
    :'estimated_age_from_selfie' => :'estimatedAgeFromSelfie'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 321

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif 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[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 142

def self.openapi_nullable
  Set.new([
    :'given_name',
    :'family_name',
    :'nationality',
    :'date_of_birth',
    :'personal_number',
    :'expiration_date',
    :'is_match_for_given_names',
    :'is_match_for_family_name',
    :'is_match_for_expiration_date',
    :'is_match_for_personal_number',
    :'is_match_for_nationality',
    :'is_match_for_birth_date',
    :'is_match_for_selfie',
    :'is_not_too_similar_to_document_portrait',
    :'is_not_different_face',
    :'is_single_face',
    :'is_over_age',
    :'is_age_estimation_match_for_selfie',
    :'age_estimation_threshold',
    :'estimated_age_from_selfie'
  ])
end

.openapi_typesObject

Attribute type mapping.



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 116

def self.openapi_types
  {
    :'given_name' => :'String',
    :'family_name' => :'String',
    :'nationality' => :'String',
    :'date_of_birth' => :'Date',
    :'personal_number' => :'String',
    :'expiration_date' => :'Date',
    :'is_match_for_given_names' => :'Boolean',
    :'is_match_for_family_name' => :'Boolean',
    :'is_match_for_expiration_date' => :'Boolean',
    :'is_match_for_personal_number' => :'Boolean',
    :'is_match_for_nationality' => :'Boolean',
    :'is_match_for_birth_date' => :'Boolean',
    :'is_match_for_selfie' => :'Boolean',
    :'is_not_too_similar_to_document_portrait' => :'Boolean',
    :'is_not_different_face' => :'Boolean',
    :'is_single_face' => :'Boolean',
    :'is_over_age' => :'Boolean',
    :'is_age_estimation_match_for_selfie' => :'Boolean',
    :'age_estimation_threshold' => :'Integer',
    :'estimated_age_from_selfie' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 281

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      given_name == o.given_name &&
      family_name == o.family_name &&
      nationality == o.nationality &&
      date_of_birth == o.date_of_birth &&
      personal_number == o.personal_number &&
      expiration_date == o.expiration_date &&
      is_match_for_given_names == o.is_match_for_given_names &&
      is_match_for_family_name == o.is_match_for_family_name &&
      is_match_for_expiration_date == o.is_match_for_expiration_date &&
      is_match_for_personal_number == o.is_match_for_personal_number &&
      is_match_for_nationality == o.is_match_for_nationality &&
      is_match_for_birth_date == o.is_match_for_birth_date &&
      is_match_for_selfie == o.is_match_for_selfie &&
      is_not_too_similar_to_document_portrait == o.is_not_too_similar_to_document_portrait &&
      is_not_different_face == o.is_not_different_face &&
      is_single_face == o.is_single_face &&
      is_over_age == o.is_over_age &&
      is_age_estimation_match_for_selfie == o.is_age_estimation_match_for_selfie &&
      age_estimation_threshold == o.age_estimation_threshold &&
      estimated_age_from_selfie == o.estimated_age_from_selfie
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


308
309
310
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 308

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



314
315
316
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 314

def hash
  [given_name, family_name, nationality, date_of_birth, personal_number, expiration_date, is_match_for_given_names, is_match_for_family_name, is_match_for_expiration_date, is_match_for_personal_number, is_match_for_nationality, is_match_for_birth_date, is_match_for_selfie, is_not_too_similar_to_document_portrait, is_not_different_face, is_single_face, is_over_age, is_age_estimation_match_for_selfie, age_estimation_threshold, estimated_age_from_selfie].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



266
267
268
269
270
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 266

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 343

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



274
275
276
277
# File 'lib/trinsic_api/models/poland_mobywatel_match_provider_output.rb', line 274

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  true
end