Class: TrinsicApi::SingpassPersonalCatalog
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- TrinsicApi::SingpassPersonalCatalog
- Defined in:
- lib/trinsic_api/models/singpass_personal_catalog.rb
Overview
MyInfo Personal catalog.
Instance Attribute Summary collapse
-
#alias_name ⇒ Object
The individual’s alternate legally recognized name.
-
#birth_country ⇒ Object
The user’s birth country in IS0-2 country code format.
-
#date_of_birth ⇒ Object
The user’s date of birth.
-
#dialect ⇒ Object
The user’s dialect.
-
#email ⇒ Object
The user’s email address.
-
#employment_sector ⇒ Object
The user’s employment sector.
-
#hanyu_pinyin_alias_name ⇒ Object
The individual’s Hanyu Pinyin alias name.
-
#hanyu_pinyin_name ⇒ Object
The individual’s Hanyu Pinyin name.
-
#house_developmenet_board_type ⇒ Object
Housing and Development Board (HBD) flat type code and description.
-
#housing_type ⇒ Object
The user’s housing type.
-
#identity_number ⇒ Object
The Unique Identifier Number (UINFIN) for the user.
-
#married_name ⇒ Object
The individual’s married name.
-
#mobile_number ⇒ Object
The user’s mobile number, split into prefix, area code, and subscriber number.
-
#name ⇒ Object
The name of verified individual composed of all the possible names.
-
#nationality ⇒ Object
The user’s nationality in IS0-2 country code format.
-
#partial_identity_number ⇒ Object
The partial National Registration Identity Card or Foreign Identification Number (NRIC/FIN) shown by Singpass.
-
#pass_expiry_date ⇒ Object
Pass expiration date.
-
#pass_status ⇒ Object
Pass status.
-
#pass_type ⇒ Object
The Pass type of the individual.
-
#passport_expiry_date ⇒ Object
The user’s passport expiry date.
-
#passport_number ⇒ Object
The user’s passport number.
-
#registered_address ⇒ Object
The user’s registered address.
-
#residential_status ⇒ Object
The user’s residential status.
-
#sex ⇒ Object
Sex of the individual.
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 = {}) ⇒ SingpassPersonalCatalog
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 = {}) ⇒ SingpassPersonalCatalog
Initializes the object
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 295 296 297 298 299 300 301 302 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 193 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::SingpassPersonalCatalog` 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::SingpassPersonalCatalog`. 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?(:'identity_number') self.identity_number = attributes[:'identity_number'] end if attributes.key?(:'partial_identity_number') self.partial_identity_number = attributes[:'partial_identity_number'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'alias_name') self.alias_name = attributes[:'alias_name'] end if attributes.key?(:'hanyu_pinyin_name') self. = attributes[:'hanyu_pinyin_name'] end if attributes.key?(:'hanyu_pinyin_alias_name') self. = attributes[:'hanyu_pinyin_alias_name'] end if attributes.key?(:'married_name') self.married_name = attributes[:'married_name'] end if attributes.key?(:'email') self.email = attributes[:'email'] end if attributes.key?(:'mobile_number') self.mobile_number = attributes[:'mobile_number'] end if attributes.key?(:'dialect') self.dialect = attributes[:'dialect'] end if attributes.key?(:'date_of_birth') self.date_of_birth = attributes[:'date_of_birth'] end if attributes.key?(:'residential_status') self.residential_status = attributes[:'residential_status'] end if attributes.key?(:'nationality') self.nationality = attributes[:'nationality'] end if attributes.key?(:'birth_country') self.birth_country = attributes[:'birth_country'] end if attributes.key?(:'passport_number') self.passport_number = attributes[:'passport_number'] end if attributes.key?(:'passport_expiry_date') self.passport_expiry_date = attributes[:'passport_expiry_date'] end if attributes.key?(:'pass_type') self.pass_type = attributes[:'pass_type'] end if attributes.key?(:'pass_status') self.pass_status = attributes[:'pass_status'] end if attributes.key?(:'pass_expiry_date') self.pass_expiry_date = attributes[:'pass_expiry_date'] end if attributes.key?(:'employment_sector') self.employment_sector = attributes[:'employment_sector'] end if attributes.key?(:'registered_address') self.registered_address = attributes[:'registered_address'] end if attributes.key?(:'house_developmenet_board_type') self.house_developmenet_board_type = attributes[:'house_developmenet_board_type'] end if attributes.key?(:'housing_type') self.housing_type = attributes[:'housing_type'] end if attributes.key?(:'sex') self.sex = attributes[:'sex'] end end |
Instance Attribute Details
#alias_name ⇒ Object
The individual’s alternate legally recognized name.
29 30 31 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 29 def alias_name @alias_name end |
#birth_country ⇒ Object
The user’s birth country in IS0-2 country code format.
59 60 61 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 59 def birth_country @birth_country end |
#date_of_birth ⇒ Object
The user’s date of birth.
50 51 52 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 50 def date_of_birth @date_of_birth end |
#dialect ⇒ Object
The user’s dialect.
47 48 49 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 47 def dialect @dialect end |
#email ⇒ Object
The user’s email address.
41 42 43 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 41 def email @email end |
#employment_sector ⇒ Object
The user’s employment sector.
77 78 79 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 77 def employment_sector @employment_sector end |
#hanyu_pinyin_alias_name ⇒ Object
The individual’s Hanyu Pinyin alias name.
35 36 37 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 35 def @hanyu_pinyin_alias_name end |
#hanyu_pinyin_name ⇒ Object
The individual’s Hanyu Pinyin name.
32 33 34 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 32 def @hanyu_pinyin_name end |
#house_developmenet_board_type ⇒ Object
Housing and Development Board (HBD) flat type code and description. This value will be null if not HBD Possible values (code description): - 111 1-ROOM FLAT (HDB) - 112 2-ROOM FLAT (HDB) - 113 3-ROOM FLAT (HDB) - 114 4-ROOM FLAT (HDB) - 115 5-ROOM FLAT (HDB) - 116 EXECUTIVE FLAT (HDB) - 118 STUDIO APARTMENT (HDB)
83 84 85 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 83 def house_developmenet_board_type @house_developmenet_board_type end |
#housing_type ⇒ Object
The user’s housing type. Possible values (code description): - 121 DETACHED HOUSE - 122 SEMI-DETACHED HOUSE - 123 TERRACE HOUSE - 131 CONDOMINIUM - 132 EXECUTIVE CONDOMINIUM - 139 APARTMENT
86 87 88 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 86 def housing_type @housing_type end |
#identity_number ⇒ Object
The Unique Identifier Number (UINFIN) for the user. The number can be either a National Registration Identity Card or a Foreign Identification Number (NRIC/FIN). Follows the format @xxxxxxx#: - @ is the status of the holder. - Singapore citizens and permanent residents born before 1 January 2000 are assigned the letter "S". - Singapore citizens and permanent residents born on or after 1 January 2000 are assigned the letter "T". - Foreigners issued with long-term passes before 1 January 2000 are assigned the letter "F". - Foreigners issued with long-term passes from 1 January 2000 to 31 December 2021 are assigned the letter "G". - Foreigners issued with long-term passes on or after 1 January 2022 are assigned the letter "M". - xxxxxxx is seven digit serial number. - # is the checksum letter.
20 21 22 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 20 def identity_number @identity_number end |
#married_name ⇒ Object
The individual’s married name. This appears when Singpass has a legally recognized married surname on file.
38 39 40 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 38 def married_name @married_name end |
#mobile_number ⇒ Object
The user’s mobile number, split into prefix, area code, and subscriber number.
44 45 46 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 44 def mobile_number @mobile_number end |
#name ⇒ Object
The name of verified individual composed of all the possible names. The name is assembled in the following format (where applicable): 1. Principal Name (The first name section) 2. Hanyu Pinyin Name 3. Alias Name 4. Hanyu Pinyin Alias Name 5. Married Name (optional): Available only for females, prefixed with "MRS"
26 27 28 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 26 def name @name end |
#nationality ⇒ Object
The user’s nationality in IS0-2 country code format.
56 57 58 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 56 def nationality @nationality end |
#partial_identity_number ⇒ Object
The partial National Registration Identity Card or Foreign Identification Number (NRIC/FIN) shown by Singpass. The value hides all but the last three digits and checksum.
23 24 25 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 23 def partial_identity_number @partial_identity_number end |
#pass_expiry_date ⇒ Object
Pass expiration date. Note that this only applies to a FIN holder.
74 75 76 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 74 def pass_expiry_date @pass_expiry_date end |
#pass_status ⇒ Object
Pass status. Possible values: - Live - Approved (Interim status in which the FIN holder has yet to receive the pass) Note that this only applies to a FIN holder.
71 72 73 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 71 def pass_status @pass_status end |
#pass_type ⇒ Object
The Pass type of the individual. Possible values: (code description) - RPass Work Permit - SPass S Pass - P1Pass Employment Pass - P2Pass Employment Pass - QPass Employment Pass - PEP Personalised Employment Pass - WHP Work Holiday Pass - TEP Training Employment Pass - Entre EntrePass - OVE Overseas Networks & Expertise Pass - DP Dependent Pass - LTVP Long-Term Visit Pass - LOC Letter of Consent - MWP Miscellaneous Work Pass - STP Student’s Pass - LTVP+ Long-Term Visit Pass Plus - IEO Immigration Exemption Order Note that this only applies to a FIN holder.
68 69 70 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 68 def pass_type @pass_type end |
#passport_expiry_date ⇒ Object
The user’s passport expiry date.
65 66 67 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 65 def passport_expiry_date @passport_expiry_date end |
#passport_number ⇒ Object
The user’s passport number.
62 63 64 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 62 def passport_number @passport_number end |
#registered_address ⇒ Object
The user’s registered address.
80 81 82 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 80 def registered_address @registered_address end |
#residential_status ⇒ Object
The user’s residential status. Possible values (code description): - A Alien - C Citizen - P PR - U Unknown - N NOT APPLICABLE
53 54 55 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 53 def residential_status @residential_status end |
#sex ⇒ Object
Sex of the individual. Possible values: - Female - Male - Unknown
89 90 91 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 89 def sex @sex end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
122 123 124 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 122 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
127 128 129 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 127 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 92 def self.attribute_map { :'identity_number' => :'identityNumber', :'partial_identity_number' => :'partialIdentityNumber', :'name' => :'name', :'alias_name' => :'aliasName', :'hanyu_pinyin_name' => :'hanyuPinyinName', :'hanyu_pinyin_alias_name' => :'hanyuPinyinAliasName', :'married_name' => :'marriedName', :'email' => :'email', :'mobile_number' => :'mobileNumber', :'dialect' => :'dialect', :'date_of_birth' => :'dateOfBirth', :'residential_status' => :'residentialStatus', :'nationality' => :'nationality', :'birth_country' => :'birthCountry', :'passport_number' => :'passportNumber', :'passport_expiry_date' => :'passportExpiryDate', :'pass_type' => :'passType', :'pass_status' => :'passStatus', :'pass_expiry_date' => :'passExpiryDate', :'employment_sector' => :'employmentSector', :'registered_address' => :'registeredAddress', :'house_developmenet_board_type' => :'houseDevelopmenetBoardType', :'housing_type' => :'housingType', :'sex' => :'sex' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 365 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
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 162 def self.openapi_nullable Set.new([ :'identity_number', :'partial_identity_number', :'name', :'alias_name', :'hanyu_pinyin_name', :'hanyu_pinyin_alias_name', :'married_name', :'email', :'mobile_number', :'dialect', :'date_of_birth', :'residential_status', :'nationality', :'birth_country', :'passport_number', :'passport_expiry_date', :'pass_type', :'pass_status', :'pass_expiry_date', :'employment_sector', :'registered_address', :'house_developmenet_board_type', :'housing_type', :'sex' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 132 def self.openapi_types { :'identity_number' => :'String', :'partial_identity_number' => :'String', :'name' => :'String', :'alias_name' => :'String', :'hanyu_pinyin_name' => :'String', :'hanyu_pinyin_alias_name' => :'String', :'married_name' => :'String', :'email' => :'String', :'mobile_number' => :'SingpassPhoneNumber', :'dialect' => :'SingpassMyInfoDescription', :'date_of_birth' => :'Date', :'residential_status' => :'SingpassMyInfoDescription', :'nationality' => :'String', :'birth_country' => :'String', :'passport_number' => :'String', :'passport_expiry_date' => :'Date', :'pass_type' => :'SingpassMyInfoDescription', :'pass_status' => :'String', :'pass_expiry_date' => :'Date', :'employment_sector' => :'String', :'registered_address' => :'SingpassMyInfoRegisteredAddressOutput', :'house_developmenet_board_type' => :'SingpassMyInfoDescription', :'housing_type' => :'SingpassMyInfoDescription', :'sex' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 321 def ==(o) return true if self.equal?(o) self.class == o.class && identity_number == o.identity_number && partial_identity_number == o.partial_identity_number && name == o.name && alias_name == o.alias_name && == o. && == o. && married_name == o.married_name && email == o.email && mobile_number == o.mobile_number && dialect == o.dialect && date_of_birth == o.date_of_birth && residential_status == o.residential_status && nationality == o.nationality && birth_country == o.birth_country && passport_number == o.passport_number && passport_expiry_date == o.passport_expiry_date && pass_type == o.pass_type && pass_status == o.pass_status && pass_expiry_date == o.pass_expiry_date && employment_sector == o.employment_sector && registered_address == o.registered_address && house_developmenet_board_type == o.house_developmenet_board_type && housing_type == o.housing_type && sex == o.sex end |
#eql?(o) ⇒ Boolean
352 353 354 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 352 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
358 359 360 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 358 def hash [identity_number, partial_identity_number, name, alias_name, , , married_name, email, mobile_number, dialect, date_of_birth, residential_status, nationality, birth_country, passport_number, passport_expiry_date, pass_type, pass_status, pass_expiry_date, employment_sector, registered_address, house_developmenet_board_type, housing_type, sex].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
306 307 308 309 310 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 306 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
387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 387 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
314 315 316 317 |
# File 'lib/trinsic_api/models/singpass_personal_catalog.rb', line 314 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |