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.
Files changed (212) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/docs/AadhaarInput.md +20 -0
  4. data/docs/Address.md +3 -3
  5. data/docs/AttachmentAccessKeys.md +7 -5
  6. data/docs/AttachmentsApi.md +1 -1
  7. data/docs/BangladeshNationalIdInput.md +24 -0
  8. data/docs/BrazilCpfCheckInput.md +18 -0
  9. data/docs/BrazilDigitalCnhInput.md +24 -0
  10. data/docs/CreateAdvancedProviderSessionRequest.md +26 -0
  11. data/docs/CreateAdvancedProviderSessionResponse.md +22 -0
  12. data/docs/CreateHostedProviderSessionRequest.md +22 -0
  13. data/docs/CreateHostedProviderSessionResponse.md +22 -0
  14. data/docs/CreateWidgetSessionRequest.md +22 -0
  15. data/docs/CreateWidgetSessionResponse.md +22 -0
  16. data/docs/DocumentData.md +3 -3
  17. data/docs/DocumentScanAttachments.md +18 -0
  18. data/docs/{SessionState.md → DocumentType.md} +2 -2
  19. data/docs/HttpValidationProblemDetails.md +28 -0
  20. data/docs/IdentityData.md +6 -4
  21. data/docs/IdinInput.md +18 -0
  22. data/docs/IndonesiaNikInput.md +22 -0
  23. data/docs/{FailureMessage.md → IntegrationCapability.md} +2 -5
  24. data/docs/IntegrationLaunchMethod.md +15 -0
  25. data/docs/IntegrationStep.md +22 -0
  26. data/docs/KenyaNidInput.md +28 -0
  27. data/docs/{SessionFailCode.md → Language.md} +2 -2
  28. data/docs/ListProviderContractsResponse.md +18 -0
  29. data/docs/MexicoCurpInput.md +18 -0
  30. data/docs/MobileIdInput.md +22 -0
  31. data/docs/NetworkApi.md +22 -25
  32. data/docs/NigeriaNinInput.md +30 -0
  33. data/docs/PersonData.md +14 -12
  34. data/docs/PhilippineMatchInput.md +26 -0
  35. data/docs/PhilippineQRInput.md +20 -0
  36. data/docs/ProblemDetails.md +26 -0
  37. data/docs/ProviderAttachments.md +18 -0
  38. data/docs/ProviderContract.md +46 -0
  39. data/docs/ProviderInformation.md +3 -3
  40. data/docs/ProviderInput.md +50 -0
  41. data/docs/RecommendRequest.md +2 -6
  42. data/docs/RecommendationInfo.md +24 -0
  43. data/docs/RefreshStepContentRequest.md +18 -0
  44. data/docs/RefreshStepContentResponse.md +18 -0
  45. data/docs/ResultCollection.md +20 -0
  46. data/docs/ResultCollectionMethod.md +15 -0
  47. data/docs/Session.md +6 -8
  48. data/docs/{VerificationFailCode.md → SessionErrorCode.md} +2 -2
  49. data/docs/SessionsApi.md +237 -19
  50. data/docs/Sex.md +15 -0
  51. data/docs/SmartIdInput.md +18 -0
  52. data/docs/SouthAfricaNidInput.md +24 -0
  53. data/docs/SpidInput.md +18 -0
  54. data/docs/StepRefreshInfo.md +22 -0
  55. data/docs/SubProviderMetadata.md +24 -0
  56. data/docs/TrinsicTestDatabaseLookupInput.md +24 -0
  57. data/docs/TrinsicTestSubProvidersInput.md +18 -0
  58. data/lib/trinsic_api/api/attachments_api.rb +3 -3
  59. data/lib/trinsic_api/api/network_api.rb +19 -25
  60. data/lib/trinsic_api/api/sessions_api.rb +219 -21
  61. data/lib/trinsic_api/api_client.rb +1 -1
  62. data/lib/trinsic_api/api_error.rb +1 -1
  63. data/lib/trinsic_api/configuration.rb +1 -1
  64. data/lib/trinsic_api/models/aadhaar_input.rb +227 -0
  65. data/lib/trinsic_api/models/address.rb +16 -10
  66. data/lib/trinsic_api/models/attachment_access_keys.rb +25 -10
  67. data/lib/trinsic_api/models/bangladesh_national_id_input.rb +249 -0
  68. data/lib/trinsic_api/models/brazil_cpf_check_input.rb +261 -0
  69. data/lib/trinsic_api/models/brazil_digital_cnh_input.rb +294 -0
  70. data/lib/trinsic_api/models/cancel_session_response.rb +1 -1
  71. data/lib/trinsic_api/models/create_advanced_provider_session_request.rb +312 -0
  72. data/lib/trinsic_api/models/create_advanced_provider_session_response.rb +256 -0
  73. data/lib/trinsic_api/models/create_hosted_provider_session_request.rb +288 -0
  74. data/lib/trinsic_api/models/create_hosted_provider_session_response.rb +256 -0
  75. data/lib/trinsic_api/models/create_widget_session_request.rb +240 -0
  76. data/lib/trinsic_api/models/create_widget_session_response.rb +256 -0
  77. data/lib/trinsic_api/models/document_data.rb +32 -4
  78. data/lib/trinsic_api/models/{failure_message.rb → document_scan_attachments.rb} +12 -18
  79. data/lib/trinsic_api/models/{session_state.rb → document_type.rb} +9 -11
  80. data/lib/trinsic_api/models/get_attachment_request.rb +1 -1
  81. data/lib/trinsic_api/models/get_attachment_response.rb +1 -1
  82. data/lib/trinsic_api/models/get_session_response.rb +1 -1
  83. data/lib/trinsic_api/models/get_session_result_request.rb +1 -1
  84. data/lib/trinsic_api/models/get_session_result_response.rb +2 -1
  85. data/lib/trinsic_api/models/{known_address.rb → http_validation_problem_details.rb} +55 -51
  86. data/lib/trinsic_api/models/identity_data.rb +16 -6
  87. data/lib/trinsic_api/models/{known_identity_data.rb → idin_input.rb} +13 -13
  88. data/lib/trinsic_api/models/{disclosed_fields_request.rb → indonesia_nik_input.rb} +94 -93
  89. data/lib/trinsic_api/models/integration_capability.rb +44 -0
  90. data/lib/trinsic_api/models/integration_launch_method.rb +42 -0
  91. data/lib/trinsic_api/models/integration_step.rb +275 -0
  92. data/lib/trinsic_api/models/kenya_nid_input.rb +397 -0
  93. data/lib/trinsic_api/models/language.rb +42 -0
  94. data/lib/trinsic_api/models/{validation_result.rb → list_provider_contracts_response.rb} +17 -25
  95. data/lib/trinsic_api/models/list_providers_response.rb +1 -1
  96. data/lib/trinsic_api/models/list_sessions_response.rb +1 -1
  97. data/lib/trinsic_api/models/{create_session_response.rb → mexico_curp_input.rb} +44 -26
  98. data/lib/trinsic_api/models/mobile_id_input.rb +260 -0
  99. data/lib/trinsic_api/models/nigeria_nin_input.rb +383 -0
  100. data/lib/trinsic_api/models/order_direction.rb +1 -1
  101. data/lib/trinsic_api/models/person_data.rb +50 -15
  102. data/lib/trinsic_api/models/{known_person_data.rb → philippine_match_input.rb} +28 -33
  103. data/lib/trinsic_api/models/philippine_qr_input.rb +227 -0
  104. data/lib/trinsic_api/models/{verification.rb → problem_details.rb} +49 -42
  105. data/lib/trinsic_api/models/provider_attachments.rb +215 -0
  106. data/lib/trinsic_api/models/provider_contract.rb +482 -0
  107. data/lib/trinsic_api/models/provider_info.rb +1 -1
  108. data/lib/trinsic_api/models/provider_information.rb +1 -1
  109. data/lib/trinsic_api/models/provider_input.rb +392 -0
  110. data/lib/trinsic_api/models/recommend_request.rb +10 -40
  111. data/lib/trinsic_api/models/recommend_response.rb +1 -1
  112. data/lib/trinsic_api/models/recommendation_info.rb +256 -0
  113. data/lib/trinsic_api/models/refresh_step_content_request.rb +216 -0
  114. data/lib/trinsic_api/models/{identity_lookup_response.rb → refresh_step_content_response.rb} +16 -16
  115. data/lib/trinsic_api/models/result_collection.rb +261 -0
  116. data/lib/trinsic_api/models/result_collection_method.rb +40 -0
  117. data/lib/trinsic_api/models/session.rb +32 -48
  118. data/lib/trinsic_api/models/session_error_code.rb +48 -0
  119. data/lib/trinsic_api/models/session_ordering.rb +1 -1
  120. data/lib/trinsic_api/models/sex.rb +42 -0
  121. data/lib/trinsic_api/models/smart_id_input.rb +216 -0
  122. data/lib/trinsic_api/models/{disclosed_fields.rb → south_africa_nid_input.rb} +107 -154
  123. data/lib/trinsic_api/models/spid_input.rb +216 -0
  124. data/lib/trinsic_api/models/step_refresh_info.rb +256 -0
  125. data/lib/trinsic_api/models/sub_provider_metadata.rb +274 -0
  126. data/lib/trinsic_api/models/trinsic_test_database_lookup_input.rb +249 -0
  127. data/lib/trinsic_api/models/trinsic_test_sub_providers_input.rb +216 -0
  128. data/lib/trinsic_api/version.rb +2 -2
  129. data/lib/trinsic_api.rb +45 -15
  130. data/spec/api/attachments_api_spec.rb +2 -2
  131. data/spec/api/network_api_spec.rb +8 -9
  132. data/spec/api/sessions_api_spec.rb +45 -8
  133. data/spec/models/{verification_spec.rb → aadhaar_input_spec.rb} +9 -9
  134. data/spec/models/address_spec.rb +2 -2
  135. data/spec/models/attachment_access_keys_spec.rb +7 -1
  136. data/spec/models/bangladesh_national_id_input_spec.rb +54 -0
  137. data/spec/models/{identity_lookup_response_spec.rb → brazil_cpf_check_input_spec.rb} +8 -8
  138. data/spec/models/brazil_digital_cnh_input_spec.rb +54 -0
  139. data/spec/models/cancel_session_response_spec.rb +1 -1
  140. data/spec/models/create_advanced_provider_session_request_spec.rb +60 -0
  141. data/spec/models/create_advanced_provider_session_response_spec.rb +48 -0
  142. data/spec/models/create_hosted_provider_session_request_spec.rb +48 -0
  143. data/spec/models/create_hosted_provider_session_response_spec.rb +48 -0
  144. data/spec/models/create_widget_session_request_spec.rb +48 -0
  145. data/spec/models/create_widget_session_response_spec.rb +48 -0
  146. data/spec/models/document_data_spec.rb +1 -1
  147. data/spec/models/document_scan_attachments_spec.rb +36 -0
  148. data/spec/models/{session_state_spec.rb → document_type_spec.rb} +7 -7
  149. data/spec/models/get_attachment_request_spec.rb +1 -1
  150. data/spec/models/get_attachment_response_spec.rb +1 -1
  151. data/spec/models/get_session_response_spec.rb +1 -1
  152. data/spec/models/get_session_result_request_spec.rb +1 -1
  153. data/spec/models/get_session_result_response_spec.rb +1 -1
  154. data/spec/models/http_validation_problem_details_spec.rb +66 -0
  155. data/spec/models/identity_data_spec.rb +7 -1
  156. data/spec/models/{failure_message_spec.rb → idin_input_spec.rb} +8 -8
  157. data/spec/models/indonesia_nik_input_spec.rb +48 -0
  158. data/spec/models/integration_capability_spec.rb +30 -0
  159. data/spec/models/integration_launch_method_spec.rb +30 -0
  160. data/spec/models/integration_step_spec.rb +48 -0
  161. data/spec/models/{known_person_data_spec.rb → kenya_nid_input_spec.rb} +13 -13
  162. data/spec/models/{session_fail_code_spec.rb → language_spec.rb} +7 -7
  163. data/spec/models/list_provider_contracts_response_spec.rb +36 -0
  164. data/spec/models/list_providers_response_spec.rb +1 -1
  165. data/spec/models/list_sessions_response_spec.rb +1 -1
  166. data/spec/models/{known_identity_data_spec.rb → mexico_curp_input_spec.rb} +8 -8
  167. data/spec/models/mobile_id_input_spec.rb +48 -0
  168. data/spec/models/{known_address_spec.rb → nigeria_nin_input_spec.rb} +14 -14
  169. data/spec/models/order_direction_spec.rb +1 -1
  170. data/spec/models/person_data_spec.rb +8 -2
  171. data/spec/models/{create_session_request_spec.rb → philippine_match_input_spec.rb} +12 -12
  172. data/spec/models/{create_session_response_spec.rb → philippine_qr_input_spec.rb} +9 -9
  173. data/spec/models/problem_details_spec.rb +60 -0
  174. data/spec/models/provider_attachments_spec.rb +36 -0
  175. data/spec/models/{disclosed_fields_request_spec.rb → provider_contract_spec.rb} +37 -19
  176. data/spec/models/provider_info_spec.rb +1 -1
  177. data/spec/models/provider_information_spec.rb +1 -1
  178. data/spec/models/{disclosed_fields_spec.rb → provider_input_spec.rb} +49 -19
  179. data/spec/models/recommend_request_spec.rb +2 -14
  180. data/spec/models/recommend_response_spec.rb +1 -1
  181. data/spec/models/recommendation_info_spec.rb +54 -0
  182. data/spec/models/refresh_step_content_request_spec.rb +36 -0
  183. data/spec/models/refresh_step_content_response_spec.rb +36 -0
  184. data/spec/models/result_collection_method_spec.rb +30 -0
  185. data/spec/models/{validation_result_spec.rb → result_collection_spec.rb} +9 -9
  186. data/spec/models/{verification_fail_code_spec.rb → session_error_code_spec.rb} +7 -7
  187. data/spec/models/session_ordering_spec.rb +1 -1
  188. data/spec/models/session_spec.rb +4 -10
  189. data/spec/models/sex_spec.rb +30 -0
  190. data/spec/models/smart_id_input_spec.rb +36 -0
  191. data/spec/models/south_africa_nid_input_spec.rb +54 -0
  192. data/spec/models/spid_input_spec.rb +36 -0
  193. data/spec/models/step_refresh_info_spec.rb +48 -0
  194. data/spec/models/sub_provider_metadata_spec.rb +54 -0
  195. data/spec/models/trinsic_test_database_lookup_input_spec.rb +54 -0
  196. data/spec/models/trinsic_test_sub_providers_input_spec.rb +36 -0
  197. data/spec/spec_helper.rb +1 -1
  198. data/trinsic_api.gemspec +1 -1
  199. metadata +195 -75
  200. data/docs/CreateSessionRequest.md +0 -26
  201. data/docs/CreateSessionResponse.md +0 -20
  202. data/docs/DisclosedFields.md +0 -40
  203. data/docs/DisclosedFieldsRequest.md +0 -40
  204. data/docs/IdentityLookupResponse.md +0 -18
  205. data/docs/KnownAddress.md +0 -30
  206. data/docs/KnownIdentityData.md +0 -18
  207. data/docs/KnownPersonData.md +0 -28
  208. data/docs/ValidationResult.md +0 -20
  209. data/docs/Verification.md +0 -20
  210. data/lib/trinsic_api/models/create_session_request.rb +0 -257
  211. data/lib/trinsic_api/models/session_fail_code.rb +0 -45
  212. data/lib/trinsic_api/models/verification_fail_code.rb +0 -44
@@ -0,0 +1,482 @@
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 ProviderContract
18
+ # The ID of the Provider for this contract.
19
+ attr_accessor :id
20
+
21
+ # The Provider's Name as it appears in Trinsic's Dashboard and Widget
22
+ attr_accessor :name
23
+
24
+ # The Provider's description as it appears in Trinsic's Widget. This is flavor text, not a full, human-readable description of the provider.
25
+ attr_accessor :description
26
+
27
+ # A URL pointing to the Provider's logo on Trinsic's CDN. May be a PNG, JPG, or SVG image.
28
+ attr_accessor :logo_url
29
+
30
+ # Whether the Provider is available for use in your App. If `false`, you will need to contact Trinsic to enable this Provider for your App.
31
+ attr_accessor :available
32
+
33
+ # The geographies within the Regions the Provider is available.
34
+ attr_accessor :geography
35
+
36
+ # The regions within which the Provider is available.
37
+ attr_accessor :regions
38
+
39
+ # Relevant only to Advanced Provider Sessions. The `LaunchMethod` which must be supported to launch the Provider Session in Advanced Provider Sessions.
40
+ attr_accessor :launch_method
41
+
42
+ # Relevant only to Advanced Provider Sessions. The `CollectionMethod` which must be supported to launch the Provider Session in Advanced Provider Sessions.
43
+ attr_accessor :collection_method
44
+
45
+ # If `true`, then the results for this Provider may not be available immediately after the user is redirected back to your application. In this case, the `GetSessionResults` API must be called until results are available. This is an uncommon scenario, and typically only applies to Providers which use a biometric check or traditional document scan.
46
+ attr_accessor :results_may_be_delayed_after_redirect
47
+
48
+ # Relevant only to Advanced Provider Sessions. Whether the Provider requires the `RefreshStepContent` capability. For example, Samsung Wallet's deep links expire every 30 seconds, and must be refreshed periodically for a resilient user flow.
49
+ attr_accessor :has_refreshable_content
50
+
51
+ # Relevant to Hosted Provider Sessions and Advanced Provider Sessions. If `true`, this Provider requires provider-specific input on Session creation. If this input is not provided, Trinsic's Hosted UI will be invoked to collect the input from the user.
52
+ attr_accessor :requires_input
53
+
54
+ # Whether there exists a Trinsic-hosted UI for this Provider. This is `true` for any Provider which is not a simple, OIDC-like redirect flow.
55
+ attr_accessor :has_trinsic_interface
56
+
57
+ # Whether this Provider can be fully whitelabeled/OEMed through the Advanced Provider Sessions API. If `false`, the Provider may still be launched through Advanced Provider Sessions; however, it will necessarily require a Trinsic-hosted UI to function.
58
+ attr_accessor :supports_advanced_provider_sessions
59
+
60
+ # Metadata about the sub-providers which are available for this Provider. For example, Italy's SPID is a Provider which aggregates access to multiple sub-providers.
61
+ attr_accessor :sub_providers
62
+
63
+ class EnumAttributeValidator
64
+ attr_reader :datatype
65
+ attr_reader :allowable_values
66
+
67
+ def initialize(datatype, allowable_values)
68
+ @allowable_values = allowable_values.map do |value|
69
+ case datatype.to_s
70
+ when /Integer/i
71
+ value.to_i
72
+ when /Float/i
73
+ value.to_f
74
+ else
75
+ value
76
+ end
77
+ end
78
+ end
79
+
80
+ def valid?(value)
81
+ !value || allowable_values.include?(value)
82
+ end
83
+ end
84
+
85
+ # Attribute mapping from ruby-style variable name to JSON key.
86
+ def self.attribute_map
87
+ {
88
+ :'id' => :'id',
89
+ :'name' => :'name',
90
+ :'description' => :'description',
91
+ :'logo_url' => :'logoUrl',
92
+ :'available' => :'available',
93
+ :'geography' => :'geography',
94
+ :'regions' => :'regions',
95
+ :'launch_method' => :'launchMethod',
96
+ :'collection_method' => :'collectionMethod',
97
+ :'results_may_be_delayed_after_redirect' => :'resultsMayBeDelayedAfterRedirect',
98
+ :'has_refreshable_content' => :'hasRefreshableContent',
99
+ :'requires_input' => :'requiresInput',
100
+ :'has_trinsic_interface' => :'hasTrinsicInterface',
101
+ :'supports_advanced_provider_sessions' => :'supportsAdvancedProviderSessions',
102
+ :'sub_providers' => :'subProviders'
103
+ }
104
+ end
105
+
106
+ # Returns all the JSON keys this model knows about
107
+ def self.acceptable_attributes
108
+ attribute_map.values
109
+ end
110
+
111
+ # Attribute type mapping.
112
+ def self.openapi_types
113
+ {
114
+ :'id' => :'String',
115
+ :'name' => :'String',
116
+ :'description' => :'String',
117
+ :'logo_url' => :'String',
118
+ :'available' => :'Boolean',
119
+ :'geography' => :'Array<String>',
120
+ :'regions' => :'Array<String>',
121
+ :'launch_method' => :'IntegrationLaunchMethod',
122
+ :'collection_method' => :'ResultCollectionMethod',
123
+ :'results_may_be_delayed_after_redirect' => :'Boolean',
124
+ :'has_refreshable_content' => :'Boolean',
125
+ :'requires_input' => :'Boolean',
126
+ :'has_trinsic_interface' => :'Boolean',
127
+ :'supports_advanced_provider_sessions' => :'Boolean',
128
+ :'sub_providers' => :'Array<SubProviderMetadata>'
129
+ }
130
+ end
131
+
132
+ # List of attributes with nullable: true
133
+ def self.openapi_nullable
134
+ Set.new([
135
+ :'sub_providers'
136
+ ])
137
+ end
138
+
139
+ # Initializes the object
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ def initialize(attributes = {})
142
+ if (!attributes.is_a?(Hash))
143
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::ProviderContract` initialize method"
144
+ end
145
+
146
+ # check to see if the attribute exists and convert string to symbol for hash key
147
+ attributes = attributes.each_with_object({}) { |(k, v), h|
148
+ if (!self.class.attribute_map.key?(k.to_sym))
149
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::ProviderContract`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
150
+ end
151
+ h[k.to_sym] = v
152
+ }
153
+
154
+ if attributes.key?(:'id')
155
+ self.id = attributes[:'id']
156
+ else
157
+ self.id = nil
158
+ end
159
+
160
+ if attributes.key?(:'name')
161
+ self.name = attributes[:'name']
162
+ else
163
+ self.name = nil
164
+ end
165
+
166
+ if attributes.key?(:'description')
167
+ self.description = attributes[:'description']
168
+ else
169
+ self.description = nil
170
+ end
171
+
172
+ if attributes.key?(:'logo_url')
173
+ self.logo_url = attributes[:'logo_url']
174
+ else
175
+ self.logo_url = nil
176
+ end
177
+
178
+ if attributes.key?(:'available')
179
+ self.available = attributes[:'available']
180
+ else
181
+ self.available = nil
182
+ end
183
+
184
+ if attributes.key?(:'geography')
185
+ if (value = attributes[:'geography']).is_a?(Array)
186
+ self.geography = value
187
+ end
188
+ else
189
+ self.geography = nil
190
+ end
191
+
192
+ if attributes.key?(:'regions')
193
+ if (value = attributes[:'regions']).is_a?(Array)
194
+ self.regions = value
195
+ end
196
+ else
197
+ self.regions = nil
198
+ end
199
+
200
+ if attributes.key?(:'launch_method')
201
+ self.launch_method = attributes[:'launch_method']
202
+ else
203
+ self.launch_method = nil
204
+ end
205
+
206
+ if attributes.key?(:'collection_method')
207
+ self.collection_method = attributes[:'collection_method']
208
+ else
209
+ self.collection_method = nil
210
+ end
211
+
212
+ if attributes.key?(:'results_may_be_delayed_after_redirect')
213
+ self.results_may_be_delayed_after_redirect = attributes[:'results_may_be_delayed_after_redirect']
214
+ else
215
+ self.results_may_be_delayed_after_redirect = nil
216
+ end
217
+
218
+ if attributes.key?(:'has_refreshable_content')
219
+ self.has_refreshable_content = attributes[:'has_refreshable_content']
220
+ else
221
+ self.has_refreshable_content = nil
222
+ end
223
+
224
+ if attributes.key?(:'requires_input')
225
+ self.requires_input = attributes[:'requires_input']
226
+ else
227
+ self.requires_input = nil
228
+ end
229
+
230
+ if attributes.key?(:'has_trinsic_interface')
231
+ self.has_trinsic_interface = attributes[:'has_trinsic_interface']
232
+ else
233
+ self.has_trinsic_interface = nil
234
+ end
235
+
236
+ if attributes.key?(:'supports_advanced_provider_sessions')
237
+ self.supports_advanced_provider_sessions = attributes[:'supports_advanced_provider_sessions']
238
+ else
239
+ self.supports_advanced_provider_sessions = nil
240
+ end
241
+
242
+ if attributes.key?(:'sub_providers')
243
+ if (value = attributes[:'sub_providers']).is_a?(Array)
244
+ self.sub_providers = value
245
+ end
246
+ end
247
+ end
248
+
249
+ # Show invalid properties with the reasons. Usually used together with valid?
250
+ # @return Array for valid properties with the reasons
251
+ def list_invalid_properties
252
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
253
+ invalid_properties = Array.new
254
+ if @id.nil?
255
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
256
+ end
257
+
258
+ if @name.nil?
259
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
260
+ end
261
+
262
+ if @description.nil?
263
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
264
+ end
265
+
266
+ if @logo_url.nil?
267
+ invalid_properties.push('invalid value for "logo_url", logo_url cannot be nil.')
268
+ end
269
+
270
+ if @available.nil?
271
+ invalid_properties.push('invalid value for "available", available cannot be nil.')
272
+ end
273
+
274
+ if @geography.nil?
275
+ invalid_properties.push('invalid value for "geography", geography cannot be nil.')
276
+ end
277
+
278
+ if @regions.nil?
279
+ invalid_properties.push('invalid value for "regions", regions cannot be nil.')
280
+ end
281
+
282
+ if @launch_method.nil?
283
+ invalid_properties.push('invalid value for "launch_method", launch_method cannot be nil.')
284
+ end
285
+
286
+ if @collection_method.nil?
287
+ invalid_properties.push('invalid value for "collection_method", collection_method cannot be nil.')
288
+ end
289
+
290
+ if @results_may_be_delayed_after_redirect.nil?
291
+ invalid_properties.push('invalid value for "results_may_be_delayed_after_redirect", results_may_be_delayed_after_redirect cannot be nil.')
292
+ end
293
+
294
+ if @has_refreshable_content.nil?
295
+ invalid_properties.push('invalid value for "has_refreshable_content", has_refreshable_content cannot be nil.')
296
+ end
297
+
298
+ if @requires_input.nil?
299
+ invalid_properties.push('invalid value for "requires_input", requires_input cannot be nil.')
300
+ end
301
+
302
+ if @has_trinsic_interface.nil?
303
+ invalid_properties.push('invalid value for "has_trinsic_interface", has_trinsic_interface cannot be nil.')
304
+ end
305
+
306
+ if @supports_advanced_provider_sessions.nil?
307
+ invalid_properties.push('invalid value for "supports_advanced_provider_sessions", supports_advanced_provider_sessions cannot be nil.')
308
+ end
309
+
310
+ invalid_properties
311
+ end
312
+
313
+ # Check to see if the all the properties in the model are valid
314
+ # @return true if the model is valid
315
+ def valid?
316
+ warn '[DEPRECATED] the `valid?` method is obsolete'
317
+ return false if @id.nil?
318
+ return false if @name.nil?
319
+ return false if @description.nil?
320
+ return false if @logo_url.nil?
321
+ return false if @available.nil?
322
+ return false if @geography.nil?
323
+ return false if @regions.nil?
324
+ return false if @launch_method.nil?
325
+ return false if @collection_method.nil?
326
+ return false if @results_may_be_delayed_after_redirect.nil?
327
+ return false if @has_refreshable_content.nil?
328
+ return false if @requires_input.nil?
329
+ return false if @has_trinsic_interface.nil?
330
+ return false if @supports_advanced_provider_sessions.nil?
331
+ true
332
+ end
333
+
334
+ # Checks equality by comparing each attribute.
335
+ # @param [Object] Object to be compared
336
+ def ==(o)
337
+ return true if self.equal?(o)
338
+ self.class == o.class &&
339
+ id == o.id &&
340
+ name == o.name &&
341
+ description == o.description &&
342
+ logo_url == o.logo_url &&
343
+ available == o.available &&
344
+ geography == o.geography &&
345
+ regions == o.regions &&
346
+ launch_method == o.launch_method &&
347
+ collection_method == o.collection_method &&
348
+ results_may_be_delayed_after_redirect == o.results_may_be_delayed_after_redirect &&
349
+ has_refreshable_content == o.has_refreshable_content &&
350
+ requires_input == o.requires_input &&
351
+ has_trinsic_interface == o.has_trinsic_interface &&
352
+ supports_advanced_provider_sessions == o.supports_advanced_provider_sessions &&
353
+ sub_providers == o.sub_providers
354
+ end
355
+
356
+ # @see the `==` method
357
+ # @param [Object] Object to be compared
358
+ def eql?(o)
359
+ self == o
360
+ end
361
+
362
+ # Calculates hash code according to all attributes.
363
+ # @return [Integer] Hash code
364
+ def hash
365
+ [id, name, description, logo_url, available, geography, regions, launch_method, collection_method, results_may_be_delayed_after_redirect, has_refreshable_content, requires_input, has_trinsic_interface, supports_advanced_provider_sessions, sub_providers].hash
366
+ end
367
+
368
+ # Builds the object from hash
369
+ # @param [Hash] attributes Model attributes in the form of hash
370
+ # @return [Object] Returns the model itself
371
+ def self.build_from_hash(attributes)
372
+ return nil unless attributes.is_a?(Hash)
373
+ attributes = attributes.transform_keys(&:to_sym)
374
+ transformed_hash = {}
375
+ openapi_types.each_pair do |key, type|
376
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
377
+ transformed_hash["#{key}"] = nil
378
+ elsif type =~ /\AArray<(.*)>/i
379
+ # check to ensure the input is an array given that the attribute
380
+ # is documented as an array but the input is not
381
+ if attributes[attribute_map[key]].is_a?(Array)
382
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
383
+ end
384
+ elsif !attributes[attribute_map[key]].nil?
385
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
386
+ end
387
+ end
388
+ new(transformed_hash)
389
+ end
390
+
391
+ # Deserializes the data based on type
392
+ # @param string type Data type
393
+ # @param string value Value to be deserialized
394
+ # @return [Object] Deserialized data
395
+ def self._deserialize(type, value)
396
+ case type.to_sym
397
+ when :Time
398
+ Time.parse(value)
399
+ when :Date
400
+ Date.parse(value)
401
+ when :String
402
+ value.to_s
403
+ when :Integer
404
+ value.to_i
405
+ when :Float
406
+ value.to_f
407
+ when :Boolean
408
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
409
+ true
410
+ else
411
+ false
412
+ end
413
+ when :Object
414
+ # generic object (usually a Hash), return directly
415
+ value
416
+ when /\AArray<(?<inner_type>.+)>\z/
417
+ inner_type = Regexp.last_match[:inner_type]
418
+ value.map { |v| _deserialize(inner_type, v) }
419
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
420
+ k_type = Regexp.last_match[:k_type]
421
+ v_type = Regexp.last_match[:v_type]
422
+ {}.tap do |hash|
423
+ value.each do |k, v|
424
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
425
+ end
426
+ end
427
+ else # model
428
+ # models (e.g. Pet) or oneOf
429
+ klass = TrinsicApi.const_get(type)
430
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
431
+ end
432
+ end
433
+
434
+ # Returns the string representation of the object
435
+ # @return [String] String presentation of the object
436
+ def to_s
437
+ to_hash.to_s
438
+ end
439
+
440
+ # to_body is an alias to to_hash (backward compatibility)
441
+ # @return [Hash] Returns the object in the form of hash
442
+ def to_body
443
+ to_hash
444
+ end
445
+
446
+ # Returns the object in the form of hash
447
+ # @return [Hash] Returns the object in the form of hash
448
+ def to_hash
449
+ hash = {}
450
+ self.class.attribute_map.each_pair do |attr, param|
451
+ value = self.send(attr)
452
+ if value.nil?
453
+ is_nullable = self.class.openapi_nullable.include?(attr)
454
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
455
+ end
456
+
457
+ hash[param] = _to_hash(value)
458
+ end
459
+ hash
460
+ end
461
+
462
+ # Outputs non-array value in the form of hash
463
+ # For object, use to_hash. Otherwise, just return the value
464
+ # @param [Object] value Any valid value
465
+ # @return [Hash] Returns the value in the form of hash
466
+ def _to_hash(value)
467
+ if value.is_a?(Array)
468
+ value.compact.map { |v| _to_hash(v) }
469
+ elsif value.is_a?(Hash)
470
+ {}.tap do |hash|
471
+ value.each { |k, v| hash[k] = _to_hash(v) }
472
+ end
473
+ elsif value.respond_to? :to_hash
474
+ value.to_hash
475
+ else
476
+ value
477
+ end
478
+ end
479
+
480
+ end
481
+
482
+ end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #Connect API
2
+ #Trinsic API
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #Connect API
2
+ #Trinsic API
3
3
 
4
4
  #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5