Class: TrinsicApi::UAEPassProviderOutput

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

Overview

Exposed properties for the uae-pass 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 = {}) ⇒ UAEPassProviderOutput

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  if attributes.key?(:'authentication_methods')
    if (value = attributes[:'authentication_methods']).is_a?(Array)
      self.authentication_methods = value
    end
  end
end

Instance Attribute Details

#authentication_assurance_levelObject

UAE Pass authentication assurance level, if present. This classifies the authentication policy that was satisfied for the session. Known values include: - urn:safelayer:tws:policies:authentication:level:low - urn:safelayer:tws:policies:authentication:level:high



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

def authentication_assurance_level
  @authentication_assurance_level
end

#authentication_methodsObject

UAE Pass authentication methods, if present. This classifies the concrete methods used during authentication. Known values include: - urn:safelayer:tws:policies:authentication:adaptive:methods:mobileid - urn:uae:authentication:method:verified - urn:oasis:names:tc:SAML:1:0:am:password



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

def authentication_methods
  @authentication_methods
end

#emailObject

Email address.



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

def email
  @email
end

#emirates_id_numberObject

Verified Emirates ID number, if returned for the user profile type and scope. The Emirates ID is issued by the Federal Authority for Identity, Citizenship, Customs and Port Security (ICP). The number is a 15-digit identifier following the format 784-YYYY-NNNNNNN-C: The number is a 15-digit identifier following the format 784-YYYY-NNNNNNN-C: - 784: UAE ISO 3166-1 numeric country code. - YYYY: A year value, which could be birth year, registration year, or another year value. This should not be relied upon to infer birth or registration details. - NNNNNNN: 7-digit random serial number for the individual. - C: Check digit. This field may not be returned for visitor profiles.



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

def emirates_id_number
  @emirates_id_number
end

#first_name_arabicObject

First name in Arabic.



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

def first_name_arabic
  @first_name_arabic
end

#first_name_englishObject

First name in the Latin-script value returned by UAE Pass.



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

def first_name_english
  @first_name_english
end

#full_name_arabicObject

Full name in Arabic.



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

def full_name_arabic
  @full_name_arabic
end

#full_name_englishObject

Full name in the Latin-script value returned by UAE Pass.



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

def full_name_english
  @full_name_english
end

#genderObject

Normalized sex parsed from the UAE Pass gender value. Possible values: - Male - Female - Unknown - NotApplicable This is null when the UAE Pass value cannot be parsed.



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

def gender
  @gender
end

#id_typeObject

ID type. Known values: - ID: Emirates ID or national identity document. Returned for SOP2 and SOP3 citizen or resident profiles and SOP3 visitor profiles.



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

def id_type
  @id_type
end

#last_name_arabicObject

Last name in Arabic.



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

def last_name_arabic
  @last_name_arabic
end

#last_name_englishObject

Last name in the Latin-script value returned by UAE Pass.



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

def last_name_english
  @last_name_english
end

#mobileObject

Mobile number.



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

def mobile
  @mobile
end

#nationality_arabicObject

Nationality in Arabic.



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

def nationality_arabic
  @nationality_arabic
end

#nationality_englishObject

Nationality in the Latin-script value returned by UAE Pass.



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

def nationality_english
  @nationality_english
end

#profile_typeObject

UAE Pass profile type, if returned for the requested scope. Possible values: - 1: Citizen or resident profile. - 2: Visitor profile.



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

def profile_type
  @profile_type
end

#smart_pass_uuidObject

SmartPass unique user identifier, if returned. SmartPass was a previous UAE government single-sign-on identity system. UAE Pass can return this legacy identifier for SOP2 and SOP3 accounts that were verified through SmartPass.



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

def smart_pass_uuid
  @smart_pass_uuid
end

#subObject

OIDC subject (sub) returned by UAE Pass. This is an opaque identifier for the authenticated user in the UAE Pass OIDC transaction. It can be prefixed or unprefixed; do not parse this value or assume it matches the Emirates ID number, UAE Pass UUID, or UAE unified ID.



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

def sub
  @sub
end

#title_arabicObject

Title in Arabic. Returned for SOP2 and SOP3 citizen or resident profiles and SOP3 visitor profiles.



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

def title_arabic
  @title_arabic
end

#title_englishObject

Title in the Latin-script value returned by UAE Pass. Returned for SOP2 and SOP3 citizen or resident profiles and SOP3 visitor profiles.



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

def title_english
  @title_english
end

#uae_pass_uuidObject

UAE Pass UUID. The unique UAE Pass user identifier. It is separate from the OIDC subject identifier, Emirates ID number, and UAE unified ID.



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

def uae_pass_uuid
  @uae_pass_uuid
end

#unified_idObject

UAE unified ID, if returned for the requested scope. A unique ID for the user. It is separate from the Emirates ID number, UAE Pass UUID, and OIDC subject identifier.



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

def unified_id
  @unified_id
end

#user_typeObject

UAE Pass user type. Possible values: - SOP1: Basic account. Unverified account with verified email and mobile number. - SOP2: Advanced account. Verified account with Emirates ID verification through SmartPass, Dubai ID, or Emirates ID PIN registration. - SOP3: Qualified account. Verified account with Emirates ID verification through finger biometrics or face biometrics.



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

def user_type
  @user_type
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



118
119
120
# File 'lib/trinsic_api/models/uae_pass_provider_output.rb', line 118

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



123
124
125
# File 'lib/trinsic_api/models/uae_pass_provider_output.rb', line 123

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/trinsic_api/models/uae_pass_provider_output.rb', line 89

def self.attribute_map
  {
    :'sub' => :'sub',
    :'full_name_arabic' => :'fullNameArabic',
    :'gender' => :'gender',
    :'mobile' => :'mobile',
    :'last_name_english' => :'lastNameEnglish',
    :'full_name_english' => :'fullNameEnglish',
    :'uae_pass_uuid' => :'uaePassUuid',
    :'smart_pass_uuid' => :'smartPassUuid',
    :'last_name_arabic' => :'lastNameArabic',
    :'emirates_id_number' => :'emiratesIdNumber',
    :'id_type' => :'idType',
    :'nationality_english' => :'nationalityEnglish',
    :'first_name_english' => :'firstNameEnglish',
    :'user_type' => :'userType',
    :'nationality_arabic' => :'nationalityArabic',
    :'first_name_arabic' => :'firstNameArabic',
    :'email' => :'email',
    :'title_english' => :'titleEnglish',
    :'title_arabic' => :'titleArabic',
    :'profile_type' => :'profileType',
    :'unified_id' => :'unifiedId',
    :'authentication_assurance_level' => :'authenticationAssuranceLevel',
    :'authentication_methods' => :'authenticationMethods'
  }
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



356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'lib/trinsic_api/models/uae_pass_provider_output.rb', line 356

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



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

def self.openapi_nullable
  Set.new([
    :'sub',
    :'full_name_arabic',
    :'gender',
    :'mobile',
    :'last_name_english',
    :'full_name_english',
    :'uae_pass_uuid',
    :'smart_pass_uuid',
    :'last_name_arabic',
    :'emirates_id_number',
    :'id_type',
    :'nationality_english',
    :'first_name_english',
    :'user_type',
    :'nationality_arabic',
    :'first_name_arabic',
    :'email',
    :'title_english',
    :'title_arabic',
    :'profile_type',
    :'unified_id',
    :'authentication_assurance_level',
    :'authentication_methods'
  ])
end

.openapi_typesObject

Attribute type mapping.



128
129
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/trinsic_api/models/uae_pass_provider_output.rb', line 128

def self.openapi_types
  {
    :'sub' => :'String',
    :'full_name_arabic' => :'String',
    :'gender' => :'String',
    :'mobile' => :'String',
    :'last_name_english' => :'String',
    :'full_name_english' => :'String',
    :'uae_pass_uuid' => :'String',
    :'smart_pass_uuid' => :'String',
    :'last_name_arabic' => :'String',
    :'emirates_id_number' => :'String',
    :'id_type' => :'String',
    :'nationality_english' => :'String',
    :'first_name_english' => :'String',
    :'user_type' => :'String',
    :'nationality_arabic' => :'String',
    :'first_name_arabic' => :'String',
    :'email' => :'String',
    :'title_english' => :'String',
    :'title_arabic' => :'String',
    :'profile_type' => :'Integer',
    :'unified_id' => :'String',
    :'authentication_assurance_level' => :'String',
    :'authentication_methods' => :'Array<String>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      sub == o.sub &&
      full_name_arabic == o.full_name_arabic &&
      gender == o.gender &&
      mobile == o.mobile &&
      last_name_english == o.last_name_english &&
      full_name_english == o.full_name_english &&
      uae_pass_uuid == o.uae_pass_uuid &&
      smart_pass_uuid == o.smart_pass_uuid &&
      last_name_arabic == o.last_name_arabic &&
      emirates_id_number == o.emirates_id_number &&
      id_type == o.id_type &&
      nationality_english == o.nationality_english &&
      first_name_english == o.first_name_english &&
      user_type == o.user_type &&
      nationality_arabic == o.nationality_arabic &&
      first_name_arabic == o.first_name_arabic &&
      email == o.email &&
      title_english == o.title_english &&
      title_arabic == o.title_arabic &&
      profile_type == o.profile_type &&
      unified_id == o.unified_id &&
      authentication_assurance_level == o.authentication_assurance_level &&
      authentication_methods == o.authentication_methods
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


343
344
345
# File 'lib/trinsic_api/models/uae_pass_provider_output.rb', line 343

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



349
350
351
# File 'lib/trinsic_api/models/uae_pass_provider_output.rb', line 349

def hash
  [sub, full_name_arabic, gender, mobile, last_name_english, full_name_english, uae_pass_uuid, smart_pass_uuid, last_name_arabic, emirates_id_number, id_type, nationality_english, first_name_english, user_type, nationality_arabic, first_name_arabic, email, title_english, title_arabic, profile_type, unified_id, authentication_assurance_level, authentication_methods].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



298
299
300
301
302
# File 'lib/trinsic_api/models/uae_pass_provider_output.rb', line 298

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



378
379
380
381
382
383
384
385
386
387
388
389
390
# File 'lib/trinsic_api/models/uae_pass_provider_output.rb', line 378

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



306
307
308
309
# File 'lib/trinsic_api/models/uae_pass_provider_output.rb', line 306

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