Class: TrinsicApi::MoldovaIdentityCardCredential
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- TrinsicApi::MoldovaIdentityCardCredential
- Defined in:
- lib/trinsic_api/models/moldova_identity_card_credential.rb
Overview
A Moldovan Identity Card credential, with document type md.gov.wallet.pid.1, retrieved from the Moldovan EVO wallet. This credential is derived from the individual's Moldovan National Identity Card.
Instance Attribute Summary collapse
-
#age_over18 ⇒ Object
Whether the individual is at least 18 years of age at the time of issuance of the digital credential.
-
#age_over21 ⇒ Object
Whether the individual is at least 21 years of age at the time of issuance of the digital credential.
-
#date_of_birth ⇒ Object
The date of birth of the individual.
-
#document_number ⇒ Object
The number of the underlying physical identity card, excluding the series.
-
#document_series ⇒ Object
The series of the underlying physical identity card.
-
#document_type ⇒ Object
The document type TODO: Get example values.
-
#expiry_date ⇒ Object
The date the physical identity card, used to create this digital credential, expires.
-
#family_name ⇒ Object
The individual's family name (surname), as recorded on their Moldovan identity card.
-
#given_name ⇒ Object
The individual's given name(s), as recorded on their Moldovan identity card.
-
#idnp ⇒ Object
The individual's IDNP (Numărul de Identificare Personal), the Moldovan state personal identification number.
-
#issue_date ⇒ Object
The date the physical identity card, used to create this digital credential, was issued.
-
#issuing_authority ⇒ Object
The name of the authority that issued the identity card.
-
#nationality ⇒ Object
The individual's nationality, as an ISO 3166-1 alpha-2 country code.
-
#resident_address ⇒ Object
The individual's full registered residential address as a single formatted string.
-
#resident_block ⇒ Object
The building block (bloc) of the individual's registered residence, where applicable.
-
#resident_city ⇒ Object
The locality (municipality, city, town, or village) of the individual's registered residence.
-
#resident_country ⇒ Object
The country of the individual's registered residence, as an ISO 3166-1 alpha-2 country code.
-
#resident_flat ⇒ Object
The flat (apartment) number of the individual's registered residence, where applicable.
-
#resident_house_number ⇒ Object
The house or building number of the individual's registered residence.
-
#resident_region ⇒ Object
The region of the individual's registered residence.
-
#resident_street ⇒ Object
The street name of the individual's registered residence.
-
#sex ⇒ Object
The individual's sex, as an ISO/IEC 5218 numeric code.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ MoldovaIdentityCardCredential
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ MoldovaIdentityCardCredential
Initializes the object
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 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 181 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::MoldovaIdentityCardCredential` 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::MoldovaIdentityCardCredential`. 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?(:'idnp') self.idnp = attributes[:'idnp'] 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?(:'sex') self.sex = attributes[:'sex'] 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?(:'age_over18') self.age_over18 = attributes[:'age_over18'] end if attributes.key?(:'age_over21') self.age_over21 = attributes[:'age_over21'] end if attributes.key?(:'resident_address') self.resident_address = attributes[:'resident_address'] end if attributes.key?(:'resident_country') self.resident_country = attributes[:'resident_country'] end if attributes.key?(:'resident_region') self.resident_region = attributes[:'resident_region'] end if attributes.key?(:'resident_city') self.resident_city = attributes[:'resident_city'] end if attributes.key?(:'resident_street') self.resident_street = attributes[:'resident_street'] end if attributes.key?(:'resident_house_number') self.resident_house_number = attributes[:'resident_house_number'] end if attributes.key?(:'resident_block') self.resident_block = attributes[:'resident_block'] end if attributes.key?(:'resident_flat') self.resident_flat = attributes[:'resident_flat'] end if attributes.key?(:'issue_date') self.issue_date = attributes[:'issue_date'] end if attributes.key?(:'expiry_date') self.expiry_date = attributes[:'expiry_date'] end if attributes.key?(:'issuing_authority') self. = attributes[:'issuing_authority'] end if attributes.key?(:'document_type') self.document_type = attributes[:'document_type'] end if attributes.key?(:'document_series') self.document_series = attributes[:'document_series'] end if attributes.key?(:'document_number') self.document_number = attributes[:'document_number'] end end |
Instance Attribute Details
#age_over18 ⇒ Object
Whether the individual is at least 18 years of age at the time of issuance of the digital credential.
38 39 40 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 38 def age_over18 @age_over18 end |
#age_over21 ⇒ Object
Whether the individual is at least 21 years of age at the time of issuance of the digital credential.
41 42 43 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 41 def age_over21 @age_over21 end |
#date_of_birth ⇒ Object
The date of birth of the individual.
35 36 37 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 35 def date_of_birth @date_of_birth end |
#document_number ⇒ Object
The number of the underlying physical identity card, excluding the series. This is the suffix to the full Moldovan identity card number, which is in the format SNNN..., where: - S is a one-letter document series - NNN... is a document number (typically 8 digits)
83 84 85 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 83 def document_number @document_number end |
#document_series ⇒ Object
The series of the underlying physical identity card. This is the prefix to the full Moldovan identity card number, which is in the format SNNN..., where: - S is a one-letter document series - NNN... is a document number (typically 8 digits)
80 81 82 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 80 def document_series @document_series end |
#document_type ⇒ Object
The document type TODO: Get example values
77 78 79 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 77 def document_type @document_type end |
#expiry_date ⇒ Object
The date the physical identity card, used to create this digital credential, expires.
71 72 73 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 71 def expiry_date @expiry_date end |
#family_name ⇒ Object
The individual's family name (surname), as recorded on their Moldovan identity card.
26 27 28 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 26 def family_name @family_name end |
#given_name ⇒ Object
The individual's given name(s), as recorded on their Moldovan identity card.
23 24 25 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 23 def given_name @given_name end |
#idnp ⇒ Object
The individual's IDNP (Numărul de Identificare Personal), the Moldovan state personal identification number. This is a 13-digit number which uniquely identifies all natural persons in the Republic of Moldova. It has the format 2YYYOOOSSSSSX, where: - 2 is the literal number 2 to indicate that the identifier belongs to a natural person - YYY is the last 3 digits of the year in which the identifier was issued - OOO is the code of the registrar office which issued the identifier - SSSSS is the sequential birth number for that year - X is a check digit Note that the year encoded in the identifier is not necessarily the same as the year of birth of the individual.
20 21 22 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 20 def idnp @idnp end |
#issue_date ⇒ Object
The date the physical identity card, used to create this digital credential, was issued.
68 69 70 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 68 def issue_date @issue_date end |
#issuing_authority ⇒ Object
The name of the authority that issued the identity card.
74 75 76 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 74 def @issuing_authority end |
#nationality ⇒ Object
The individual's nationality, as an ISO 3166-1 alpha-2 country code. Moldovan nationals are MD.
32 33 34 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 32 def nationality @nationality end |
#resident_address ⇒ Object
The individual's full registered residential address as a single formatted string.
44 45 46 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 44 def resident_address @resident_address end |
#resident_block ⇒ Object
The building block (bloc) of the individual's registered residence, where applicable.
62 63 64 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 62 def resident_block @resident_block end |
#resident_city ⇒ Object
The locality (municipality, city, town, or village) of the individual's registered residence.
53 54 55 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 53 def resident_city @resident_city end |
#resident_country ⇒ Object
The country of the individual's registered residence, as an ISO 3166-1 alpha-2 country code.
47 48 49 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 47 def resident_country @resident_country end |
#resident_flat ⇒ Object
The flat (apartment) number of the individual's registered residence, where applicable.
65 66 67 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 65 def resident_flat @resident_flat end |
#resident_house_number ⇒ Object
The house or building number of the individual's registered residence.
59 60 61 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 59 def resident_house_number @resident_house_number end |
#resident_region ⇒ Object
The region of the individual's registered residence.
50 51 52 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 50 def resident_region @resident_region end |
#resident_street ⇒ Object
The street name of the individual's registered residence.
56 57 58 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 56 def resident_street @resident_street end |
#sex ⇒ Object
The individual's sex, as an ISO/IEC 5218 numeric code. Possible values: - 0: Not known - 1: Male - 2: Female - 9: Not applicable
29 30 31 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 29 def sex @sex end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
114 115 116 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 114 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
119 120 121 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 119 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 86 def self.attribute_map { :'idnp' => :'idnp', :'given_name' => :'givenName', :'family_name' => :'familyName', :'sex' => :'sex', :'nationality' => :'nationality', :'date_of_birth' => :'dateOfBirth', :'age_over18' => :'ageOver18', :'age_over21' => :'ageOver21', :'resident_address' => :'residentAddress', :'resident_country' => :'residentCountry', :'resident_region' => :'residentRegion', :'resident_city' => :'residentCity', :'resident_street' => :'residentStreet', :'resident_house_number' => :'residentHouseNumber', :'resident_block' => :'residentBlock', :'resident_flat' => :'residentFlat', :'issue_date' => :'issueDate', :'expiry_date' => :'expiryDate', :'issuing_authority' => :'issuingAuthority', :'document_type' => :'documentType', :'document_series' => :'documentSeries', :'document_number' => :'documentNumber' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 343 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_nullable ⇒ Object
List of attributes with nullable: true
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 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 152 def self.openapi_nullable Set.new([ :'idnp', :'given_name', :'family_name', :'sex', :'nationality', :'date_of_birth', :'age_over18', :'age_over21', :'resident_address', :'resident_country', :'resident_region', :'resident_city', :'resident_street', :'resident_house_number', :'resident_block', :'resident_flat', :'issue_date', :'expiry_date', :'issuing_authority', :'document_type', :'document_series', :'document_number' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 124 def self.openapi_types { :'idnp' => :'String', :'given_name' => :'String', :'family_name' => :'String', :'sex' => :'Integer', :'nationality' => :'String', :'date_of_birth' => :'Date', :'age_over18' => :'Boolean', :'age_over21' => :'Boolean', :'resident_address' => :'String', :'resident_country' => :'String', :'resident_region' => :'String', :'resident_city' => :'String', :'resident_street' => :'String', :'resident_house_number' => :'String', :'resident_block' => :'String', :'resident_flat' => :'String', :'issue_date' => :'Date', :'expiry_date' => :'Date', :'issuing_authority' => :'String', :'document_type' => :'String', :'document_series' => :'String', :'document_number' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 301 def ==(o) return true if self.equal?(o) self.class == o.class && idnp == o.idnp && given_name == o.given_name && family_name == o.family_name && sex == o.sex && nationality == o.nationality && date_of_birth == o.date_of_birth && age_over18 == o.age_over18 && age_over21 == o.age_over21 && resident_address == o.resident_address && resident_country == o.resident_country && resident_region == o.resident_region && resident_city == o.resident_city && resident_street == o.resident_street && resident_house_number == o.resident_house_number && resident_block == o.resident_block && resident_flat == o.resident_flat && issue_date == o.issue_date && expiry_date == o.expiry_date && == o. && document_type == o.document_type && document_series == o.document_series && document_number == o.document_number end |
#eql?(o) ⇒ Boolean
330 331 332 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 330 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
336 337 338 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 336 def hash [idnp, given_name, family_name, sex, nationality, date_of_birth, age_over18, age_over21, resident_address, resident_country, resident_region, resident_city, resident_street, resident_house_number, resident_block, resident_flat, issue_date, expiry_date, , document_type, document_series, document_number].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
286 287 288 289 290 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 286 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
365 366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 365 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
294 295 296 297 |
# File 'lib/trinsic_api/models/moldova_identity_card_credential.rb', line 294 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |