trinsic_api 1.2.0 → 2.0.0

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 (212) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/docs/AadhaarInput.md +20 -0
  4. data/docs/Address.md +3 -3
  5. data/docs/AttachmentAccessKeys.md +7 -5
  6. data/docs/AttachmentsApi.md +1 -1
  7. data/docs/BangladeshNationalIdInput.md +24 -0
  8. data/docs/BrazilCpfCheckInput.md +18 -0
  9. data/docs/BrazilDigitalCnhInput.md +24 -0
  10. data/docs/CreateAdvancedProviderSessionRequest.md +26 -0
  11. data/docs/CreateAdvancedProviderSessionResponse.md +22 -0
  12. data/docs/CreateHostedProviderSessionRequest.md +22 -0
  13. data/docs/CreateHostedProviderSessionResponse.md +22 -0
  14. data/docs/CreateWidgetSessionRequest.md +22 -0
  15. data/docs/CreateWidgetSessionResponse.md +22 -0
  16. data/docs/DocumentData.md +3 -3
  17. data/docs/DocumentScanAttachments.md +18 -0
  18. data/docs/{SessionState.md → DocumentType.md} +2 -2
  19. data/docs/HttpValidationProblemDetails.md +28 -0
  20. data/docs/IdentityData.md +6 -4
  21. data/docs/IdinInput.md +18 -0
  22. data/docs/IndonesiaNikInput.md +22 -0
  23. data/docs/{FailureMessage.md → IntegrationCapability.md} +2 -5
  24. data/docs/IntegrationLaunchMethod.md +15 -0
  25. data/docs/IntegrationStep.md +22 -0
  26. data/docs/KenyaNidInput.md +28 -0
  27. data/docs/{SessionFailCode.md → Language.md} +2 -2
  28. data/docs/ListProviderContractsResponse.md +18 -0
  29. data/docs/MexicoCurpInput.md +18 -0
  30. data/docs/MobileIdInput.md +22 -0
  31. data/docs/NetworkApi.md +22 -25
  32. data/docs/NigeriaNinInput.md +30 -0
  33. data/docs/PersonData.md +14 -12
  34. data/docs/PhilippineMatchInput.md +26 -0
  35. data/docs/PhilippineQRInput.md +20 -0
  36. data/docs/ProblemDetails.md +26 -0
  37. data/docs/ProviderAttachments.md +18 -0
  38. data/docs/ProviderContract.md +46 -0
  39. data/docs/ProviderInformation.md +3 -3
  40. data/docs/ProviderInput.md +50 -0
  41. data/docs/RecommendRequest.md +2 -6
  42. data/docs/RecommendationInfo.md +24 -0
  43. data/docs/RefreshStepContentRequest.md +18 -0
  44. data/docs/RefreshStepContentResponse.md +18 -0
  45. data/docs/ResultCollection.md +20 -0
  46. data/docs/ResultCollectionMethod.md +15 -0
  47. data/docs/Session.md +6 -8
  48. data/docs/{VerificationFailCode.md → SessionErrorCode.md} +2 -2
  49. data/docs/SessionsApi.md +237 -19
  50. data/docs/Sex.md +15 -0
  51. data/docs/SmartIdInput.md +18 -0
  52. data/docs/SouthAfricaNidInput.md +24 -0
  53. data/docs/SpidInput.md +18 -0
  54. data/docs/StepRefreshInfo.md +22 -0
  55. data/docs/SubProviderMetadata.md +24 -0
  56. data/docs/TrinsicTestDatabaseLookupInput.md +24 -0
  57. data/docs/TrinsicTestSubProvidersInput.md +18 -0
  58. data/lib/trinsic_api/api/attachments_api.rb +3 -3
  59. data/lib/trinsic_api/api/network_api.rb +19 -25
  60. data/lib/trinsic_api/api/sessions_api.rb +219 -21
  61. data/lib/trinsic_api/api_client.rb +1 -1
  62. data/lib/trinsic_api/api_error.rb +1 -1
  63. data/lib/trinsic_api/configuration.rb +1 -1
  64. data/lib/trinsic_api/models/aadhaar_input.rb +227 -0
  65. data/lib/trinsic_api/models/address.rb +16 -10
  66. data/lib/trinsic_api/models/attachment_access_keys.rb +25 -10
  67. data/lib/trinsic_api/models/bangladesh_national_id_input.rb +249 -0
  68. data/lib/trinsic_api/models/brazil_cpf_check_input.rb +261 -0
  69. data/lib/trinsic_api/models/brazil_digital_cnh_input.rb +294 -0
  70. data/lib/trinsic_api/models/cancel_session_response.rb +1 -1
  71. data/lib/trinsic_api/models/create_advanced_provider_session_request.rb +312 -0
  72. data/lib/trinsic_api/models/create_advanced_provider_session_response.rb +256 -0
  73. data/lib/trinsic_api/models/create_hosted_provider_session_request.rb +288 -0
  74. data/lib/trinsic_api/models/create_hosted_provider_session_response.rb +256 -0
  75. data/lib/trinsic_api/models/create_widget_session_request.rb +240 -0
  76. data/lib/trinsic_api/models/create_widget_session_response.rb +256 -0
  77. data/lib/trinsic_api/models/document_data.rb +32 -4
  78. data/lib/trinsic_api/models/{failure_message.rb → document_scan_attachments.rb} +12 -18
  79. data/lib/trinsic_api/models/{session_state.rb → document_type.rb} +9 -11
  80. data/lib/trinsic_api/models/get_attachment_request.rb +1 -1
  81. data/lib/trinsic_api/models/get_attachment_response.rb +1 -1
  82. data/lib/trinsic_api/models/get_session_response.rb +1 -1
  83. data/lib/trinsic_api/models/get_session_result_request.rb +1 -1
  84. data/lib/trinsic_api/models/get_session_result_response.rb +2 -1
  85. data/lib/trinsic_api/models/{known_address.rb → http_validation_problem_details.rb} +55 -51
  86. data/lib/trinsic_api/models/identity_data.rb +16 -6
  87. data/lib/trinsic_api/models/{known_identity_data.rb → idin_input.rb} +13 -13
  88. data/lib/trinsic_api/models/{disclosed_fields_request.rb → indonesia_nik_input.rb} +94 -93
  89. data/lib/trinsic_api/models/integration_capability.rb +44 -0
  90. data/lib/trinsic_api/models/integration_launch_method.rb +42 -0
  91. data/lib/trinsic_api/models/integration_step.rb +275 -0
  92. data/lib/trinsic_api/models/kenya_nid_input.rb +397 -0
  93. data/lib/trinsic_api/models/language.rb +42 -0
  94. data/lib/trinsic_api/models/{validation_result.rb → list_provider_contracts_response.rb} +17 -25
  95. data/lib/trinsic_api/models/list_providers_response.rb +1 -1
  96. data/lib/trinsic_api/models/list_sessions_response.rb +1 -1
  97. data/lib/trinsic_api/models/{create_session_response.rb → mexico_curp_input.rb} +44 -26
  98. data/lib/trinsic_api/models/mobile_id_input.rb +260 -0
  99. data/lib/trinsic_api/models/nigeria_nin_input.rb +383 -0
  100. data/lib/trinsic_api/models/order_direction.rb +1 -1
  101. data/lib/trinsic_api/models/person_data.rb +50 -15
  102. data/lib/trinsic_api/models/{known_person_data.rb → philippine_match_input.rb} +28 -33
  103. data/lib/trinsic_api/models/philippine_qr_input.rb +227 -0
  104. data/lib/trinsic_api/models/{verification.rb → problem_details.rb} +49 -42
  105. data/lib/trinsic_api/models/provider_attachments.rb +215 -0
  106. data/lib/trinsic_api/models/provider_contract.rb +482 -0
  107. data/lib/trinsic_api/models/provider_info.rb +1 -1
  108. data/lib/trinsic_api/models/provider_information.rb +1 -1
  109. data/lib/trinsic_api/models/provider_input.rb +392 -0
  110. data/lib/trinsic_api/models/recommend_request.rb +10 -40
  111. data/lib/trinsic_api/models/recommend_response.rb +1 -1
  112. data/lib/trinsic_api/models/recommendation_info.rb +256 -0
  113. data/lib/trinsic_api/models/refresh_step_content_request.rb +216 -0
  114. data/lib/trinsic_api/models/{identity_lookup_response.rb → refresh_step_content_response.rb} +16 -16
  115. data/lib/trinsic_api/models/result_collection.rb +261 -0
  116. data/lib/trinsic_api/models/result_collection_method.rb +40 -0
  117. data/lib/trinsic_api/models/session.rb +32 -48
  118. data/lib/trinsic_api/models/session_error_code.rb +48 -0
  119. data/lib/trinsic_api/models/session_ordering.rb +1 -1
  120. data/lib/trinsic_api/models/sex.rb +42 -0
  121. data/lib/trinsic_api/models/smart_id_input.rb +216 -0
  122. data/lib/trinsic_api/models/{disclosed_fields.rb → south_africa_nid_input.rb} +107 -154
  123. data/lib/trinsic_api/models/spid_input.rb +216 -0
  124. data/lib/trinsic_api/models/step_refresh_info.rb +256 -0
  125. data/lib/trinsic_api/models/sub_provider_metadata.rb +274 -0
  126. data/lib/trinsic_api/models/trinsic_test_database_lookup_input.rb +249 -0
  127. data/lib/trinsic_api/models/trinsic_test_sub_providers_input.rb +216 -0
  128. data/lib/trinsic_api/version.rb +2 -2
  129. data/lib/trinsic_api.rb +45 -15
  130. data/spec/api/attachments_api_spec.rb +2 -2
  131. data/spec/api/network_api_spec.rb +8 -9
  132. data/spec/api/sessions_api_spec.rb +45 -8
  133. data/spec/models/{verification_spec.rb → aadhaar_input_spec.rb} +9 -9
  134. data/spec/models/address_spec.rb +2 -2
  135. data/spec/models/attachment_access_keys_spec.rb +7 -1
  136. data/spec/models/bangladesh_national_id_input_spec.rb +54 -0
  137. data/spec/models/{identity_lookup_response_spec.rb → brazil_cpf_check_input_spec.rb} +8 -8
  138. data/spec/models/brazil_digital_cnh_input_spec.rb +54 -0
  139. data/spec/models/cancel_session_response_spec.rb +1 -1
  140. data/spec/models/create_advanced_provider_session_request_spec.rb +60 -0
  141. data/spec/models/create_advanced_provider_session_response_spec.rb +48 -0
  142. data/spec/models/create_hosted_provider_session_request_spec.rb +48 -0
  143. data/spec/models/create_hosted_provider_session_response_spec.rb +48 -0
  144. data/spec/models/create_widget_session_request_spec.rb +48 -0
  145. data/spec/models/create_widget_session_response_spec.rb +48 -0
  146. data/spec/models/document_data_spec.rb +1 -1
  147. data/spec/models/document_scan_attachments_spec.rb +36 -0
  148. data/spec/models/{session_state_spec.rb → document_type_spec.rb} +7 -7
  149. data/spec/models/get_attachment_request_spec.rb +1 -1
  150. data/spec/models/get_attachment_response_spec.rb +1 -1
  151. data/spec/models/get_session_response_spec.rb +1 -1
  152. data/spec/models/get_session_result_request_spec.rb +1 -1
  153. data/spec/models/get_session_result_response_spec.rb +1 -1
  154. data/spec/models/http_validation_problem_details_spec.rb +66 -0
  155. data/spec/models/identity_data_spec.rb +7 -1
  156. data/spec/models/{failure_message_spec.rb → idin_input_spec.rb} +8 -8
  157. data/spec/models/indonesia_nik_input_spec.rb +48 -0
  158. data/spec/models/integration_capability_spec.rb +30 -0
  159. data/spec/models/integration_launch_method_spec.rb +30 -0
  160. data/spec/models/integration_step_spec.rb +48 -0
  161. data/spec/models/{known_person_data_spec.rb → kenya_nid_input_spec.rb} +13 -13
  162. data/spec/models/{session_fail_code_spec.rb → language_spec.rb} +7 -7
  163. data/spec/models/list_provider_contracts_response_spec.rb +36 -0
  164. data/spec/models/list_providers_response_spec.rb +1 -1
  165. data/spec/models/list_sessions_response_spec.rb +1 -1
  166. data/spec/models/{known_identity_data_spec.rb → mexico_curp_input_spec.rb} +8 -8
  167. data/spec/models/mobile_id_input_spec.rb +48 -0
  168. data/spec/models/{known_address_spec.rb → nigeria_nin_input_spec.rb} +14 -14
  169. data/spec/models/order_direction_spec.rb +1 -1
  170. data/spec/models/person_data_spec.rb +8 -2
  171. data/spec/models/{create_session_request_spec.rb → philippine_match_input_spec.rb} +12 -12
  172. data/spec/models/{create_session_response_spec.rb → philippine_qr_input_spec.rb} +9 -9
  173. data/spec/models/problem_details_spec.rb +60 -0
  174. data/spec/models/provider_attachments_spec.rb +36 -0
  175. data/spec/models/{disclosed_fields_request_spec.rb → provider_contract_spec.rb} +37 -19
  176. data/spec/models/provider_info_spec.rb +1 -1
  177. data/spec/models/provider_information_spec.rb +1 -1
  178. data/spec/models/{disclosed_fields_spec.rb → provider_input_spec.rb} +49 -19
  179. data/spec/models/recommend_request_spec.rb +2 -14
  180. data/spec/models/recommend_response_spec.rb +1 -1
  181. data/spec/models/recommendation_info_spec.rb +54 -0
  182. data/spec/models/refresh_step_content_request_spec.rb +36 -0
  183. data/spec/models/refresh_step_content_response_spec.rb +36 -0
  184. data/spec/models/result_collection_method_spec.rb +30 -0
  185. data/spec/models/{validation_result_spec.rb → result_collection_spec.rb} +9 -9
  186. data/spec/models/{verification_fail_code_spec.rb → session_error_code_spec.rb} +7 -7
  187. data/spec/models/session_ordering_spec.rb +1 -1
  188. data/spec/models/session_spec.rb +4 -10
  189. data/spec/models/sex_spec.rb +30 -0
  190. data/spec/models/smart_id_input_spec.rb +36 -0
  191. data/spec/models/south_africa_nid_input_spec.rb +54 -0
  192. data/spec/models/spid_input_spec.rb +36 -0
  193. data/spec/models/step_refresh_info_spec.rb +48 -0
  194. data/spec/models/sub_provider_metadata_spec.rb +54 -0
  195. data/spec/models/trinsic_test_database_lookup_input_spec.rb +54 -0
  196. data/spec/models/trinsic_test_sub_providers_input_spec.rb +36 -0
  197. data/spec/spec_helper.rb +1 -1
  198. data/trinsic_api.gemspec +1 -1
  199. metadata +195 -75
  200. data/docs/CreateSessionRequest.md +0 -26
  201. data/docs/CreateSessionResponse.md +0 -20
  202. data/docs/DisclosedFields.md +0 -40
  203. data/docs/DisclosedFieldsRequest.md +0 -40
  204. data/docs/IdentityLookupResponse.md +0 -18
  205. data/docs/KnownAddress.md +0 -30
  206. data/docs/KnownIdentityData.md +0 -18
  207. data/docs/KnownPersonData.md +0 -28
  208. data/docs/ValidationResult.md +0 -20
  209. data/docs/Verification.md +0 -20
  210. data/lib/trinsic_api/models/create_session_request.rb +0 -257
  211. data/lib/trinsic_api/models/session_fail_code.rb +0 -45
  212. data/lib/trinsic_api/models/verification_fail_code.rb +0 -44
