Class: TrinsicApi::FrenchNumeriqueProviderOutput

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

Overview

Exposed properties for the france-identite-numerique 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 = {}) ⇒ FrenchNumeriqueProviderOutput

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 217

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::FrenchNumeriqueProviderOutput` 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::FrenchNumeriqueProviderOutput`. 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?(:'sub')
    self.sub = attributes[:'sub']
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#birth_countryObject

National Institute of Statistics and Economic Studies (INSEE) official geographic code (COG) for the individual's country of birth. LaPoste returns this as a 5-character numeric string. This is a country/territory COG, so it always starts with "99" (99xxx). France is coded as 99100. See full list here: https://www.insee.fr/fr/information/2560452



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

def birth_country
  @birth_country
end

#birth_country_isoObject

Birth country as an ISO 3166 alpha-3 code.



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

def birth_country_iso
  @birth_country_iso
end

#birth_country_labelObject

Label of the birth country, in English.



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

def birth_country_label
  @birth_country_label
end

#birth_departmentObject

Number of the department of birth (e.g., "75" for Paris, "2A" for Corse-du-Sud). See full list here: https://en.wikipedia.org/wiki/Departments_of_France



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

def birth_department
  @birth_department
end

#birthdateObject

Date of birth in YYYY-MM-DD format, as recorded on the individual's French identity document.



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

def birthdate
  @birthdate
end

#birthplaceObject

National Institute of Statistics and Economic Studies (INSEE) official geographic code (COG) of the birthplace. This is a 5-digit French administrative code identifying the commune (municipality) of birth. For births in metropolitan France, the first two digits represent the department. See: https://www.insee.fr/fr/information/2560452



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

def birthplace
  @birthplace
end

#birthplace_labelObject

Name of the birthplace commune (municipality). If applicable, this includes the full name of the arrondissement (borough).



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

def birthplace_label
  @birthplace_label
end

#digital_identity_creation_dateObject

Date when the individual's digital identity was created.



80
81
82
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 80

def digital_identity_creation_date
  @digital_identity_creation_date
end

#digital_identity_expiration_dateObject

Date when the digital identity expires. It is valid for 5 years from the date of identity verification. Individuals are notified ~1 month before and must re-verify identity via the app or in-person at La Poste. After expiration, the identity is deactivated but can be renewed within 1 year; otherwise deleted.



83
84
85
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 83

def digital_identity_expiration_date
  @digital_identity_expiration_date
end

#emailObject

Email address registered in the individual's digital identity account.



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

def email
  @email
end

#email_verifiedObject

Whether the email address has been verified by the provider.



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

def email_verified
  @email_verified
end

#family_nameObject

Birth name (nom de naissance) as recorded on the individual's French identity document. In France, this is the family name given at birth and may differ from the usage name.



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

def family_name
  @family_name
end

#given_nameObject

Full given name(s) as recorded on the individual's French identity document. If the individual has multiple given names, they are separated by a single space.



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

def given_name
  @given_name
end

#identity_document_emitting_countryObject

Country that issued the identity document (ISO 3166 alpha-3 code).



98
99
100
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 98

def identity_document_emitting_country
  @identity_document_emitting_country
end

#identity_document_emitting_dateObject

Date when the identity document was issued.



92
93
94
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 92

def identity_document_emitting_date
  @identity_document_emitting_date
end

#identity_document_expiration_dateObject

Date when the identity document expires.



95
96
97
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 95

def identity_document_expiration_date
  @identity_document_expiration_date
end

#identity_document_mrzObject

Machine Readable Zone (MRZ) data from the ID Card, Passport or Residence Permit.



101
102
103
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 101

def identity_document_mrz
  @identity_document_mrz
end

#identity_document_numberObject

Identity document number as it appears on the ID Card, Passport or Residence Permit.



89
90
91
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 89

def identity_document_number
  @identity_document_number
end

#identity_document_typeObject

Type of identity document used for verification. Can be "ID_CARD", "PASSPORT", or "RESIDENCE_PERMIT".



86
87
88
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 86

def identity_document_type
  @identity_document_type
end

#majorityObject

Majority status (majorité) indicating whether the individual has reached the French age of legal majority (18 years old). This value is computed by the provider from the individual's birthdate.



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

def majority
  @majority
end

#nationalityObject

Nationality information with ISO 3166 alpha-3 code and French label. The label is provided in French (e.g., "Française" for French nationality).



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

def nationality
  @nationality
end

#phone_numberObject

Full phone number including country prefix.



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

def phone_number
  @phone_number
end

#phone_number_verifiedObject

Whether the phone number has been verified by the provider.



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

def phone_number_verified
  @phone_number_verified
end

#preferred_surnameObject

Usage surname ("nom d'usage") - according to French law, this is the surname used in daily life. This is typically a married name or other preferred surname, as opposed to FamilyName which is the birth surname ("nom de naissance").



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

def preferred_surname
  @preferred_surname
end

#sexObject

Sex - "Male" or "Female".



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

def sex
  @sex
end

#splitted_given_nameObject

Given name split into first name and middle name(s).



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

def splitted_given_name
  @splitted_given_name
end

#splitted_phoneObject

Phone number split into country prefix and national number.



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

def splitted_phone
  @splitted_phone
end

#subObject

OpenID Connect subject identifier (sub) for the verified individual.



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

def sub
  @sub
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



138
139
140
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 138

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



143
144
145
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 143

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 104

