Class: TrinsicApi::ItsmeProviderOutput

Inherits:
ApiModelBase show all
Defined in:
lib/trinsic_api/models/itsme_provider_output.rb

Overview

Exposed properties for the itsme 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 = {}) ⇒ ItsmeProviderOutput

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/itsme_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::ItsmeProviderOutput` 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::ItsmeProviderOutput`. 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?(:'date_of_birth')
    self.date_of_birth = attributes[:'date_of_birth']
  end

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

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

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

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

  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?(:'date_of_birth_as_string')
    self.date_of_birth_as_string = attributes[:'date_of_birth_as_string']
  end

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#addressObject

The address of the verified individual. Availability by ID document issuing country: always returned for Belgian-issued ID documents, best effort for Netherlands-issued ID documents, and not returned for other supported issuing countries.



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

def address
  @address
end

#belgian_identity_cardObject

The Belgian eID card document number and related metadata. Availability by ID document issuing country: returned only for Belgian-issued ID documents.



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

def belgian_identity_card
  @belgian_identity_card
end

#belgian_national_numberObject

The Belgian National Register Number and related metadata. Availability by ID document issuing country: returned only for Belgian-issued ID documents.



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

def belgian_national_number
  @belgian_national_number
end

#citizenshipObject

The citizenship of the verified individual as an ISO 3166-1 alpha-2 country code. Availability by ID document issuing country: always returned for supported issuing countries except Belgium, where it is best effort.



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

def citizenship
  @citizenship
end

#date_of_birthObject

The date of birth of the verified individual. Availability by ID document issuing country: always returned for supported issuing countries except Belgium, where it is best effort.



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

def date_of_birth
  @date_of_birth
end

#date_of_birth_as_stringObject

The date of birth of the verified individual in itsme's document-facing string format. Availability by ID document issuing country: best effort for Belgian-issued ID documents; not returned for other supported issuing countries.



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

def date_of_birth_as_string
  @date_of_birth_as_string
end

#deviceObject

The device metadata for the verification. Availability by ID document issuing country: best effort for all supported issuing countries.



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

def device
  @device
end

#emailObject

The email address of the verified individual. Availability by ID document issuing country: best effort for all supported issuing countries.



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

def email
  @email
end

#email_verifiedObject

Whether itsme reports the email address as verified. Availability by ID document issuing country: returned only if email is available. Note: itsme currently documents that this value is usually false because email verification is not implemented in its systems.



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

def email_verified
  @email_verified
end

#family_nameObject

The family name of the verified individual. Availability by ID document issuing country: always returned for all supported issuing countries.



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

def family_name
  @family_name
end

#full_nameObject

The full name of the verified individual. Availability by ID document issuing country: always returned for all supported issuing countries.



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

def full_name
  @full_name
end

#genderObject

The gender claim for the verified individual. Availability by ID document issuing country: always returned for supported issuing countries except Netherlands, where it is best effort. Known values: - Female - Male - Unknown



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

def gender
  @gender
end

#given_nameObject

The given name of the verified individual. Availability by ID document issuing country: best effort for all supported issuing countries.



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

def given_name
  @given_name
end

#identity_documentObject

The identity document and related metadata. Availability by ID document issuing country: always returned for all supported issuing countries.



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

def identity_document
  @identity_document
end

#localeObject

The itsme app language as an uppercase language code. Availability by ID document issuing country: best effort for all supported issuing countries. Known values: - NL - FR - DE - EN



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

def locale
  @locale
end

#phone_numberObject

The phone number of the verified individual, with a leading + country calling code. Availability by ID document issuing country: always returned for all supported issuing countries.



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

def phone_number
  @phone_number
end

#phone_number_verifiedObject

Whether itsme reports the phone number as verified. Availability by ID document issuing country: always returned for all supported issuing countries.



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

def phone_number_verified
  @phone_number_verified
end

#picture_urlObject

The URL of the profile picture resource. Availability by ID document issuing country: always returned for supported issuing countries except Belgium, where it is best effort.



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

def picture_url
  @picture_url
end

#place_of_birthObject

The place of birth. Availability by ID document issuing country: best effort for Belgian-issued ID documents; not returned for other supported issuing countries.



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

def place_of_birth
  @place_of_birth
end

#subObject

The stable OpenID Connect (OIDC) subject (sub) identifier. This should be a stable identifier, however, if a user deletes and recreates an account, this identifier will change.



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

def sub
  @sub
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



106
107
108
# File 'lib/trinsic_api/models/itsme_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/itsme_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/itsme_provider_output.rb', line 80

def self.attribute_map
  {
    :'date_of_birth' => :'dateOfBirth',
    :'email' => :'email',
    :'phone_number' => :'phoneNumber',
    :'sub' => :'sub',
    :'full_name' => :'fullName',
    :'given_name' => :'givenName',
    :'family_name' => :'familyName',
    :'date_of_birth_as_string' => :'dateOfBirthAsString',
    :'gender' => :'gender',
    :'locale' => :'locale',
    :'picture_url' => :'pictureUrl',
    :'email_verified' => :'emailVerified',
    :'phone_number_verified' => :'phoneNumberVerified',
    :'address' => :'address',
    :'citizenship' => :'citizenship',
    :'belgian_national_number' => :'belgianNationalNumber',
    :'belgian_identity_card' => :'belgianIdentityCard',
    :'identity_document' => :'identityDocument',
    :'place_of_birth' => :'placeOfBirth',
    :'device' => :'device'
  }
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/itsme_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/itsme_provider_output.rb', line 142

def self.openapi_nullable
  Set.new([
    :'date_of_birth',
    :'email',
    :'phone_number',
    :'sub',
    :'full_name',
    :'given_name',
    :'family_name',
    :'date_of_birth_as_string',
    :'gender',
    :'locale',
    :'picture_url',
    :'email_verified',
    :'phone_number_verified',
    :'address',
    :'citizenship',
    :'belgian_national_number',
    :'belgian_identity_card',
    :'identity_document',
    :'place_of_birth',
    :'device'
  ])
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/itsme_provider_output.rb', line 116

def self.openapi_types
  {
    :'date_of_birth' => :'Date',
    :'email' => :'String',
    :'phone_number' => :'String',
    :'sub' => :'String',
    :'full_name' => :'String',
    :'given_name' => :'String',
    :'family_name' => :'String',
    :'date_of_birth_as_string' => :'String',
    :'gender' => :'String',
    :'locale' => :'String',
    :'picture_url' => :'String',
    :'email_verified' => :'Boolean',
    :'phone_number_verified' => :'Boolean',
    :'address' => :'ItsmeProviderAddress',
    :'citizenship' => :'String',
    :'belgian_national_number' => :'ItsmeBelgianNationalNumber',
    :'belgian_identity_card' => :'ItsmeBelgianIdentityCard',
    :'identity_document' => :'ItsmeIdentityDocument',
    :'place_of_birth' => :'ItsmePlaceOfBirth',
    :'device' => :'ItsmeDirectDevice'
  }
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/itsme_provider_output.rb', line 281

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      date_of_birth == o.date_of_birth &&
      email == o.email &&
      phone_number == o.phone_number &&
      sub == o.sub &&
      full_name == o.full_name &&
      given_name == o.given_name &&
      family_name == o.family_name &&
      date_of_birth_as_string == o.date_of_birth_as_string &&
      gender == o.gender &&
      locale == o.locale &&
      picture_url == o.picture_url &&
      email_verified == o.email_verified &&
      phone_number_verified == o.phone_number_verified &&
      address == o.address &&
      citizenship == o.citizenship &&
      belgian_national_number == o.belgian_national_number &&
      belgian_identity_card == o.belgian_identity_card &&
      identity_document == o.identity_document &&
      place_of_birth == o.place_of_birth &&
      device == o.device
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


308
309
310
# File 'lib/trinsic_api/models/itsme_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/itsme_provider_output.rb', line 314

def hash
  [date_of_birth, email, phone_number, sub, full_name, given_name, family_name, date_of_birth_as_string, gender, locale, picture_url, email_verified, phone_number_verified, address, citizenship, belgian_national_number, belgian_identity_card, identity_document, place_of_birth, device].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/itsme_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/itsme_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/itsme_provider_output.rb', line 274

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