@@ -0,0 +1,383 @@
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.8.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrinsicApi
17
+ class NigeriaNinInput
18
+ # The user's first name as it appears in their National ID
19
+ attr_accessor :first_name
20
+
21
+ # The user's middle name as it appears in their National ID (optional)
22
+ attr_accessor :middle_name
23
+
24
+ # The user's last name as it appears in their National ID (optional)
25
+ attr_accessor :last_name
26
+
27
+ # The user's phone number (optional)
28
+ attr_accessor :phone_number
29
+
30
+ # The user's date of birth, in `YYYY-MM-DD` format
31
+ attr_accessor :date_of_birth
32
+
33
+ # The user's gender as it appears in their National ID (e.g., male, female)
34
+ attr_accessor :gender
35
+
36
+ # The user's South African National ID number
37
+ attr_accessor :national_id_number
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'first_name' => :'firstName',
43
+ :'middle_name' => :'middleName',
44
+ :'last_name' => :'lastName',
45
+ :'phone_number' => :'phoneNumber',
46
+ :'date_of_birth' => :'dateOfBirth',
47
+ :'gender' => :'gender',
48
+ :'national_id_number' => :'nationalIdNumber'
49
+ }
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'first_name' => :'String',
61
+ :'middle_name' => :'String',
62
+ :'last_name' => :'String',
63
+ :'phone_number' => :'String',
64
+ :'date_of_birth' => :'Date',
65
+ :'gender' => :'String',
66
+ :'national_id_number' => :'String'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ :'middle_name',
74
+ :'phone_number',
75
+ :'gender',
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::NigeriaNinInput` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!self.class.attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::NigeriaNinInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'first_name')
95
+ self.first_name = attributes[:'first_name']
96
+ else
97
+ self.first_name = nil
98
+ end
99
+
100
+ if attributes.key?(:'middle_name')
101
+ self.middle_name = attributes[:'middle_name']
102
+ end
103
+
104
+ if attributes.key?(:'last_name')
105
+ self.last_name = attributes[:'last_name']
106
+ else
107
+ self.last_name = nil
108
+ end
109
+
110
+ if attributes.key?(:'phone_number')
111
+ self.phone_number = attributes[:'phone_number']
112
+ end
113
+
114
+ if attributes.key?(:'date_of_birth')
115
+ self.date_of_birth = attributes[:'date_of_birth']
116
+ else
117
+ self.date_of_birth = nil
118
+ end
119
+
120
+ if attributes.key?(:'gender')
121
+ self.gender = attributes[:'gender']
122
+ end
123
+
124
+ if attributes.key?(:'national_id_number')
125
+ self.national_id_number = attributes[:'national_id_number']
126
+ else
127
+ self.national_id_number = nil
128
+ end
129
+ end
130
+
131
+ # Show invalid properties with the reasons. Usually used together with valid?
132
+ # @return Array for valid properties with the reasons
133
+ def list_invalid_properties
134
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
135
+ invalid_properties = Array.new
136
+ if @first_name.nil?
137
+ invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
138
+ end
139
+
140
+ if @first_name.to_s.length < 1
141
+ invalid_properties.push('invalid value for "first_name", the character length must be great than or equal to 1.')
142
+ end
143
+
144
+ if @last_name.nil?
145
+ invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
146
+ end
147
+
148
+ if @last_name.to_s.length < 1
149
+ invalid_properties.push('invalid value for "last_name", the character length must be great than or equal to 1.')
150
+ end
151
+
152
+ if @date_of_birth.nil?
153
+ invalid_properties.push('invalid value for "date_of_birth", date_of_birth cannot be nil.')
154
+ end
155
+
156
+ if @national_id_number.nil?
157
+ invalid_properties.push('invalid value for "national_id_number", national_id_number cannot be nil.')
158
+ end
159
+
160
+ if @national_id_number.to_s.length > 11
161
+ invalid_properties.push('invalid value for "national_id_number", the character length must be smaller than or equal to 11.')
162
+ end
163
+
164
+ if @national_id_number.to_s.length < 11
165
+ invalid_properties.push('invalid value for "national_id_number", the character length must be great than or equal to 11.')
166
+ end
167
+
168
+ pattern = Regexp.new(/^\d*$/)
169
+ if @national_id_number !~ pattern
170
+ invalid_properties.push("invalid value for \"national_id_number\", must conform to the pattern #{pattern}.")
171
+ end
172
+
173
+ invalid_properties
174
+ end
175
+
176
+ # Check to see if the all the properties in the model are valid
177
+ # @return true if the model is valid
178
+ def valid?
179
+ warn '[DEPRECATED] the `valid?` method is obsolete'
180
+ return false if @first_name.nil?
181
+ return false if @first_name.to_s.length < 1
182
+ return false if @last_name.nil?
183
+ return false if @last_name.to_s.length < 1
184
+ return false if @date_of_birth.nil?
185
+ return false if @national_id_number.nil?
186
+ return false if @national_id_number.to_s.length > 11
187
+ return false if @national_id_number.to_s.length < 11
188
+ return false if @national_id_number !~ Regexp.new(/^\d*$/)
189
+ true
190
+ end
191
+
192
+ # Custom attribute writer method with validation
193
+ # @param [Object] first_name Value to be assigned
194
+ def first_name=(first_name)
195
+ if first_name.nil?
196
+ fail ArgumentError, 'first_name cannot be nil'
197
+ end
198
+
199
+ if first_name.to_s.length < 1
200
+ fail ArgumentError, 'invalid value for "first_name", the character length must be great than or equal to 1.'
201
+ end
202
+
203
+ @first_name = first_name
204
+ end
205
+
206
+ # Custom attribute writer method with validation
207
+ # @param [Object] last_name Value to be assigned
208
+ def last_name=(last_name)
209
+ if last_name.nil?
210
+ fail ArgumentError, 'last_name cannot be nil'
211
+ end
212
+
213
+ if last_name.to_s.length < 1
214
+ fail ArgumentError, 'invalid value for "last_name", the character length must be great than or equal to 1.'
215
+ end
216
+
217
+ @last_name = last_name
218
+ end
219
+
220
+ # Custom attribute writer method with validation
221
+ # @param [Object] national_id_number Value to be assigned
222
+ def national_id_number=(national_id_number)
223
+ if national_id_number.nil?
224
+ fail ArgumentError, 'national_id_number cannot be nil'
225
+ end
226
+
227
+ if national_id_number.to_s.length > 11
228
+ fail ArgumentError, 'invalid value for "national_id_number", the character length must be smaller than or equal to 11.'
229
+ end
230
+
231
+ if national_id_number.to_s.length < 11
232
+ fail ArgumentError, 'invalid value for "national_id_number", the character length must be great than or equal to 11.'
233
+ end
234
+
235
+ pattern = Regexp.new(/^\d*$/)
236
+ if national_id_number !~ pattern
237
+ fail ArgumentError, "invalid value for \"national_id_number\", must conform to the pattern #{pattern}."
238
+ end
239
+
240
+ @national_id_number = national_id_number
241
+ end
242
+
243
+ # Checks equality by comparing each attribute.
244
+ # @param [Object] Object to be compared
245
+ def ==(o)
246
+ return true if self.equal?(o)
247
+ self.class == o.class &&
248
+ first_name == o.first_name &&
249
+ middle_name == o.middle_name &&
250
+ last_name == o.last_name &&
251
+ phone_number == o.phone_number &&
252
+ date_of_birth == o.date_of_birth &&
253
+ gender == o.gender &&
254
+ national_id_number == o.national_id_number
255
+ end
256
+
257
+ # @see the `==` method
258
+ # @param [Object] Object to be compared
259
+ def eql?(o)
260
+ self == o
261
+ end
262
+
263
+ # Calculates hash code according to all attributes.
264
+ # @return [Integer] Hash code
265
+ def hash
266
+ [first_name, middle_name, last_name, phone_number, date_of_birth, gender, national_id_number].hash
267
+ end
268
+
269
+ # Builds the object from hash
270
+ # @param [Hash] attributes Model attributes in the form of hash
271
+ # @return [Object] Returns the model itself
272
+ def self.build_from_hash(attributes)
273
+ return nil unless attributes.is_a?(Hash)
274
+ attributes = attributes.transform_keys(&:to_sym)
275
+ transformed_hash = {}
276
+ openapi_types.each_pair do |key, type|
277
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
278
+ transformed_hash["#{key}"] = nil
279
+ elsif type =~ /\AArray<(.*)>/i
280
+ # check to ensure the input is an array given that the attribute
281
+ # is documented as an array but the input is not
282
+ if attributes[attribute_map[key]].is_a?(Array)
283
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
284
+ end
285
+ elsif !attributes[attribute_map[key]].nil?
286
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
287
+ end
288
+ end
289
+ new(transformed_hash)
290
+ end
291
+
292
+ # Deserializes the data based on type
293
+ # @param string type Data type
294
+ # @param string value Value to be deserialized
295
+ # @return [Object] Deserialized data
296
+ def self._deserialize(type, value)
297
+ case type.to_sym
298
+ when :Time
299
+ Time.parse(value)
300
+ when :Date
301
+ Date.parse(value)
302
+ when :String
303
+ value.to_s
304
+ when :Integer
305
+ value.to_i
306
+ when :Float
307
+ value.to_f
308
+ when :Boolean
309
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
310
+ true
311
+ else
312
+ false
313
+ end
314
+ when :Object
315
+ # generic object (usually a Hash), return directly
316
+ value
317
+ when /\AArray<(?<inner_type>.+)>\z/
318
+ inner_type = Regexp.last_match[:inner_type]
319
+ value.map { |v| _deserialize(inner_type, v) }
320
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
321
+ k_type = Regexp.last_match[:k_type]
322
+ v_type = Regexp.last_match[:v_type]
323
+ {}.tap do |hash|
324
+ value.each do |k, v|
325
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
326
+ end
327
+ end
328
+ else # model
329
+ # models (e.g. Pet) or oneOf
330
+ klass = TrinsicApi.const_get(type)
331
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
332
+ end
333
+ end
334
+
335
+ # Returns the string representation of the object
336
+ # @return [String] String presentation of the object
337
+ def to_s
338
+ to_hash.to_s
339
+ end
340
+
341
+ # to_body is an alias to to_hash (backward compatibility)
342
+ # @return [Hash] Returns the object in the form of hash
343
+ def to_body
344
+ to_hash
345
+ end
346
+
347
+ # Returns the object in the form of hash
348
+ # @return [Hash] Returns the object in the form of hash
349
+ def to_hash
350
+ hash = {}
351
+ self.class.attribute_map.each_pair do |attr, param|
352
+ value = self.send(attr)
353
+ if value.nil?
354
+ is_nullable = self.class.openapi_nullable.include?(attr)
355
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
356
+ end
357
+
358
+ hash[param] = _to_hash(value)
359
+ end
360
+ hash
361
+ end
362
+
363
+ # Outputs non-array value in the form of hash
364
+ # For object, use to_hash. Otherwise, just return the value
365
+ # @param [Object] value Any valid value
366
+ # @return [Hash] Returns the value in the form of hash
367
+ def _to_hash(value)
368
+ if value.is_a?(Array)
369
+ value.compact.map { |v| _to_hash(v) }
370
+ elsif value.is_a?(Hash)
371
+ {}.tap do |hash|
372
+ value.each { |k, v| hash[k] = _to_hash(v) }
373
+ end
374
+ elsif value.respond_to? :to_hash
375
+ value.to_hash
376
+ else
377
+ value
378
+ end
379
+ end
380
+
381
+ end
382
+
383
+ end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #Connect API
2
+ #Trinsic API
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #Connect API
2
+ #Trinsic API
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
@@ -14,31 +14,49 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module TrinsicApi
17
- # Identity information for the individual being verified
18
17
  class PersonData
19
- # Given (first) name of the individual
20
18
  attr_accessor :given_name
21
19
 
22
- # Family (last) name of the individual
23
20
  attr_accessor :family_name
24
21
 
25
- # Middle name of the individual
26
22
  attr_accessor :middle_name
27
23
 
28
- # The individual's full name as a single string. Useful for names which do not fit into a \"first middle last\" structure.
29
24
  attr_accessor :full_name
30
25
 
26
+ attr_accessor :suffix
27
+
31
28
  attr_accessor :nationality
32
29
 
33
- attr_accessor :gender
30
+ attr_accessor :sex
34
31
 
35
32
  attr_accessor :phone_number
36
33
 
37
- # Address information for an individual
38
34
  attr_accessor :address
39
35
 
40
36
  attr_accessor :date_of_birth
41
37
 
38
+ class EnumAttributeValidator
39
+ attr_reader :datatype
40
+ attr_reader :allowable_values
41
+
42
+ def initialize(datatype, allowable_values)
43
+ @allowable_values = allowable_values.map do |value|
44
+ case datatype.to_s
45
+ when /Integer/i
46
+ value.to_i
47
+ when /Float/i
48
+ value.to_f
49
+ else
50
+ value
51
+ end
52
+ end
53
+ end
54
+
55
+ def valid?(value)
56
+ !value || allowable_values.include?(value)
57
+ end
58
+ end
59
+
42
60
  # Attribute mapping from ruby-style variable name to JSON key.
43
61
  def self.attribute_map
44
62
  {
@@ -46,8 +64,9 @@ module TrinsicApi
46
64
  :'family_name' => :'familyName',
47
65
  :'middle_name' => :'middleName',
48
66
  :'full_name' => :'fullName',
67
+ :'suffix' => :'suffix',
49
68
  :'nationality' => :'nationality',
50
- :'gender' => :'gender',
69
+ :'sex' => :'sex',
51
70
  :'phone_number' => :'phoneNumber',
52
71
  :'address' => :'address',
53
72
  :'date_of_birth' => :'dateOfBirth'
@@ -66,17 +85,28 @@ module TrinsicApi
66
85
  :'family_name' => :'String',
67
86
  :'middle_name' => :'String',
68
87
  :'full_name' => :'String',
88
+ :'suffix' => :'String',
69
89
  :'nationality' => :'String',
70
- :'gender' => :'String',
90
+ :'sex' => :'Sex',
71
91
  :'phone_number' => :'String',
72
92
  :'address' => :'Address',
73
- :'date_of_birth' => :'String'
93
+ :'date_of_birth' => :'Date'
74
94
  }
75
95
  end
76
96
 
77
97
  # List of attributes with nullable: true
78
98
  def self.openapi_nullable
79
99
  Set.new([
100
+ :'given_name',
101
+ :'family_name',
102
+ :'middle_name',
103
+ :'full_name',
104
+ :'suffix',
105
+ :'nationality',
106
+ :'sex',
107
+ :'phone_number',
108
+ :'address',
109
+ :'date_of_birth'
80
110
  ])
81
111
  end
82
112
 
@@ -111,12 +141,16 @@ module TrinsicApi
111
141
  self.full_name = attributes[:'full_name']
112
142
  end
113
143
 
144
+ if attributes.key?(:'suffix')
145
+ self.suffix = attributes[:'suffix']
146
+ end
147
+
114
148
  if attributes.key?(:'nationality')
115
149
  self.nationality = attributes[:'nationality']
116
150
  end
117
151
 
118
- if attributes.key?(:'gender')
119
- self.gender = attributes[:'gender']
152
+ if attributes.key?(:'sex')
153
+ self.sex = attributes[:'sex']
120
154
  end
121
155
 
122
156
  if attributes.key?(:'phone_number')
@@ -156,8 +190,9 @@ module TrinsicApi
156
190
  family_name == o.family_name &&
157
191
  middle_name == o.middle_name &&
158
192
  full_name == o.full_name &&
193
+ suffix == o.suffix &&
159
194
  nationality == o.nationality &&
160
- gender == o.gender &&
195
+ sex == o.sex &&
161
196
  phone_number == o.phone_number &&
162
197
  address == o.address &&
163
198
  date_of_birth == o.date_of_birth
@@ -172,7 +207,7 @@ module TrinsicApi
172
207
  # Calculates hash code according to all attributes.
173
208
  # @return [Integer] Hash code
174
209
  def hash
175
- [given_name, family_name, middle_name, full_name, nationality, gender, phone_number, address, date_of_birth].hash
210
+ [given_name, family_name, middle_name, full_name, suffix, nationality, sex, phone_number, address, date_of_birth].hash
176
211
  end
177
212
 
178
213
  # Builds the object from hash
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #Connect API
2
+ #Trinsic API
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
@@ -14,33 +14,29 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module TrinsicApi
17
- class KnownPersonData
18
- # Given (first) name of the individual
17
+ class PhilippineMatchInput
18
+ # The user's given / first name
19
19
  attr_accessor :given_name
20
20
 
21
- # Family (last) name of the individual
22
- attr_accessor :family_name
23
-
24
- # Middle name of the individual
21
+ # The user's middle name
25
22
  attr_accessor :middle_name
26
23
 
27
- # The phone number (with preceding + character and country code) of the individual being verified
28
- attr_accessor :phone_number
24
+ # The user's family / last name
25
+ attr_accessor :family_name
29
26
 
30
- # The address of the individual being verified
31
- attr_accessor :address
27
+ # The user's name suffix
28
+ attr_accessor :suffix
32
29
 
33
- # Date of birth of the individual, in the format \"YYYY-MM-DD\"
30
+ # The user's date of birth, in `YYYY-MM-DD` format
34
31
  attr_accessor :date_of_birth
35
32
 
36
33
  # Attribute mapping from ruby-style variable name to JSON key.
37
34
  def self.attribute_map
38
35
  {
39
36
  :'given_name' => :'givenName',
40
- :'family_name' => :'familyName',
41
37
  :'middle_name' => :'middleName',
42
- :'phone_number' => :'phoneNumber',
43
- :'address' => :'address',
38
+ :'family_name' => :'familyName',
39
+ :'suffix' => :'suffix',
44
40
  :'date_of_birth' => :'dateOfBirth'
45
41
  }
46
42
  end
@@ -54,17 +50,21 @@ module TrinsicApi
54
50
  def self.openapi_types
55
51
  {
56
52
  :'given_name' => :'String',
57
- :'family_name' => :'String',
58
53
  :'middle_name' => :'String',
59
- :'phone_number' => :'String',
60
- :'address' => :'KnownAddress',
61
- :'date_of_birth' => :'String'
54
+ :'family_name' => :'String',
55
+ :'suffix' => :'String',
56
+ :'date_of_birth' => :'Date'
62
57
  }
63
58
  end
64
59
 
65
60
  # List of attributes with nullable: true
66
61
  def self.openapi_nullable
67
62
  Set.new([
63
+ :'given_name',
64
+ :'middle_name',
65
+ :'family_name',
66
+ :'suffix',
67
+ :'date_of_birth'
68
68
  ])
69
69
  end
70
70
 
@@ -72,13 +72,13 @@ module TrinsicApi
72
72
  # @param [Hash] attributes Model attributes in the form of hash
73
73
  def initialize(attributes = {})
74
74
  if (!attributes.is_a?(Hash))
75
- fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::KnownPersonData` initialize method"
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::PhilippineMatchInput` initialize method"
76
76
  end
77
77
 
78
78
  # check to see if the attribute exists and convert string to symbol for hash key
79
79
  attributes = attributes.each_with_object({}) { |(k, v), h|
80
80
  if (!self.class.attribute_map.key?(k.to_sym))
81
- fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::KnownPersonData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::PhilippineMatchInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
82
  end
83
83
  h[k.to_sym] = v
84
84
  }
@@ -87,20 +87,16 @@ module TrinsicApi
87
87
  self.given_name = attributes[:'given_name']
88
88
  end
89
89
 
90
- if attributes.key?(:'family_name')
91
- self.family_name = attributes[:'family_name']
92
- end
93
-
94
90
  if attributes.key?(:'middle_name')
95
91
  self.middle_name = attributes[:'middle_name']
96
92
  end
97
93
 
98
- if attributes.key?(:'phone_number')
99
- self.phone_number = attributes[:'phone_number']
94
+ if attributes.key?(:'family_name')
95
+ self.family_name = attributes[:'family_name']
100
96
  end
101
97
 
102
- if attributes.key?(:'address')
103
- self.address = attributes[:'address']
98
+ if attributes.key?(:'suffix')
99
+ self.suffix = attributes[:'suffix']
104
100
  end
105
101
 
106
102
  if attributes.key?(:'date_of_birth')
@@ -129,10 +125,9 @@ module TrinsicApi
129
125
  return true if self.equal?(o)
130
126
  self.class == o.class &&
131
127
  given_name == o.given_name &&
132
- family_name == o.family_name &&
133
128
  middle_name == o.middle_name &&
134
- phone_number == o.phone_number &&
135
- address == o.address &&
129
+ family_name == o.family_name &&
130
+ suffix == o.suffix &&
136
131
  date_of_birth == o.date_of_birth
137
132
  end
138
133
 
@@ -145,7 +140,7 @@ module TrinsicApi
145
140
  # Calculates hash code according to all attributes.
146
141
  # @return [Integer] Hash code
147
142
  def hash
148
- [given_name, family_name, middle_name, phone_number, address, date_of_birth].hash
143
+ [given_name, middle_name, family_name, suffix, date_of_birth].hash
149
144
  end
150
145
 
151
146
  # Builds the object from hash