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
@@ -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,22 @@ 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 IndonesiaNikInput
|
18
|
+
# The user's full name
|
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
|
39
|
-
|
40
|
-
attr_accessor :selfie
|
24
|
+
# The user's Indonesia NIK ID number
|
25
|
+
attr_accessor :nik_id_number
|
41
26
|
|
42
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
43
28
|
def self.attribute_map
|
44
29
|
{
|
45
|
-
:'
|
46
|
-
:'given_name' => :'givenName',
|
47
|
-
:'family_name' => :'familyName',
|
48
|
-
:'address' => :'address',
|
30
|
+
:'full_name' => :'fullName',
|
49
31
|
:'date_of_birth' => :'dateOfBirth',
|
50
|
-
:'
|
51
|
-
:'issue_date' => :'issueDate',
|
52
|
-
:'expiration_date' => :'expirationDate',
|
53
|
-
:'document_front' => :'documentFront',
|
54
|
-
:'document_back' => :'documentBack',
|
55
|
-
:'document_portrait' => :'documentPortrait',
|
56
|
-
:'selfie' => :'selfie'
|
32
|
+
:'nik_id_number' => :'nikIdNumber'
|
57
33
|
}
|
58
34
|
end
|
59
35
|
|
@@ -65,18 +41,9 @@ module TrinsicApi
|
|
65
41
|
# Attribute type mapping.
|
66
42
|
def self.openapi_types
|
67
43
|
{
|
68
|
-
:'
|
69
|
-
:'
|
70
|
-
:'
|
71
|
-
:'address' => :'Boolean',
|
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'
|
44
|
+
:'full_name' => :'String',
|
45
|
+
:'date_of_birth' => :'Date',
|
46
|
+
:'nik_id_number' => :'String'
|
80
47
|
}
|
81
48
|
end
|
82
49
|
|
@@ -90,71 +57,70 @@ module TrinsicApi
|
|
90
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
91
58
|
def initialize(attributes = {})
|
92
59
|
if (!attributes.is_a?(Hash))
|
93
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::IndonesiaNikInput` initialize method"
|
94
61
|
end
|
95
62
|
|
96
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
97
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
98
65
|
if (!self.class.attribute_map.key?(k.to_sym))
|
99
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::IndonesiaNikInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
100
67
|
end
|
101
68
|
h[k.to_sym] = v
|
102
69
|
}
|
103
70
|
|
104
|
-
if attributes.key?(:'
|
105
|
-
self.
|
106
|
-
|
107
|
-
|
108
|
-
if attributes.key?(:'given_name')
|
109
|
-
self.given_name = attributes[:'given_name']
|
110
|
-
end
|
111
|
-
|
112
|
-
if attributes.key?(:'family_name')
|
113
|
-
self.family_name = attributes[:'family_name']
|
114
|
-
end
|
115
|
-
|
116
|
-
if attributes.key?(:'address')
|
117
|
-
self.address = attributes[:'address']
|
71
|
+
if attributes.key?(:'full_name')
|
72
|
+
self.full_name = attributes[:'full_name']
|
73
|
+
else
|
74
|
+
self.full_name = nil
|
118
75
|
end
|
119
76
|
|
120
77
|
if attributes.key?(:'date_of_birth')
|
121
78
|
self.date_of_birth = attributes[:'date_of_birth']
|
79
|
+
else
|
80
|
+
self.date_of_birth = nil
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'nik_id_number')
|
84
|
+
self.nik_id_number = attributes[:'nik_id_number']
|
85
|
+
else
|
86
|
+
self.nik_id_number = nil
|
122
87
|
end
|
88
|
+
end
|
123
89
|
|
124
|
-
|
125
|
-
|
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 @full_name.nil?
|
96
|
+
invalid_properties.push('invalid value for "full_name", full_name cannot be nil.')
|
126
97
|
end
|
127
98
|
|
128
|
-
if
|
129
|
-
|
99
|
+
if @full_name.to_s.length < 1
|
100
|
+
invalid_properties.push('invalid value for "full_name", the character length must be great than or equal to 1.')
|
130
101
|
end
|
131
102
|
|
132
|
-
if
|
133
|
-
|
103
|
+
if @date_of_birth.nil?
|
104
|
+
invalid_properties.push('invalid value for "date_of_birth", date_of_birth cannot be nil.')
|
134
105
|
end
|
135
106
|
|
136
|
-
if
|
137
|
-
|
107
|
+
if @nik_id_number.nil?
|
108
|
+
invalid_properties.push('invalid value for "nik_id_number", nik_id_number cannot be nil.')
|
138
109
|
end
|
139
110
|
|
140
|
-
if
|
141
|
-
|
111
|
+
if @nik_id_number.to_s.length > 16
|
112
|
+
invalid_properties.push('invalid value for "nik_id_number", the character length must be smaller than or equal to 16.')
|
142
113
|
end
|
143
114
|
|
144
|
-
if
|
145
|
-
|
115
|
+
if @nik_id_number.to_s.length < 16
|
116
|
+
invalid_properties.push('invalid value for "nik_id_number", the character length must be great than or equal to 16.')
|
146
117
|
end
|
147
118
|
|
148
|
-
|
149
|
-
|
119
|
+
pattern = Regexp.new(/^\d*$/)
|
120
|
+
if @nik_id_number !~ pattern
|
121
|
+
invalid_properties.push("invalid value for \"nik_id_number\", must conform to the pattern #{pattern}.")
|
150
122
|
end
|
151
|
-
end
|
152
123
|
|
153
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
154
|
-
# @return Array for valid properties with the reasons
|
155
|
-
def list_invalid_properties
|
156
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
157
|
-
invalid_properties = Array.new
|
158
124
|
invalid_properties
|
159
125
|
end
|
160
126
|
|
@@ -162,26 +128,61 @@ module TrinsicApi
|
|
162
128
|
# @return true if the model is valid
|
163
129
|
def valid?
|
164
130
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
131
|
+
return false if @full_name.nil?
|
132
|
+
return false if @full_name.to_s.length < 1
|
133
|
+
return false if @date_of_birth.nil?
|
134
|
+
return false if @nik_id_number.nil?
|
135
|
+
return false if @nik_id_number.to_s.length > 16
|
136
|
+
return false if @nik_id_number.to_s.length < 16
|
137
|
+
return false if @nik_id_number !~ Regexp.new(/^\d*$/)
|
165
138
|
true
|
166
139
|
end
|
167
140
|
|
141
|
+
# Custom attribute writer method with validation
|
142
|
+
# @param [Object] full_name Value to be assigned
|
143
|
+
def full_name=(full_name)
|
144
|
+
if full_name.nil?
|
145
|
+
fail ArgumentError, 'full_name cannot be nil'
|
146
|
+
end
|
147
|
+
|
148
|
+
if full_name.to_s.length < 1
|
149
|
+
fail ArgumentError, 'invalid value for "full_name", the character length must be great than or equal to 1.'
|
150
|
+
end
|
151
|
+
|
152
|
+
@full_name = full_name
|
153
|
+
end
|
154
|
+
|
155
|
+
# Custom attribute writer method with validation
|
156
|
+
# @param [Object] nik_id_number Value to be assigned
|
157
|
+
def nik_id_number=(nik_id_number)
|
158
|
+
if nik_id_number.nil?
|
159
|
+
fail ArgumentError, 'nik_id_number cannot be nil'
|
160
|
+
end
|
161
|
+
|
162
|
+
if nik_id_number.to_s.length > 16
|
163
|
+
fail ArgumentError, 'invalid value for "nik_id_number", the character length must be smaller than or equal to 16.'
|
164
|
+
end
|
165
|
+
|
166
|
+
if nik_id_number.to_s.length < 16
|
167
|
+
fail ArgumentError, 'invalid value for "nik_id_number", the character length must be great than or equal to 16.'
|
168
|
+
end
|
169
|
+
|
170
|
+
pattern = Regexp.new(/^\d*$/)
|
171
|
+
if nik_id_number !~ pattern
|
172
|
+
fail ArgumentError, "invalid value for \"nik_id_number\", must conform to the pattern #{pattern}."
|
173
|
+
end
|
174
|
+
|
175
|
+
@nik_id_number = nik_id_number
|
176
|
+
end
|
177
|
+
|
168
178
|
# Checks equality by comparing each attribute.
|
169
179
|
# @param [Object] Object to be compared
|
170
180
|
def ==(o)
|
171
181
|
return true if self.equal?(o)
|
172
182
|
self.class == o.class &&
|
173
|
-
|
174
|
-
given_name == o.given_name &&
|
175
|
-
family_name == o.family_name &&
|
176
|
-
address == o.address &&
|
183
|
+
full_name == o.full_name &&
|
177
184
|
date_of_birth == o.date_of_birth &&
|
178
|
-
|
179
|
-
issue_date == o.issue_date &&
|
180
|
-
expiration_date == o.expiration_date &&
|
181
|
-
document_front == o.document_front &&
|
182
|
-
document_back == o.document_back &&
|
183
|
-
document_portrait == o.document_portrait &&
|
184
|
-
selfie == o.selfie
|
185
|
+
nik_id_number == o.nik_id_number
|
185
186
|
end
|
186
187
|
|
187
188
|
# @see the `==` method
|
@@ -193,7 +194,7 @@ module TrinsicApi
|
|
193
194
|
# Calculates hash code according to all attributes.
|
194
195
|
# @return [Integer] Hash code
|
195
196
|
def hash
|
196
|
-
[
|
197
|
+
[full_name, date_of_birth, nik_id_number].hash
|
197
198
|
end
|
198
199
|
|
199
200
|
# Builds the object from hash
|
@@ -0,0 +1,44 @@
|
|
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 IntegrationCapability
|
18
|
+
LAUNCH_BROWSER = "LaunchBrowser".freeze
|
19
|
+
DEEPLINK_TO_MOBILE = "DeeplinkToMobile".freeze
|
20
|
+
SHOW_CONTENT = "ShowContent".freeze
|
21
|
+
REFRESH_STEP_CONTENT = "RefreshStepContent".freeze
|
22
|
+
CAPTURE_REDIRECT = "CaptureRedirect".freeze
|
23
|
+
POLL_RESULT = "PollResult".freeze
|
24
|
+
|
25
|
+
def self.all_vars
|
26
|
+
@all_vars ||= [LAUNCH_BROWSER, DEEPLINK_TO_MOBILE, SHOW_CONTENT, REFRESH_STEP_CONTENT, CAPTURE_REDIRECT, POLL_RESULT].freeze
|
27
|
+
end
|
28
|
+
|
29
|
+
# Builds the enum from string
|
30
|
+
# @param [String] The enum value in the form of the string
|
31
|
+
# @return [String] The enum value
|
32
|
+
def self.build_from_hash(value)
|
33
|
+
new.build_from_hash(value)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Builds the enum from string
|
37
|
+
# @param [String] The enum value in the form of the string
|
38
|
+
# @return [String] The enum value
|
39
|
+
def build_from_hash(value)
|
40
|
+
return value if IntegrationCapability.all_vars.include?(value)
|
41
|
+
raise "Invalid ENUM value #{value} for class #IntegrationCapability"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
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 IntegrationLaunchMethod
|
18
|
+
LAUNCH_BROWSER = "LaunchBrowser".freeze
|
19
|
+
POLL_RESULT = "PollResult".freeze
|
20
|
+
DEEPLINK_TO_MOBILE = "DeeplinkToMobile".freeze
|
21
|
+
SHOW_CONTENT = "ShowContent".freeze
|
22
|
+
|
23
|
+
def self.all_vars
|
24
|
+
@all_vars ||= [LAUNCH_BROWSER, POLL_RESULT, DEEPLINK_TO_MOBILE, SHOW_CONTENT].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 IntegrationLaunchMethod.all_vars.include?(value)
|
39
|
+
raise "Invalid ENUM value #{value} for class #IntegrationLaunchMethod"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,275 @@
|
|
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
|
+
# A step to perform in the process of executing an Advanced Provider Session
|
18
|
+
class IntegrationStep
|
19
|
+
# The launch method to perform
|
20
|
+
attr_accessor :method
|
21
|
+
|
22
|
+
# Step type-specific content related to the step: a URL for `LaunchBrowser`, a deeplink for `DeeplinkToMobile` or a string to show to the user for `ShowContent`.
|
23
|
+
attr_accessor :content
|
24
|
+
|
25
|
+
# If non-null, contains metadata about how to refresh the value of `content`.
|
26
|
+
attr_accessor :refresh
|
27
|
+
|
28
|
+
class EnumAttributeValidator
|
29
|
+
attr_reader :datatype
|
30
|
+
attr_reader :allowable_values
|
31
|
+
|
32
|
+
def initialize(datatype, allowable_values)
|
33
|
+
@allowable_values = allowable_values.map do |value|
|
34
|
+
case datatype.to_s
|
35
|
+
when /Integer/i
|
36
|
+
value.to_i
|
37
|
+
when /Float/i
|
38
|
+
value.to_f
|
39
|
+
else
|
40
|
+
value
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def valid?(value)
|
46
|
+
!value || allowable_values.include?(value)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
51
|
+
def self.attribute_map
|
52
|
+
{
|
53
|
+
:'method' => :'method',
|
54
|
+
:'content' => :'content',
|
55
|
+
:'refresh' => :'refresh'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# Returns all the JSON keys this model knows about
|
60
|
+
def self.acceptable_attributes
|
61
|
+
attribute_map.values
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.openapi_types
|
66
|
+
{
|
67
|
+
:'method' => :'IntegrationLaunchMethod',
|
68
|
+
:'content' => :'String',
|
69
|
+
:'refresh' => :'StepRefreshInfo'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# List of attributes with nullable: true
|
74
|
+
def self.openapi_nullable
|
75
|
+
Set.new([
|
76
|
+
:'refresh'
|
77
|
+
])
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
def initialize(attributes = {})
|
83
|
+
if (!attributes.is_a?(Hash))
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::IntegrationStep` initialize method"
|
85
|
+
end
|
86
|
+
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
89
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::IntegrationStep`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
91
|
+
end
|
92
|
+
h[k.to_sym] = v
|
93
|
+
}
|
94
|
+
|
95
|
+
if attributes.key?(:'method')
|
96
|
+
self.method = attributes[:'method']
|
97
|
+
else
|
98
|
+
self.method = nil
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'content')
|
102
|
+
self.content = attributes[:'content']
|
103
|
+
else
|
104
|
+
self.content = nil
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'refresh')
|
108
|
+
self.refresh = attributes[:'refresh']
|
109
|
+
else
|
110
|
+
self.refresh = nil
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
115
|
+
# @return Array for valid properties with the reasons
|
116
|
+
def list_invalid_properties
|
117
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
118
|
+
invalid_properties = Array.new
|
119
|
+
if @method.nil?
|
120
|
+
invalid_properties.push('invalid value for "method", method cannot be nil.')
|
121
|
+
end
|
122
|
+
|
123
|
+
if @content.nil?
|
124
|
+
invalid_properties.push('invalid value for "content", content cannot be nil.')
|
125
|
+
end
|
126
|
+
|
127
|
+
invalid_properties
|
128
|
+
end
|
129
|
+
|
130
|
+
# Check to see if the all the properties in the model are valid
|
131
|
+
# @return true if the model is valid
|
132
|
+
def valid?
|
133
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
134
|
+
return false if @method.nil?
|
135
|
+
return false if @content.nil?
|
136
|
+
true
|
137
|
+
end
|
138
|
+
|
139
|
+
# Checks equality by comparing each attribute.
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def ==(o)
|
142
|
+
return true if self.equal?(o)
|
143
|
+
self.class == o.class &&
|
144
|
+
method == o.method &&
|
145
|
+
content == o.content &&
|
146
|
+
refresh == o.refresh
|
147
|
+
end
|
148
|
+
|
149
|
+
# @see the `==` method
|
150
|
+
# @param [Object] Object to be compared
|
151
|
+
def eql?(o)
|
152
|
+
self == o
|
153
|
+
end
|
154
|
+
|
155
|
+
# Calculates hash code according to all attributes.
|
156
|
+
# @return [Integer] Hash code
|
157
|
+
def hash
|
158
|
+
[method, content, refresh].hash
|
159
|
+
end
|
160
|
+
|
161
|
+
# Builds the object from hash
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
163
|
+
# @return [Object] Returns the model itself
|
164
|
+
def self.build_from_hash(attributes)
|
165
|
+
return nil unless attributes.is_a?(Hash)
|
166
|
+
attributes = attributes.transform_keys(&:to_sym)
|
167
|
+
transformed_hash = {}
|
168
|
+
openapi_types.each_pair do |key, type|
|
169
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
170
|
+
transformed_hash["#{key}"] = nil
|
171
|
+
elsif type =~ /\AArray<(.*)>/i
|
172
|
+
# check to ensure the input is an array given that the attribute
|
173
|
+
# is documented as an array but the input is not
|
174
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
175
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
176
|
+
end
|
177
|
+
elsif !attributes[attribute_map[key]].nil?
|
178
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
179
|
+
end
|
180
|
+
end
|
181
|
+
new(transformed_hash)
|
182
|
+
end
|
183
|
+
|
184
|
+
# Deserializes the data based on type
|
185
|
+
# @param string type Data type
|
186
|
+
# @param string value Value to be deserialized
|
187
|
+
# @return [Object] Deserialized data
|
188
|
+
def self._deserialize(type, value)
|
189
|
+
case type.to_sym
|
190
|
+
when :Time
|
191
|
+
Time.parse(value)
|
192
|
+
when :Date
|
193
|
+
Date.parse(value)
|
194
|
+
when :String
|
195
|
+
value.to_s
|
196
|
+
when :Integer
|
197
|
+
value.to_i
|
198
|
+
when :Float
|
199
|
+
value.to_f
|
200
|
+
when :Boolean
|
201
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
202
|
+
true
|
203
|
+
else
|
204
|
+
false
|
205
|
+
end
|
206
|
+
when :Object
|
207
|
+
# generic object (usually a Hash), return directly
|
208
|
+
value
|
209
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
210
|
+
inner_type = Regexp.last_match[:inner_type]
|
211
|
+
value.map { |v| _deserialize(inner_type, v) }
|
212
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
213
|
+
k_type = Regexp.last_match[:k_type]
|
214
|
+
v_type = Regexp.last_match[:v_type]
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each do |k, v|
|
217
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
218
|
+
end
|
219
|
+
end
|
220
|
+
else # model
|
221
|
+
# models (e.g. Pet) or oneOf
|
222
|
+
klass = TrinsicApi.const_get(type)
|
223
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
# Returns the string representation of the object
|
228
|
+
# @return [String] String presentation of the object
|
229
|
+
def to_s
|
230
|
+
to_hash.to_s
|
231
|
+
end
|
232
|
+
|
233
|
+
# to_body is an alias to to_hash (backward compatibility)
|
234
|
+
# @return [Hash] Returns the object in the form of hash
|
235
|
+
def to_body
|
236
|
+
to_hash
|
237
|
+
end
|
238
|
+
|
239
|
+
# Returns the object in the form of hash
|
240
|
+
# @return [Hash] Returns the object in the form of hash
|
241
|
+
def to_hash
|
242
|
+
hash = {}
|
243
|
+
self.class.attribute_map.each_pair do |attr, param|
|
244
|
+
value = self.send(attr)
|
245
|
+
if value.nil?
|
246
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
247
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
248
|
+
end
|
249
|
+
|
250
|
+
hash[param] = _to_hash(value)
|
251
|
+
end
|
252
|
+
hash
|
253
|
+
end
|
254
|
+
|
255
|
+
# Outputs non-array value in the form of hash
|
256
|
+
# For object, use to_hash. Otherwise, just return the value
|
257
|
+
# @param [Object] value Any valid value
|
258
|
+
# @return [Hash] Returns the value in the form of hash
|
259
|
+
def _to_hash(value)
|
260
|
+
if value.is_a?(Array)
|
261
|
+
value.compact.map { |v| _to_hash(v) }
|
262
|
+
elsif value.is_a?(Hash)
|
263
|
+
{}.tap do |hash|
|
264
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
265
|
+
end
|
266
|
+
elsif value.respond_to? :to_hash
|
267
|
+
value.to_hash
|
268
|
+
else
|
269
|
+
value
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
end
|
274
|
+
|
275
|
+
end
|