trinsic_api 2.1.1.pre.alpha1 → 2.2.0.pre.alpha1

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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AppleWalletInput.md +18 -0
  3. data/docs/AttachmentsApi.md +1 -1
  4. data/docs/{CreateAdvancedProviderSessionRequest.md → CreateDirectProviderSessionRequest.md} +5 -3
  5. data/docs/{CreateAdvancedProviderSessionResponse.md → CreateDirectProviderSessionResponse.md} +2 -2
  6. data/docs/CreateHostedProviderSessionRequest.md +3 -1
  7. data/docs/CreateMdlExchangeRequest.md +32 -0
  8. data/docs/CreateMdlExchangeResponse.md +22 -0
  9. data/docs/CreateWidgetSessionRequest.md +3 -1
  10. data/docs/ExternalMdlFieldData.md +20 -0
  11. data/docs/FinalizeMdlExchangeRequest.md +24 -0
  12. data/docs/FinalizeMdlExchangeResponse.md +24 -0
  13. data/docs/GetAttachmentRequest.md +3 -1
  14. data/docs/GoogleWalletInput.md +18 -0
  15. data/docs/IdentityData.md +2 -0
  16. data/docs/{IndonesiaDukcapilBiometricMatchInput.md → IndonesiaDukcapilMatchInput.md} +3 -3
  17. data/docs/Match.md +20 -0
  18. data/docs/MatchData.md +36 -0
  19. data/docs/MdlApi.md +151 -0
  20. data/docs/MdlCertificateData.md +26 -0
  21. data/docs/MdlExchangeMechanism.md +15 -0
  22. data/docs/MdlFieldDataType.md +15 -0
  23. data/docs/MdlIdentityData.md +22 -0
  24. data/docs/NetworkApi.md +21 -18
  25. data/docs/ProviderContract.md +7 -5
  26. data/docs/ProviderInput.md +6 -2
  27. data/docs/RecommendRequest.md +2 -0
  28. data/docs/SessionsApi.md +103 -27
  29. data/docs/SubmitNativeChallengeResponseRequest.md +20 -0
  30. data/docs/SubmitNativeChallengeResponseResponse.md +18 -0
  31. data/lib/trinsic_api/api/mdl_api.rb +150 -0
  32. data/lib/trinsic_api/api/network_api.rb +22 -14
  33. data/lib/trinsic_api/api/sessions_api.rb +99 -23
  34. data/lib/trinsic_api/models/apple_wallet_input.rb +244 -0
  35. data/lib/trinsic_api/models/{create_advanced_provider_session_request.rb → create_direct_provider_session_request.rb} +32 -5
  36. data/lib/trinsic_api/models/{create_advanced_provider_session_response.rb → create_direct_provider_session_response.rb} +3 -3
  37. data/lib/trinsic_api/models/create_hosted_provider_session_request.rb +29 -2
  38. data/lib/trinsic_api/models/create_mdl_exchange_request.rb +404 -0
  39. data/lib/trinsic_api/models/create_mdl_exchange_response.rb +292 -0
  40. data/lib/trinsic_api/models/create_widget_session_request.rb +29 -2
  41. data/lib/trinsic_api/models/external_mdl_field_data.rb +287 -0
  42. data/lib/trinsic_api/models/finalize_mdl_exchange_request.rb +319 -0
  43. data/lib/trinsic_api/models/finalize_mdl_exchange_response.rb +287 -0
  44. data/lib/trinsic_api/models/get_attachment_request.rb +31 -4
  45. data/lib/trinsic_api/models/google_wallet_input.rb +244 -0
  46. data/lib/trinsic_api/models/identity_data.rb +11 -1
  47. data/lib/trinsic_api/models/{indonesia_dukcapil_biometric_match_input.rb → indonesia_dukcapil_match_input.rb} +4 -4
  48. data/lib/trinsic_api/models/integration_capability.rb +2 -1
  49. data/lib/trinsic_api/models/integration_launch_method.rb +2 -1
  50. data/lib/trinsic_api/models/integration_step.rb +1 -1
  51. data/lib/trinsic_api/models/match.rb +231 -0
  52. data/lib/trinsic_api/models/match_data.rb +311 -0
  53. data/lib/trinsic_api/models/mdl_certificate_data.rb +346 -0
  54. data/lib/trinsic_api/models/mdl_exchange_mechanism.rb +40 -0
  55. data/lib/trinsic_api/models/mdl_field_data_type.rb +43 -0
  56. data/lib/trinsic_api/models/mdl_identity_data.rb +294 -0
  57. data/lib/trinsic_api/models/provider_contract.rb +33 -6
  58. data/lib/trinsic_api/models/provider_input.rb +31 -9
  59. data/lib/trinsic_api/models/recommend_request.rb +28 -1
  60. data/lib/trinsic_api/models/result_collection_method.rb +2 -1
  61. data/lib/trinsic_api/models/session_error_code.rb +3 -1
  62. data/lib/trinsic_api/models/submit_native_challenge_response_request.rb +283 -0
  63. data/lib/trinsic_api/models/submit_native_challenge_response_response.rb +238 -0
  64. data/lib/trinsic_api/version.rb +1 -1
  65. data/lib/trinsic_api.rb +19 -3
  66. data/spec/api/mdl_api_spec.rb +59 -0
  67. data/spec/api/network_api_spec.rb +3 -3
  68. data/spec/api/sessions_api_spec.rb +21 -7
  69. data/spec/models/apple_wallet_input_spec.rb +36 -0
  70. data/spec/models/{create_advanced_provider_session_request_spec.rb → create_direct_provider_session_request_spec.rb} +12 -6
  71. data/spec/models/{create_advanced_provider_session_response_spec.rb → create_direct_provider_session_response_spec.rb} +6 -6
  72. data/spec/models/create_hosted_provider_session_request_spec.rb +6 -0
  73. data/spec/models/create_mdl_exchange_request_spec.rb +78 -0
  74. data/spec/models/create_mdl_exchange_response_spec.rb +48 -0
  75. data/spec/models/create_widget_session_request_spec.rb +6 -0
  76. data/spec/models/external_mdl_field_data_spec.rb +42 -0
  77. data/spec/models/finalize_mdl_exchange_request_spec.rb +54 -0
  78. data/spec/models/finalize_mdl_exchange_response_spec.rb +54 -0
  79. data/spec/models/get_attachment_request_spec.rb +6 -0
  80. data/spec/models/google_wallet_input_spec.rb +36 -0
  81. data/spec/models/identity_data_spec.rb +6 -0
  82. data/spec/models/{indonesia_dukcapil_biometric_match_input_spec.rb → indonesia_dukcapil_match_input_spec.rb} +6 -6
  83. data/spec/models/match_data_spec.rb +90 -0
  84. data/spec/models/match_spec.rb +42 -0
  85. data/spec/models/mdl_certificate_data_spec.rb +60 -0
  86. data/spec/models/mdl_exchange_mechanism_spec.rb +30 -0
  87. data/spec/models/mdl_field_data_type_spec.rb +30 -0
  88. data/spec/models/mdl_identity_data_spec.rb +48 -0
  89. data/spec/models/provider_contract_spec.rb +6 -0
  90. data/spec/models/provider_input_spec.rb +13 -1
  91. data/spec/models/recommend_request_spec.rb +6 -0
  92. data/spec/models/submit_native_challenge_response_request_spec.rb +42 -0
  93. data/spec/models/submit_native_challenge_response_response_spec.rb +36 -0
  94. metadata +130 -66
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module TrinsicApi
17
- class CreateAdvancedProviderSessionResponse
17
+ class CreateDirectProviderSessionResponse
18
18
  # The ID of the newly-created Acceptance Session
