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.
Files changed (183) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AadhaarInput.md +20 -0
  3. data/docs/Address.md +3 -3
  4. data/docs/AttachmentAccessKeys.md +7 -5
  5. data/docs/BangladeshNationalIdInput.md +24 -0
  6. data/docs/BrazilCpfCheckInput.md +18 -0
  7. data/docs/BrazilDigitalCnhInput.md +24 -0
  8. data/docs/CreateAdvancedProviderSessionRequest.md +26 -0
  9. data/docs/CreateAdvancedProviderSessionResponse.md +22 -0
  10. data/docs/CreateHostedProviderSessionRequest.md +22 -0
  11. data/docs/CreateHostedProviderSessionResponse.md +20 -0
  12. data/docs/CreateWidgetSessionRequest.md +22 -0
  13. data/docs/{CreateSessionResponse.md → CreateWidgetSessionResponse.md} +5 -5
  14. data/docs/DocumentData.md +3 -3
  15. data/docs/DocumentScanAttachments.md +18 -0
  16. data/docs/{SessionState.md → DocumentType.md} +2 -2
  17. data/docs/HttpValidationProblemDetails.md +28 -0
  18. data/docs/IdentityData.md +4 -4
  19. data/docs/IndonesiaNikInput.md +22 -0
  20. data/docs/{FailureMessage.md → IntegrationCapability.md} +2 -5
  21. data/docs/IntegrationLaunchMethod.md +15 -0
  22. data/docs/IntegrationStep.md +22 -0
  23. data/docs/KenyaNidInput.md +28 -0
  24. data/docs/KnownAddress.md +32 -0
  25. data/docs/KnownIdentityData.md +18 -0
  26. data/docs/KnownPersonData.md +32 -0
  27. data/docs/MexicoCurpInput.md +18 -0
  28. data/docs/NetworkApi.md +37 -35
  29. data/docs/NigeriaNinInput.md +30 -0
  30. data/docs/PersonData.md +14 -12
  31. data/docs/PhilippineMatchInput.md +26 -0
  32. data/docs/PhilippineQRInput.md +20 -0
  33. data/docs/ProblemDetails.md +26 -0
  34. data/docs/ProviderAttachments.md +18 -0
  35. data/docs/ProviderInfo.md +3 -1
  36. data/docs/ProviderInformation.md +22 -0
  37. data/docs/ProviderInput.md +38 -0
  38. data/docs/RecommendRequest.md +26 -0
  39. data/docs/RecommendResponse.md +22 -0
  40. data/docs/RefreshStepContentRequest.md +18 -0
  41. data/docs/RefreshStepContentResponse.md +18 -0
  42. data/docs/ResultCollection.md +20 -0
  43. data/docs/ResultCollectionMethod.md +15 -0
  44. data/docs/Session.md +6 -8
  45. data/docs/{VerificationFailCode.md → SessionErrorCode.md} +2 -2
  46. data/docs/SessionsApi.md +236 -18
  47. data/docs/{SessionFailCode.md → Sex.md} +2 -2
  48. data/docs/SouthAfricaNidInput.md +24 -0
  49. data/docs/StepRefreshInfo.md +22 -0
  50. data/lib/trinsic_api/api/attachments_api.rb +1 -1
  51. data/lib/trinsic_api/api/network_api.rb +38 -37
  52. data/lib/trinsic_api/api/sessions_api.rb +217 -19
  53. data/lib/trinsic_api/api_client.rb +1 -1
  54. data/lib/trinsic_api/api_error.rb +1 -1
  55. data/lib/trinsic_api/configuration.rb +1 -1
  56. data/lib/trinsic_api/models/{validation_result.rb → aadhaar_input.rb} +21 -26
  57. data/lib/trinsic_api/models/address.rb +16 -10
  58. data/lib/trinsic_api/models/attachment_access_keys.rb +25 -10
  59. data/lib/trinsic_api/models/bangladesh_national_id_input.rb +249 -0
  60. data/lib/trinsic_api/models/brazil_cpf_check_input.rb +261 -0
  61. data/lib/trinsic_api/models/brazil_digital_cnh_input.rb +294 -0
  62. data/lib/trinsic_api/models/cancel_session_response.rb +1 -1
  63. data/lib/trinsic_api/models/create_advanced_provider_session_request.rb +312 -0
  64. data/lib/trinsic_api/models/create_advanced_provider_session_response.rb +256 -0
  65. data/lib/trinsic_api/models/create_hosted_provider_session_request.rb +288 -0
  66. data/lib/trinsic_api/models/create_hosted_provider_session_response.rb +233 -0
  67. data/lib/trinsic_api/models/create_widget_session_request.rb +240 -0
  68. data/lib/trinsic_api/models/{create_session_response.rb → create_widget_session_response.rb} +18 -17
  69. data/lib/trinsic_api/models/document_data.rb +32 -4
  70. data/lib/trinsic_api/models/{failure_message.rb → document_scan_attachments.rb} +12 -18
  71. data/lib/trinsic_api/models/{session_state.rb → document_type.rb} +9 -11
  72. data/lib/trinsic_api/models/get_attachment_request.rb +1 -1
  73. data/lib/trinsic_api/models/get_attachment_response.rb +1 -1
  74. data/lib/trinsic_api/models/get_session_response.rb +1 -1
  75. data/lib/trinsic_api/models/get_session_result_request.rb +1 -1
  76. data/lib/trinsic_api/models/get_session_result_response.rb +2 -1
  77. data/lib/trinsic_api/models/http_validation_problem_details.rb +273 -0
  78. data/lib/trinsic_api/models/identity_data.rb +5 -5
  79. data/lib/trinsic_api/models/{create_session_request.rb → indonesia_nik_input.rb} +105 -38
  80. data/lib/trinsic_api/models/integration_capability.rb +44 -0
  81. data/lib/trinsic_api/models/integration_launch_method.rb +42 -0
  82. data/lib/trinsic_api/models/integration_step.rb +275 -0
  83. data/lib/trinsic_api/models/kenya_nid_input.rb +397 -0
  84. data/lib/trinsic_api/models/known_address.rb +287 -0
  85. data/lib/trinsic_api/models/known_identity_data.rb +217 -0
  86. data/lib/trinsic_api/models/{disclosed_fields_request.rb → known_person_data.rb} +57 -77
  87. data/lib/trinsic_api/models/list_providers_response.rb +1 -1
  88. data/lib/trinsic_api/models/list_sessions_response.rb +1 -1
  89. data/lib/trinsic_api/models/mexico_curp_input.rb +250 -0
  90. data/lib/trinsic_api/models/nigeria_nin_input.rb +383 -0
  91. data/lib/trinsic_api/models/order_direction.rb +1 -1
  92. data/lib/trinsic_api/models/person_data.rb +50 -15
  93. data/lib/trinsic_api/models/philippine_match_input.rb +260 -0
  94. data/lib/trinsic_api/models/philippine_qr_input.rb +227 -0
  95. data/lib/trinsic_api/models/problem_details.rb +255 -0
  96. data/lib/trinsic_api/models/provider_attachments.rb +215 -0
  97. data/lib/trinsic_api/models/provider_info.rb +18 -5
  98. data/lib/trinsic_api/models/provider_information.rb +253 -0
  99. data/lib/trinsic_api/models/provider_input.rb +326 -0
  100. data/lib/trinsic_api/models/recommend_request.rb +266 -0
  101. data/lib/trinsic_api/models/recommend_response.rb +262 -0
  102. data/lib/trinsic_api/models/refresh_step_content_request.rb +216 -0
  103. data/lib/trinsic_api/models/{identity_lookup_response.rb → refresh_step_content_response.rb} +16 -16
  104. data/lib/trinsic_api/models/{verification.rb → result_collection.rb} +27 -20
  105. data/lib/trinsic_api/models/result_collection_method.rb +40 -0
  106. data/lib/trinsic_api/models/session.rb +32 -48
  107. data/lib/trinsic_api/models/session_error_code.rb +48 -0
  108. data/lib/trinsic_api/models/session_ordering.rb +1 -1
  109. data/lib/trinsic_api/models/sex.rb +42 -0
  110. data/lib/trinsic_api/models/{disclosed_fields.rb → south_africa_nid_input.rb} +107 -154
  111. data/lib/trinsic_api/models/step_refresh_info.rb +256 -0
  112. data/lib/trinsic_api/version.rb +2 -2
  113. data/lib/trinsic_api.rb +40 -12
  114. data/spec/api/attachments_api_spec.rb +1 -1
  115. data/spec/api/network_api_spec.rb +12 -12
  116. data/spec/api/sessions_api_spec.rb +44 -7
  117. data/spec/models/{verification_spec.rb → aadhaar_input_spec.rb} +9 -9
  118. data/spec/models/address_spec.rb +2 -2
  119. data/spec/models/attachment_access_keys_spec.rb +7 -1
  120. data/spec/models/bangladesh_national_id_input_spec.rb +54 -0
  121. data/spec/models/{identity_lookup_response_spec.rb → brazil_cpf_check_input_spec.rb} +8 -8
  122. data/spec/models/brazil_digital_cnh_input_spec.rb +54 -0
  123. data/spec/models/cancel_session_response_spec.rb +1 -1
  124. data/spec/models/create_advanced_provider_session_request_spec.rb +60 -0
  125. data/spec/models/create_advanced_provider_session_response_spec.rb +48 -0
  126. data/spec/models/create_hosted_provider_session_request_spec.rb +48 -0
  127. data/spec/models/create_hosted_provider_session_response_spec.rb +42 -0
  128. data/spec/models/create_widget_session_request_spec.rb +48 -0
  129. data/spec/models/{create_session_response_spec.rb → create_widget_session_response_spec.rb} +8 -8
  130. data/spec/models/document_data_spec.rb +1 -1
  131. data/spec/models/document_scan_attachments_spec.rb +36 -0
  132. data/spec/models/{session_state_spec.rb → document_type_spec.rb} +7 -7
  133. data/spec/models/get_attachment_request_spec.rb +1 -1
  134. data/spec/models/get_attachment_response_spec.rb +1 -1
  135. data/spec/models/get_session_response_spec.rb +1 -1
  136. data/spec/models/get_session_result_request_spec.rb +1 -1
  137. data/spec/models/get_session_result_response_spec.rb +1 -1
  138. data/spec/models/http_validation_problem_details_spec.rb +66 -0
  139. data/spec/models/identity_data_spec.rb +1 -1
  140. data/spec/models/indonesia_nik_input_spec.rb +48 -0
  141. data/spec/models/integration_capability_spec.rb +30 -0
  142. data/spec/models/integration_launch_method_spec.rb +30 -0
  143. data/spec/models/integration_step_spec.rb +48 -0
  144. data/spec/models/kenya_nid_input_spec.rb +66 -0
  145. data/spec/models/known_address_spec.rb +78 -0
  146. data/spec/models/known_identity_data_spec.rb +36 -0
  147. data/spec/models/{disclosed_fields_request_spec.rb → known_person_data_spec.rb} +13 -37
  148. data/spec/models/list_providers_response_spec.rb +1 -1
  149. data/spec/models/list_sessions_response_spec.rb +1 -1
  150. data/spec/models/{failure_message_spec.rb → mexico_curp_input_spec.rb} +8 -8
  151. data/spec/models/nigeria_nin_input_spec.rb +72 -0
  152. data/spec/models/order_direction_spec.rb +1 -1
  153. data/spec/models/person_data_spec.rb +8 -2
  154. data/spec/models/philippine_match_input_spec.rb +60 -0
  155. data/spec/models/philippine_qr_input_spec.rb +42 -0
  156. data/spec/models/problem_details_spec.rb +60 -0
  157. data/spec/models/provider_attachments_spec.rb +36 -0
  158. data/spec/models/provider_info_spec.rb +7 -1
  159. data/spec/models/provider_information_spec.rb +48 -0
  160. data/spec/models/{disclosed_fields_spec.rb → provider_input_spec.rb} +18 -24
  161. data/spec/models/recommend_request_spec.rb +60 -0
  162. data/spec/models/recommend_response_spec.rb +48 -0
  163. data/spec/models/refresh_step_content_request_spec.rb +36 -0
  164. data/spec/models/refresh_step_content_response_spec.rb +36 -0
  165. data/spec/models/result_collection_method_spec.rb +30 -0
  166. data/spec/models/{validation_result_spec.rb → result_collection_spec.rb} +9 -9
  167. data/spec/models/{verification_fail_code_spec.rb → session_error_code_spec.rb} +7 -7
  168. data/spec/models/session_ordering_spec.rb +1 -1
  169. data/spec/models/session_spec.rb +4 -10
  170. data/spec/models/{session_fail_code_spec.rb → sex_spec.rb} +7 -7
  171. data/spec/models/{create_session_request_spec.rb → south_africa_nid_input_spec.rb} +11 -11
  172. data/spec/models/step_refresh_info_spec.rb +48 -0
  173. data/spec/spec_helper.rb +1 -1
  174. data/trinsic_api.gemspec +1 -1
  175. metadata +173 -61
  176. data/docs/CreateSessionRequest.md +0 -24
  177. data/docs/DisclosedFields.md +0 -40
  178. data/docs/DisclosedFieldsRequest.md +0 -40
  179. data/docs/IdentityLookupResponse.md +0 -18
  180. data/docs/ValidationResult.md +0 -20
  181. data/docs/Verification.md +0 -20
  182. data/lib/trinsic_api/models/session_fail_code.rb +0 -45
  183. data/lib/trinsic_api/models/verification_fail_code.rb +0 -43
@@ -0,0 +1,253 @@
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 ProviderInformation
18
+ attr_accessor :provider_id
19
+
20
+ attr_accessor :provider_display_name
21
+
22
+ attr_accessor :provider_logo
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'provider_id' => :'providerId',
28
+ :'provider_display_name' => :'providerDisplayName',
29
+ :'provider_logo' => :'providerLogo'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'provider_id' => :'String',
42
+ :'provider_display_name' => :'String',
43
+ :'provider_logo' => :'String'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::ProviderInformation` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::ProviderInformation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'provider_id')
69
+ self.provider_id = attributes[:'provider_id']
70
+ else
71
+ self.provider_id = nil
72
+ end
73
+
74
+ if attributes.key?(:'provider_display_name')
75
+ self.provider_display_name = attributes[:'provider_display_name']
76
+ else
77
+ self.provider_display_name = nil
78
+ end
79
+
80
+ if attributes.key?(:'provider_logo')
81
+ self.provider_logo = attributes[:'provider_logo']
82
+ else
83
+ self.provider_logo = nil
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ if @provider_id.nil?
93
+ invalid_properties.push('invalid value for "provider_id", provider_id cannot be nil.')
94
+ end
95
+
96
+ if @provider_display_name.nil?
97
+ invalid_properties.push('invalid value for "provider_display_name", provider_display_name cannot be nil.')
98
+ end
99
+
100
+ if @provider_logo.nil?
101
+ invalid_properties.push('invalid value for "provider_logo", provider_logo cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ return false if @provider_id.nil?
112
+ return false if @provider_display_name.nil?
113
+ return false if @provider_logo.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ provider_id == o.provider_id &&
123
+ provider_display_name == o.provider_display_name &&
124
+ provider_logo == o.provider_logo
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [provider_id, provider_display_name, provider_logo].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ attributes = attributes.transform_keys(&:to_sym)
145
+ transformed_hash = {}
146
+ openapi_types.each_pair do |key, type|
147
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
148
+ transformed_hash["#{key}"] = nil
149
+ elsif type =~ /\AArray<(.*)>/i
150
+ # check to ensure the input is an array given that the attribute
151
+ # is documented as an array but the input is not
152
+ if attributes[attribute_map[key]].is_a?(Array)
153
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
154
+ end
155
+ elsif !attributes[attribute_map[key]].nil?
156
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
157
+ end
158
+ end
159
+ new(transformed_hash)
160
+ end
161
+
162
+ # Deserializes the data based on type
163
+ # @param string type Data type
164
+ # @param string value Value to be deserialized
165
+ # @return [Object] Deserialized data
166
+ def self._deserialize(type, value)
167
+ case type.to_sym
168
+ when :Time
169
+ Time.parse(value)
170
+ when :Date
171
+ Date.parse(value)
172
+ when :String
173
+ value.to_s
174
+ when :Integer
175
+ value.to_i
176
+ when :Float
177
+ value.to_f
178
+ when :Boolean
179
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
180
+ true
181
+ else
182
+ false
183
+ end
184
+ when :Object
185
+ # generic object (usually a Hash), return directly
186
+ value
187
+ when /\AArray<(?<inner_type>.+)>\z/
188
+ inner_type = Regexp.last_match[:inner_type]
189
+ value.map { |v| _deserialize(inner_type, v) }
190
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
191
+ k_type = Regexp.last_match[:k_type]
192
+ v_type = Regexp.last_match[:v_type]
193
+ {}.tap do |hash|
194
+ value.each do |k, v|
195
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
196
+ end
197
+ end
198
+ else # model
199
+ # models (e.g. Pet) or oneOf
200
+ klass = TrinsicApi.const_get(type)
201
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
202
+ end
203
+ end
204
+
205
+ # Returns the string representation of the object
206
+ # @return [String] String presentation of the object
207
+ def to_s
208
+ to_hash.to_s
209
+ end
210
+
211
+ # to_body is an alias to to_hash (backward compatibility)
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_body
214
+ to_hash
215
+ end
216
+
217
+ # Returns the object in the form of hash
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_hash
220
+ hash = {}
221
+ self.class.attribute_map.each_pair do |attr, param|
222
+ value = self.send(attr)
223
+ if value.nil?
224
+ is_nullable = self.class.openapi_nullable.include?(attr)
225
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
226
+ end
227
+
228
+ hash[param] = _to_hash(value)
229
+ end
230
+ hash
231
+ end
232
+
233
+ # Outputs non-array value in the form of hash
234
+ # For object, use to_hash. Otherwise, just return the value
235
+ # @param [Object] value Any valid value
236
+ # @return [Hash] Returns the value in the form of hash
237
+ def _to_hash(value)
238
+ if value.is_a?(Array)
239
+ value.compact.map { |v| _to_hash(v) }
240
+ elsif value.is_a?(Hash)
241
+ {}.tap do |hash|
242
+ value.each { |k, v| hash[k] = _to_hash(v) }
243
+ end
244
+ elsif value.respond_to? :to_hash
245
+ value.to_hash
246
+ else
247
+ value
248
+ end
249
+ end
250
+
251
+ end
252
+
253
+ end
@@ -0,0 +1,326 @@
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 ProviderInput
18
+ # Input for the `f-indonesia-nik` integration
19
+ attr_accessor :indonesia_nik
20
+
21
+ # Input for the `f-mexico-curp` integration
22
+ attr_accessor :mexico_curp
23
+
24
+ # Input for the `f-south-africa-nid` integration
25
+ attr_accessor :south_africa_nid
26
+
27
+ # Input for the `f-kenya-nid` integration
28
+ attr_accessor :kenya_nid
29
+
30
+ # Input for the `f-nigeria-nin` integration
31
+ attr_accessor :nigeria_nin
32
+
33
+ # Input for the `f-india-aadhaar-match` integration
34
+ attr_accessor :aadhaar
35
+
36
+ # Input for the `bangladesh-nid` integration
37
+ attr_accessor :bangladesh_national_id
38
+
39
+ # Input for the `g-brazil-cpf` integration
40
+ attr_accessor :brazil_cpf_check
41
+
42
+ # Input for the `g-brazil-digital-cnh` integration
43
+ attr_accessor :brazil_digital_cnh
44
+
45
+ # Input for the `b-philsys-biometric` integration
46
+ attr_accessor :philippine_match
47
+
48
+ # Input for the `b-philippine-qr-digital-national-id` and `b-philippine-qr-ephill-id` integrations
49
+ attr_accessor :philippine_qr
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'indonesia_nik' => :'indonesiaNik',
55
+ :'mexico_curp' => :'mexicoCurp',
56
+ :'south_africa_nid' => :'southAfricaNid',
57
+ :'kenya_nid' => :'kenyaNid',
58
+ :'nigeria_nin' => :'nigeriaNin',
59
+ :'aadhaar' => :'aadhaar',
60
+ :'bangladesh_national_id' => :'bangladeshNationalId',
61
+ :'brazil_cpf_check' => :'brazilCpfCheck',
62
+ :'brazil_digital_cnh' => :'brazilDigitalCnh',
63
+ :'philippine_match' => :'philippineMatch',
64
+ :'philippine_qr' => :'philippineQR'
65
+ }
66
+ end
67
+
68
+ # Returns all the JSON keys this model knows about
69
+ def self.acceptable_attributes
70
+ attribute_map.values
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'indonesia_nik' => :'IndonesiaNikInput',
77
+ :'mexico_curp' => :'MexicoCurpInput',
78
+ :'south_africa_nid' => :'SouthAfricaNidInput',
79
+ :'kenya_nid' => :'KenyaNidInput',
80
+ :'nigeria_nin' => :'NigeriaNinInput',
81
+ :'aadhaar' => :'AadhaarInput',
82
+ :'bangladesh_national_id' => :'BangladeshNationalIdInput',
83
+ :'brazil_cpf_check' => :'BrazilCpfCheckInput',
84
+ :'brazil_digital_cnh' => :'BrazilDigitalCnhInput',
85
+ :'philippine_match' => :'PhilippineMatchInput',
86
+ :'philippine_qr' => :'PhilippineQRInput'
87
+ }
88
+ end
89
+
90
+ # List of attributes with nullable: true
91
+ def self.openapi_nullable
92
+ Set.new([
93
+ :'indonesia_nik',
94
+ :'mexico_curp',
95
+ :'south_africa_nid',
96
+ :'kenya_nid',
97
+ :'nigeria_nin',
98
+ :'aadhaar',
99
+ :'bangladesh_national_id',
100
+ :'brazil_cpf_check',
101
+ :'brazil_digital_cnh',
102
+ :'philippine_match',
103
+ :'philippine_qr'
104
+ ])
105
+ end
106
+
107
+ # Initializes the object
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ def initialize(attributes = {})
110
+ if (!attributes.is_a?(Hash))
111
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::ProviderInput` initialize method"
112
+ end
113
+
114
+ # check to see if the attribute exists and convert string to symbol for hash key
115
+ attributes = attributes.each_with_object({}) { |(k, v), h|
116
+ if (!self.class.attribute_map.key?(k.to_sym))
117
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::ProviderInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
118
+ end
119
+ h[k.to_sym] = v
120
+ }
121
+
122
+ if attributes.key?(:'indonesia_nik')
123
+ self.indonesia_nik = attributes[:'indonesia_nik']
124
+ end
125
+
126
+ if attributes.key?(:'mexico_curp')
127
+ self.mexico_curp = attributes[:'mexico_curp']
128
+ end
129
+
130
+ if attributes.key?(:'south_africa_nid')
131
+ self.south_africa_nid = attributes[:'south_africa_nid']
132
+ end
133
+
134
+ if attributes.key?(:'kenya_nid')
135
+ self.kenya_nid = attributes[:'kenya_nid']
136
+ end
137
+
138
+ if attributes.key?(:'nigeria_nin')
139
+ self.nigeria_nin = attributes[:'nigeria_nin']
140
+ end
141
+
142
+ if attributes.key?(:'aadhaar')
143
+ self.aadhaar = attributes[:'aadhaar']
144
+ end
145
+
146
+ if attributes.key?(:'bangladesh_national_id')
147
+ self.bangladesh_national_id = attributes[:'bangladesh_national_id']
148
+ end
149
+
150
+ if attributes.key?(:'brazil_cpf_check')
151
+ self.brazil_cpf_check = attributes[:'brazil_cpf_check']
152
+ end
153
+
154
+ if attributes.key?(:'brazil_digital_cnh')
155
+ self.brazil_digital_cnh = attributes[:'brazil_digital_cnh']
156
+ end
157
+
158
+ if attributes.key?(:'philippine_match')
159
+ self.philippine_match = attributes[:'philippine_match']
160
+ end
161
+
162
+ if attributes.key?(:'philippine_qr')
163
+ self.philippine_qr = attributes[:'philippine_qr']
164
+ end
165
+ end
166
+
167
+ # Show invalid properties with the reasons. Usually used together with valid?
168
+ # @return Array for valid properties with the reasons
169
+ def list_invalid_properties
170
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
171
+ invalid_properties = Array.new
172
+ invalid_properties
173
+ end
174
+
175
+ # Check to see if the all the properties in the model are valid
176
+ # @return true if the model is valid
177
+ def valid?
178
+ warn '[DEPRECATED] the `valid?` method is obsolete'
179
+ true
180
+ end
181
+
182
+ # Checks equality by comparing each attribute.
183
+ # @param [Object] Object to be compared
184
+ def ==(o)
185
+ return true if self.equal?(o)
186
+ self.class == o.class &&
187
+ indonesia_nik == o.indonesia_nik &&
188
+ mexico_curp == o.mexico_curp &&
189
+ south_africa_nid == o.south_africa_nid &&
190
+ kenya_nid == o.kenya_nid &&
191
+ nigeria_nin == o.nigeria_nin &&
192
+ aadhaar == o.aadhaar &&
193
+ bangladesh_national_id == o.bangladesh_national_id &&
194
+ brazil_cpf_check == o.brazil_cpf_check &&
195
+ brazil_digital_cnh == o.brazil_digital_cnh &&
196
+ philippine_match == o.philippine_match &&
197
+ philippine_qr == o.philippine_qr
198
+ end
199
+
200
+ # @see the `==` method
201
+ # @param [Object] Object to be compared
202
+ def eql?(o)
203
+ self == o
204
+ end
205
+
206
+ # Calculates hash code according to all attributes.
207
+ # @return [Integer] Hash code
208
+ def hash
209
+ [indonesia_nik, mexico_curp, south_africa_nid, kenya_nid, nigeria_nin, aadhaar, bangladesh_national_id, brazil_cpf_check, brazil_digital_cnh, philippine_match, philippine_qr].hash
210
+ end
211
+
212
+ # Builds the object from hash
213
+ # @param [Hash] attributes Model attributes in the form of hash
214
+ # @return [Object] Returns the model itself
215
+ def self.build_from_hash(attributes)
216
+ return nil unless attributes.is_a?(Hash)
217
+ attributes = attributes.transform_keys(&:to_sym)
218
+ transformed_hash = {}
219
+ openapi_types.each_pair do |key, type|
220
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
221
+ transformed_hash["#{key}"] = nil
222
+ elsif type =~ /\AArray<(.*)>/i
223
+ # check to ensure the input is an array given that the attribute
224
+ # is documented as an array but the input is not
225
+ if attributes[attribute_map[key]].is_a?(Array)
226
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
227
+ end
228
+ elsif !attributes[attribute_map[key]].nil?
229
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
230
+ end
231
+ end
232
+ new(transformed_hash)
233
+ end
234
+
235
+ # Deserializes the data based on type
236
+ # @param string type Data type
237
+ # @param string value Value to be deserialized
238
+ # @return [Object] Deserialized data
239
+ def self._deserialize(type, value)
240
+ case type.to_sym
241
+ when :Time
242
+ Time.parse(value)
243
+ when :Date
244
+ Date.parse(value)
245
+ when :String
246
+ value.to_s
247
+ when :Integer
248
+ value.to_i
249
+ when :Float
250
+ value.to_f
251
+ when :Boolean
252
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
253
+ true
254
+ else
255
+ false
256
+ end
257
+ when :Object
258
+ # generic object (usually a Hash), return directly
259
+ value
260
+ when /\AArray<(?<inner_type>.+)>\z/
261
+ inner_type = Regexp.last_match[:inner_type]
262
+ value.map { |v| _deserialize(inner_type, v) }
263
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
264
+ k_type = Regexp.last_match[:k_type]
265
+ v_type = Regexp.last_match[:v_type]
266
+ {}.tap do |hash|
267
+ value.each do |k, v|
268
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
269
+ end
270
+ end
271
+ else # model
272
+ # models (e.g. Pet) or oneOf
273
+ klass = TrinsicApi.const_get(type)
274
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
275
+ end
276
+ end
277
+
278
+ # Returns the string representation of the object
279
+ # @return [String] String presentation of the object
280
+ def to_s
281
+ to_hash.to_s
282
+ end
283
+
284
+ # to_body is an alias to to_hash (backward compatibility)
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_body
287
+ to_hash
288
+ end
289
+
290
+ # Returns the object in the form of hash
291
+ # @return [Hash] Returns the object in the form of hash
292
+ def to_hash
293
+ hash = {}
294
+ self.class.attribute_map.each_pair do |attr, param|
295
+ value = self.send(attr)
296
+ if value.nil?
297
+ is_nullable = self.class.openapi_nullable.include?(attr)
298
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
299
+ end
300
+
301
+ hash[param] = _to_hash(value)
302
+ end
303
+ hash
304
+ end
305
+
306
+ # Outputs non-array value in the form of hash
307
+ # For object, use to_hash. Otherwise, just return the value
308
+ # @param [Object] value Any valid value
309
+ # @return [Hash] Returns the value in the form of hash
310
+ def _to_hash(value)
311
+ if value.is_a?(Array)
312
+ value.compact.map { |v| _to_hash(v) }
313
+ elsif value.is_a?(Hash)
314
+ {}.tap do |hash|
315
+ value.each { |k, v| hash[k] = _to_hash(v) }
316
+ end
317
+ elsif value.respond_to? :to_hash
318
+ value.to_hash
319
+ else
320
+ value
321
+ end
322
+ end
323
+
324
+ end
325
+
326
+ end