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