19
19
  attr_accessor :session_id
20
20
 
@@ -62,14 +62,14 @@ module TrinsicApi
62
62
  # @param [Hash] attributes Model attributes in the form of hash
63
63
  def initialize(attributes = {})
64
64
  if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::CreateAdvancedProviderSessionResponse` initialize method"
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::CreateDirectProviderSessionResponse` initialize method"
66
66
  end
67
67
 
68
68
  # check to see if the attribute exists and convert string to symbol for hash key
69
69
  acceptable_attribute_map = self.class.acceptable_attribute_map
70
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
71
71
  if (!acceptable_attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::CreateAdvancedProviderSessionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::CreateDirectProviderSessionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
73
  end
74
74
  h[k.to_sym] = v
75
75
  }
@@ -18,16 +18,20 @@ module TrinsicApi
18
18
  # The ID of the provider to launch
19
19
  attr_accessor :provider
20
20
 
21
+ # The ID of the Verification Profile to use for this session.
22
+ attr_accessor :verification_profile_id
23
+
21
24
  # The Redirect URL to which the user should be sent after the session is complete.
22
25
  attr_accessor :redirect_url
23
26
 
24
- # Provider-specific input for those providers which require it. <b>Deprecated:</b> In the future, Hosted Provider Sessions will not accept input on creation, and will instead always redirect the user to a hosted interface to collect input. If you need to collect input from the user yourself, please use the Create Advanced Session endpoint instead.
27
+ # Provider-specific input for those providers which require it. <b>Deprecated:</b> In the future, Hosted Provider Sessions will not accept input on creation, and will instead always redirect the user to a hosted interface to collect input. If you need to collect input from the user yourself, please use the Create Direct Session endpoint instead.
25
28
  attr_accessor :provider_input
