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.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AadhaarClaims.md +46 -0
  3. data/docs/AadhaarLanguage.md +20 -0
  4. data/docs/AadhaarLocalizedClaims.md +40 -0
  5. data/docs/AppleWalletInput.md +3 -1
  6. data/docs/ConnectIdAddress.md +26 -0
  7. data/docs/ConnectIdAgeVerification.md +20 -0
  8. data/docs/ConnectIdBeneficiaryAccount.md +24 -0
  9. data/docs/ConnectIdProviderOutput.md +38 -0
  10. data/docs/CzechMojeIdAddressOutput.md +28 -0
  11. data/docs/CzechMojeIdProviderOutput.md +62 -0
  12. data/docs/DigilockerAadhaarProviderOutput.md +30 -0
  13. data/docs/FaydaProviderOutput.md +7 -1
  14. data/docs/FinnishTrustNetworkProviderOutput.md +38 -0
  15. data/docs/FranceIdentiteInput.md +18 -0
  16. data/docs/FranceIdentiteProviderOutput.md +18 -0
  17. data/docs/FrejaIndirectProviderOutput.md +24 -0
  18. data/docs/FrejaProviderOutput.md +36 -8
  19. data/docs/GetProviderResponse.md +18 -0
  20. data/docs/GoogleWalletInput.md +3 -1
  21. data/docs/KenyaNidLookup2Address.md +26 -0
  22. data/docs/KenyaNidLookup2ProviderOutput.md +38 -0
  23. data/docs/NigeriaNinLookup2ProviderOutput.md +40 -0
  24. data/docs/NorwegianBankIdProviderOutput.md +32 -0
  25. data/docs/OneIdProviderAddress.md +26 -0
  26. data/docs/OneIdProviderOutput.md +28 -0
  27. data/docs/OutputFrejaAddress.md +24 -0
  28. data/docs/OutputFrejaDocument.md +24 -0
  29. data/docs/PhilippinesDigitalNidProviderOutput.md +21 -1
  30. data/docs/PhilippinesPhysicalNidProviderOutput.md +17 -1
  31. data/docs/ProviderInput.md +6 -0
  32. data/docs/ProviderOutput.md +26 -2
  33. data/docs/ProvidersApi.md +70 -0
  34. data/docs/Raw18013DocumentRequest.md +20 -0
  35. data/docs/Raw18013RequestInput.md +18 -0
  36. data/docs/RecommendProvidersResponse.md +3 -1
  37. data/docs/SamsungWalletInput.md +18 -0
  38. data/docs/UkEvisaLookupInput.md +20 -0
  39. data/docs/UnitedKingdomEvisaProviderOutput.md +38 -0
  40. data/docs/VerificationProfileResponse.md +2 -0
  41. data/docs/VerificationProfilesApi.md +4 -0
  42. data/docs/YotiDeeplinkProviderOutput.md +40 -0
  43. data/lib/trinsic_api/api/providers_api.rb +63 -0
  44. data/lib/trinsic_api/api/verification_profiles_api.rb +6 -0
  45. data/lib/trinsic_api/models/aadhaar_claims.rb +376 -0
  46. data/lib/trinsic_api/models/aadhaar_language.rb +250 -0
  47. data/lib/trinsic_api/models/aadhaar_localized_claims.rb +343 -0
  48. data/lib/trinsic_api/models/apple_wallet_input.rb +16 -5
  49. data/lib/trinsic_api/models/connect_id_address.rb +266 -0
  50. data/lib/trinsic_api/models/connect_id_age_verification.rb +233 -0
  51. data/lib/trinsic_api/models/connect_id_beneficiary_account.rb +255 -0
  52. data/lib/trinsic_api/models/connect_id_provider_output.rb +333 -0
  53. data/lib/trinsic_api/models/czech_moje_id_address_output.rb +277 -0
  54. data/lib/trinsic_api/models/czech_moje_id_provider_output.rb +465 -0
  55. data/lib/trinsic_api/models/digilocker_aadhaar_provider_output.rb +305 -0
  56. data/lib/trinsic_api/models/fayda_provider_output.rb +38 -5
  57. data/lib/trinsic_api/models/finnish_trust_network_provider_output.rb +333 -0
  58. data/lib/trinsic_api/models/france_identite_input.rb +222 -0
  59. data/lib/trinsic_api/models/france_identite_provider_output.rb +239 -0
  60. data/lib/trinsic_api/models/freja_indirect_provider_output.rb +320 -0
  61. data/lib/trinsic_api/models/freja_provider_output.rb +185 -91
  62. data/lib/trinsic_api/models/get_provider_response.rb +238 -0
  63. data/lib/trinsic_api/models/google_wallet_input.rb +16 -5
  64. data/lib/trinsic_api/models/integration_step.rb +1 -1
  65. data/lib/trinsic_api/models/kenya_nid_lookup2_address.rb +269 -0
  66. data/lib/trinsic_api/models/kenya_nid_lookup2_provider_output.rb +429 -0
  67. data/lib/trinsic_api/models/nigeria_nin_lookup2_provider_output.rb +392 -0
  68. data/lib/trinsic_api/models/norwegian_bank_id_provider_output.rb +300 -0
  69. data/lib/trinsic_api/models/one_id_provider_address.rb +266 -0
  70. data/lib/trinsic_api/models/one_id_provider_output.rb +278 -0
  71. data/lib/trinsic_api/models/output_freja_address.rb +255 -0
  72. data/lib/trinsic_api/models/output_freja_document.rb +255 -0
  73. data/lib/trinsic_api/models/philippines_digital_nid_provider_output.rb +114 -4
  74. data/lib/trinsic_api/models/philippines_physical_nid_provider_output.rb +92 -4
  75. data/lib/trinsic_api/models/provider_input.rb +34 -1
  76. data/lib/trinsic_api/models/provider_output.rb +138 -6
  77. data/lib/trinsic_api/models/raw18013_document_request.rb +276 -0
  78. data/lib/trinsic_api/models/raw18013_request_input.rb +259 -0
  79. data/lib/trinsic_api/models/recommend_providers_response.rb +33 -4
  80. data/lib/trinsic_api/models/samsung_wallet_input.rb +222 -0
  81. data/lib/trinsic_api/models/uk_evisa_lookup_input.rb +283 -0
  82. data/lib/trinsic_api/models/united_kingdom_evisa_provider_output.rb +333 -0
  83. data/lib/trinsic_api/models/verification_profile_response.rb +28 -1
  84. data/lib/trinsic_api/models/yoti_deeplink_provider_output.rb +344 -0
  85. data/lib/trinsic_api/version.rb +1 -1
  86. data/lib/trinsic_api.rb +29 -0
  87. data/spec/api/providers_api_spec.rb +12 -0
  88. data/spec/api/verification_profiles_api_spec.rb +2 -0
  89. data/spec/models/aadhaar_claims_spec.rb +120 -0
  90. data/spec/models/aadhaar_language_spec.rb +42 -0
  91. data/spec/models/aadhaar_localized_claims_spec.rb +102 -0
  92. data/spec/models/apple_wallet_input_spec.rb +6 -0
  93. data/spec/models/connect_id_address_spec.rb +60 -0
  94. data/spec/models/connect_id_age_verification_spec.rb +42 -0
  95. data/spec/models/connect_id_beneficiary_account_spec.rb +54 -0
  96. data/spec/models/connect_id_provider_output_spec.rb +96 -0
  97. data/spec/models/czech_moje_id_address_output_spec.rb +66 -0
  98. data/spec/models/czech_moje_id_provider_output_spec.rb +168 -0
  99. data/spec/models/digilocker_aadhaar_provider_output_spec.rb +72 -0
  100. data/spec/models/fayda_provider_output_spec.rb +18 -0
  101. data/spec/models/finnish_trust_network_provider_output_spec.rb +96 -0
  102. data/spec/models/france_identite_input_spec.rb +36 -0
  103. data/spec/models/france_identite_provider_output_spec.rb +36 -0
  104. data/spec/models/freja_indirect_provider_output_spec.rb +54 -0
  105. data/spec/models/freja_provider_output_spec.rb +88 -4
  106. data/spec/models/get_provider_response_spec.rb +36 -0
  107. data/spec/models/google_wallet_input_spec.rb +6 -0
  108. data/spec/models/kenya_nid_lookup2_address_spec.rb +60 -0
  109. data/spec/models/kenya_nid_lookup2_provider_output_spec.rb +96 -0
  110. data/spec/models/nigeria_nin_lookup2_provider_output_spec.rb +102 -0
  111. data/spec/models/norwegian_bank_id_provider_output_spec.rb +78 -0
  112. data/spec/models/one_id_provider_address_spec.rb +60 -0
  113. data/spec/models/one_id_provider_output_spec.rb +66 -0
  114. data/spec/models/output_freja_address_spec.rb +54 -0
  115. data/spec/models/output_freja_document_spec.rb +54 -0
  116. data/spec/models/philippines_digital_nid_provider_output_spec.rb +60 -0
  117. data/spec/models/philippines_physical_nid_provider_output_spec.rb +48 -0
  118. data/spec/models/provider_input_spec.rb +18 -0
  119. data/spec/models/provider_output_spec.rb +72 -0
  120. data/spec/models/raw18013_document_request_spec.rb +42 -0
  121. data/spec/models/raw18013_request_input_spec.rb +36 -0
  122. data/spec/models/recommend_providers_response_spec.rb +6 -0
  123. data/spec/models/samsung_wallet_input_spec.rb +36 -0
  124. data/spec/models/uk_evisa_lookup_input_spec.rb +42 -0
  125. data/spec/models/united_kingdom_evisa_provider_output_spec.rb +96 -0
  126. data/spec/models/verification_profile_response_spec.rb +6 -0
  127. data/spec/models/yoti_deeplink_provider_output_spec.rb +102 -0
  128. metadata +236 -120