def self.attribute_map
  {
    :'sub' => :'sub',
    :'given_name' => :'givenName',
    :'splitted_given_name' => :'splittedGivenName',
    :'family_name' => :'familyName',
    :'preferred_surname' => :'preferredSurname',
    :'birthdate' => :'birthdate',
    :'nationality' => :'nationality',
    :'sex' => :'sex',
    :'majority' => :'majority',
    :'phone_number' => :'phoneNumber',
    :'splitted_phone' => :'splittedPhone',
    :'phone_number_verified' => :'phoneNumberVerified',
    :'email' => :'email',
    :'email_verified' => :'emailVerified',
    :'birthplace' => :'birthplace',
    :'birthplace_label' => :'birthplaceLabel',
    :'birth_country' => :'birthCountry',
    :'birth_country_iso' => :'birthCountryIso',
    :'birth_country_label' => :'birthCountryLabel',
    :'birth_department' => :'birthDepartment',
    :'digital_identity_creation_date' => :'digitalIdentityCreationDate',
    :'digital_identity_expiration_date' => :'digitalIdentityExpirationDate',
    :'identity_document_type' => :'identityDocumentType',
    :'identity_document_number' => :'identityDocumentNumber',
    :'identity_document_emitting_date' => :'identityDocumentEmittingDate',
    :'identity_document_expiration_date' => :'identityDocumentExpirationDate',
    :'identity_document_emitting_country' => :'identityDocumentEmittingCountry',
    :'identity_document_mrz' => :'identityDocumentMrz'
  }
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



409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 409

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



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
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 182

def self.openapi_nullable
  Set.new([
    :'sub',
    :'given_name',
    :'splitted_given_name',
    :'family_name',
    :'preferred_surname',
    :'birthdate',
    :'nationality',
    :'sex',
    :'majority',
    :'phone_number',
    :'splitted_phone',
    :'phone_number_verified',
    :'email',
    :'email_verified',
    :'birthplace',
    :'birthplace_label',
    :'birth_country',
    :'birth_country_iso',
    :'birth_country_label',
    :'birth_department',
    :'digital_identity_creation_date',
    :'digital_identity_expiration_date',
    :'identity_document_type',
    :'identity_document_number',
    :'identity_document_emitting_date',
    :'identity_document_expiration_date',
    :'identity_document_emitting_country',
    :'identity_document_mrz'
  ])
end

.openapi_typesObject

Attribute type mapping.



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 148

def self.openapi_types
  {
    :'sub' => :'String',
    :'given_name' => :'String',
    :'splitted_given_name' => :'FrenchNumeriqueSplittedGivenName',
    :'family_name' => :'String',
    :'preferred_surname' => :'String',
    :'birthdate' => :'String',
    :'nationality' => :'FrenchNumeriqueNationality',
    :'sex' => :'String',
    :'majority' => :'Boolean',
    :'phone_number' => :'String',
    :'splitted_phone' => :'FrenchNumeriqueSplittedPhone',
    :'phone_number_verified' => :'Boolean',
    :'email' => :'String',
    :'email_verified' => :'Boolean',
    :'birthplace' => :'String',
    :'birthplace_label' => :'String',
    :'birth_country' => :'String',
    :'birth_country_iso' => :'String',
    :'birth_country_label' => :'String',
    :'birth_department' => :'String',
    :'digital_identity_creation_date' => :'Date',
    :'digital_identity_expiration_date' => :'Date',
    :'identity_document_type' => :'String',
    :'identity_document_number' => :'String',
    :'identity_document_emitting_date' => :'Date',
    :'identity_document_expiration_date' => :'Date',
    :'identity_document_emitting_country' => :'String',
    :'identity_document_mrz' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 361

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      sub == o.sub &&
      given_name == o.given_name &&
      splitted_given_name == o.splitted_given_name &&
      family_name == o.family_name &&
      preferred_surname == o.preferred_surname &&
      birthdate == o.birthdate &&
      nationality == o.nationality &&
      sex == o.sex &&
      majority == o.majority &&
      phone_number == o.phone_number &&
      splitted_phone == o.splitted_phone &&
      phone_number_verified == o.phone_number_verified &&
      email == o.email &&
      email_verified == o.email_verified &&
      birthplace == o.birthplace &&
      birthplace_label == o.birthplace_label &&
      birth_country == o.birth_country &&
      birth_country_iso == o.birth_country_iso &&
      birth_country_label == o.birth_country_label &&
      birth_department == o.birth_department &&
      digital_identity_creation_date == o.digital_identity_creation_date &&
      digital_identity_expiration_date == o.digital_identity_expiration_date &&
      identity_document_type == o.identity_document_type &&
      identity_document_number == o.identity_document_number &&
      identity_document_emitting_date == o.identity_document_emitting_date &&
      identity_document_expiration_date == o.identity_document_expiration_date &&
      identity_document_emitting_country == o.identity_document_emitting_country &&
      identity_document_mrz == o.identity_document_mrz
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


396
397
398
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 396

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



402
403
404
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 402

def hash
  [sub, given_name, splitted_given_name, family_name, preferred_surname, birthdate, nationality, sex, majority, phone_number, splitted_phone, phone_number_verified, email, email_verified, birthplace, birthplace_label, birth_country, birth_country_iso, birth_country_label, birth_department, digital_identity_creation_date, digital_identity_expiration_date, identity_document_type, identity_document_number, identity_document_emitting_date, identity_document_expiration_date, identity_document_emitting_country, identity_document_mrz].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



346
347
348
349
350
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 346

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



431
432
433
434
435
436
437
438
439
440
441
442
443
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 431

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



354
355
356
357
# File 'lib/trinsic_api/models/french_numerique_provider_output.rb', line 354

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