trinsic_api 1.1.2 → 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 +32 -0
- data/docs/KnownIdentityData.md +18 -0
- data/docs/KnownPersonData.md +32 -0
- data/docs/MexicoCurpInput.md +18 -0
- data/docs/NetworkApi.md +37 -35
- 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/ProviderInformation.md +22 -0
- data/docs/ProviderInput.md +38 -0
- data/docs/RecommendRequest.md +26 -0
- data/docs/RecommendResponse.md +22 -0
- 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 +38 -37
- 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/{create_session_request.rb → indonesia_nik_input.rb} +105 -38
- 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 +287 -0
- data/lib/trinsic_api/models/known_identity_data.rb +217 -0
- data/lib/trinsic_api/models/{disclosed_fields_request.rb → known_person_data.rb} +57 -77
- 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 +253 -0
- data/lib/trinsic_api/models/provider_input.rb +326 -0
- data/lib/trinsic_api/models/recommend_request.rb +266 -0
- data/lib/trinsic_api/models/recommend_response.rb +262 -0
- 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 +40 -12
- data/spec/api/attachments_api_spec.rb +1 -1
- data/spec/api/network_api_spec.rb +12 -12
- 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 +78 -0
- data/spec/models/known_identity_data_spec.rb +36 -0
- data/spec/models/{disclosed_fields_request_spec.rb → known_person_data_spec.rb} +13 -37
- 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/philippine_match_input_spec.rb +60 -0
- 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 +48 -0
- data/spec/models/{disclosed_fields_spec.rb → provider_input_spec.rb} +18 -24
- data/spec/models/recommend_request_spec.rb +60 -0
- data/spec/models/recommend_response_spec.rb +48 -0
- 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/{create_session_request_spec.rb → south_africa_nid_input_spec.rb} +11 -11
- data/spec/models/step_refresh_info_spec.rb +48 -0
- data/spec/spec_helper.rb +1 -1
- data/trinsic_api.gemspec +1 -1
- metadata +173 -61
- data/docs/CreateSessionRequest.md +0 -24
- 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 -43
@@ -0,0 +1,42 @@
|
|
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 Sex
|
18
|
+
UNKNOWN = "Unknown".freeze
|
19
|
+
NOT_APPLICABLE = "NotApplicable".freeze
|
20
|
+
MALE = "Male".freeze
|
21
|
+
FEMALE = "Female".freeze
|
22
|
+
|
23
|
+
def self.all_vars
|
24
|
+
@all_vars ||= [UNKNOWN, NOT_APPLICABLE, MALE, FEMALE].freeze
|
25
|
+
end
|
26
|
+
|
27
|
+
# Builds the enum from string
|
28
|
+
# @param [String] The enum value in the form of the string
|
29
|
+
# @return [String] The enum value
|
30
|
+
def self.build_from_hash(value)
|
31
|
+
new.build_from_hash(value)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Builds the enum from string
|
35
|
+
# @param [String] The enum value in the form of the string
|
36
|
+
# @return [String] The enum value
|
37
|
+
def build_from_hash(value)
|
38
|
+
return value if Sex.all_vars.include?(value)
|
39
|
+
raise "Invalid ENUM value #{value} for class #Sex"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
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
|
|
@@ -14,46 +14,26 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module TrinsicApi
|
17
|
-
class
|
18
|
-
|
19
|
-
|
20
|
-
attr_accessor :given_name
|
21
|
-
|
22
|
-
attr_accessor :family_name
|
23
|
-
|
24
|
-
attr_accessor :address
|
17
|
+
class SouthAfricaNidInput
|
18
|
+
# The user's full name as it appears in their National ID
|
19
|
+
attr_accessor :full_name
|
25
20
|
|
21
|
+
# The user's date of birth, in `YYYY-MM-DD` format
|
26
22
|
attr_accessor :date_of_birth
|
27
23
|
|
28
|
-
|
29
|
-
|
30
|
-
attr_accessor :issue_date
|
31
|
-
|
32
|
-
attr_accessor :expiration_date
|
33
|
-
|
34
|
-
attr_accessor :document_front
|
35
|
-
|
36
|
-
attr_accessor :document_back
|
37
|
-
|
38
|
-
attr_accessor :document_portrait
|
24
|
+
# The user's gender as it appears in their National ID (e.g., male, female)
|
25
|
+
attr_accessor :gender
|
39
26
|
|
40
|
-
|
27
|
+
# The user's South African National ID number
|
28
|
+
attr_accessor :national_id_number
|
41
29
|
|
42
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
43
31
|
def self.attribute_map
|
44
32
|
{
|
45
|
-
:'
|
46
|
-
:'given_name' => :'givenName',
|
47
|
-
:'family_name' => :'familyName',
|
48
|
-
:'address' => :'address',
|
33
|
+
:'full_name' => :'fullName',
|
49
34
|
:'date_of_birth' => :'dateOfBirth',
|
50
|
-
:'
|
51
|
-
:'
|
52
|
-
:'expiration_date' => :'expirationDate',
|
53
|
-
:'document_front' => :'documentFront',
|
54
|
-
:'document_back' => :'documentBack',
|
55
|
-
:'document_portrait' => :'documentPortrait',
|
56
|
-
:'selfie' => :'selfie'
|
35
|
+
:'gender' => :'gender',
|
36
|
+
:'national_id_number' => :'nationalIdNumber'
|
57
37
|
}
|
58
38
|
end
|
59
39
|
|
@@ -65,18 +45,10 @@ module TrinsicApi
|
|
65
45
|
# Attribute type mapping.
|
66
46
|
def self.openapi_types
|
67
47
|
{
|
68
|
-
:'
|
69
|
-
:'
|
70
|
-
:'
|
71
|
-
:'
|
72
|
-
:'date_of_birth' => :'Boolean',
|
73
|
-
:'country' => :'Boolean',
|
74
|
-
:'issue_date' => :'Boolean',
|
75
|
-
:'expiration_date' => :'Boolean',
|
76
|
-
:'document_front' => :'Boolean',
|
77
|
-
:'document_back' => :'Boolean',
|
78
|
-
:'document_portrait' => :'Boolean',
|
79
|
-
:'selfie' => :'Boolean'
|
48
|
+
:'full_name' => :'String',
|
49
|
+
:'date_of_birth' => :'Date',
|
50
|
+
:'gender' => :'String',
|
51
|
+
:'national_id_number' => :'String'
|
80
52
|
}
|
81
53
|
end
|
82
54
|
|
@@ -90,39 +62,21 @@ module TrinsicApi
|
|
90
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
91
63
|
def initialize(attributes = {})
|
92
64
|
if (!attributes.is_a?(Hash))
|
93
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::SouthAfricaNidInput` initialize method"
|
94
66
|
end
|
95
67
|
|
96
68
|
# check to see if the attribute exists and convert string to symbol for hash key
|
97
69
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
98
70
|
if (!self.class.attribute_map.key?(k.to_sym))
|
99
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::SouthAfricaNidInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
100
72
|
end
|
101
73
|
h[k.to_sym] = v
|
102
74
|
}
|
103
75
|
|
104
|
-
if attributes.key?(:'
|
105
|
-
self.
|
106
|
-
else
|
107
|
-
self.id_number = nil
|
108
|
-
end
|
109
|
-
|
110
|
-
if attributes.key?(:'given_name')
|
111
|
-
self.given_name = attributes[:'given_name']
|
112
|
-
else
|
113
|
-
self.given_name = nil
|
114
|
-
end
|
115
|
-
|
116
|
-
if attributes.key?(:'family_name')
|
117
|
-
self.family_name = attributes[:'family_name']
|
118
|
-
else
|
119
|
-
self.family_name = nil
|
120
|
-
end
|
121
|
-
|
122
|
-
if attributes.key?(:'address')
|
123
|
-
self.address = attributes[:'address']
|
76
|
+
if attributes.key?(:'full_name')
|
77
|
+
self.full_name = attributes[:'full_name']
|
124
78
|
else
|
125
|
-
self.
|
79
|
+
self.full_name = nil
|
126
80
|
end
|
127
81
|
|
128
82
|
if attributes.key?(:'date_of_birth')
|
@@ -131,46 +85,16 @@ module TrinsicApi
|
|
131
85
|
self.date_of_birth = nil
|
132
86
|
end
|
133
87
|
|
134
|
-
if attributes.key?(:'
|
135
|
-
self.
|
136
|
-
else
|
137
|
-
self.country = nil
|
138
|
-
end
|
139
|
-
|
140
|
-
if attributes.key?(:'issue_date')
|
141
|
-
self.issue_date = attributes[:'issue_date']
|
142
|
-
else
|
143
|
-
self.issue_date = nil
|
144
|
-
end
|
145
|
-
|
146
|
-
if attributes.key?(:'expiration_date')
|
147
|
-
self.expiration_date = attributes[:'expiration_date']
|
148
|
-
else
|
149
|
-
self.expiration_date = nil
|
150
|
-
end
|
151
|
-
|
152
|
-
if attributes.key?(:'document_front')
|
153
|
-
self.document_front = attributes[:'document_front']
|
154
|
-
else
|
155
|
-
self.document_front = nil
|
156
|
-
end
|
157
|
-
|
158
|
-
if attributes.key?(:'document_back')
|
159
|
-
self.document_back = attributes[:'document_back']
|
160
|
-
else
|
161
|
-
self.document_back = nil
|
162
|
-
end
|
163
|
-
|
164
|
-
if attributes.key?(:'document_portrait')
|
165
|
-
self.document_portrait = attributes[:'document_portrait']
|
88
|
+
if attributes.key?(:'gender')
|
89
|
+
self.gender = attributes[:'gender']
|
166
90
|
else
|
167
|
-
self.
|
91
|
+
self.gender = nil
|
168
92
|
end
|
169
93
|
|
170
|
-
if attributes.key?(:'
|
171
|
-
self.
|
94
|
+
if attributes.key?(:'national_id_number')
|
95
|
+
self.national_id_number = attributes[:'national_id_number']
|
172
96
|
else
|
173
|
-
self.
|
97
|
+
self.national_id_number = nil
|
174
98
|
end
|
175
99
|
end
|
176
100
|
|
@@ -179,52 +103,41 @@ module TrinsicApi
|
|
179
103
|
def list_invalid_properties
|
180
104
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
181
105
|
invalid_properties = Array.new
|
182
|
-
if @
|
183
|
-
invalid_properties.push('invalid value for "
|
184
|
-
end
|
185
|
-
|
186
|
-
if @given_name.nil?
|
187
|
-
invalid_properties.push('invalid value for "given_name", given_name cannot be nil.')
|
106
|
+
if @full_name.nil?
|
107
|
+
invalid_properties.push('invalid value for "full_name", full_name cannot be nil.')
|
188
108
|
end
|
189
109
|
|
190
|
-
if @
|
191
|
-
invalid_properties.push('invalid value for "
|
192
|
-
end
|
193
|
-
|
194
|
-
if @address.nil?
|
195
|
-
invalid_properties.push('invalid value for "address", address cannot be nil.')
|
110
|
+
if @full_name.to_s.length < 1
|
111
|
+
invalid_properties.push('invalid value for "full_name", the character length must be great than or equal to 1.')
|
196
112
|
end
|
197
113
|
|
198
114
|
if @date_of_birth.nil?
|
199
115
|
invalid_properties.push('invalid value for "date_of_birth", date_of_birth cannot be nil.')
|
200
116
|
end
|
201
117
|
|
202
|
-
if @
|
203
|
-
invalid_properties.push('invalid value for "
|
204
|
-
end
|
205
|
-
|
206
|
-
if @issue_date.nil?
|
207
|
-
invalid_properties.push('invalid value for "issue_date", issue_date cannot be nil.')
|
118
|
+
if @gender.nil?
|
119
|
+
invalid_properties.push('invalid value for "gender", gender cannot be nil.')
|
208
120
|
end
|
209
121
|
|
210
|
-
if @
|
211
|
-
invalid_properties.push('invalid value for "
|
122
|
+
if @gender.to_s.length < 1
|
123
|
+
invalid_properties.push('invalid value for "gender", the character length must be great than or equal to 1.')
|
212
124
|
end
|
213
125
|
|
214
|
-
if @
|
215
|
-
invalid_properties.push('invalid value for "
|
126
|
+
if @national_id_number.nil?
|
127
|
+
invalid_properties.push('invalid value for "national_id_number", national_id_number cannot be nil.')
|
216
128
|
end
|
217
129
|
|
218
|
-
if @
|
219
|
-
invalid_properties.push('invalid value for "
|
130
|
+
if @national_id_number.to_s.length > 13
|
131
|
+
invalid_properties.push('invalid value for "national_id_number", the character length must be smaller than or equal to 13.')
|
220
132
|
end
|
221
133
|
|
222
|
-
if @
|
223
|
-
invalid_properties.push('invalid value for "
|
134
|
+
if @national_id_number.to_s.length < 13
|
135
|
+
invalid_properties.push('invalid value for "national_id_number", the character length must be great than or equal to 13.')
|
224
136
|
end
|
225
137
|
|
226
|
-
|
227
|
-
|
138
|
+
pattern = Regexp.new(/^\d*$/)
|
139
|
+
if @national_id_number !~ pattern
|
140
|
+
invalid_properties.push("invalid value for \"national_id_number\", must conform to the pattern #{pattern}.")
|
228
141
|
end
|
229
142
|
|
230
143
|
invalid_properties
|
@@ -234,38 +147,78 @@ module TrinsicApi
|
|
234
147
|
# @return true if the model is valid
|
235
148
|
def valid?
|
236
149
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
237
|
-
return false if @
|
238
|
-
return false if @
|
239
|
-
return false if @family_name.nil?
|
240
|
-
return false if @address.nil?
|
150
|
+
return false if @full_name.nil?
|
151
|
+
return false if @full_name.to_s.length < 1
|
241
152
|
return false if @date_of_birth.nil?
|
242
|
-
return false if @
|
243
|
-
return false if @
|
244
|
-
return false if @
|
245
|
-
return false if @
|
246
|
-
return false if @
|
247
|
-
return false if @
|
248
|
-
return false if @selfie.nil?
|
153
|
+
return false if @gender.nil?
|
154
|
+
return false if @gender.to_s.length < 1
|
155
|
+
return false if @national_id_number.nil?
|
156
|
+
return false if @national_id_number.to_s.length > 13
|
157
|
+
return false if @national_id_number.to_s.length < 13
|
158
|
+
return false if @national_id_number !~ Regexp.new(/^\d*$/)
|
249
159
|
true
|
250
160
|
end
|
251
161
|
|
162
|
+
# Custom attribute writer method with validation
|
163
|
+
# @param [Object] full_name Value to be assigned
|
164
|
+
def full_name=(full_name)
|
165
|
+
if full_name.nil?
|
166
|
+
fail ArgumentError, 'full_name cannot be nil'
|
167
|
+
end
|
168
|
+
|
169
|
+
if full_name.to_s.length < 1
|
170
|
+
fail ArgumentError, 'invalid value for "full_name", the character length must be great than or equal to 1.'
|
171
|
+
end
|
172
|
+
|
173
|
+
@full_name = full_name
|
174
|
+
end
|
175
|
+
|
176
|
+
# Custom attribute writer method with validation
|
177
|
+
# @param [Object] gender Value to be assigned
|
178
|
+
def gender=(gender)
|
179
|
+
if gender.nil?
|
180
|
+
fail ArgumentError, 'gender cannot be nil'
|
181
|
+
end
|
182
|
+
|
183
|
+
if gender.to_s.length < 1
|
184
|
+
fail ArgumentError, 'invalid value for "gender", the character length must be great than or equal to 1.'
|
185
|
+
end
|
186
|
+
|
187
|
+
@gender = gender
|
188
|
+
end
|
189
|
+
|
190
|
+
# Custom attribute writer method with validation
|
191
|
+
# @param [Object] national_id_number Value to be assigned
|
192
|
+
def national_id_number=(national_id_number)
|
193
|
+
if national_id_number.nil?
|
194
|
+
fail ArgumentError, 'national_id_number cannot be nil'
|
195
|
+
end
|
196
|
+
|
197
|
+
if national_id_number.to_s.length > 13
|
198
|
+
fail ArgumentError, 'invalid value for "national_id_number", the character length must be smaller than or equal to 13.'
|
199
|
+
end
|
200
|
+
|
201
|
+
if national_id_number.to_s.length < 13
|
202
|
+
fail ArgumentError, 'invalid value for "national_id_number", the character length must be great than or equal to 13.'
|
203
|
+
end
|
204
|
+
|
205
|
+
pattern = Regexp.new(/^\d*$/)
|
206
|
+
if national_id_number !~ pattern
|
207
|
+
fail ArgumentError, "invalid value for \"national_id_number\", must conform to the pattern #{pattern}."
|
208
|
+
end
|
209
|
+
|
210
|
+
@national_id_number = national_id_number
|
211
|
+
end
|
212
|
+
|
252
213
|
# Checks equality by comparing each attribute.
|
253
214
|
# @param [Object] Object to be compared
|
254
215
|
def ==(o)
|
255
216
|
return true if self.equal?(o)
|
256
217
|
self.class == o.class &&
|
257
|
-
|
258
|
-
given_name == o.given_name &&
|
259
|
-
family_name == o.family_name &&
|
260
|
-
address == o.address &&
|
218
|
+
full_name == o.full_name &&
|
261
219
|
date_of_birth == o.date_of_birth &&
|
262
|
-
|
263
|
-
|
264
|
-
expiration_date == o.expiration_date &&
|
265
|
-
document_front == o.document_front &&
|
266
|
-
document_back == o.document_back &&
|
267
|
-
document_portrait == o.document_portrait &&
|
268
|
-
selfie == o.selfie
|
220
|
+
gender == o.gender &&
|
221
|
+
national_id_number == o.national_id_number
|
269
222
|
end
|
270
223
|
|
271
224
|
# @see the `==` method
|
@@ -277,7 +230,7 @@ module TrinsicApi
|
|
277
230
|
# Calculates hash code according to all attributes.
|
278
231
|
# @return [Integer] Hash code
|
279
232
|
def hash
|
280
|
-
[
|
233
|
+
[full_name, date_of_birth, gender, national_id_number].hash
|
281
234
|
end
|
282
235
|
|
283
236
|
# Builds the object from hash
|
@@ -0,0 +1,256 @@
|
|
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 StepRefreshInfo
|
18
|
+
# The UTC date/time at which the step `content` will expire and should no longer be used. Use the `Refresh Step Content` API to obtain a new value for `content`.
|
19
|
+
attr_accessor :expires_at
|
20
|
+
|
21
|
+
# The UTC date/time after which Trinsic recommends you refresh the step `content`.
|
22
|
+
attr_accessor :refresh_after
|
23
|
+
|
24
|
+
# The total lifetime of the step `content`.
|
25
|
+
attr_accessor :time_to_live_seconds
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'expires_at' => :'expiresAt',
|
31
|
+
:'refresh_after' => :'refreshAfter',
|
32
|
+
:'time_to_live_seconds' => :'timeToLiveSeconds'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'expires_at' => :'Time',
|
45
|
+
:'refresh_after' => :'Time',
|
46
|
+
:'time_to_live_seconds' => :'Integer'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# List of attributes with nullable: true
|
51
|
+
def self.openapi_nullable
|
52
|
+
Set.new([
|
53
|
+
])
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
def initialize(attributes = {})
|
59
|
+
if (!attributes.is_a?(Hash))
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::StepRefreshInfo` initialize method"
|
61
|
+
end
|
62
|
+
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::StepRefreshInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
|
+
end
|
68
|
+
h[k.to_sym] = v
|
69
|
+
}
|
70
|
+
|
71
|
+
if attributes.key?(:'expires_at')
|
72
|
+
self.expires_at = attributes[:'expires_at']
|
73
|
+
else
|
74
|
+
self.expires_at = nil
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'refresh_after')
|
78
|
+
self.refresh_after = attributes[:'refresh_after']
|
79
|
+
else
|
80
|
+
self.refresh_after = nil
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'time_to_live_seconds')
|
84
|
+
self.time_to_live_seconds = attributes[:'time_to_live_seconds']
|
85
|
+
else
|
86
|
+
self.time_to_live_seconds = nil
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
91
|
+
# @return Array for valid properties with the reasons
|
92
|
+
def list_invalid_properties
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
94
|
+
invalid_properties = Array.new
|
95
|
+
if @expires_at.nil?
|
96
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
97
|
+
end
|
98
|
+
|
99
|
+
if @refresh_after.nil?
|
100
|
+
invalid_properties.push('invalid value for "refresh_after", refresh_after cannot be nil.')
|
101
|
+
end
|
102
|
+
|
103
|
+
if @time_to_live_seconds.nil?
|
104
|
+
invalid_properties.push('invalid value for "time_to_live_seconds", time_to_live_seconds cannot be nil.')
|
105
|
+
end
|
106
|
+
|
107
|
+
invalid_properties
|
108
|
+
end
|
109
|
+
|
110
|
+
# Check to see if the all the properties in the model are valid
|
111
|
+
# @return true if the model is valid
|
112
|
+
def valid?
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
114
|
+
return false if @expires_at.nil?
|
115
|
+
return false if @refresh_after.nil?
|
116
|
+
return false if @time_to_live_seconds.nil?
|
117
|
+
true
|
118
|
+
end
|
119
|
+
|
120
|
+
# Checks equality by comparing each attribute.
|
121
|
+
# @param [Object] Object to be compared
|
122
|
+
def ==(o)
|
123
|
+
return true if self.equal?(o)
|
124
|
+
self.class == o.class &&
|
125
|
+
expires_at == o.expires_at &&
|
126
|
+
refresh_after == o.refresh_after &&
|
127
|
+
time_to_live_seconds == o.time_to_live_seconds
|
128
|
+
end
|
129
|
+
|
130
|
+
# @see the `==` method
|
131
|
+
# @param [Object] Object to be compared
|
132
|
+
def eql?(o)
|
133
|
+
self == o
|
134
|
+
end
|
135
|
+
|
136
|
+
# Calculates hash code according to all attributes.
|
137
|
+
# @return [Integer] Hash code
|
138
|
+
def hash
|
139
|
+
[expires_at, refresh_after, time_to_live_seconds].hash
|
140
|
+
end
|
141
|
+
|
142
|
+
# Builds the object from hash
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
+
# @return [Object] Returns the model itself
|
145
|
+
def self.build_from_hash(attributes)
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
148
|
+
transformed_hash = {}
|
149
|
+
openapi_types.each_pair do |key, type|
|
150
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = nil
|
152
|
+
elsif type =~ /\AArray<(.*)>/i
|
153
|
+
# check to ensure the input is an array given that the attribute
|
154
|
+
# is documented as an array but the input is not
|
155
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
156
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
157
|
+
end
|
158
|
+
elsif !attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
160
|
+
end
|
161
|
+
end
|
162
|
+
new(transformed_hash)
|
163
|
+
end
|
164
|
+
|
165
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def self._deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :Time
|
172
|
+
Time.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :Boolean
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
# models (e.g. Pet) or oneOf
|
203
|
+
klass = TrinsicApi.const_get(type)
|
204
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the string representation of the object
|
209
|
+
# @return [String] String presentation of the object
|
210
|
+
def to_s
|
211
|
+
to_hash.to_s
|
212
|
+
end
|
213
|
+
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_body
|
217
|
+
to_hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the object in the form of hash
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_hash
|
223
|
+
hash = {}
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
225
|
+
value = self.send(attr)
|
226
|
+
if value.nil?
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
229
|
+
end
|
230
|
+
|
231
|
+
hash[param] = _to_hash(value)
|
232
|
+
end
|
233
|
+
hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Outputs non-array value in the form of hash
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
238
|
+
# @param [Object] value Any valid value
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
240
|
+
def _to_hash(value)
|
241
|
+
if value.is_a?(Array)
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
243
|
+
elsif value.is_a?(Hash)
|
244
|
+
{}.tap do |hash|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
246
|
+
end
|
247
|
+
elsif value.respond_to? :to_hash
|
248
|
+
value.to_hash
|
249
|
+
else
|
250
|
+
value
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
data/lib/trinsic_api/version.rb
CHANGED
@@ -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
|
|
@@ -11,5 +11,5 @@ Generator version: 7.8.0
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module TrinsicApi
|
14
|
-
VERSION = '
|
14
|
+
VERSION = '2.0.0-alpha3'
|
15
15
|
end
|