@@ -0,0 +1,255 @@
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
+ class OutputFrejaAddress
18
+ # The line1 portion of the address. Incorporates all address details that are not included by city, postal code, and country.
19
+ attr_accessor :line1
20
+
21
+ # The name of the city associated with the address.
22
+ attr_accessor :city
23
+
24
+ # The postal code associated with the address.
25
+ attr_accessor :postal_code
26
+
27
+ # The ISO 3166-1 alpha-2 country code associated with the address.
28
+ attr_accessor :country
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'line1' => :'line1',
34
+ :'city' => :'city',
35
+ :'postal_code' => :'postalCode',
36
+ :'country' => :'country'
37
+ }
38
+ end
39
+
40
+ # Returns attribute mapping this model knows about
41
+ def self.acceptable_attribute_map
42
+ attribute_map
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ acceptable_attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'line1' => :'String',
54
+ :'city' => :'String',
55
+ :'postal_code' => :'String',
56
+ :'country' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ :'line1',
64
+ :'city',
65
+ :'postal_code',
66
+ :'country'
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::OutputFrejaAddress` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ acceptable_attribute_map = self.class.acceptable_attribute_map
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!acceptable_attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::OutputFrejaAddress`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'line1')
87
+ self.line1 = attributes[:'line1']
88
+ end
89
+
90
+ if attributes.key?(:'city')
91
+ self.city = attributes[:'city']
92
+ end
93
+
94
+ if attributes.key?(:'postal_code')
95
+ self.postal_code = attributes[:'postal_code']
96
+ end
97
+
98
+ if attributes.key?(:'country')
99
+ self.country = attributes[:'country']
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ line1 == o.line1 &&
124
+ city == o.city &&
125
+ postal_code == o.postal_code &&
126
+ country == o.country
127
+ end
128
+
129
+ # @see the `==` method
130
+ # @param [Object] Object to be compared
131
+ def eql?(o)
132
+ self == o
133
+ end
134
+
135
+ # Calculates hash code according to all attributes.
136
+ # @return [Integer] Hash code
137
+ def hash
138
+ [line1, city, postal_code, country].hash
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def self.build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ attributes = attributes.transform_keys(&:to_sym)
147
+ transformed_hash = {}
148
+ openapi_types.each_pair do |key, type|
149
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = nil
151
+ elsif type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[attribute_map[key]].is_a?(Array)
155
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
156
+ end
157
+ elsif !attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
159
+ end
160
+ end
161
+ new(transformed_hash)
162
+ end
163
+
164
+ # Deserializes the data based on type
165
+ # @param string type Data type
166
+ # @param string value Value to be deserialized
167
+ # @return [Object] Deserialized data
168
+ def self._deserialize(type, value)
169
+ case type.to_sym
170
+ when :Time
171
+ Time.parse(value)
172
+ when :Date
173
+ Date.parse(value)
174
+ when :String
175
+ value.to_s
176
+ when :Integer
177
+ value.to_i
178
+ when :Float
179
+ value.to_f
180
+ when :Boolean
181
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
182
+ true
183
+ else
184
+ false
185
+ end
186
+ when :Object
187
+ # generic object (usually a Hash), return directly
188
+ value
189
+ when /\AArray<(?<inner_type>.+)>\z/
190
+ inner_type = Regexp.last_match[:inner_type]
191
+ value.map { |v| _deserialize(inner_type, v) }
192
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
193
+ k_type = Regexp.last_match[:k_type]
194
+ v_type = Regexp.last_match[:v_type]
195
+ {}.tap do |hash|
196
+ value.each do |k, v|
197
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
198
+ end
199
+ end
200
+ else # model
201
+ # models (e.g. Pet) or oneOf
202
+ klass = TrinsicApi.const_get(type)
203
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
+ end
205
+ end
206
+
207
+ # Returns the string representation of the object
208
+ # @return [String] String presentation of the object
209
+ def to_s
210
+ to_hash.to_s
211
+ end
212
+
213
+ # to_body is an alias to to_hash (backward compatibility)
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_body
216
+ to_hash
217
+ end
218
+
219
+ # Returns the object in the form of hash
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_hash
222
+ hash = {}
223
+ self.class.attribute_map.each_pair do |attr, param|
224
+ value = self.send(attr)
225
+ if value.nil?
226
+ is_nullable = self.class.openapi_nullable.include?(attr)
227
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
+ end
229
+
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ hash
233
+ end
234
+
235
+ # Outputs non-array value in the form of hash
236
+ # For object, use to_hash. Otherwise, just return the value
237
+ # @param [Object] value Any valid value
238
+ # @return [Hash] Returns the value in the form of hash
239
+ def _to_hash(value)
240
+ if value.is_a?(Array)
241
+ value.compact.map { |v| _to_hash(v) }
242
+ elsif value.is_a?(Hash)
243
+ {}.tap do |hash|
244
+ value.each { |k, v| hash[k] = _to_hash(v) }
245
+ end
246
+ elsif value.respond_to? :to_hash
247
+ value.to_hash
248
+ else
249
+ value
250
+ end
251
+ end
252
+
253
+ end
254
+
255
+ end
@@ -0,0 +1,255 @@
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
+ class OutputFrejaDocument
18
+ # Type of document. Possible values are: * \"PASS\": Passport * \"DRILIC\": Driver's License * \"NATID\": National ID * \"IDSIS\": SiS certified ID document * \"TAXID\": Tax Agency ID card * \"OTHERID\": Other IDs
19
+ attr_accessor :type
20
+
21
+ # The document serial number. The structure of this number depends on the type and nationality of the document.
22
+ attr_accessor :serial_number
23
+
24
+ # Expiration date of the document. Formatted as an ISO 8601 Date.
25
+ attr_accessor :expiration_date
26
+
27
+ # The ISO 3166-1 alpha-2 country code associated with the document.
28
+ attr_accessor :country
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'type' => :'type',
34
+ :'serial_number' => :'serialNumber',
35
+ :'expiration_date' => :'expirationDate',
36
+ :'country' => :'country'
37
+ }
38
+ end
39
+
40
+ # Returns attribute mapping this model knows about
41
+ def self.acceptable_attribute_map
42
+ attribute_map
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ acceptable_attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'type' => :'String',
54
+ :'serial_number' => :'String',
55
+ :'expiration_date' => :'Date',
56
+ :'country' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ :'type',
64
+ :'serial_number',
65
+ :'expiration_date',
66
+ :'country'
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::OutputFrejaDocument` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ acceptable_attribute_map = self.class.acceptable_attribute_map
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!acceptable_attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::OutputFrejaDocument`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'type')
87
+ self.type = attributes[:'type']
88
+ end
89
+
90
+ if attributes.key?(:'serial_number')
91
+ self.serial_number = attributes[:'serial_number']
92
+ end
93
+
94
+ if attributes.key?(:'expiration_date')
95
+ self.expiration_date = attributes[:'expiration_date']
96
+ end
97
+
98
+ if attributes.key?(:'country')
99
+ self.country = attributes[:'country']
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ type == o.type &&
124
+ serial_number == o.serial_number &&
125
+ expiration_date == o.expiration_date &&
126
+ country == o.country
127
+ end
128
+
129
+ # @see the `==` method
130
+ # @param [Object] Object to be compared
131
+ def eql?(o)
132
+ self == o
133
+ end
134
+
135
+ # Calculates hash code according to all attributes.
136
+ # @return [Integer] Hash code
137
+ def hash
138
+ [type, serial_number, expiration_date, country].hash
139
+ end
140
+
141
+ # Builds the object from hash
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ # @return [Object] Returns the model itself
144
+ def self.build_from_hash(attributes)
145
+ return nil unless attributes.is_a?(Hash)
146
+ attributes = attributes.transform_keys(&:to_sym)
147
+ transformed_hash = {}
148
+ openapi_types.each_pair do |key, type|
149
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = nil
151
+ elsif type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[attribute_map[key]].is_a?(Array)
155
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
156
+ end
157
+ elsif !attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
159
+ end
160
+ end
161
+ new(transformed_hash)
162
+ end
163
+
164
+ # Deserializes the data based on type
165
+ # @param string type Data type
166
+ # @param string value Value to be deserialized
167
+ # @return [Object] Deserialized data
168
+ def self._deserialize(type, value)
169
+ case type.to_sym
170
+ when :Time
171
+ Time.parse(value)
172
+ when :Date
173
+ Date.parse(value)
174
+ when :String
175
+ value.to_s
176
+ when :Integer
177
+ value.to_i
178
+ when :Float
179
+ value.to_f
180
+ when :Boolean
181
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
182
+ true
183
+ else
184
+ false
185
+ end
186
+ when :Object
187
+ # generic object (usually a Hash), return directly
188
+ value
189
+ when /\AArray<(?<inner_type>.+)>\z/
190
+ inner_type = Regexp.last_match[:inner_type]
191
+ value.map { |v| _deserialize(inner_type, v) }
192
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
193
+ k_type = Regexp.last_match[:k_type]
194
+ v_type = Regexp.last_match[:v_type]
195
+ {}.tap do |hash|
196
+ value.each do |k, v|
197
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
198
+ end
199
+ end
200
+ else # model
201
+ # models (e.g. Pet) or oneOf
202
+ klass = TrinsicApi.const_get(type)
203
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
+ end
205
+ end
206
+
207
+ # Returns the string representation of the object
208
+ # @return [String] String presentation of the object
209
+ def to_s
210
+ to_hash.to_s
211
+ end
212
+
213
+ # to_body is an alias to to_hash (backward compatibility)
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_body
216
+ to_hash
217
+ end
218
+
219
+ # Returns the object in the form of hash
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_hash
222
+ hash = {}
223
+ self.class.attribute_map.each_pair do |attr, param|
224
+ value = self.send(attr)
225
+ if value.nil?
226
+ is_nullable = self.class.openapi_nullable.include?(attr)
227
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
+ end
229
+
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ hash
233
+ end
234
+
235
+ # Outputs non-array value in the form of hash
236
+ # For object, use to_hash. Otherwise, just return the value
237
+ # @param [Object] value Any valid value
238
+ # @return [Hash] Returns the value in the form of hash
239
+ def _to_hash(value)
240
+ if value.is_a?(Array)
241
+ value.compact.map { |v| _to_hash(v) }
242
+ elsif value.is_a?(Hash)
243
+ {}.tap do |hash|
244
+ value.each { |k, v| hash[k] = _to_hash(v) }
245
+ end
246
+ elsif value.respond_to? :to_hash
247
+ value.to_hash
248
+ else
249
+ value
250
+ end
251
+ end
252
+
253
+ end
254
+
255
+ end
@@ -19,10 +19,50 @@ module TrinsicApi
19
19
  # The PhilSys Card Number (PCN). Every citizen or resident alien registered in PhilSys has a PhilSys Number (PSN). This number is tokenized into a card number to protect the PSN. The PhilSys Card Number is 12 characters long, and often is written in octets with dashes in between.
