Class: TrinsicApi::NigeriaNinLookup3ProviderOutput
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- TrinsicApi::NigeriaNinLookup3ProviderOutput
- Defined in:
- lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb
Overview
Exposed properties for the nigeria-nin-lookup-3 Provider which do not directly map to the normalized IdentityData model.
Instance Attribute Summary collapse
-
#birth_country ⇒ Object
Country of birth as an ISO 3166-1 alpha-2 code.
-
#birth_state ⇒ Object
State of birth as recorded by National Identity Management Commission (NIMC).
-
#date_of_birth ⇒ Object
The date of birth of the individual.
-
#family_name ⇒ Object
The family name of the individual.
-
#given_name ⇒ Object
The given name of the individual.
-
#local_government_area ⇒ Object
Local Government Area of residence.
-
#middle_name ⇒ Object
The middle name of the individual.
-
#national_identity_number ⇒ Object
National Identification Number (NIN).
-
#next_of_kin_first_name ⇒ Object
First name of the individual's next of kin.
-
#next_of_kin_local_government_area ⇒ Object
Local Government Area of the individual's next of kin.
-
#next_of_kin_street_address ⇒ Object
Street or residence line of the individual's next of kin.
-
#next_of_kin_town ⇒ Object
Town of residence of the individual's next of kin.
-
#phone_number ⇒ Object
Phone number registered with National Identity Management Commission (NIMC).
-
#residence_town ⇒ Object
Town of residence registered with National Identity Management Commission (NIMC).
-
#sex ⇒ Object
The sex of the individual.
-
#state ⇒ Object
State of residence registered with National Identity Management Commission (NIMC).
-
#street_address ⇒ Object
Street or residence line registered with National Identity Management Commission (NIMC).
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 = {}) ⇒ NigeriaNinLookup3ProviderOutput
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 = {}) ⇒ NigeriaNinLookup3ProviderOutput
Initializes the object
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 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 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 151 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::NigeriaNinLookup3ProviderOutput` 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::NigeriaNinLookup3ProviderOutput`. 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?(:'national_identity_number') self.national_identity_number = attributes[:'national_identity_number'] end if attributes.key?(:'given_name') self.given_name = attributes[:'given_name'] end if attributes.key?(:'middle_name') self.middle_name = attributes[:'middle_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?(:'date_of_birth') self.date_of_birth = attributes[:'date_of_birth'] end if attributes.key?(:'birth_country') self.birth_country = attributes[:'birth_country'] end if attributes.key?(:'birth_state') self.birth_state = attributes[:'birth_state'] end if attributes.key?(:'phone_number') self.phone_number = attributes[:'phone_number'] end if attributes.key?(:'street_address') self.street_address = attributes[:'street_address'] end if attributes.key?(:'residence_town') self.residence_town = attributes[:'residence_town'] end if attributes.key?(:'local_government_area') self.local_government_area = attributes[:'local_government_area'] end if attributes.key?(:'state') self.state = attributes[:'state'] end if attributes.key?(:'next_of_kin_first_name') self.next_of_kin_first_name = attributes[:'next_of_kin_first_name'] end if attributes.key?(:'next_of_kin_street_address') self.next_of_kin_street_address = attributes[:'next_of_kin_street_address'] end if attributes.key?(:'next_of_kin_local_government_area') self.next_of_kin_local_government_area = attributes[:'next_of_kin_local_government_area'] end if attributes.key?(:'next_of_kin_town') self.next_of_kin_town = attributes[:'next_of_kin_town'] end end |
Instance Attribute Details
#birth_country ⇒ Object
Country of birth as an ISO 3166-1 alpha-2 code.
38 39 40 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 38 def birth_country @birth_country end |
#birth_state ⇒ Object
State of birth as recorded by National Identity Management Commission (NIMC).
41 42 43 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 41 def birth_state @birth_state end |
#date_of_birth ⇒ Object
The date of birth of the individual.
35 36 37 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 35 def date_of_birth @date_of_birth end |
#family_name ⇒ Object
The family name of the individual.
29 30 31 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 29 def family_name @family_name end |
#given_name ⇒ Object
The given name of the individual.
23 24 25 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 23 def given_name @given_name end |
#local_government_area ⇒ Object
Local Government Area of residence. Nigeria is divided into 774 Local Government Areas (LGAs), which are the third-tier administrative divisions below states and the Federal Capital Territory. LGAs are roughly equivalent to counties or municipalities in other countries.
53 54 55 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 53 def local_government_area @local_government_area end |
#middle_name ⇒ Object
The middle name of the individual.
26 27 28 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 26 def middle_name @middle_name end |
#national_identity_number ⇒ Object
National Identification Number (NIN). This is a unique, permanent identifier assigned by the National Identity Management Commission (NIMC) upon enrollment. Format: - 11 numeric digits - No publicly known encoding scheme is used to encode personal information in the NIN - Last digit is a checksum using the Verhoeff algorithm
20 21 22 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 20 def national_identity_number @national_identity_number end |
#next_of_kin_first_name ⇒ Object
First name of the individual's next of kin.
59 60 61 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 59 def next_of_kin_first_name @next_of_kin_first_name end |
#next_of_kin_local_government_area ⇒ Object
Local Government Area of the individual's next of kin.
65 66 67 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 65 def next_of_kin_local_government_area @next_of_kin_local_government_area end |
#next_of_kin_street_address ⇒ Object
Street or residence line of the individual's next of kin.
62 63 64 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 62 def next_of_kin_street_address @next_of_kin_street_address end |
#next_of_kin_town ⇒ Object
Town of residence of the individual's next of kin.
68 69 70 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 68 def next_of_kin_town @next_of_kin_town end |
#phone_number ⇒ Object
Phone number registered with National Identity Management Commission (NIMC). Format: - International E.164
44 45 46 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 44 def phone_number @phone_number end |
#residence_town ⇒ Object
Town of residence registered with National Identity Management Commission (NIMC).
50 51 52 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 50 def residence_town @residence_town end |
#sex ⇒ Object
The sex of the individual. Possible values: - Male - Female
32 33 34 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 32 def sex @sex end |
#state ⇒ Object
State of residence registered with National Identity Management Commission (NIMC).
56 57 58 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 56 def state @state end |
#street_address ⇒ Object
Street or residence line registered with National Identity Management Commission (NIMC). This is the street-level address line only. Town, Local Government Area, and state are returned separately.
47 48 49 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 47 def street_address @street_address end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
94 95 96 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 94 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
99 100 101 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 99 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 71 def self.attribute_map { :'national_identity_number' => :'nationalIdentityNumber', :'given_name' => :'givenName', :'middle_name' => :'middleName', :'family_name' => :'familyName', :'sex' => :'sex', :'date_of_birth' => :'dateOfBirth', :'birth_country' => :'birthCountry', :'birth_state' => :'birthState', :'phone_number' => :'phoneNumber', :'street_address' => :'streetAddress', :'residence_town' => :'residenceTown', :'local_government_area' => :'localGovernmentArea', :'state' => :'state', :'next_of_kin_first_name' => :'nextOfKinFirstName', :'next_of_kin_street_address' => :'nextOfKinStreetAddress', :'next_of_kin_local_government_area' => :'nextOfKinLocalGovernmentArea', :'next_of_kin_town' => :'nextOfKinTown' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 288 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
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 127 def self.openapi_nullable Set.new([ :'national_identity_number', :'given_name', :'middle_name', :'family_name', :'sex', :'date_of_birth', :'birth_country', :'birth_state', :'phone_number', :'street_address', :'residence_town', :'local_government_area', :'state', :'next_of_kin_first_name', :'next_of_kin_street_address', :'next_of_kin_local_government_area', :'next_of_kin_town' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 104 def self.openapi_types { :'national_identity_number' => :'String', :'given_name' => :'String', :'middle_name' => :'String', :'family_name' => :'String', :'sex' => :'String', :'date_of_birth' => :'Date', :'birth_country' => :'String', :'birth_state' => :'String', :'phone_number' => :'String', :'street_address' => :'String', :'residence_town' => :'String', :'local_government_area' => :'String', :'state' => :'String', :'next_of_kin_first_name' => :'String', :'next_of_kin_street_address' => :'String', :'next_of_kin_local_government_area' => :'String', :'next_of_kin_town' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 251 def ==(o) return true if self.equal?(o) self.class == o.class && national_identity_number == o.national_identity_number && given_name == o.given_name && middle_name == o.middle_name && family_name == o.family_name && sex == o.sex && date_of_birth == o.date_of_birth && birth_country == o.birth_country && birth_state == o.birth_state && phone_number == o.phone_number && street_address == o.street_address && residence_town == o.residence_town && local_government_area == o.local_government_area && state == o.state && next_of_kin_first_name == o.next_of_kin_first_name && next_of_kin_street_address == o.next_of_kin_street_address && next_of_kin_local_government_area == o.next_of_kin_local_government_area && next_of_kin_town == o.next_of_kin_town end |
#eql?(o) ⇒ Boolean
275 276 277 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 275 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
281 282 283 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 281 def hash [national_identity_number, given_name, middle_name, family_name, sex, date_of_birth, birth_country, birth_state, phone_number, street_address, residence_town, local_government_area, state, next_of_kin_first_name, next_of_kin_street_address, next_of_kin_local_government_area, next_of_kin_town].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
236 237 238 239 240 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 236 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
310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 310 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
244 245 246 247 |
# File 'lib/trinsic_api/models/nigeria_nin_lookup3_provider_output.rb', line 244 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |