trinsic_api 3.0.0 → 3.0.2.pre.preview

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 (128) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AadhaarClaims.md +46 -0
  3. data/docs/AadhaarLanguage.md +20 -0
  4. data/docs/AadhaarLocalizedClaims.md +40 -0
  5. data/docs/AppleWalletInput.md +3 -1
  6. data/docs/ConnectIdAddress.md +26 -0
  7. data/docs/ConnectIdAgeVerification.md +20 -0
  8. data/docs/ConnectIdBeneficiaryAccount.md +24 -0
  9. data/docs/ConnectIdProviderOutput.md +38 -0
  10. data/docs/CzechMojeIdAddressOutput.md +28 -0
  11. data/docs/CzechMojeIdProviderOutput.md +62 -0
  12. data/docs/DigilockerAadhaarProviderOutput.md +30 -0
  13. data/docs/FaydaProviderOutput.md +7 -1
  14. data/docs/FinnishTrustNetworkProviderOutput.md +38 -0
  15. data/docs/FranceIdentiteInput.md +18 -0
  16. data/docs/FranceIdentiteProviderOutput.md +18 -0
  17. data/docs/FrejaIndirectProviderOutput.md +24 -0
  18. data/docs/FrejaProviderOutput.md +36 -8
  19. data/docs/GetProviderResponse.md +18 -0
  20. data/docs/GoogleWalletInput.md +3 -1
  21. data/docs/KenyaNidLookup2Address.md +26 -0
  22. data/docs/KenyaNidLookup2ProviderOutput.md +38 -0
  23. data/docs/NigeriaNinLookup2ProviderOutput.md +40 -0
  24. data/docs/NorwegianBankIdProviderOutput.md +32 -0
  25. data/docs/OneIdProviderAddress.md +26 -0
  26. data/docs/OneIdProviderOutput.md +28 -0
  27. data/docs/OutputFrejaAddress.md +24 -0
  28. data/docs/OutputFrejaDocument.md +24 -0
  29. data/docs/PhilippinesDigitalNidProviderOutput.md +21 -1
  30. data/docs/PhilippinesPhysicalNidProviderOutput.md +17 -1
  31. data/docs/ProviderInput.md +6 -0
  32. data/docs/ProviderOutput.md +26 -2
  33. data/docs/ProvidersApi.md +70 -0
  34. data/docs/Raw18013DocumentRequest.md +20 -0
  35. data/docs/Raw18013RequestInput.md +18 -0
  36. data/docs/RecommendProvidersResponse.md +3 -1
  37. data/docs/SamsungWalletInput.md +18 -0
  38. data/docs/UkEvisaLookupInput.md +20 -0
  39. data/docs/UnitedKingdomEvisaProviderOutput.md +38 -0
  40. data/docs/VerificationProfileResponse.md +2 -0
  41. data/docs/VerificationProfilesApi.md +4 -0
  42. data/docs/YotiDeeplinkProviderOutput.md +40 -0
  43. data/lib/trinsic_api/api/providers_api.rb +63 -0
  44. data/lib/trinsic_api/api/verification_profiles_api.rb +6 -0
  45. data/lib/trinsic_api/models/aadhaar_claims.rb +376 -0
  46. data/lib/trinsic_api/models/aadhaar_language.rb +250 -0
  47. data/lib/trinsic_api/models/aadhaar_localized_claims.rb +343 -0
  48. data/lib/trinsic_api/models/apple_wallet_input.rb +16 -5
  49. data/lib/trinsic_api/models/connect_id_address.rb +266 -0
  50. data/lib/trinsic_api/models/connect_id_age_verification.rb +233 -0
  51. data/lib/trinsic_api/models/connect_id_beneficiary_account.rb +255 -0
  52. data/lib/trinsic_api/models/connect_id_provider_output.rb +333 -0
  53. data/lib/trinsic_api/models/czech_moje_id_address_output.rb +277 -0
  54. data/lib/trinsic_api/models/czech_moje_id_provider_output.rb +465 -0
  55. data/lib/trinsic_api/models/digilocker_aadhaar_provider_output.rb +305 -0
  56. data/lib/trinsic_api/models/fayda_provider_output.rb +38 -5
  57. data/lib/trinsic_api/models/finnish_trust_network_provider_output.rb +333 -0
  58. data/lib/trinsic_api/models/france_identite_input.rb +222 -0
  59. data/lib/trinsic_api/models/france_identite_provider_output.rb +239 -0
  60. data/lib/trinsic_api/models/freja_indirect_provider_output.rb +320 -0
  61. data/lib/trinsic_api/models/freja_provider_output.rb +185 -91
  62. data/lib/trinsic_api/models/get_provider_response.rb +238 -0
  63. data/lib/trinsic_api/models/google_wallet_input.rb +16 -5
  64. data/lib/trinsic_api/models/integration_step.rb +1 -1
  65. data/lib/trinsic_api/models/kenya_nid_lookup2_address.rb +269 -0
  66. data/lib/trinsic_api/models/kenya_nid_lookup2_provider_output.rb +429 -0
  67. data/lib/trinsic_api/models/nigeria_nin_lookup2_provider_output.rb +392 -0
  68. data/lib/trinsic_api/models/norwegian_bank_id_provider_output.rb +300 -0
  69. data/lib/trinsic_api/models/one_id_provider_address.rb +266 -0
  70. data/lib/trinsic_api/models/one_id_provider_output.rb +278 -0
  71. data/lib/trinsic_api/models/output_freja_address.rb +255 -0
  72. data/lib/trinsic_api/models/output_freja_document.rb +255 -0
  73. data/lib/trinsic_api/models/philippines_digital_nid_provider_output.rb +114 -4
  74. data/lib/trinsic_api/models/philippines_physical_nid_provider_output.rb +92 -4
  75. data/lib/trinsic_api/models/provider_input.rb +34 -1
  76. data/lib/trinsic_api/models/provider_output.rb +138 -6
  77. data/lib/trinsic_api/models/raw18013_document_request.rb +276 -0
  78. data/lib/trinsic_api/models/raw18013_request_input.rb +259 -0
  79. data/lib/trinsic_api/models/recommend_providers_response.rb +33 -4
  80. data/lib/trinsic_api/models/samsung_wallet_input.rb +222 -0
  81. data/lib/trinsic_api/models/uk_evisa_lookup_input.rb +283 -0
  82. data/lib/trinsic_api/models/united_kingdom_evisa_provider_output.rb +333 -0
  83. data/lib/trinsic_api/models/verification_profile_response.rb +28 -1
  84. data/lib/trinsic_api/models/yoti_deeplink_provider_output.rb +344 -0
  85. data/lib/trinsic_api/version.rb +1 -1
  86. data/lib/trinsic_api.rb +29 -0
  87. data/spec/api/providers_api_spec.rb +12 -0
  88. data/spec/api/verification_profiles_api_spec.rb +2 -0
  89. data/spec/models/aadhaar_claims_spec.rb +120 -0
  90. data/spec/models/aadhaar_language_spec.rb +42 -0
  91. data/spec/models/aadhaar_localized_claims_spec.rb +102 -0
  92. data/spec/models/apple_wallet_input_spec.rb +6 -0
  93. data/spec/models/connect_id_address_spec.rb +60 -0
  94. data/spec/models/connect_id_age_verification_spec.rb +42 -0
  95. data/spec/models/connect_id_beneficiary_account_spec.rb +54 -0
  96. data/spec/models/connect_id_provider_output_spec.rb +96 -0
  97. data/spec/models/czech_moje_id_address_output_spec.rb +66 -0
  98. data/spec/models/czech_moje_id_provider_output_spec.rb +168 -0
  99. data/spec/models/digilocker_aadhaar_provider_output_spec.rb +72 -0
  100. data/spec/models/fayda_provider_output_spec.rb +18 -0
  101. data/spec/models/finnish_trust_network_provider_output_spec.rb +96 -0
  102. data/spec/models/france_identite_input_spec.rb +36 -0
  103. data/spec/models/france_identite_provider_output_spec.rb +36 -0
  104. data/spec/models/freja_indirect_provider_output_spec.rb +54 -0
  105. data/spec/models/freja_provider_output_spec.rb +88 -4
  106. data/spec/models/get_provider_response_spec.rb +36 -0
  107. data/spec/models/google_wallet_input_spec.rb +6 -0
  108. data/spec/models/kenya_nid_lookup2_address_spec.rb +60 -0
  109. data/spec/models/kenya_nid_lookup2_provider_output_spec.rb +96 -0
  110. data/spec/models/nigeria_nin_lookup2_provider_output_spec.rb +102 -0
  111. data/spec/models/norwegian_bank_id_provider_output_spec.rb +78 -0
  112. data/spec/models/one_id_provider_address_spec.rb +60 -0
  113. data/spec/models/one_id_provider_output_spec.rb +66 -0
  114. data/spec/models/output_freja_address_spec.rb +54 -0
  115. data/spec/models/output_freja_document_spec.rb +54 -0
  116. data/spec/models/philippines_digital_nid_provider_output_spec.rb +60 -0
  117. data/spec/models/philippines_physical_nid_provider_output_spec.rb +48 -0
  118. data/spec/models/provider_input_spec.rb +18 -0
  119. data/spec/models/provider_output_spec.rb +72 -0
  120. data/spec/models/raw18013_document_request_spec.rb +42 -0
  121. data/spec/models/raw18013_request_input_spec.rb +36 -0
  122. data/spec/models/recommend_providers_response_spec.rb +6 -0
  123. data/spec/models/samsung_wallet_input_spec.rb +36 -0
  124. data/spec/models/uk_evisa_lookup_input_spec.rb +42 -0
  125. data/spec/models/united_kingdom_evisa_provider_output_spec.rb +96 -0
  126. data/spec/models/verification_profile_response_spec.rb +6 -0
  127. data/spec/models/yoti_deeplink_provider_output_spec.rb +102 -0
  128. metadata +236 -120
@@ -0,0 +1,276 @@
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
+ class Raw18013DocumentRequest
18
+ # The type of the document being requested, as defined by ISO specifications 18013-5, 18013-7, 23220-2, or a similar or related standard. Common values: - \"org.iso.18013.5.1.mDL\" -- a Mobile Driver's License - \"eu.europa.ec.eudi.pid.1\" -- an EUDI Wallet PID - \"com.google.wallet.idcard.1\" -- a Google Wallet ID Pass - \"org.iso.23220.photoid.1\" -- a generic ISO 23220-2 compliant Photo ID (used by Apple Wallet's ID Pass)
19
+ attr_accessor :document_type
20
+
21
+ # The namespaces and attributes (PII) to request from the document. This is a map of (nameSpaceName -> (attributeName -> willRetain)), where: - nameSpaceName is the name of a NameSpace within the document - attributeName is the name of a specific attribute within the NameSpace - willRetain indicates, to the Wallet, whether you as the Relying Party intend to retain the data for longer than the scope of the transaction Common namespace values: - \"org.iso.18013.5.1\" -- the primary namespace of a Mobile Driver's License or a Google Wallet ID Pass - \"org.iso.18013.5.1.aamva\" -- the secondary, AAMVA-defined namespace of a Mobile Driver's License - \"eu.europa.ec.eudi.pid.1\" -- the primary namespace of an EUDI Wallet PID - \"org.iso.23220.1\" -- the primary namespace of an ISO 23220-2 credential or an Apple Wallet ID Pass
22
+ attr_accessor :name_spaces
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'document_type' => :'documentType',
28
+ :'name_spaces' => :'nameSpaces'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'document_type' => :'String',
46
+ :'name_spaces' => :'Hash<String, Hash<String, Boolean>>'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::Raw18013DocumentRequest` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::Raw18013DocumentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'document_type')
73
+ self.document_type = attributes[:'document_type']
74
+ else
75
+ self.document_type = nil
76
+ end
77
+
78
+ if attributes.key?(:'name_spaces')
79
+ if (value = attributes[:'name_spaces']).is_a?(Hash)
80
+ self.name_spaces = value
81
+ end
82
+ else
83
+ self.name_spaces = 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 @document_type.nil?
93
+ invalid_properties.push('invalid value for "document_type", document_type cannot be nil.')
94
+ end
95
+
96
+ if @document_type.to_s.length < 1
97
+ invalid_properties.push('invalid value for "document_type", the character length must be great than or equal to 1.')
98
+ end
99
+
100
+ if @name_spaces.nil?
101
+ invalid_properties.push('invalid value for "name_spaces", name_spaces 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 @document_type.nil?
112
+ return false if @document_type.to_s.length < 1
113
+ return false if @name_spaces.nil?
114
+ true
115
+ end
116
+
117
+ # Custom attribute writer method with validation
118
+ # @param [Object] document_type Value to be assigned
119
+ def document_type=(document_type)
120
+ if document_type.nil?
121
+ fail ArgumentError, 'document_type cannot be nil'
122
+ end
123
+
124
+ if document_type.to_s.length < 1
125
+ fail ArgumentError, 'invalid value for "document_type", the character length must be great than or equal to 1.'
126
+ end
127
+
128
+ @document_type = document_type
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] name_spaces Value to be assigned
133
+ def name_spaces=(name_spaces)
134
+ if name_spaces.nil?
135
+ fail ArgumentError, 'name_spaces cannot be nil'
136
+ end
137
+
138
+ @name_spaces = name_spaces
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param [Object] Object to be compared
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ document_type == o.document_type &&
147
+ name_spaces == o.name_spaces
148
+ end
149
+
150
+ # @see the `==` method
151
+ # @param [Object] Object to be compared
152
+ def eql?(o)
153
+ self == o
154
+ end
155
+
156
+ # Calculates hash code according to all attributes.
157
+ # @return [Integer] Hash code
158
+ def hash
159
+ [document_type, name_spaces].hash
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def self.build_from_hash(attributes)
166
+ return nil unless attributes.is_a?(Hash)
167
+ attributes = attributes.transform_keys(&:to_sym)
168
+ transformed_hash = {}
169
+ openapi_types.each_pair do |key, type|
170
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = nil
172
+ elsif type =~ /\AArray<(.*)>/i
173
+ # check to ensure the input is an array given that the attribute
174
+ # is documented as an array but the input is not
175
+ if attributes[attribute_map[key]].is_a?(Array)
176
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
177
+ end
178
+ elsif !attributes[attribute_map[key]].nil?
179
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
180
+ end
181
+ end
182
+ new(transformed_hash)
183
+ end
184
+
185
+ # Deserializes the data based on type
186
+ # @param string type Data type
187
+ # @param string value Value to be deserialized
188
+ # @return [Object] Deserialized data
189
+ def self._deserialize(type, value)
190
+ case type.to_sym
191
+ when :Time
192
+ Time.parse(value)
193
+ when :Date
194
+ Date.parse(value)
195
+ when :String
196
+ value.to_s
197
+ when :Integer
198
+ value.to_i
199
+ when :Float
200
+ value.to_f
201
+ when :Boolean
202
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
203
+ true
204
+ else
205
+ false
206
+ end
207
+ when :Object
208
+ # generic object (usually a Hash), return directly
209
+ value
210
+ when /\AArray<(?<inner_type>.+)>\z/
211
+ inner_type = Regexp.last_match[:inner_type]
212
+ value.map { |v| _deserialize(inner_type, v) }
213
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
214
+ k_type = Regexp.last_match[:k_type]
215
+ v_type = Regexp.last_match[:v_type]
216
+ {}.tap do |hash|
217
+ value.each do |k, v|
218
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
219
+ end
220
+ end
221
+ else # model
222
+ # models (e.g. Pet) or oneOf
223
+ klass = TrinsicApi.const_get(type)
224
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
225
+ end
226
+ end
227
+
228
+ # Returns the string representation of the object
229
+ # @return [String] String presentation of the object
230
+ def to_s
231
+ to_hash.to_s
232
+ end
233
+
234
+ # to_body is an alias to to_hash (backward compatibility)
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_body
237
+ to_hash
238
+ end
239
+
240
+ # Returns the object in the form of hash
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_hash
243
+ hash = {}
244
+ self.class.attribute_map.each_pair do |attr, param|
245
+ value = self.send(attr)
246
+ if value.nil?
247
+ is_nullable = self.class.openapi_nullable.include?(attr)
248
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
249
+ end
250
+
251
+ hash[param] = _to_hash(value)
252
+ end
253
+ hash
254
+ end
255
+
256
+ # Outputs non-array value in the form of hash
257
+ # For object, use to_hash. Otherwise, just return the value
258
+ # @param [Object] value Any valid value
259
+ # @return [Hash] Returns the value in the form of hash
260
+ def _to_hash(value)
261
+ if value.is_a?(Array)
262
+ value.compact.map { |v| _to_hash(v) }
263
+ elsif value.is_a?(Hash)
264
+ {}.tap do |hash|
265
+ value.each { |k, v| hash[k] = _to_hash(v) }
266
+ end
267
+ elsif value.respond_to? :to_hash
268
+ value.to_hash
269
+ else
270
+ value
271
+ end
272
+ end
273
+
274
+ end
275
+
276
+ end
@@ -0,0 +1,259 @@
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
+ # A raw 18013-7 exchange request. Use this to specify a raw 18013-7 exchange against an arbitrary document type, namespace, and set of fields.
18
+ class Raw18013RequestInput
19
+ # A collection of requests for specific document(s), any of which may be used to satisfy the verification. At least one request must be provided. No more than 10 requests may be provided.
20
+ attr_accessor :document_requests
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'document_requests' => :'documentRequests'
26
+ }
27
+ end
28
+
29
+ # Returns attribute mapping this model knows about
30
+ def self.acceptable_attribute_map
31
+ attribute_map
32
+ end
33
+
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ acceptable_attribute_map.values
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'document_requests' => :'Array<Raw18013DocumentRequest>'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::Raw18013RequestInput` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!acceptable_attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::Raw18013RequestInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'document_requests')
69
+ if (value = attributes[:'document_requests']).is_a?(Array)
70
+ self.document_requests = value
71
+ end
72
+ else
73
+ self.document_requests = nil
74
+ end
75
+ end
76
+
77
+ # Show invalid properties with the reasons. Usually used together with valid?
78
+ # @return Array for valid properties with the reasons
79
+ def list_invalid_properties
80
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
81
+ invalid_properties = Array.new
82
+ if @document_requests.nil?
83
+ invalid_properties.push('invalid value for "document_requests", document_requests cannot be nil.')
84
+ end
85
+
86
+ if @document_requests.length > 10
87
+ invalid_properties.push('invalid value for "document_requests", number of items must be less than or equal to 10.')
88
+ end
89
+
90
+ if @document_requests.length < 1
91
+ invalid_properties.push('invalid value for "document_requests", number of items must be greater than or equal to 1.')
92
+ end
93
+
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ return false if @document_requests.nil?
102
+ return false if @document_requests.length > 10
103
+ return false if @document_requests.length < 1
104
+ true
105
+ end
106
+
107
+ # Custom attribute writer method with validation
108
+ # @param [Object] document_requests Value to be assigned
109
+ def document_requests=(document_requests)
110
+ if document_requests.nil?
111
+ fail ArgumentError, 'document_requests cannot be nil'
112
+ end
113
+
114
+ if document_requests.length > 10
115
+ fail ArgumentError, 'invalid value for "document_requests", number of items must be less than or equal to 10.'
116
+ end
117
+
118
+ if document_requests.length < 1
119
+ fail ArgumentError, 'invalid value for "document_requests", number of items must be greater than or equal to 1.'
120
+ end
121
+
122
+ @document_requests = document_requests
123
+ end
124
+
125
+ # Checks equality by comparing each attribute.
126
+ # @param [Object] Object to be compared
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ document_requests == o.document_requests
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Integer] Hash code
141
+ def hash
142
+ [document_requests].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ attributes = attributes.transform_keys(&:to_sym)
151
+ transformed_hash = {}
152
+ openapi_types.each_pair do |key, type|
153
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = nil
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[attribute_map[key]].is_a?(Array)
159
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
160
+ end
161
+ elsif !attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
163
+ end
164
+ end
165
+ new(transformed_hash)
166
+ end
167
+
168
+ # Deserializes the data based on type
169
+ # @param string type Data type
170
+ # @param string value Value to be deserialized
171
+ # @return [Object] Deserialized data
172
+ def self._deserialize(type, value)
173
+ case type.to_sym
174
+ when :Time
175
+ Time.parse(value)
176
+ when :Date
177
+ Date.parse(value)
178
+ when :String
179
+ value.to_s
180
+ when :Integer
181
+ value.to_i
182
+ when :Float
183
+ value.to_f
184
+ when :Boolean
185
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
+ true
187
+ else
188
+ false
189
+ end
190
+ when :Object
191
+ # generic object (usually a Hash), return directly
192
+ value
193
+ when /\AArray<(?<inner_type>.+)>\z/
194
+ inner_type = Regexp.last_match[:inner_type]
195
+ value.map { |v| _deserialize(inner_type, v) }
196
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
+ k_type = Regexp.last_match[:k_type]
198
+ v_type = Regexp.last_match[:v_type]
199
+ {}.tap do |hash|
200
+ value.each do |k, v|
201
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
+ end
203
+ end
204
+ else # model
205
+ # models (e.g. Pet) or oneOf
206
+ klass = TrinsicApi.const_get(type)
207
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ # Outputs non-array value in the form of hash
240
+ # For object, use to_hash. Otherwise, just return the value
241
+ # @param [Object] value Any valid value
242
+ # @return [Hash] Returns the value in the form of hash
243
+ def _to_hash(value)
244
+ if value.is_a?(Array)
245
+ value.compact.map { |v| _to_hash(v) }
246
+ elsif value.is_a?(Hash)
247
+ {}.tap do |hash|
248
+ value.each { |k, v| hash[k] = _to_hash(v) }
249
+ end
250
+ elsif value.respond_to? :to_hash
251
+ value.to_hash
252
+ else
253
+ value
254
+ end
255
+ end
256
+
257
+ end
258
+
259
+ end
@@ -17,10 +17,14 @@ module TrinsicApi
17
17
  class RecommendProvidersResponse
18
18
  attr_accessor :recommended_providers
19
19
 
20
+ # All Providers available to your Verification Profile which are not in `recommendedProviders`
21
+ attr_accessor :remainder
22
+
20
23
  # Attribute mapping from ruby-style variable name to JSON key.
21
24
  def self.attribute_map
22
25
  {
23
- :'recommended_providers' => :'recommendedProviders'
26
+ :'recommended_providers' => :'recommendedProviders',
27
+ :'remainder' => :'remainder'
24
28
  }
25
29
  end
26
30
 
@@ -37,7 +41,8 @@ module TrinsicApi
37
41
  # Attribute type mapping.
38
42
  def self.openapi_types
39
43
  {
40
- :'recommended_providers' => :'Array<RecommendProviderInformation>'
44
+ :'recommended_providers' => :'Array<RecommendProviderInformation>',
45
+ :'remainder' => :'Array<RecommendProviderInformation>'
41
46
  }
42
47
  end
43
48
 
@@ -70,6 +75,14 @@ module TrinsicApi
70
75
  else
71
76
  self.recommended_providers = nil
72
77
  end
78
+
79
+ if attributes.key?(:'remainder')
80
+ if (value = attributes[:'remainder']).is_a?(Array)
81
+ self.remainder = value
82
+ end
83
+ else
84
+ self.remainder = nil
85
+ end
73
86
  end
74
87
 
75
88
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -81,6 +94,10 @@ module TrinsicApi
81
94
  invalid_properties.push('invalid value for "recommended_providers", recommended_providers cannot be nil.')
82
95
  end
83
96
 
97
+ if @remainder.nil?
98
+ invalid_properties.push('invalid value for "remainder", remainder cannot be nil.')
99
+ end
100
+
84
101
  invalid_properties
85
102
  end
86
103
 
@@ -89,6 +106,7 @@ module TrinsicApi
89
106
  def valid?
90
107
  warn '[DEPRECATED] the `valid?` method is obsolete'
91
108
  return false if @recommended_providers.nil?
109
+ return false if @remainder.nil?
92
110
  true
93
111
  end
94
112
 
@@ -102,12 +120,23 @@ module TrinsicApi
102
120
  @recommended_providers = recommended_providers
103
121
  end
104
122
 
123
+ # Custom attribute writer method with validation
124
+ # @param [Object] remainder Value to be assigned
125
+ def remainder=(remainder)
126
+ if remainder.nil?
127
+ fail ArgumentError, 'remainder cannot be nil'
128
+ end
129
+
130
+ @remainder = remainder
131
+ end
132
+
105
133
  # Checks equality by comparing each attribute.
106
134
  # @param [Object] Object to be compared
107
135
  def ==(o)
108
136
  return true if self.equal?(o)
109
137
  self.class == o.class &&
110
- recommended_providers == o.recommended_providers
138
+ recommended_providers == o.recommended_providers &&
139
+ remainder == o.remainder
111
140
  end
112
141
 
113
142
  # @see the `==` method
@@ -119,7 +148,7 @@ module TrinsicApi
119
148
  # Calculates hash code according to all attributes.
120
149
  # @return [Integer] Hash code
121
150
  def hash
122
- [recommended_providers].hash
151
+ [recommended_providers, remainder].hash
123
152
  end
124
153
 
125
154
  # Builds the object from hash