20
20
  attr_accessor :philsys_card_number
21
21
 
22
+ # The given (first) name of the individual.
23
+ attr_accessor :given_name
24
+
25
+ # The middle name of the individual.
26
+ attr_accessor :middle_name
27
+
28
+ # The family (last) name of the individual.
29
+ attr_accessor :family_name
30
+
31
+ # The date of birth of the individual.
32
+ attr_accessor :date_of_birth
33
+
34
+ # The name suffix of the individual (e.g. Jr., III).
35
+ attr_accessor :suffix
36
+
37
+ # The sex of the individual. Possible values: - Male - Female
38
+ attr_accessor :sex
39
+
40
+ # The place of birth of the individual as recorded on the PhilSys credential.
41
+ attr_accessor :place_of_birth
42
+
43
+ # The date the document was issued.
44
+ attr_accessor :document_issue_date
45
+
46
+ # The document number of the digital National ID.
47
+ attr_accessor :document_number
48
+
49
+ # The issuing authority of the document.
50
+ attr_accessor :issuing_authority
51
+
22
52
  # Attribute mapping from ruby-style variable name to JSON key.
23
53
  def self.attribute_map
24
54
  {
25
- :'philsys_card_number' => :'philsysCardNumber'
55
+ :'philsys_card_number' => :'philsysCardNumber',
56
+ :'given_name' => :'givenName',
57
+ :'middle_name' => :'middleName',
58
+ :'family_name' => :'familyName',
59
+ :'date_of_birth' => :'dateOfBirth',
60
+ :'suffix' => :'suffix',
61
+ :'sex' => :'sex',
62
+ :'place_of_birth' => :'placeOfBirth',
63
+ :'document_issue_date' => :'documentIssueDate',
64
+ :'document_number' => :'documentNumber',
65
+ :'issuing_authority' => :'issuingAuthority'
26
66
  }
27
67
  end
28
68
 
@@ -39,13 +79,33 @@ module TrinsicApi
39
79
  # Attribute type mapping.
40
80
  def self.openapi_types
41
81
  {
42
- :'philsys_card_number' => :'String'
82
+ :'philsys_card_number' => :'String',
83
+ :'given_name' => :'String',
84
+ :'middle_name' => :'String',
85
+ :'family_name' => :'String',
86
+ :'date_of_birth' => :'Date',
87
+ :'suffix' => :'String',
88
+ :'sex' => :'String',
89
+ :'place_of_birth' => :'String',
90
+ :'document_issue_date' => :'Date',
91
+ :'document_number' => :'String',
92
+ :'issuing_authority' => :'String'
43
93
  }
44
94
  end
45
95
 
46
96
  # List of attributes with nullable: true
47
97
  def self.openapi_nullable
48
98
  Set.new([
99
+ :'given_name',
100
+ :'middle_name',
101
+ :'family_name',
102
+ :'date_of_birth',
103
+ :'suffix',
104
+ :'sex',
105
+ :'place_of_birth',
106
+ :'document_issue_date',
107
+ :'document_number',
108
+ :'issuing_authority'
49
109
  ])
50
110
  end
51
111
 
@@ -70,6 +130,46 @@ module TrinsicApi
70
130
  else
