trinsic_api 3.0.0 → 3.0.2.pre.preview
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/AadhaarClaims.md +46 -0
- data/docs/AadhaarLanguage.md +20 -0
- data/docs/AadhaarLocalizedClaims.md +40 -0
- data/docs/AppleWalletInput.md +3 -1
- data/docs/ConnectIdAddress.md +26 -0
- data/docs/ConnectIdAgeVerification.md +20 -0
- data/docs/ConnectIdBeneficiaryAccount.md +24 -0
- data/docs/ConnectIdProviderOutput.md +38 -0
- data/docs/CzechMojeIdAddressOutput.md +28 -0
- data/docs/CzechMojeIdProviderOutput.md +62 -0
- data/docs/DigilockerAadhaarProviderOutput.md +30 -0
- data/docs/FaydaProviderOutput.md +7 -1
- data/docs/FinnishTrustNetworkProviderOutput.md +38 -0
- data/docs/FranceIdentiteInput.md +18 -0
- data/docs/FranceIdentiteProviderOutput.md +18 -0
- data/docs/FrejaIndirectProviderOutput.md +24 -0
- data/docs/FrejaProviderOutput.md +36 -8
- data/docs/GetProviderResponse.md +18 -0
- data/docs/GoogleWalletInput.md +3 -1
- data/docs/KenyaNidLookup2Address.md +26 -0
- data/docs/KenyaNidLookup2ProviderOutput.md +38 -0
- data/docs/NigeriaNinLookup2ProviderOutput.md +40 -0
- data/docs/NorwegianBankIdProviderOutput.md +32 -0
- data/docs/OneIdProviderAddress.md +26 -0
- data/docs/OneIdProviderOutput.md +28 -0
- data/docs/OutputFrejaAddress.md +24 -0
- data/docs/OutputFrejaDocument.md +24 -0
- data/docs/PhilippinesDigitalNidProviderOutput.md +21 -1
- data/docs/PhilippinesPhysicalNidProviderOutput.md +17 -1
- data/docs/ProviderInput.md +6 -0
- data/docs/ProviderOutput.md +26 -2
- data/docs/ProvidersApi.md +70 -0
- data/docs/Raw18013DocumentRequest.md +20 -0
- data/docs/Raw18013RequestInput.md +18 -0
- data/docs/RecommendProvidersResponse.md +3 -1
- data/docs/SamsungWalletInput.md +18 -0
- data/docs/UkEvisaLookupInput.md +20 -0
- data/docs/UnitedKingdomEvisaProviderOutput.md +38 -0
- data/docs/VerificationProfileResponse.md +2 -0
- data/docs/VerificationProfilesApi.md +4 -0
- data/docs/YotiDeeplinkProviderOutput.md +40 -0
- data/lib/trinsic_api/api/providers_api.rb +63 -0
- data/lib/trinsic_api/api/verification_profiles_api.rb +6 -0
- data/lib/trinsic_api/models/aadhaar_claims.rb +376 -0
- data/lib/trinsic_api/models/aadhaar_language.rb +250 -0
- data/lib/trinsic_api/models/aadhaar_localized_claims.rb +343 -0
- data/lib/trinsic_api/models/apple_wallet_input.rb +16 -5
- data/lib/trinsic_api/models/connect_id_address.rb +266 -0
- data/lib/trinsic_api/models/connect_id_age_verification.rb +233 -0
- data/lib/trinsic_api/models/connect_id_beneficiary_account.rb +255 -0
- data/lib/trinsic_api/models/connect_id_provider_output.rb +333 -0
- data/lib/trinsic_api/models/czech_moje_id_address_output.rb +277 -0
- data/lib/trinsic_api/models/czech_moje_id_provider_output.rb +465 -0
- data/lib/trinsic_api/models/digilocker_aadhaar_provider_output.rb +305 -0
- data/lib/trinsic_api/models/fayda_provider_output.rb +38 -5
- data/lib/trinsic_api/models/finnish_trust_network_provider_output.rb +333 -0
- data/lib/trinsic_api/models/france_identite_input.rb +222 -0
- data/lib/trinsic_api/models/france_identite_provider_output.rb +239 -0
- data/lib/trinsic_api/models/freja_indirect_provider_output.rb +320 -0
- data/lib/trinsic_api/models/freja_provider_output.rb +185 -91
- data/lib/trinsic_api/models/get_provider_response.rb +238 -0
- data/lib/trinsic_api/models/google_wallet_input.rb +16 -5
- data/lib/trinsic_api/models/integration_step.rb +1 -1
- data/lib/trinsic_api/models/kenya_nid_lookup2_address.rb +269 -0
- data/lib/trinsic_api/models/kenya_nid_lookup2_provider_output.rb +429 -0
- data/lib/trinsic_api/models/nigeria_nin_lookup2_provider_output.rb +392 -0
- data/lib/trinsic_api/models/norwegian_bank_id_provider_output.rb +300 -0
- data/lib/trinsic_api/models/one_id_provider_address.rb +266 -0
- data/lib/trinsic_api/models/one_id_provider_output.rb +278 -0
- data/lib/trinsic_api/models/output_freja_address.rb +255 -0
- data/lib/trinsic_api/models/output_freja_document.rb +255 -0
- data/lib/trinsic_api/models/philippines_digital_nid_provider_output.rb +114 -4
- data/lib/trinsic_api/models/philippines_physical_nid_provider_output.rb +92 -4
- data/lib/trinsic_api/models/provider_input.rb +34 -1
- data/lib/trinsic_api/models/provider_output.rb +138 -6
- data/lib/trinsic_api/models/raw18013_document_request.rb +276 -0
- data/lib/trinsic_api/models/raw18013_request_input.rb +259 -0
- data/lib/trinsic_api/models/recommend_providers_response.rb +33 -4
- data/lib/trinsic_api/models/samsung_wallet_input.rb +222 -0
- data/lib/trinsic_api/models/uk_evisa_lookup_input.rb +283 -0
- data/lib/trinsic_api/models/united_kingdom_evisa_provider_output.rb +333 -0
- data/lib/trinsic_api/models/verification_profile_response.rb +28 -1
- data/lib/trinsic_api/models/yoti_deeplink_provider_output.rb +344 -0
- data/lib/trinsic_api/version.rb +1 -1
- data/lib/trinsic_api.rb +29 -0
- data/spec/api/providers_api_spec.rb +12 -0
- data/spec/api/verification_profiles_api_spec.rb +2 -0
- data/spec/models/aadhaar_claims_spec.rb +120 -0
- data/spec/models/aadhaar_language_spec.rb +42 -0
- data/spec/models/aadhaar_localized_claims_spec.rb +102 -0
- data/spec/models/apple_wallet_input_spec.rb +6 -0
- data/spec/models/connect_id_address_spec.rb +60 -0
- data/spec/models/connect_id_age_verification_spec.rb +42 -0
- data/spec/models/connect_id_beneficiary_account_spec.rb +54 -0
- data/spec/models/connect_id_provider_output_spec.rb +96 -0
- data/spec/models/czech_moje_id_address_output_spec.rb +66 -0
- data/spec/models/czech_moje_id_provider_output_spec.rb +168 -0
- data/spec/models/digilocker_aadhaar_provider_output_spec.rb +72 -0
- data/spec/models/fayda_provider_output_spec.rb +18 -0
- data/spec/models/finnish_trust_network_provider_output_spec.rb +96 -0
- data/spec/models/france_identite_input_spec.rb +36 -0
- data/spec/models/france_identite_provider_output_spec.rb +36 -0
- data/spec/models/freja_indirect_provider_output_spec.rb +54 -0
- data/spec/models/freja_provider_output_spec.rb +88 -4
- data/spec/models/get_provider_response_spec.rb +36 -0
- data/spec/models/google_wallet_input_spec.rb +6 -0
- data/spec/models/kenya_nid_lookup2_address_spec.rb +60 -0
- data/spec/models/kenya_nid_lookup2_provider_output_spec.rb +96 -0
- data/spec/models/nigeria_nin_lookup2_provider_output_spec.rb +102 -0
- data/spec/models/norwegian_bank_id_provider_output_spec.rb +78 -0
- data/spec/models/one_id_provider_address_spec.rb +60 -0
- data/spec/models/one_id_provider_output_spec.rb +66 -0
- data/spec/models/output_freja_address_spec.rb +54 -0
- data/spec/models/output_freja_document_spec.rb +54 -0
- data/spec/models/philippines_digital_nid_provider_output_spec.rb +60 -0
- data/spec/models/philippines_physical_nid_provider_output_spec.rb +48 -0
- data/spec/models/provider_input_spec.rb +18 -0
- data/spec/models/provider_output_spec.rb +72 -0
- data/spec/models/raw18013_document_request_spec.rb +42 -0
- data/spec/models/raw18013_request_input_spec.rb +36 -0
- data/spec/models/recommend_providers_response_spec.rb +6 -0
- data/spec/models/samsung_wallet_input_spec.rb +36 -0
- data/spec/models/uk_evisa_lookup_input_spec.rb +42 -0
- data/spec/models/united_kingdom_evisa_provider_output_spec.rb +96 -0
- data/spec/models/verification_profile_response_spec.rb +6 -0
- data/spec/models/yoti_deeplink_provider_output_spec.rb +102 -0
- metadata +236 -120
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Trinsic API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.13.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TrinsicApi
|
|
17
|
+
# Represents a Kenya address as stored in the IPRS (Integrated Population Registration System) database. The structure reflects the pre-2010 provincial administration system: District > Division > Location. Since the 2010 constitutional change to counties, these legacy administrative divisions are still maintained in IPRS records for historical continuity. The raw address from IPRS is a newline-separated string with labeled administrative components. Example format: ``` P O BOX 41842 NAIROBI PARLIAMENT BUILDINGS LOCATION - CITY SQUARE DIVISION - CENTRAL DISTRICT - NAIROBI ``` The first lines contain informal address details (village, P.O. Box) while the suffixed lines contain official administrative designations prefixed with labels like \"LOCATION -\", \"DIVISION -\", \"DISTRICT -\".
|
|
18
|
+
class KenyaNidLookup2Address
|
|
19
|
+
# The district where the person resides. This is the highest level of the pre-2010 administrative hierarchy stored in IPRS. Districts were the primary administrative units under Kenya's provincial system before the change to counties in 2010. Districts roughly correspond to sub-counties in the current administrative structure.
|
|
20
|
+
attr_accessor :district
|
|
21
|
+
|
|
22
|
+
# The division within the district. This is the second level of the pre-2010 administrative hierarchy. Divisions were administrative units between districts and locations.
|
|
23
|
+
attr_accessor :division
|
|
24
|
+
|
|
25
|
+
# The location within the division. This is the third level of the pre-2010 administrative hierarchy. Locations were the smallest administrative units.
|
|
26
|
+
attr_accessor :location
|
|
27
|
+
|
|
28
|
+
# Additional address lines that appear before the structured administrative parts. May include P.O. Box (format: \"P O BOX [number] [location]\"), village names, estate names, or other informal locality information.
|
|
29
|
+
attr_accessor :additional_lines
|
|
30
|
+
|
|
31
|
+
# The raw, unparsed address string as returned from IPRS (Integrated Population Registration System). This preserves the original newline-separated format containing both informal address components (village, P.O. Box) and labeled administrative divisions (LOCATION, DIVISION, DISTRICT).
|
|
32
|
+
attr_accessor :raw
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'district' => :'district',
|
|
38
|
+
:'division' => :'division',
|
|
39
|
+
:'location' => :'location',
|
|
40
|
+
:'additional_lines' => :'additionalLines',
|
|
41
|
+
:'raw' => :'raw'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'district' => :'String',
|
|
59
|
+
:'division' => :'String',
|
|
60
|
+
:'location' => :'String',
|
|
61
|
+
:'additional_lines' => :'Array<String>',
|
|
62
|
+
:'raw' => :'String'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List of attributes with nullable: true
|
|
67
|
+
def self.openapi_nullable
|
|
68
|
+
Set.new([
|
|
69
|
+
:'district',
|
|
70
|
+
:'division',
|
|
71
|
+
:'location',
|
|
72
|
+
:'additional_lines',
|
|
73
|
+
:'raw'
|
|
74
|
+
])
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes the object
|
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
+
def initialize(attributes = {})
|
|
80
|
+
if (!attributes.is_a?(Hash))
|
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::KenyaNidLookup2Address` initialize method"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::KenyaNidLookup2Address`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
89
|
+
end
|
|
90
|
+
h[k.to_sym] = v
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'district')
|
|
94
|
+
self.district = attributes[:'district']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'division')
|
|
98
|
+
self.division = attributes[:'division']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'location')
|
|
102
|
+
self.location = attributes[:'location']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'additional_lines')
|
|
106
|
+
if (value = attributes[:'additional_lines']).is_a?(Array)
|
|
107
|
+
self.additional_lines = value
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'raw')
|
|
112
|
+
self.raw = attributes[:'raw']
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
117
|
+
# @return Array for valid properties with the reasons
|
|
118
|
+
def list_invalid_properties
|
|
119
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
120
|
+
invalid_properties = Array.new
|
|
121
|
+
invalid_properties
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Check to see if the all the properties in the model are valid
|
|
125
|
+
# @return true if the model is valid
|
|
126
|
+
def valid?
|
|
127
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
128
|
+
true
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Checks equality by comparing each attribute.
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def ==(o)
|
|
134
|
+
return true if self.equal?(o)
|
|
135
|
+
self.class == o.class &&
|
|
136
|
+
district == o.district &&
|
|
137
|
+
division == o.division &&
|
|
138
|
+
location == o.location &&
|
|
139
|
+
additional_lines == o.additional_lines &&
|
|
140
|
+
raw == o.raw
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# @see the `==` method
|
|
144
|
+
# @param [Object] Object to be compared
|
|
145
|
+
def eql?(o)
|
|
146
|
+
self == o
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Calculates hash code according to all attributes.
|
|
150
|
+
# @return [Integer] Hash code
|
|
151
|
+
def hash
|
|
152
|
+
[district, division, location, additional_lines, raw].hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Builds the object from hash
|
|
156
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
157
|
+
# @return [Object] Returns the model itself
|
|
158
|
+
def self.build_from_hash(attributes)
|
|
159
|
+
return nil unless attributes.is_a?(Hash)
|
|
160
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
161
|
+
transformed_hash = {}
|
|
162
|
+
openapi_types.each_pair do |key, type|
|
|
163
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
164
|
+
transformed_hash["#{key}"] = nil
|
|
165
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
166
|
+
# check to ensure the input is an array given that the attribute
|
|
167
|
+
# is documented as an array but the input is not
|
|
168
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
169
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
170
|
+
end
|
|
171
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
172
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
new(transformed_hash)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Deserializes the data based on type
|
|
179
|
+
# @param string type Data type
|
|
180
|
+
# @param string value Value to be deserialized
|
|
181
|
+
# @return [Object] Deserialized data
|
|
182
|
+
def self._deserialize(type, value)
|
|
183
|
+
case type.to_sym
|
|
184
|
+
when :Time
|
|
185
|
+
Time.parse(value)
|
|
186
|
+
when :Date
|
|
187
|
+
Date.parse(value)
|
|
188
|
+
when :String
|
|
189
|
+
value.to_s
|
|
190
|
+
when :Integer
|
|
191
|
+
value.to_i
|
|
192
|
+
when :Float
|
|
193
|
+
value.to_f
|
|
194
|
+
when :Boolean
|
|
195
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
196
|
+
true
|
|
197
|
+
else
|
|
198
|
+
false
|
|
199
|
+
end
|
|
200
|
+
when :Object
|
|
201
|
+
# generic object (usually a Hash), return directly
|
|
202
|
+
value
|
|
203
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
204
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
205
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
206
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
207
|
+
k_type = Regexp.last_match[:k_type]
|
|
208
|
+
v_type = Regexp.last_match[:v_type]
|
|
209
|
+
{}.tap do |hash|
|
|
210
|
+
value.each do |k, v|
|
|
211
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
else # model
|
|
215
|
+
# models (e.g. Pet) or oneOf
|
|
216
|
+
klass = TrinsicApi.const_get(type)
|
|
217
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Returns the string representation of the object
|
|
222
|
+
# @return [String] String presentation of the object
|
|
223
|
+
def to_s
|
|
224
|
+
to_hash.to_s
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
228
|
+
# @return [Hash] Returns the object in the form of hash
|
|
229
|
+
def to_body
|
|
230
|
+
to_hash
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Returns the object in the form of hash
|
|
234
|
+
# @return [Hash] Returns the object in the form of hash
|
|
235
|
+
def to_hash
|
|
236
|
+
hash = {}
|
|
237
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
238
|
+
value = self.send(attr)
|
|
239
|
+
if value.nil?
|
|
240
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
241
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
hash[param] = _to_hash(value)
|
|
245
|
+
end
|
|
246
|
+
hash
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Outputs non-array value in the form of hash
|
|
250
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
251
|
+
# @param [Object] value Any valid value
|
|
252
|
+
# @return [Hash] Returns the value in the form of hash
|
|
253
|
+
def _to_hash(value)
|
|
254
|
+
if value.is_a?(Array)
|
|
255
|
+
value.compact.map { |v| _to_hash(v) }
|
|
256
|
+
elsif value.is_a?(Hash)
|
|
257
|
+
{}.tap do |hash|
|
|
258
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
259
|
+
end
|
|
260
|
+
elsif value.respond_to? :to_hash
|
|
261
|
+
value.to_hash
|
|
262
|
+
else
|
|
263
|
+
value
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
end
|
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Trinsic API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.13.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TrinsicApi
|
|
17
|
+
# Exposed properties for the `kenya-nid-lookup-2` Provider which do not directly map to the normalized IdentityData model.
|
|
18
|
+
class KenyaNidLookup2ProviderOutput
|
|
19
|
+
# The first name (given name) of the ID holder as recorded in IPRS.
|
|
20
|
+
attr_accessor :first_name
|
|
21
|
+
|
|
22
|
+
# The surname (family name) of the ID holder as recorded in IPRS.
|
|
23
|
+
attr_accessor :surname
|
|
24
|
+
|
|
25
|
+
# The other name (middle name) of the ID holder as recorded in IPRS.
|
|
26
|
+
attr_accessor :other_name
|
|
27
|
+
|
|
28
|
+
# The sex of the ID holder as recorded on the National ID. Possible values: - Male - Female
|
|
29
|
+
attr_accessor :sex
|
|
30
|
+
|
|
31
|
+
# The date of birth of the ID holder as recorded in IPRS.
|
|
32
|
+
attr_accessor :date_of_birth
|
|
33
|
+
|
|
34
|
+
# Citizenship status as recorded in the IPRS civil registry database. For the Kenya National ID lookup, this value will always be \"Kenyan\" as the National ID is only issued to Kenyan citizens. Non-citizens residing in Kenya are issued different identification documents (Alien ID cards, refugee documentation, etc.) which are not supported by this provider.
|
|
35
|
+
attr_accessor :citizenship
|
|
36
|
+
|
|
37
|
+
# The Kenya National ID Number (Nambari ya Kitambulisho). This is the primary unique identifier for Kenyan citizens in all government systems, issued by the National Registration Bureau (NRB). The format is 1 to 9 numeric digits (regex: /^[0-9]{1,9}$/). This number is assigned upon first registration at age 18 (or upon naturalization for new citizens) and remains constant for life.
|
|
38
|
+
attr_accessor :id_number
|
|
39
|
+
|
|
40
|
+
# The physical card serial number printed on the Kenya National ID card. This is distinct from the ID Number and serves as a card issuance tracking identifier maintained by IPRS. This value changes each time a new physical card is issued (loss, damage, renewal).
|
|
41
|
+
attr_accessor :serial_number
|
|
42
|
+
|
|
43
|
+
# The date the National ID was issued by the National Registration Bureau (NRB).
|
|
44
|
+
attr_accessor :date_of_issue
|
|
45
|
+
|
|
46
|
+
# Place of birth as recorded in Kenya's civil registry (IPRS). This is structured according to Kenya's pre-2010 administrative hierarchy (District > Division > Location).
|
|
47
|
+
attr_accessor :place_of_birth
|
|
48
|
+
|
|
49
|
+
# Current residence address as registered in IPRS. This represents the address on file at the time of ID registration or last update, structured according to Kenya's pre-2010 administrative hierarchy (District > Division > Location).
|
|
50
|
+
attr_accessor :place_of_residence
|
|
51
|
+
|
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
|
+
def self.attribute_map
|
|
54
|
+
{
|
|
55
|
+
:'first_name' => :'firstName',
|
|
56
|
+
:'surname' => :'surname',
|
|
57
|
+
:'other_name' => :'otherName',
|
|
58
|
+
:'sex' => :'sex',
|
|
59
|
+
:'date_of_birth' => :'dateOfBirth',
|
|
60
|
+
:'citizenship' => :'citizenship',
|
|
61
|
+
:'id_number' => :'idNumber',
|
|
62
|
+
:'serial_number' => :'serialNumber',
|
|
63
|
+
:'date_of_issue' => :'dateOfIssue',
|
|
64
|
+
:'place_of_birth' => :'placeOfBirth',
|
|
65
|
+
:'place_of_residence' => :'placeOfResidence'
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Returns attribute mapping this model knows about
|
|
70
|
+
def self.acceptable_attribute_map
|
|
71
|
+
attribute_map
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Returns all the JSON keys this model knows about
|
|
75
|
+
def self.acceptable_attributes
|
|
76
|
+
acceptable_attribute_map.values
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Attribute type mapping.
|
|
80
|
+
def self.openapi_types
|
|
81
|
+
{
|
|
82
|
+
:'first_name' => :'String',
|
|
83
|
+
:'surname' => :'String',
|
|
84
|
+
:'other_name' => :'String',
|
|
85
|
+
:'sex' => :'String',
|
|
86
|
+
:'date_of_birth' => :'Date',
|
|
87
|
+
:'citizenship' => :'String',
|
|
88
|
+
:'id_number' => :'String',
|
|
89
|
+
:'serial_number' => :'String',
|
|
90
|
+
:'date_of_issue' => :'Date',
|
|
91
|
+
:'place_of_birth' => :'KenyaNidLookup2Address',
|
|
92
|
+
:'place_of_residence' => :'KenyaNidLookup2Address'
|
|
93
|
+
}
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# List of attributes with nullable: true
|
|
97
|
+
def self.openapi_nullable
|
|
98
|
+
Set.new([
|
|
99
|
+
:'other_name',
|
|
100
|
+
:'date_of_birth',
|
|
101
|
+
:'date_of_issue',
|
|
102
|
+
:'place_of_birth',
|
|
103
|
+
:'place_of_residence'
|
|
104
|
+
])
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Initializes the object
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
def initialize(attributes = {})
|
|
110
|
+
if (!attributes.is_a?(Hash))
|
|
111
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::KenyaNidLookup2ProviderOutput` initialize method"
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
115
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
116
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
117
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
118
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::KenyaNidLookup2ProviderOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
119
|
+
end
|
|
120
|
+
h[k.to_sym] = v
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'first_name')
|
|
124
|
+
self.first_name = attributes[:'first_name']
|
|
125
|
+
else
|
|
126
|
+
self.first_name = nil
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'surname')
|
|
130
|
+
self.surname = attributes[:'surname']
|
|
131
|
+
else
|
|
132
|
+
self.surname = nil
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'other_name')
|
|
136
|
+
self.other_name = attributes[:'other_name']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'sex')
|
|
140
|
+
self.sex = attributes[:'sex']
|
|
141
|
+
else
|
|
142
|
+
self.sex = nil
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'date_of_birth')
|
|
146
|
+
self.date_of_birth = attributes[:'date_of_birth']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'citizenship')
|
|
150
|
+
self.citizenship = attributes[:'citizenship']
|
|
151
|
+
else
|
|
152
|
+
self.citizenship = nil
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'id_number')
|
|
156
|
+
self.id_number = attributes[:'id_number']
|
|
157
|
+
else
|
|
158
|
+
self.id_number = nil
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'serial_number')
|
|
162
|
+
self.serial_number = attributes[:'serial_number']
|
|
163
|
+
else
|
|
164
|
+
self.serial_number = nil
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'date_of_issue')
|
|
168
|
+
self.date_of_issue = attributes[:'date_of_issue']
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'place_of_birth')
|
|
172
|
+
self.place_of_birth = attributes[:'place_of_birth']
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'place_of_residence')
|
|
176
|
+
self.place_of_residence = attributes[:'place_of_residence']
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
181
|
+
# @return Array for valid properties with the reasons
|
|
182
|
+
def list_invalid_properties
|
|
183
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
184
|
+
invalid_properties = Array.new
|
|
185
|
+
if @first_name.nil?
|
|
186
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if @surname.nil?
|
|
190
|
+
invalid_properties.push('invalid value for "surname", surname cannot be nil.')
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
if @sex.nil?
|
|
194
|
+
invalid_properties.push('invalid value for "sex", sex cannot be nil.')
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if @citizenship.nil?
|
|
198
|
+
invalid_properties.push('invalid value for "citizenship", citizenship cannot be nil.')
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if @id_number.nil?
|
|
202
|
+
invalid_properties.push('invalid value for "id_number", id_number cannot be nil.')
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if @serial_number.nil?
|
|
206
|
+
invalid_properties.push('invalid value for "serial_number", serial_number cannot be nil.')
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
invalid_properties
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Check to see if the all the properties in the model are valid
|
|
213
|
+
# @return true if the model is valid
|
|
214
|
+
def valid?
|
|
215
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
216
|
+
return false if @first_name.nil?
|
|
217
|
+
return false if @surname.nil?
|
|
218
|
+
return false if @sex.nil?
|
|
219
|
+
return false if @citizenship.nil?
|
|
220
|
+
return false if @id_number.nil?
|
|
221
|
+
return false if @serial_number.nil?
|
|
222
|
+
true
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Custom attribute writer method with validation
|
|
226
|
+
# @param [Object] first_name Value to be assigned
|
|
227
|
+
def first_name=(first_name)
|
|
228
|
+
if first_name.nil?
|
|
229
|
+
fail ArgumentError, 'first_name cannot be nil'
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
@first_name = first_name
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Custom attribute writer method with validation
|
|
236
|
+
# @param [Object] surname Value to be assigned
|
|
237
|
+
def surname=(surname)
|
|
238
|
+
if surname.nil?
|
|
239
|
+
fail ArgumentError, 'surname cannot be nil'
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
@surname = surname
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Custom attribute writer method with validation
|
|
246
|
+
# @param [Object] sex Value to be assigned
|
|
247
|
+
def sex=(sex)
|
|
248
|
+
if sex.nil?
|
|
249
|
+
fail ArgumentError, 'sex cannot be nil'
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
@sex = sex
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Custom attribute writer method with validation
|
|
256
|
+
# @param [Object] citizenship Value to be assigned
|
|
257
|
+
def citizenship=(citizenship)
|
|
258
|
+
if citizenship.nil?
|
|
259
|
+
fail ArgumentError, 'citizenship cannot be nil'
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
@citizenship = citizenship
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Custom attribute writer method with validation
|
|
266
|
+
# @param [Object] id_number Value to be assigned
|
|
267
|
+
def id_number=(id_number)
|
|
268
|
+
if id_number.nil?
|
|
269
|
+
fail ArgumentError, 'id_number cannot be nil'
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
@id_number = id_number
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Custom attribute writer method with validation
|
|
276
|
+
# @param [Object] serial_number Value to be assigned
|
|
277
|
+
def serial_number=(serial_number)
|
|
278
|
+
if serial_number.nil?
|
|
279
|
+
fail ArgumentError, 'serial_number cannot be nil'
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
@serial_number = serial_number
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Checks equality by comparing each attribute.
|
|
286
|
+
# @param [Object] Object to be compared
|
|
287
|
+
def ==(o)
|
|
288
|
+
return true if self.equal?(o)
|
|
289
|
+
self.class == o.class &&
|
|
290
|
+
first_name == o.first_name &&
|
|
291
|
+
surname == o.surname &&
|
|
292
|
+
other_name == o.other_name &&
|
|
293
|
+
sex == o.sex &&
|
|
294
|
+
date_of_birth == o.date_of_birth &&
|
|
295
|
+
citizenship == o.citizenship &&
|
|
296
|
+
id_number == o.id_number &&
|
|
297
|
+
serial_number == o.serial_number &&
|
|
298
|
+
date_of_issue == o.date_of_issue &&
|
|
299
|
+
place_of_birth == o.place_of_birth &&
|
|
300
|
+
place_of_residence == o.place_of_residence
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# @see the `==` method
|
|
304
|
+
# @param [Object] Object to be compared
|
|
305
|
+
def eql?(o)
|
|
306
|
+
self == o
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Calculates hash code according to all attributes.
|
|
310
|
+
# @return [Integer] Hash code
|
|
311
|
+
def hash
|
|
312
|
+
[first_name, surname, other_name, sex, date_of_birth, citizenship, id_number, serial_number, date_of_issue, place_of_birth, place_of_residence].hash
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Builds the object from hash
|
|
316
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
317
|
+
# @return [Object] Returns the model itself
|
|
318
|
+
def self.build_from_hash(attributes)
|
|
319
|
+
return nil unless attributes.is_a?(Hash)
|
|
320
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
321
|
+
transformed_hash = {}
|
|
322
|
+
openapi_types.each_pair do |key, type|
|
|
323
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
324
|
+
transformed_hash["#{key}"] = nil
|
|
325
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
326
|
+
# check to ensure the input is an array given that the attribute
|
|
327
|
+
# is documented as an array but the input is not
|
|
328
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
329
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
330
|
+
end
|
|
331
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
332
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
new(transformed_hash)
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# Deserializes the data based on type
|
|
339
|
+
# @param string type Data type
|
|
340
|
+
# @param string value Value to be deserialized
|
|
341
|
+
# @return [Object] Deserialized data
|
|
342
|
+
def self._deserialize(type, value)
|
|
343
|
+
case type.to_sym
|
|
344
|
+
when :Time
|
|
345
|
+
Time.parse(value)
|
|
346
|
+
when :Date
|
|
347
|
+
Date.parse(value)
|
|
348
|
+
when :String
|
|
349
|
+
value.to_s
|
|
350
|
+
when :Integer
|
|
351
|
+
value.to_i
|
|
352
|
+
when :Float
|
|
353
|
+
value.to_f
|
|
354
|
+
when :Boolean
|
|
355
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
356
|
+
true
|
|
357
|
+
else
|
|
358
|
+
false
|
|
359
|
+
end
|
|
360
|
+
when :Object
|
|
361
|
+
# generic object (usually a Hash), return directly
|
|
362
|
+
value
|
|
363
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
364
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
365
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
366
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
367
|
+
k_type = Regexp.last_match[:k_type]
|
|
368
|
+
v_type = Regexp.last_match[:v_type]
|
|
369
|
+
{}.tap do |hash|
|
|
370
|
+
value.each do |k, v|
|
|
371
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
372
|
+
end
|
|
373
|
+
end
|
|
374
|
+
else # model
|
|
375
|
+
# models (e.g. Pet) or oneOf
|
|
376
|
+
klass = TrinsicApi.const_get(type)
|
|
377
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
378
|
+
end
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# Returns the string representation of the object
|
|
382
|
+
# @return [String] String presentation of the object
|
|
383
|
+
def to_s
|
|
384
|
+
to_hash.to_s
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
388
|
+
# @return [Hash] Returns the object in the form of hash
|
|
389
|
+
def to_body
|
|
390
|
+
to_hash
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# Returns the object in the form of hash
|
|
394
|
+
# @return [Hash] Returns the object in the form of hash
|
|
395
|
+
def to_hash
|
|
396
|
+
hash = {}
|
|
397
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
398
|
+
value = self.send(attr)
|
|
399
|
+
if value.nil?
|
|
400
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
401
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
hash[param] = _to_hash(value)
|
|
405
|
+
end
|
|
406
|
+
hash
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# Outputs non-array value in the form of hash
|
|
410
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
411
|
+
# @param [Object] value Any valid value
|
|
412
|
+
# @return [Hash] Returns the value in the form of hash
|
|
413
|
+
def _to_hash(value)
|
|
414
|
+
if value.is_a?(Array)
|
|
415
|
+
value.compact.map { |v| _to_hash(v) }
|
|
416
|
+
elsif value.is_a?(Hash)
|
|
417
|
+
{}.tap do |hash|
|
|
418
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
419
|
+
end
|
|
420
|
+
elsif value.respond_to? :to_hash
|
|
421
|
+
value.to_hash
|
|
422
|
+
else
|
|
423
|
+
value
|
|
424
|
+
end
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
end
|