26
29
 
27
30
  # Attribute mapping from ruby-style variable name to JSON key.
28
31
  def self.attribute_map
29
32
  {
30
33
  :'provider' => :'provider',
34
+ :'verification_profile_id' => :'verificationProfileId',
31
35
  :'redirect_url' => :'redirectUrl',
32
36
  :'provider_input' => :'providerInput'
33
37
  }
@@ -47,6 +51,7 @@ module TrinsicApi
47
51
  def self.openapi_types
48
52
  {
49
53
  :'provider' => :'String',
54
+ :'verification_profile_id' => :'String',
50
55
  :'redirect_url' => :'String',
51
56
  :'provider_input' => :'ProviderInput'
52
57
  }
@@ -81,6 +86,12 @@ module TrinsicApi
81
86
  self.provider = nil
82
87
  end
83
88
 
89
+ if attributes.key?(:'verification_profile_id')
90
+ self.verification_profile_id = attributes[:'verification_profile_id']
91
+ else
92
+ self.verification_profile_id = nil
93
+ end
94
+
84
95
  if attributes.key?(:'redirect_url')
85
96
  self.redirect_url = attributes[:'redirect_url']
86
97
  else
@@ -105,6 +116,10 @@ module TrinsicApi
105
116
  invalid_properties.push('invalid value for "provider", the character length must be great than or equal to 1.')
106
117
  end
107
118
 
119
+ if @verification_profile_id.nil?
120
+ invalid_properties.push('invalid value for "verification_profile_id", verification_profile_id cannot be nil.')
121
+ end
122
+
108
123
  if @redirect_url.nil?
109
124
  invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
110
125
  end
@@ -122,6 +137,7 @@ module TrinsicApi
122
137
  warn '[DEPRECATED] the `valid?` method is obsolete'
123
138
  return false if @provider.nil?
124
139
  return false if @provider.to_s.length < 1
140
+ return false if @verification_profile_id.nil?
125
141
  return false if @redirect_url.nil?
126
142
  return false if @redirect_url.to_s.length < 1
127
143
  true
@@ -141,6 +157,16 @@ module TrinsicApi
141
157
  @provider = provider
142
158
  end
143
159
 
160
+ # Custom attribute writer method with validation
161
+ # @param [Object] verification_profile_id Value to be assigned
162
+ def verification_profile_id=(verification_profile_id)
163
+ if verification_profile_id.nil?
164
+ fail ArgumentError, 'verification_profile_id cannot be nil'
165
+ end
166
+
167
+ @verification_profile_id = verification_profile_id
168
+ end
169
+
144
170
  # Custom attribute writer method with validation
145
171
  # @param [Object] redirect_url Value to be assigned
146
172
  def redirect_url=(redirect_url)
@@ -161,6 +187,7 @@ module TrinsicApi
161
187
  return true if self.equal?(o)
162
188
  self.class == o.class &&
163
189
  provider == o.provider &&
190
+ verification_profile_id == o.verification_profile_id &&
164
191
  redirect_url == o.redirect_url &&
165
192
  provider_input == o.provider_input
166
193
  end
@@ -174,7 +201,7 @@ module TrinsicApi
174
201
  # Calculates hash code according to all attributes.
175
202
  # @return [Integer] Hash code
176
203
  def hash
177
- [provider, redirect_url, provider_input].hash
204
+ [provider, verification_profile_id, redirect_url, provider_input].hash
178
205
  end
179
206
 
180
207
  # Builds the object from hash
@@ -0,0 +1,404 @@
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.13.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrinsicApi
17
+ # Request to create an mDL Exchange.
18
+ class CreateMdlExchangeRequest
19
+ # The ID of the VerificationProfile to use for this mDL exchange.
20
+ attr_accessor :verification_profile_id
21
+
22
+ # The ID of the provider to use for this mDL exchange.
23
+ attr_accessor :provider
24
+
25
+ # The mechanism by which the mDL exchange will occur (web, native SDK, etc.)
26
+ attr_accessor :exchange_mechanism
27
+
28
+ # The document type to request from the wallet. Typically, this is one of the following values: - `org.iso.18013.5.1.mDL` (Mobile Driver's License) - `com.google.wallet.idcard.1` (Google Wallet ID Pass)
29
+ attr_accessor :document_type
30
+
31
+ # The namespaces and fields to request from the mDL. This is a nested map / dictionary. The outer dictionary's keys are namespaces (e.g. \"org.iso.18013.5.1\"). The inner dictionary's keys are field names within each namespace, with boolean values indicating whether the specified field will be retained post-verification.
32
+ attr_accessor :name_spaces
33
+
34
+ # If using the `DigitalCredentialsApi` exchange mechanism, this is the hostname on which the Digital Credentials API will be called. For example, if the user is on the page `https://foo.example.com/verify-mdl`, the proper value to use is `foo.example.com`. Present for ease of testing only. May be removed as this API is stabilized.
35
+ attr_accessor :digital_credentials_api_host
36
+
37
+ # If using the `NativeApp` exchange mechanism with the `google-wallet` provider, this is the package name of the Android App which will execute the mDL exchange. This should be set to the package name of your app. Present for ease of testing only. May be removed as this API is stabilized.
38
+ attr_accessor :android_native_app_package_name
39
+
40
+ # If using the `NativeApp` exchange mechanism with the `google-wallet` provider, this is the SHA-256 fingerprint of the signing certificate used to sign the Android App which will execute the mDL exchange. Present for ease of testing only. May be removed as this API is stabilized.
41
+ attr_accessor :android_native_app_signing_certificate_fingerprint
42
+
43
+ class EnumAttributeValidator
44
+ attr_reader :datatype
45
+ attr_reader :allowable_values
46
+
47
+ def initialize(datatype, allowable_values)
48
+ @allowable_values = allowable_values.map do |value|
49
+ case datatype.to_s
50
+ when /Integer/i
51
+ value.to_i
52
+ when /Float/i
53
+ value.to_f
54
+ else
55
+ value
56
+ end
57
+ end
58
+ end
59
+
60
+ def valid?(value)
61
+ !value || allowable_values.include?(value)
62
+ end
63
+ end
64
+
65
+ # Attribute mapping from ruby-style variable name to JSON key.
66
+ def self.attribute_map
67
+ {
68
+ :'verification_profile_id' => :'verificationProfileId',
69
+ :'provider' => :'provider',
70
+ :'exchange_mechanism' => :'exchangeMechanism',
71
+ :'document_type' => :'documentType',
72
+ :'name_spaces' => :'nameSpaces',
73
+ :'digital_credentials_api_host' => :'digitalCredentialsApiHost',
74
+ :'android_native_app_package_name' => :'androidNativeAppPackageName',
75
+ :'android_native_app_signing_certificate_fingerprint' => :'androidNativeAppSigningCertificateFingerprint'
76
+ }
77
+ end
78
+
79
+ # Returns attribute mapping this model knows about
80
+ def self.acceptable_attribute_map
81
+ attribute_map
82
+ end
83
+
84
+ # Returns all the JSON keys this model knows about
85
+ def self.acceptable_attributes
86
+ acceptable_attribute_map.values
87
+ end
88
+
89
+ # Attribute type mapping.
90
+ def self.openapi_types
91
+ {
92
+ :'verification_profile_id' => :'String',
93
+ :'provider' => :'String',
94
+ :'exchange_mechanism' => :'MdlExchangeMechanism',
95
+ :'document_type' => :'String',
96
+ :'name_spaces' => :'Hash<String, Hash<String, Boolean>>',
97
+ :'digital_credentials_api_host' => :'String',
98
+ :'android_native_app_package_name' => :'String',
99
+ :'android_native_app_signing_certificate_fingerprint' => :'String'
100
+ }
101
+ end
102
+
103
+ # List of attributes with nullable: true
104
+ def self.openapi_nullable
105
+ Set.new([
106
+ :'digital_credentials_api_host',
107
+ :'android_native_app_package_name',
108
+ :'android_native_app_signing_certificate_fingerprint'
109
+ ])
110
+ end
111
+
112
+ # Initializes the object
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ def initialize(attributes = {})
115
+ if (!attributes.is_a?(Hash))
116
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::CreateMdlExchangeRequest` initialize method"
117
+ end
118
+
119
+ # check to see if the attribute exists and convert string to symbol for hash key
120
+ acceptable_attribute_map = self.class.acceptable_attribute_map
121
+ attributes = attributes.each_with_object({}) { |(k, v), h|
122
+ if (!acceptable_attribute_map.key?(k.to_sym))
123
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::CreateMdlExchangeRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
124
+ end
125
+ h[k.to_sym] = v
126
+ }
127
+
128
+ if attributes.key?(:'verification_profile_id')
129
+ self.verification_profile_id = attributes[:'verification_profile_id']
130
+ else
131
+ self.verification_profile_id = nil
132
+ end
133
+
134
+ if attributes.key?(:'provider')
135
+ self.provider = attributes[:'provider']
136
+ else
137
+ self.provider = nil
138
+ end
139
+
140
+ if attributes.key?(:'exchange_mechanism')
141
+ self.exchange_mechanism = attributes[:'exchange_mechanism']
142
+ else
143
+ self.exchange_mechanism = nil
144
+ end
145
+
146
+ if attributes.key?(:'document_type')
147
+ self.document_type = attributes[:'document_type']
148
+ else
149
+ self.document_type = nil
150
+ end
151
+
152
+ if attributes.key?(:'name_spaces')
153
+ if (value = attributes[:'name_spaces']).is_a?(Hash)
154
+ self.name_spaces = value
155
+ end
156
+ else
157
+ self.name_spaces = nil
158
+ end
159
+
160
+ if attributes.key?(:'digital_credentials_api_host')
161
+ self.digital_credentials_api_host = attributes[:'digital_credentials_api_host']
162
+ end
163
+
164
+ if attributes.key?(:'android_native_app_package_name')
165
+ self.android_native_app_package_name = attributes[:'android_native_app_package_name']
166
+ end
167
+
168
+ if attributes.key?(:'android_native_app_signing_certificate_fingerprint')
169
+ self.android_native_app_signing_certificate_fingerprint = attributes[:'android_native_app_signing_certificate_fingerprint']
170
+ end
171
+ end
172
+
173
+ # Show invalid properties with the reasons. Usually used together with valid?
174
+ # @return Array for valid properties with the reasons
175
+ def list_invalid_properties
176
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
177
+ invalid_properties = Array.new
178
+ if @verification_profile_id.nil?
179
+ invalid_properties.push('invalid value for "verification_profile_id", verification_profile_id cannot be nil.')
180
+ end
181
+
182
+ if @provider.nil?
183
+ invalid_properties.push('invalid value for "provider", provider cannot be nil.')
184
+ end
185
+
186
+ if @exchange_mechanism.nil?
187
+ invalid_properties.push('invalid value for "exchange_mechanism", exchange_mechanism cannot be nil.')
188
+ end
189
+
190
+ if @document_type.nil?
191
+ invalid_properties.push('invalid value for "document_type", document_type cannot be nil.')
192
+ end
193
+
194
+ if @name_spaces.nil?
195
+ invalid_properties.push('invalid value for "name_spaces", name_spaces cannot be nil.')
196
+ end
197
+
198
+ invalid_properties
199
+ end
200
+
201
+ # Check to see if the all the properties in the model are valid
202
+ # @return true if the model is valid
203
+ def valid?
204
+ warn '[DEPRECATED] the `valid?` method is obsolete'
205
+ return false if @verification_profile_id.nil?
206
+ return false if @provider.nil?
207
+ return false if @exchange_mechanism.nil?
208
+ return false if @document_type.nil?
209
+ return false if @name_spaces.nil?
210
+ true
211
+ end
212
+
213
+ # Custom attribute writer method with validation
214
+ # @param [Object] verification_profile_id Value to be assigned
215
+ def verification_profile_id=(verification_profile_id)
216
+ if verification_profile_id.nil?
217
+ fail ArgumentError, 'verification_profile_id cannot be nil'
218
+ end
219
+
220
+ @verification_profile_id = verification_profile_id
221
+ end
222
+
223
+ # Custom attribute writer method with validation
224
+ # @param [Object] provider Value to be assigned
225
+ def provider=(provider)
226
+ if provider.nil?
227
+ fail ArgumentError, 'provider cannot be nil'
228
+ end
229
+
230
+ @provider = provider
231
+ end
232
+
233
+ # Custom attribute writer method with validation
234
+ # @param [Object] exchange_mechanism Value to be assigned
235
+ def exchange_mechanism=(exchange_mechanism)
236
+ if exchange_mechanism.nil?
237
+ fail ArgumentError, 'exchange_mechanism cannot be nil'
238
+ end
239
+
240
+ @exchange_mechanism = exchange_mechanism
241
+ end
242
+
243
+ # Custom attribute writer method with validation
244
+ # @param [Object] document_type Value to be assigned
245
+ def document_type=(document_type)
246
+ if document_type.nil?
247
+ fail ArgumentError, 'document_type cannot be nil'
248
+ end
249
+
250
+ @document_type = document_type
251
+ end
252
+
253
+ # Custom attribute writer method with validation
254
+ # @param [Object] name_spaces Value to be assigned
255
+ def name_spaces=(name_spaces)
256
+ if name_spaces.nil?
257
+ fail ArgumentError, 'name_spaces cannot be nil'
258
+ end
259
+
260
+ @name_spaces = name_spaces
261
+ end
262
+
263
+ # Checks equality by comparing each attribute.
264
+ # @param [Object] Object to be compared
265
+ def ==(o)
266
+ return true if self.equal?(o)
267
+ self.class == o.class &&
268
+ verification_profile_id == o.verification_profile_id &&
269
+ provider == o.provider &&
270
+ exchange_mechanism == o.exchange_mechanism &&
271
+ document_type == o.document_type &&
272
+ name_spaces == o.name_spaces &&
273
+ digital_credentials_api_host == o.digital_credentials_api_host &&
274
+ android_native_app_package_name == o.android_native_app_package_name &&
275
+ android_native_app_signing_certificate_fingerprint == o.android_native_app_signing_certificate_fingerprint
276
+ end
277
+
278
+ # @see the `==` method
279
+ # @param [Object] Object to be compared
280
+ def eql?(o)
281
+ self == o
282
+ end
283
+
284
+ # Calculates hash code according to all attributes.
285
+ # @return [Integer] Hash code
286
+ def hash
287
+ [verification_profile_id, provider, exchange_mechanism, document_type, name_spaces, digital_credentials_api_host, android_native_app_package_name, android_native_app_signing_certificate_fingerprint].hash
288
+ end
289
+
290
+ # Builds the object from hash
291
+ # @param [Hash] attributes Model attributes in the form of hash
292
+ # @return [Object] Returns the model itself
293
+ def self.build_from_hash(attributes)
294
+ return nil unless attributes.is_a?(Hash)
295
+ attributes = attributes.transform_keys(&:to_sym)
296
+ transformed_hash = {}
297
+ openapi_types.each_pair do |key, type|
298
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
299
+ transformed_hash["#{key}"] = nil
300
+ elsif type =~ /\AArray<(.*)>/i
301
+ # check to ensure the input is an array given that the attribute
302
+ # is documented as an array but the input is not
303
+ if attributes[attribute_map[key]].is_a?(Array)
304
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
305
+ end
306
+ elsif !attributes[attribute_map[key]].nil?
307
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
308
+ end
309
+ end
310
+ new(transformed_hash)
311
+ end
312
+
313
+ # Deserializes the data based on type
314
+ # @param string type Data type
315
+ # @param string value Value to be deserialized
316
+ # @return [Object] Deserialized data
317
+ def self._deserialize(type, value)
318
+ case type.to_sym
319
+ when :Time
320
+ Time.parse(value)
321
+ when :Date
322
+ Date.parse(value)
323
+ when :String
324
+ value.to_s
325
+ when :Integer
326
+ value.to_i
327
+ when :Float
328
+ value.to_f
329
+ when :Boolean
330
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
331
+ true
332
+ else
333
+ false
334
+ end
335
+ when :Object
336
+ # generic object (usually a Hash), return directly
337
+ value
338
+ when /\AArray<(?<inner_type>.+)>\z/
339
+ inner_type = Regexp.last_match[:inner_type]
340
+ value.map { |v| _deserialize(inner_type, v) }
341
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
342
+ k_type = Regexp.last_match[:k_type]
343
+ v_type = Regexp.last_match[:v_type]
344
+ {}.tap do |hash|
345
+ value.each do |k, v|
346
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
347
+ end
348
+ end
349
+ else # model
350
+ # models (e.g. Pet) or oneOf
351
+ klass = TrinsicApi.const_get(type)
352
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
353
+ end
354
+ end
355
+
356
+ # Returns the string representation of the object
357
+ # @return [String] String presentation of the object
358
+ def to_s
359
+ to_hash.to_s
360
+ end
361
+
362
+ # to_body is an alias to to_hash (backward compatibility)
363
+ # @return [Hash] Returns the object in the form of hash
364
+ def to_body
365
+ to_hash
366
+ end
367
+
368
+ # Returns the object in the form of hash
369
+ # @return [Hash] Returns the object in the form of hash
370
+ def to_hash
371
+ hash = {}
372
+ self.class.attribute_map.each_pair do |attr, param|
373
+ value = self.send(attr)
374
+ if value.nil?
375
+ is_nullable = self.class.openapi_nullable.include?(attr)
376
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
377
+ end
378
+
379
+ hash[param] = _to_hash(value)
380
+ end
381
+ hash
382
+ end
383
+
384
+ # Outputs non-array value in the form of hash
385
+ # For object, use to_hash. Otherwise, just return the value
386
+ # @param [Object] value Any valid value
387
+ # @return [Hash] Returns the value in the form of hash
388
+ def _to_hash(value)
389
+ if value.is_a?(Array)
390
+ value.compact.map { |v| _to_hash(v) }
391
+ elsif value.is_a?(Hash)
392
+ {}.tap do |hash|
393
+ value.each { |k, v| hash[k] = _to_hash(v) }
394
+ end
395
+ elsif value.respond_to? :to_hash
396
+ value.to_hash
397
+ else
398
+ value
399
+ end
400
+ end
401
+
402
+ end
403
+
404
+ end