71
131
  self.philsys_card_number = nil
72
132
  end
133
+
134
+ if attributes.key?(:'given_name')
135
+ self.given_name = attributes[:'given_name']
136
+ end
137
+
138
+ if attributes.key?(:'middle_name')
139
+ self.middle_name = attributes[:'middle_name']
140
+ end
141
+
142
+ if attributes.key?(:'family_name')
143
+ self.family_name = attributes[:'family_name']
144
+ end
145
+
146
+ if attributes.key?(:'date_of_birth')
147
+ self.date_of_birth = attributes[:'date_of_birth']
148
+ end
149
+
150
+ if attributes.key?(:'suffix')
151
+ self.suffix = attributes[:'suffix']
152
+ end
153
+
154
+ if attributes.key?(:'sex')
155
+ self.sex = attributes[:'sex']
156
+ end
157
+
158
+ if attributes.key?(:'place_of_birth')
159
+ self.place_of_birth = attributes[:'place_of_birth']
160
+ end
161
+
162
+ if attributes.key?(:'document_issue_date')
163
+ self.document_issue_date = attributes[:'document_issue_date']
164
+ end
165
+
166
+ if attributes.key?(:'document_number')
167
+ self.document_number = attributes[:'document_number']
168
+ end
169
+
170
+ if attributes.key?(:'issuing_authority')
171
+ self.issuing_authority = attributes[:'issuing_authority']
172
+ end
73
173
  end
