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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/docs/AadhaarInput.md +20 -0
- data/docs/Address.md +3 -3
- data/docs/AttachmentAccessKeys.md +7 -5
- data/docs/AttachmentsApi.md +1 -1
- 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 +22 -0
- data/docs/CreateWidgetSessionRequest.md +22 -0
- data/docs/CreateWidgetSessionResponse.md +22 -0
- 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 +6 -4
- data/docs/IdinInput.md +18 -0
- 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/{SessionFailCode.md → Language.md} +2 -2
- data/docs/ListProviderContractsResponse.md +18 -0
- data/docs/MexicoCurpInput.md +18 -0
- data/docs/MobileIdInput.md +22 -0
- data/docs/NetworkApi.md +22 -25
- 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/ProviderContract.md +46 -0
- data/docs/ProviderInformation.md +3 -3
- data/docs/ProviderInput.md +50 -0
- data/docs/RecommendRequest.md +2 -6
- data/docs/RecommendationInfo.md +24 -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 +237 -19
- data/docs/Sex.md +15 -0
- data/docs/SmartIdInput.md +18 -0
- data/docs/SouthAfricaNidInput.md +24 -0
- data/docs/SpidInput.md +18 -0
- data/docs/StepRefreshInfo.md +22 -0
- data/docs/SubProviderMetadata.md +24 -0
- data/docs/TrinsicTestDatabaseLookupInput.md +24 -0
- data/docs/TrinsicTestSubProvidersInput.md +18 -0
- data/lib/trinsic_api/api/attachments_api.rb +3 -3
- data/lib/trinsic_api/api/network_api.rb +19 -25
- data/lib/trinsic_api/api/sessions_api.rb +219 -21
- 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/aadhaar_input.rb +227 -0
- 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 +256 -0
- data/lib/trinsic_api/models/create_widget_session_request.rb +240 -0
- data/lib/trinsic_api/models/create_widget_session_response.rb +256 -0
- 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/{known_address.rb → http_validation_problem_details.rb} +55 -51
- data/lib/trinsic_api/models/identity_data.rb +16 -6
- data/lib/trinsic_api/models/{known_identity_data.rb → idin_input.rb} +13 -13
- 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/language.rb +42 -0
- data/lib/trinsic_api/models/{validation_result.rb → list_provider_contracts_response.rb} +17 -25
- 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/{create_session_response.rb → mexico_curp_input.rb} +44 -26
- data/lib/trinsic_api/models/mobile_id_input.rb +260 -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/{known_person_data.rb → philippine_match_input.rb} +28 -33
- data/lib/trinsic_api/models/philippine_qr_input.rb +227 -0
- data/lib/trinsic_api/models/{verification.rb → problem_details.rb} +49 -42
- data/lib/trinsic_api/models/provider_attachments.rb +215 -0
- data/lib/trinsic_api/models/provider_contract.rb +482 -0
- data/lib/trinsic_api/models/provider_info.rb +1 -1
- data/lib/trinsic_api/models/provider_information.rb +1 -1
- data/lib/trinsic_api/models/provider_input.rb +392 -0
- data/lib/trinsic_api/models/recommend_request.rb +10 -40
- data/lib/trinsic_api/models/recommend_response.rb +1 -1
- data/lib/trinsic_api/models/recommendation_info.rb +256 -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/result_collection.rb +261 -0
- 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/smart_id_input.rb +216 -0
- data/lib/trinsic_api/models/{disclosed_fields.rb → south_africa_nid_input.rb} +107 -154
- data/lib/trinsic_api/models/spid_input.rb +216 -0
- data/lib/trinsic_api/models/step_refresh_info.rb +256 -0
- data/lib/trinsic_api/models/sub_provider_metadata.rb +274 -0
- data/lib/trinsic_api/models/trinsic_test_database_lookup_input.rb +249 -0
- data/lib/trinsic_api/models/trinsic_test_sub_providers_input.rb +216 -0
- data/lib/trinsic_api/version.rb +2 -2
- data/lib/trinsic_api.rb +45 -15
- data/spec/api/attachments_api_spec.rb +2 -2
- data/spec/api/network_api_spec.rb +8 -9
- data/spec/api/sessions_api_spec.rb +45 -8
- 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 +48 -0
- data/spec/models/create_widget_session_request_spec.rb +48 -0
- data/spec/models/create_widget_session_response_spec.rb +48 -0
- 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 +7 -1
- data/spec/models/{failure_message_spec.rb → idin_input_spec.rb} +8 -8
- 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/{known_person_data_spec.rb → kenya_nid_input_spec.rb} +13 -13
- data/spec/models/{session_fail_code_spec.rb → language_spec.rb} +7 -7
- data/spec/models/list_provider_contracts_response_spec.rb +36 -0
- data/spec/models/list_providers_response_spec.rb +1 -1
- data/spec/models/list_sessions_response_spec.rb +1 -1
- data/spec/models/{known_identity_data_spec.rb → mexico_curp_input_spec.rb} +8 -8
- data/spec/models/mobile_id_input_spec.rb +48 -0
- data/spec/models/{known_address_spec.rb → nigeria_nin_input_spec.rb} +14 -14
- 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/{create_session_response_spec.rb → philippine_qr_input_spec.rb} +9 -9
- data/spec/models/problem_details_spec.rb +60 -0
- data/spec/models/provider_attachments_spec.rb +36 -0
- data/spec/models/{disclosed_fields_request_spec.rb → provider_contract_spec.rb} +37 -19
- data/spec/models/provider_info_spec.rb +1 -1
- data/spec/models/provider_information_spec.rb +1 -1
- data/spec/models/{disclosed_fields_spec.rb → provider_input_spec.rb} +49 -19
- data/spec/models/recommend_request_spec.rb +2 -14
- data/spec/models/recommend_response_spec.rb +1 -1
- data/spec/models/recommendation_info_spec.rb +54 -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/sex_spec.rb +30 -0
- data/spec/models/smart_id_input_spec.rb +36 -0
- data/spec/models/south_africa_nid_input_spec.rb +54 -0
- data/spec/models/spid_input_spec.rb +36 -0
- data/spec/models/step_refresh_info_spec.rb +48 -0
- data/spec/models/sub_provider_metadata_spec.rb +54 -0
- data/spec/models/trinsic_test_database_lookup_input_spec.rb +54 -0
- data/spec/models/trinsic_test_sub_providers_input_spec.rb +36 -0
- data/spec/spec_helper.rb +1 -1
- data/trinsic_api.gemspec +1 -1
- metadata +195 -75
- data/docs/CreateSessionRequest.md +0 -26
- data/docs/CreateSessionResponse.md +0 -20
- data/docs/DisclosedFields.md +0 -40
- data/docs/DisclosedFieldsRequest.md +0 -40
- data/docs/IdentityLookupResponse.md +0 -18
- data/docs/KnownAddress.md +0 -30
- data/docs/KnownIdentityData.md +0 -18
- data/docs/KnownPersonData.md +0 -28
- data/docs/ValidationResult.md +0 -20
- data/docs/Verification.md +0 -20
- data/lib/trinsic_api/models/create_session_request.rb +0 -257
- data/lib/trinsic_api/models/session_fail_code.rb +0 -45
- data/lib/trinsic_api/models/verification_fail_code.rb +0 -44
@@ -0,0 +1,261 @@
|
|
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 ResultCollection
|
18
|
+
# The method by which the results of the Acceptance Session should be collected.
|
19
|
+
attr_accessor :method
|
20
|
+
|
21
|
+
# The `resultsAccessKey` for the Acceptance Session. This is an encrypted payload which contains the decryption key necessary to access the Session's Data Vault. Save this securely in your systems; it must be passed back with any API call which requires access to the Session's Data Vault. Trinsic cannot access a Session's Data Vault without this key.
|
22
|
+
attr_accessor :results_access_key
|
23
|
+
|
24
|
+
class EnumAttributeValidator
|
25
|
+
attr_reader :datatype
|
26
|
+
attr_reader :allowable_values
|
27
|
+
|
28
|
+
def initialize(datatype, allowable_values)
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
30
|
+
case datatype.to_s
|
31
|
+
when /Integer/i
|
32
|
+
value.to_i
|
33
|
+
when /Float/i
|
34
|
+
value.to_f
|
35
|
+
else
|
36
|
+
value
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def valid?(value)
|
42
|
+
!value || allowable_values.include?(value)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'method' => :'method',
|
50
|
+
:'results_access_key' => :'resultsAccessKey'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Returns all the JSON keys this model knows about
|
55
|
+
def self.acceptable_attributes
|
56
|
+
attribute_map.values
|
57
|
+
end
|
58
|
+
|
59
|
+
# Attribute type mapping.
|
60
|
+
def self.openapi_types
|
61
|
+
{
|
62
|
+
:'method' => :'ResultCollectionMethod',
|
63
|
+
:'results_access_key' => :'String'
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
# List of attributes with nullable: true
|
68
|
+
def self.openapi_nullable
|
69
|
+
Set.new([
|
70
|
+
])
|
71
|
+
end
|
72
|
+
|
73
|
+
# Initializes the object
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
75
|
+
def initialize(attributes = {})
|
76
|
+
if (!attributes.is_a?(Hash))
|
77
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::ResultCollection` initialize method"
|
78
|
+
end
|
79
|
+
|
80
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
82
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::ResultCollection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
84
|
+
end
|
85
|
+
h[k.to_sym] = v
|
86
|
+
}
|
87
|
+
|
88
|
+
if attributes.key?(:'method')
|
89
|
+
self.method = attributes[:'method']
|
90
|
+
else
|
91
|
+
self.method = nil
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'results_access_key')
|
95
|
+
self.results_access_key = attributes[:'results_access_key']
|
96
|
+
else
|
97
|
+
self.results_access_key = nil
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
102
|
+
# @return Array for valid properties with the reasons
|
103
|
+
def list_invalid_properties
|
104
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
105
|
+
invalid_properties = Array.new
|
106
|
+
if @method.nil?
|
107
|
+
invalid_properties.push('invalid value for "method", method cannot be nil.')
|
108
|
+
end
|
109
|
+
|
110
|
+
if @results_access_key.nil?
|
111
|
+
invalid_properties.push('invalid value for "results_access_key", results_access_key cannot be nil.')
|
112
|
+
end
|
113
|
+
|
114
|
+
invalid_properties
|
115
|
+
end
|
116
|
+
|
117
|
+
# Check to see if the all the properties in the model are valid
|
118
|
+
# @return true if the model is valid
|
119
|
+
def valid?
|
120
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
121
|
+
return false if @method.nil?
|
122
|
+
return false if @results_access_key.nil?
|
123
|
+
true
|
124
|
+
end
|
125
|
+
|
126
|
+
# Checks equality by comparing each attribute.
|
127
|
+
# @param [Object] Object to be compared
|
128
|
+
def ==(o)
|
129
|
+
return true if self.equal?(o)
|
130
|
+
self.class == o.class &&
|
131
|
+
method == o.method &&
|
132
|
+
results_access_key == o.results_access_key
|
133
|
+
end
|
134
|
+
|
135
|
+
# @see the `==` method
|
136
|
+
# @param [Object] Object to be compared
|
137
|
+
def eql?(o)
|
138
|
+
self == o
|
139
|
+
end
|
140
|
+
|
141
|
+
# Calculates hash code according to all attributes.
|
142
|
+
# @return [Integer] Hash code
|
143
|
+
def hash
|
144
|
+
[method, results_access_key].hash
|
145
|
+
end
|
146
|
+
|
147
|
+
# Builds the object from hash
|
148
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
149
|
+
# @return [Object] Returns the model itself
|
150
|
+
def self.build_from_hash(attributes)
|
151
|
+
return nil unless attributes.is_a?(Hash)
|
152
|
+
attributes = attributes.transform_keys(&:to_sym)
|
153
|
+
transformed_hash = {}
|
154
|
+
openapi_types.each_pair do |key, type|
|
155
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
156
|
+
transformed_hash["#{key}"] = nil
|
157
|
+
elsif type =~ /\AArray<(.*)>/i
|
158
|
+
# check to ensure the input is an array given that the attribute
|
159
|
+
# is documented as an array but the input is not
|
160
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
161
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
162
|
+
end
|
163
|
+
elsif !attributes[attribute_map[key]].nil?
|
164
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
165
|
+
end
|
166
|
+
end
|
167
|
+
new(transformed_hash)
|
168
|
+
end
|
169
|
+
|
170
|
+
# Deserializes the data based on type
|
171
|
+
# @param string type Data type
|
172
|
+
# @param string value Value to be deserialized
|
173
|
+
# @return [Object] Deserialized data
|
174
|
+
def self._deserialize(type, value)
|
175
|
+
case type.to_sym
|
176
|
+
when :Time
|
177
|
+
Time.parse(value)
|
178
|
+
when :Date
|
179
|
+
Date.parse(value)
|
180
|
+
when :String
|
181
|
+
value.to_s
|
182
|
+
when :Integer
|
183
|
+
value.to_i
|
184
|
+
when :Float
|
185
|
+
value.to_f
|
186
|
+
when :Boolean
|
187
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
188
|
+
true
|
189
|
+
else
|
190
|
+
false
|
191
|
+
end
|
192
|
+
when :Object
|
193
|
+
# generic object (usually a Hash), return directly
|
194
|
+
value
|
195
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
196
|
+
inner_type = Regexp.last_match[:inner_type]
|
197
|
+
value.map { |v| _deserialize(inner_type, v) }
|
198
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
199
|
+
k_type = Regexp.last_match[:k_type]
|
200
|
+
v_type = Regexp.last_match[:v_type]
|
201
|
+
{}.tap do |hash|
|
202
|
+
value.each do |k, v|
|
203
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
204
|
+
end
|
205
|
+
end
|
206
|
+
else # model
|
207
|
+
# models (e.g. Pet) or oneOf
|
208
|
+
klass = TrinsicApi.const_get(type)
|
209
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
# Returns the string representation of the object
|
214
|
+
# @return [String] String presentation of the object
|
215
|
+
def to_s
|
216
|
+
to_hash.to_s
|
217
|
+
end
|
218
|
+
|
219
|
+
# to_body is an alias to to_hash (backward compatibility)
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
221
|
+
def to_body
|
222
|
+
to_hash
|
223
|
+
end
|
224
|
+
|
225
|
+
# Returns the object in the form of hash
|
226
|
+
# @return [Hash] Returns the object in the form of hash
|
227
|
+
def to_hash
|
228
|
+
hash = {}
|
229
|
+
self.class.attribute_map.each_pair do |attr, param|
|
230
|
+
value = self.send(attr)
|
231
|
+
if value.nil?
|
232
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
233
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
234
|
+
end
|
235
|
+
|
236
|
+
hash[param] = _to_hash(value)
|
237
|
+
end
|
238
|
+
hash
|
239
|
+
end
|
240
|
+
|
241
|
+
# Outputs non-array value in the form of hash
|
242
|
+
# For object, use to_hash. Otherwise, just return the value
|
243
|
+
# @param [Object] value Any valid value
|
244
|
+
# @return [Hash] Returns the value in the form of hash
|
245
|
+
def _to_hash(value)
|
246
|
+
if value.is_a?(Array)
|
247
|
+
value.compact.map { |v| _to_hash(v) }
|
248
|
+
elsif value.is_a?(Hash)
|
249
|
+
{}.tap do |hash|
|
250
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
251
|
+
end
|
252
|
+
elsif value.respond_to? :to_hash
|
253
|
+
value.to_hash
|
254
|
+
else
|
255
|
+
value
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
end
|
260
|
+
|
261
|
+
end
|
@@ -0,0 +1,40 @@
|
|
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 ResultCollectionMethod
|
18
|
+
POLL_RESULT = "PollResult".freeze
|
19
|
+
CAPTURE_REDIRECT = "CaptureRedirect".freeze
|
20
|
+
|
21
|
+
def self.all_vars
|
22
|
+
@all_vars ||= [POLL_RESULT, CAPTURE_REDIRECT].freeze
|
23
|
+
end
|
24
|
+
|
25
|
+
# Builds the enum from string
|
26
|
+
# @param [String] The enum value in the form of the string
|
27
|
+
# @return [String] The enum value
|
28
|
+
def self.build_from_hash(value)
|
29
|
+
new.build_from_hash(value)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Builds the enum from string
|
33
|
+
# @param [String] The enum value in the form of the string
|
34
|
+
# @return [String] The enum value
|
35
|
+
def build_from_hash(value)
|
36
|
+
return value if ResultCollectionMethod.all_vars.include?(value)
|
37
|
+
raise "Invalid ENUM value #{value} for class #ResultCollectionMethod"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
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
|
|
@@ -17,17 +17,14 @@ module TrinsicApi
|
|
17
17
|
class Session
|
18
18
|
attr_accessor :id
|
19
19
|
|
20
|
-
#
|
21
|
-
attr_accessor :
|
20
|
+
# Whether the Session is in a terminal / final state. If this is `true`, inspect the value of `Success` to determine whether the Session was successful.
|
21
|
+
attr_accessor :done
|
22
22
|
|
23
|
-
# If the
|
24
|
-
attr_accessor :
|
23
|
+
# Whether the Session has completed successfully. If this is `false`, the Session is either not yet done, or has failed. Inspect `Done` and `ErrorCode` for more information. If this is `true`, the Session has completed successfully.
|
24
|
+
attr_accessor :success
|
25
25
|
|
26
|
-
# The
|
27
|
-
attr_accessor :
|
28
|
-
|
29
|
-
# The fields that were requested to be disclosed when the Session was created
|
30
|
-
attr_accessor :disclosed_fields
|
26
|
+
# The reason for the Session's failure. Only present if `Success` is `false`.
|
27
|
+
attr_accessor :error_code
|
31
28
|
|
32
29
|
# The unix timestamp, in seconds, when this session was created
|
33
30
|
attr_accessor :created
|
@@ -61,10 +58,9 @@ module TrinsicApi
|
|
61
58
|
def self.attribute_map
|
62
59
|
{
|
63
60
|
:'id' => :'id',
|
64
|
-
:'
|
65
|
-
:'
|
66
|
-
:'
|
67
|
-
:'disclosed_fields' => :'disclosedFields',
|
61
|
+
:'done' => :'done',
|
62
|
+
:'success' => :'success',
|
63
|
+
:'error_code' => :'errorCode',
|
68
64
|
:'created' => :'created',
|
69
65
|
:'updated' => :'updated'
|
70
66
|
}
|
@@ -79,10 +75,9 @@ module TrinsicApi
|
|
79
75
|
def self.openapi_types
|
80
76
|
{
|
81
77
|
:'id' => :'String',
|
82
|
-
:'
|
83
|
-
:'
|
84
|
-
:'
|
85
|
-
:'disclosed_fields' => :'DisclosedFields',
|
78
|
+
:'done' => :'Boolean',
|
79
|
+
:'success' => :'Boolean',
|
80
|
+
:'error_code' => :'SessionErrorCode',
|
86
81
|
:'created' => :'Integer',
|
87
82
|
:'updated' => :'Integer'
|
88
83
|
}
|
@@ -91,6 +86,7 @@ module TrinsicApi
|
|
91
86
|
# List of attributes with nullable: true
|
92
87
|
def self.openapi_nullable
|
93
88
|
Set.new([
|
89
|
+
:'error_code',
|
94
90
|
])
|
95
91
|
end
|
96
92
|
|
@@ -115,26 +111,20 @@ module TrinsicApi
|
|
115
111
|
self.id = nil
|
116
112
|
end
|
117
113
|
|
118
|
-
if attributes.key?(:'
|
119
|
-
self.
|
114
|
+
if attributes.key?(:'done')
|
115
|
+
self.done = attributes[:'done']
|
120
116
|
else
|
121
|
-
self.
|
122
|
-
end
|
123
|
-
|
124
|
-
if attributes.key?(:'fail_code')
|
125
|
-
self.fail_code = attributes[:'fail_code']
|
117
|
+
self.done = nil
|
126
118
|
end
|
127
119
|
|
128
|
-
if attributes.key?(:'
|
129
|
-
self.
|
120
|
+
if attributes.key?(:'success')
|
121
|
+
self.success = attributes[:'success']
|
130
122
|
else
|
131
|
-
self.
|
123
|
+
self.success = nil
|
132
124
|
end
|
133
125
|
|
134
|
-
if attributes.key?(:'
|
135
|
-
self.
|
136
|
-
else
|
137
|
-
self.disclosed_fields = nil
|
126
|
+
if attributes.key?(:'error_code')
|
127
|
+
self.error_code = attributes[:'error_code']
|
138
128
|
end
|
139
129
|
|
140
130
|
if attributes.key?(:'created')
|
@@ -159,16 +149,12 @@ module TrinsicApi
|
|
159
149
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
160
150
|
end
|
161
151
|
|
162
|
-
if @
|
163
|
-
invalid_properties.push('invalid value for "
|
164
|
-
end
|
165
|
-
|
166
|
-
if @verification.nil?
|
167
|
-
invalid_properties.push('invalid value for "verification", verification cannot be nil.')
|
152
|
+
if @done.nil?
|
153
|
+
invalid_properties.push('invalid value for "done", done cannot be nil.')
|
168
154
|
end
|
169
155
|
|
170
|
-
if @
|
171
|
-
invalid_properties.push('invalid value for "
|
156
|
+
if @success.nil?
|
157
|
+
invalid_properties.push('invalid value for "success", success cannot be nil.')
|
172
158
|
end
|
173
159
|
|
174
160
|
if @created.nil?
|
@@ -187,9 +173,8 @@ module TrinsicApi
|
|
187
173
|
def valid?
|
188
174
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
189
175
|
return false if @id.nil?
|
190
|
-
return false if @
|
191
|
-
return false if @
|
192
|
-
return false if @disclosed_fields.nil?
|
176
|
+
return false if @done.nil?
|
177
|
+
return false if @success.nil?
|
193
178
|
return false if @created.nil?
|
194
179
|
return false if @updated.nil?
|
195
180
|
true
|
@@ -201,10 +186,9 @@ module TrinsicApi
|
|
201
186
|
return true if self.equal?(o)
|
202
187
|
self.class == o.class &&
|
203
188
|
id == o.id &&
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
disclosed_fields == o.disclosed_fields &&
|
189
|
+
done == o.done &&
|
190
|
+
success == o.success &&
|
191
|
+
error_code == o.error_code &&
|
208
192
|
created == o.created &&
|
209
193
|
updated == o.updated
|
210
194
|
end
|
@@ -218,7 +202,7 @@ module TrinsicApi
|
|
218
202
|
# Calculates hash code according to all attributes.
|
219
203
|
# @return [Integer] Hash code
|
220
204
|
def hash
|
221
|
-
[id,
|
205
|
+
[id, done, success, error_code, created, updated].hash
|
222
206
|
end
|
223
207
|
|
224
208
|
# Builds the object from hash
|
@@ -0,0 +1,48 @@
|
|
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 SessionErrorCode
|
18
|
+
INTERNAL = "Internal".freeze
|
19
|
+
OTHER = "Other".freeze
|
20
|
+
CANCELED = "Canceled".freeze
|
21
|
+
USER_ABANDONED = "UserAbandoned".freeze
|
22
|
+
USER_TIMED_OUT = "UserTimedOut".freeze
|
23
|
+
EXPIRED = "Expired".freeze
|
24
|
+
INVALID_IMAGE = "InvalidImage".freeze
|
25
|
+
INAUTHENTIC = "Inauthentic".freeze
|
26
|
+
UNSUPPORTED_DOCUMENT = "UnsupportedDocument".freeze
|
27
|
+
ASSURANCE_LEVEL_NOT_MET = "AssuranceLevelNotMet".freeze
|
28
|
+
|
29
|
+
def self.all_vars
|
30
|
+
@all_vars ||= [INTERNAL, OTHER, CANCELED, USER_ABANDONED, USER_TIMED_OUT, EXPIRED, INVALID_IMAGE, INAUTHENTIC, UNSUPPORTED_DOCUMENT, ASSURANCE_LEVEL_NOT_MET].freeze
|
31
|
+
end
|
32
|
+
|
33
|
+
# Builds the enum from string
|
34
|
+
# @param [String] The enum value in the form of the string
|
35
|
+
# @return [String] The enum value
|
36
|
+
def self.build_from_hash(value)
|
37
|
+
new.build_from_hash(value)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Builds the enum from string
|
41
|
+
# @param [String] The enum value in the form of the string
|
42
|
+
# @return [String] The enum value
|
43
|
+
def build_from_hash(value)
|
44
|
+
return value if SessionErrorCode.all_vars.include?(value)
|
45
|
+
raise "Invalid ENUM value #{value} for class #SessionErrorCode"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -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
|