74
174
 
75
175
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -107,7 +207,17 @@ module TrinsicApi
107
207
  def ==(o)
108
208
  return true if self.equal?(o)
109
209
  self.class == o.class &&
110
- philsys_card_number == o.philsys_card_number
210
+ philsys_card_number == o.philsys_card_number &&
211
+ given_name == o.given_name &&
212
+ middle_name == o.middle_name &&
213
+ family_name == o.family_name &&
214
+ date_of_birth == o.date_of_birth &&
215
+ suffix == o.suffix &&
216
+ sex == o.sex &&
217
+ place_of_birth == o.place_of_birth &&
218
+ document_issue_date == o.document_issue_date &&
219
+ document_number == o.document_number &&
220
+ issuing_authority == o.issuing_authority
111
221
  end
112
222
 
113
223
  # @see the `==` method
@@ -119,7 +229,7 @@ module TrinsicApi
119
229
  # Calculates hash code according to all attributes.
120
230
  # @return [Integer] Hash code
121
231
  def hash
122
- [philsys_card_number].hash
232
+ [philsys_card_number, given_name, middle_name, family_name, date_of_birth, suffix, sex, place_of_birth, document_issue_date, document_number, issuing_authority].hash
123
233
  end
124
234
 
125
235
  # Builds the object from hash