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.
- checksums.yaml +4 -4
- data/docs/AppleWalletInput.md +18 -0
- data/docs/AttachmentsApi.md +1 -1
- data/docs/{CreateAdvancedProviderSessionRequest.md → CreateDirectProviderSessionRequest.md} +5 -3
- data/docs/{CreateAdvancedProviderSessionResponse.md → CreateDirectProviderSessionResponse.md} +2 -2
- data/docs/CreateHostedProviderSessionRequest.md +3 -1
- data/docs/CreateMdlExchangeRequest.md +32 -0
- data/docs/CreateMdlExchangeResponse.md +22 -0
- data/docs/CreateWidgetSessionRequest.md +3 -1
- data/docs/ExternalMdlFieldData.md +20 -0
- data/docs/FinalizeMdlExchangeRequest.md +24 -0
- data/docs/FinalizeMdlExchangeResponse.md +24 -0
- data/docs/GetAttachmentRequest.md +3 -1
- data/docs/GoogleWalletInput.md +18 -0
- data/docs/IdentityData.md +2 -0
- data/docs/{IndonesiaDukcapilBiometricMatchInput.md → IndonesiaDukcapilMatchInput.md} +3 -3
- data/docs/Match.md +20 -0
- data/docs/MatchData.md +36 -0
- data/docs/MdlApi.md +151 -0
- data/docs/MdlCertificateData.md +26 -0
- data/docs/MdlExchangeMechanism.md +15 -0
- data/docs/MdlFieldDataType.md +15 -0
- data/docs/MdlIdentityData.md +22 -0
- data/docs/NetworkApi.md +21 -18
- data/docs/ProviderContract.md +7 -5
- data/docs/ProviderInput.md +6 -2
- data/docs/RecommendRequest.md +2 -0
- data/docs/SessionsApi.md +103 -27
- data/docs/SubmitNativeChallengeResponseRequest.md +20 -0
- data/docs/SubmitNativeChallengeResponseResponse.md +18 -0
- data/lib/trinsic_api/api/mdl_api.rb +150 -0
- data/lib/trinsic_api/api/network_api.rb +22 -14
- data/lib/trinsic_api/api/sessions_api.rb +99 -23
- data/lib/trinsic_api/models/apple_wallet_input.rb +244 -0
- data/lib/trinsic_api/models/{create_advanced_provider_session_request.rb → create_direct_provider_session_request.rb} +32 -5
- data/lib/trinsic_api/models/{create_advanced_provider_session_response.rb → create_direct_provider_session_response.rb} +3 -3
- data/lib/trinsic_api/models/create_hosted_provider_session_request.rb +29 -2
- data/lib/trinsic_api/models/create_mdl_exchange_request.rb +404 -0
- data/lib/trinsic_api/models/create_mdl_exchange_response.rb +292 -0
- data/lib/trinsic_api/models/create_widget_session_request.rb +29 -2
- data/lib/trinsic_api/models/external_mdl_field_data.rb +287 -0
- data/lib/trinsic_api/models/finalize_mdl_exchange_request.rb +319 -0
- data/lib/trinsic_api/models/finalize_mdl_exchange_response.rb +287 -0
- data/lib/trinsic_api/models/get_attachment_request.rb +31 -4
- data/lib/trinsic_api/models/google_wallet_input.rb +244 -0
- data/lib/trinsic_api/models/identity_data.rb +11 -1
- data/lib/trinsic_api/models/{indonesia_dukcapil_biometric_match_input.rb → indonesia_dukcapil_match_input.rb} +4 -4
- data/lib/trinsic_api/models/integration_capability.rb +2 -1
- data/lib/trinsic_api/models/integration_launch_method.rb +2 -1
- data/lib/trinsic_api/models/integration_step.rb +1 -1
- data/lib/trinsic_api/models/match.rb +231 -0
- data/lib/trinsic_api/models/match_data.rb +311 -0
- data/lib/trinsic_api/models/mdl_certificate_data.rb +346 -0
- data/lib/trinsic_api/models/mdl_exchange_mechanism.rb +40 -0
- data/lib/trinsic_api/models/mdl_field_data_type.rb +43 -0
- data/lib/trinsic_api/models/mdl_identity_data.rb +294 -0
- data/lib/trinsic_api/models/provider_contract.rb +33 -6
- data/lib/trinsic_api/models/provider_input.rb +31 -9
- data/lib/trinsic_api/models/recommend_request.rb +28 -1
- data/lib/trinsic_api/models/result_collection_method.rb +2 -1
- data/lib/trinsic_api/models/session_error_code.rb +3 -1
- data/lib/trinsic_api/models/submit_native_challenge_response_request.rb +283 -0
- data/lib/trinsic_api/models/submit_native_challenge_response_response.rb +238 -0
- data/lib/trinsic_api/version.rb +1 -1
- data/lib/trinsic_api.rb +19 -3
- data/spec/api/mdl_api_spec.rb +59 -0
- data/spec/api/network_api_spec.rb +3 -3
- data/spec/api/sessions_api_spec.rb +21 -7
- data/spec/models/apple_wallet_input_spec.rb +36 -0
- data/spec/models/{create_advanced_provider_session_request_spec.rb → create_direct_provider_session_request_spec.rb} +12 -6
- data/spec/models/{create_advanced_provider_session_response_spec.rb → create_direct_provider_session_response_spec.rb} +6 -6
- data/spec/models/create_hosted_provider_session_request_spec.rb +6 -0
- data/spec/models/create_mdl_exchange_request_spec.rb +78 -0
- data/spec/models/create_mdl_exchange_response_spec.rb +48 -0
- data/spec/models/create_widget_session_request_spec.rb +6 -0
- data/spec/models/external_mdl_field_data_spec.rb +42 -0
- data/spec/models/finalize_mdl_exchange_request_spec.rb +54 -0
- data/spec/models/finalize_mdl_exchange_response_spec.rb +54 -0
- data/spec/models/get_attachment_request_spec.rb +6 -0
- data/spec/models/google_wallet_input_spec.rb +36 -0
- data/spec/models/identity_data_spec.rb +6 -0
- data/spec/models/{indonesia_dukcapil_biometric_match_input_spec.rb → indonesia_dukcapil_match_input_spec.rb} +6 -6
- data/spec/models/match_data_spec.rb +90 -0
- data/spec/models/match_spec.rb +42 -0
- data/spec/models/mdl_certificate_data_spec.rb +60 -0
- data/spec/models/mdl_exchange_mechanism_spec.rb +30 -0
- data/spec/models/mdl_field_data_type_spec.rb +30 -0
- data/spec/models/mdl_identity_data_spec.rb +48 -0
- data/spec/models/provider_contract_spec.rb +6 -0
- data/spec/models/provider_input_spec.rb +13 -1
- data/spec/models/recommend_request_spec.rb +6 -0
- data/spec/models/submit_native_challenge_response_request_spec.rb +42 -0
- data/spec/models/submit_native_challenge_response_response_spec.rb +36 -0
- metadata +130 -66
@@ -0,0 +1,311 @@
|
|
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 MatchData
|
18
|
+
attr_accessor :national_id_number
|
19
|
+
|
20
|
+
attr_accessor :full_name
|
21
|
+
|
22
|
+
attr_accessor :given_name
|
23
|
+
|
24
|
+
attr_accessor :middle_name
|
25
|
+
|
26
|
+
attr_accessor :family_name
|
27
|
+
|
28
|
+
attr_accessor :sex
|
29
|
+
|
30
|
+
attr_accessor :date_of_birth
|
31
|
+
|
32
|
+
attr_accessor :face_match
|
33
|
+
|
34
|
+
attr_accessor :liveness
|
35
|
+
|
36
|
+
attr_accessor :image_authenticity
|
37
|
+
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'national_id_number' => :'nationalIdNumber',
|
42
|
+
:'full_name' => :'fullName',
|
43
|
+
:'given_name' => :'givenName',
|
44
|
+
:'middle_name' => :'middleName',
|
45
|
+
:'family_name' => :'familyName',
|
46
|
+
:'sex' => :'sex',
|
47
|
+
:'date_of_birth' => :'dateOfBirth',
|
48
|
+
:'face_match' => :'faceMatch',
|
49
|
+
:'liveness' => :'liveness',
|
50
|
+
:'image_authenticity' => :'imageAuthenticity'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Returns attribute mapping this model knows about
|
55
|
+
def self.acceptable_attribute_map
|
56
|
+
attribute_map
|
57
|
+
end
|
58
|
+
|
59
|
+
# Returns all the JSON keys this model knows about
|
60
|
+
def self.acceptable_attributes
|
61
|
+
acceptable_attribute_map.values
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.openapi_types
|
66
|
+
{
|
67
|
+
:'national_id_number' => :'Match',
|
68
|
+
:'full_name' => :'Match',
|
69
|
+
:'given_name' => :'Match',
|
70
|
+
:'middle_name' => :'Match',
|
71
|
+
:'family_name' => :'Match',
|
72
|
+
:'sex' => :'Match',
|
73
|
+
:'date_of_birth' => :'Match',
|
74
|
+
:'face_match' => :'Match',
|
75
|
+
:'liveness' => :'Match',
|
76
|
+
:'image_authenticity' => :'Match'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# List of attributes with nullable: true
|
81
|
+
def self.openapi_nullable
|
82
|
+
Set.new([
|
83
|
+
:'national_id_number',
|
84
|
+
:'full_name',
|
85
|
+
:'given_name',
|
86
|
+
:'middle_name',
|
87
|
+
:'family_name',
|
88
|
+
:'sex',
|
89
|
+
:'date_of_birth',
|
90
|
+
:'face_match',
|
91
|
+
:'liveness',
|
92
|
+
:'image_authenticity'
|
93
|
+
])
|
94
|
+
end
|
95
|
+
|
96
|
+
# Initializes the object
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
+
def initialize(attributes = {})
|
99
|
+
if (!attributes.is_a?(Hash))
|
100
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::MatchData` initialize method"
|
101
|
+
end
|
102
|
+
|
103
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
104
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
105
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
106
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
107
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::MatchData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
108
|
+
end
|
109
|
+
h[k.to_sym] = v
|
110
|
+
}
|
111
|
+
|
112
|
+
if attributes.key?(:'national_id_number')
|
113
|
+
self.national_id_number = attributes[:'national_id_number']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'full_name')
|
117
|
+
self.full_name = attributes[:'full_name']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'given_name')
|
121
|
+
self.given_name = attributes[:'given_name']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'middle_name')
|
125
|
+
self.middle_name = attributes[:'middle_name']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'family_name')
|
129
|
+
self.family_name = attributes[:'family_name']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'sex')
|
133
|
+
self.sex = attributes[:'sex']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'date_of_birth')
|
137
|
+
self.date_of_birth = attributes[:'date_of_birth']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'face_match')
|
141
|
+
self.face_match = attributes[:'face_match']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'liveness')
|
145
|
+
self.liveness = attributes[:'liveness']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'image_authenticity')
|
149
|
+
self.image_authenticity = attributes[:'image_authenticity']
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
154
|
+
# @return Array for valid properties with the reasons
|
155
|
+
def list_invalid_properties
|
156
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
157
|
+
invalid_properties = Array.new
|
158
|
+
invalid_properties
|
159
|
+
end
|
160
|
+
|
161
|
+
# Check to see if the all the properties in the model are valid
|
162
|
+
# @return true if the model is valid
|
163
|
+
def valid?
|
164
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
165
|
+
true
|
166
|
+
end
|
167
|
+
|
168
|
+
# Checks equality by comparing each attribute.
|
169
|
+
# @param [Object] Object to be compared
|
170
|
+
def ==(o)
|
171
|
+
return true if self.equal?(o)
|
172
|
+
self.class == o.class &&
|
173
|
+
national_id_number == o.national_id_number &&
|
174
|
+
full_name == o.full_name &&
|
175
|
+
given_name == o.given_name &&
|
176
|
+
middle_name == o.middle_name &&
|
177
|
+
family_name == o.family_name &&
|
178
|
+
sex == o.sex &&
|
179
|
+
date_of_birth == o.date_of_birth &&
|
180
|
+
face_match == o.face_match &&
|
181
|
+
liveness == o.liveness &&
|
182
|
+
image_authenticity == o.image_authenticity
|
183
|
+
end
|
184
|
+
|
185
|
+
# @see the `==` method
|
186
|
+
# @param [Object] Object to be compared
|
187
|
+
def eql?(o)
|
188
|
+
self == o
|
189
|
+
end
|
190
|
+
|
191
|
+
# Calculates hash code according to all attributes.
|
192
|
+
# @return [Integer] Hash code
|
193
|
+
def hash
|
194
|
+
[national_id_number, full_name, given_name, middle_name, family_name, sex, date_of_birth, face_match, liveness, image_authenticity].hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Builds the object from hash
|
198
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
199
|
+
# @return [Object] Returns the model itself
|
200
|
+
def self.build_from_hash(attributes)
|
201
|
+
return nil unless attributes.is_a?(Hash)
|
202
|
+
attributes = attributes.transform_keys(&:to_sym)
|
203
|
+
transformed_hash = {}
|
204
|
+
openapi_types.each_pair do |key, type|
|
205
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
206
|
+
transformed_hash["#{key}"] = nil
|
207
|
+
elsif type =~ /\AArray<(.*)>/i
|
208
|
+
# check to ensure the input is an array given that the attribute
|
209
|
+
# is documented as an array but the input is not
|
210
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
211
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
212
|
+
end
|
213
|
+
elsif !attributes[attribute_map[key]].nil?
|
214
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
215
|
+
end
|
216
|
+
end
|
217
|
+
new(transformed_hash)
|
218
|
+
end
|
219
|
+
|
220
|
+
# Deserializes the data based on type
|
221
|
+
# @param string type Data type
|
222
|
+
# @param string value Value to be deserialized
|
223
|
+
# @return [Object] Deserialized data
|
224
|
+
def self._deserialize(type, value)
|
225
|
+
case type.to_sym
|
226
|
+
when :Time
|
227
|
+
Time.parse(value)
|
228
|
+
when :Date
|
229
|
+
Date.parse(value)
|
230
|
+
when :String
|
231
|
+
value.to_s
|
232
|
+
when :Integer
|
233
|
+
value.to_i
|
234
|
+
when :Float
|
235
|
+
value.to_f
|
236
|
+
when :Boolean
|
237
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
238
|
+
true
|
239
|
+
else
|
240
|
+
false
|
241
|
+
end
|
242
|
+
when :Object
|
243
|
+
# generic object (usually a Hash), return directly
|
244
|
+
value
|
245
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
246
|
+
inner_type = Regexp.last_match[:inner_type]
|
247
|
+
value.map { |v| _deserialize(inner_type, v) }
|
248
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
249
|
+
k_type = Regexp.last_match[:k_type]
|
250
|
+
v_type = Regexp.last_match[:v_type]
|
251
|
+
{}.tap do |hash|
|
252
|
+
value.each do |k, v|
|
253
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
254
|
+
end
|
255
|
+
end
|
256
|
+
else # model
|
257
|
+
# models (e.g. Pet) or oneOf
|
258
|
+
klass = TrinsicApi.const_get(type)
|
259
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
# Returns the string representation of the object
|
264
|
+
# @return [String] String presentation of the object
|
265
|
+
def to_s
|
266
|
+
to_hash.to_s
|
267
|
+
end
|
268
|
+
|
269
|
+
# to_body is an alias to to_hash (backward compatibility)
|
270
|
+
# @return [Hash] Returns the object in the form of hash
|
271
|
+
def to_body
|
272
|
+
to_hash
|
273
|
+
end
|
274
|
+
|
275
|
+
# Returns the object in the form of hash
|
276
|
+
# @return [Hash] Returns the object in the form of hash
|
277
|
+
def to_hash
|
278
|
+
hash = {}
|
279
|
+
self.class.attribute_map.each_pair do |attr, param|
|
280
|
+
value = self.send(attr)
|
281
|
+
if value.nil?
|
282
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
283
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
284
|
+
end
|
285
|
+
|
286
|
+
hash[param] = _to_hash(value)
|
287
|
+
end
|
288
|
+
hash
|
289
|
+
end
|
290
|
+
|
291
|
+
# Outputs non-array value in the form of hash
|
292
|
+
# For object, use to_hash. Otherwise, just return the value
|
293
|
+
# @param [Object] value Any valid value
|
294
|
+
# @return [Hash] Returns the value in the form of hash
|
295
|
+
def _to_hash(value)
|
296
|
+
if value.is_a?(Array)
|
297
|
+
value.compact.map { |v| _to_hash(v) }
|
298
|
+
elsif value.is_a?(Hash)
|
299
|
+
{}.tap do |hash|
|
300
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
301
|
+
end
|
302
|
+
elsif value.respond_to? :to_hash
|
303
|
+
value.to_hash
|
304
|
+
else
|
305
|
+
value
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
end
|
310
|
+
|
311
|
+
end
|
@@ -0,0 +1,346 @@
|
|
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 MdlCertificateData
|
18
|
+
# The serial number of the certificate
|
19
|
+
attr_accessor :serial_number
|
20
|
+
|
21
|
+
# The common name (CN) of the certificate
|
22
|
+
attr_accessor :common_name
|
23
|
+
|
24
|
+
# The state or province name (ST) of the certificate. May be an empty string for certificates which are not state-specific (e.g., Google Wallet's ID Pass certificates).
|
25
|
+
attr_accessor :state_or_province_name
|
26
|
+
|
27
|
+
# The date before which this certificate is not valid.
|
28
|
+
attr_accessor :not_before
|
29
|
+
|
30
|
+
# The date after which this certificate is not valid.
|
31
|
+
attr_accessor :not_after
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'serial_number' => :'serialNumber',
|
37
|
+
:'common_name' => :'commonName',
|
38
|
+
:'state_or_province_name' => :'stateOrProvinceName',
|
39
|
+
:'not_before' => :'notBefore',
|
40
|
+
:'not_after' => :'notAfter'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Returns attribute mapping this model knows about
|
45
|
+
def self.acceptable_attribute_map
|
46
|
+
attribute_map
|
47
|
+
end
|
48
|
+
|
49
|
+
# Returns all the JSON keys this model knows about
|
50
|
+
def self.acceptable_attributes
|
51
|
+
acceptable_attribute_map.values
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.openapi_types
|
56
|
+
{
|
57
|
+
:'serial_number' => :'String',
|
58
|
+
:'common_name' => :'String',
|
59
|
+
:'state_or_province_name' => :'String',
|
60
|
+
:'not_before' => :'Time',
|
61
|
+
:'not_after' => :'Time'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# List of attributes with nullable: true
|
66
|
+
def self.openapi_nullable
|
67
|
+
Set.new([
|
68
|
+
])
|
69
|
+
end
|
70
|
+
|
71
|
+
# Initializes the object
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
+
def initialize(attributes = {})
|
74
|
+
if (!attributes.is_a?(Hash))
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::MdlCertificateData` initialize method"
|
76
|
+
end
|
77
|
+
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::MdlCertificateData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
83
|
+
end
|
84
|
+
h[k.to_sym] = v
|
85
|
+
}
|
86
|
+
|
87
|
+
if attributes.key?(:'serial_number')
|
88
|
+
self.serial_number = attributes[:'serial_number']
|
89
|
+
else
|
90
|
+
self.serial_number = nil
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'common_name')
|
94
|
+
self.common_name = attributes[:'common_name']
|
95
|
+
else
|
96
|
+
self.common_name = nil
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'state_or_province_name')
|
100
|
+
self.state_or_province_name = attributes[:'state_or_province_name']
|
101
|
+
else
|
102
|
+
self.state_or_province_name = nil
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'not_before')
|
106
|
+
self.not_before = attributes[:'not_before']
|
107
|
+
else
|
108
|
+
self.not_before = nil
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'not_after')
|
112
|
+
self.not_after = attributes[:'not_after']
|
113
|
+
else
|
114
|
+
self.not_after = nil
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
119
|
+
# @return Array for valid properties with the reasons
|
120
|
+
def list_invalid_properties
|
121
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
122
|
+
invalid_properties = Array.new
|
123
|
+
if @serial_number.nil?
|
124
|
+
invalid_properties.push('invalid value for "serial_number", serial_number cannot be nil.')
|
125
|
+
end
|
126
|
+
|
127
|
+
if @common_name.nil?
|
128
|
+
invalid_properties.push('invalid value for "common_name", common_name cannot be nil.')
|
129
|
+
end
|
130
|
+
|
131
|
+
if @state_or_province_name.nil?
|
132
|
+
invalid_properties.push('invalid value for "state_or_province_name", state_or_province_name cannot be nil.')
|
133
|
+
end
|
134
|
+
|
135
|
+
if @not_before.nil?
|
136
|
+
invalid_properties.push('invalid value for "not_before", not_before cannot be nil.')
|
137
|
+
end
|
138
|
+
|
139
|
+
if @not_after.nil?
|
140
|
+
invalid_properties.push('invalid value for "not_after", not_after cannot be nil.')
|
141
|
+
end
|
142
|
+
|
143
|
+
invalid_properties
|
144
|
+
end
|
145
|
+
|
146
|
+
# Check to see if the all the properties in the model are valid
|
147
|
+
# @return true if the model is valid
|
148
|
+
def valid?
|
149
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
150
|
+
return false if @serial_number.nil?
|
151
|
+
return false if @common_name.nil?
|
152
|
+
return false if @state_or_province_name.nil?
|
153
|
+
return false if @not_before.nil?
|
154
|
+
return false if @not_after.nil?
|
155
|
+
true
|
156
|
+
end
|
157
|
+
|
158
|
+
# Custom attribute writer method with validation
|
159
|
+
# @param [Object] serial_number Value to be assigned
|
160
|
+
def serial_number=(serial_number)
|
161
|
+
if serial_number.nil?
|
162
|
+
fail ArgumentError, 'serial_number cannot be nil'
|
163
|
+
end
|
164
|
+
|
165
|
+
@serial_number = serial_number
|
166
|
+
end
|
167
|
+
|
168
|
+
# Custom attribute writer method with validation
|
169
|
+
# @param [Object] common_name Value to be assigned
|
170
|
+
def common_name=(common_name)
|
171
|
+
if common_name.nil?
|
172
|
+
fail ArgumentError, 'common_name cannot be nil'
|
173
|
+
end
|
174
|
+
|
175
|
+
@common_name = common_name
|
176
|
+
end
|
177
|
+
|
178
|
+
# Custom attribute writer method with validation
|
179
|
+
# @param [Object] state_or_province_name Value to be assigned
|
180
|
+
def state_or_province_name=(state_or_province_name)
|
181
|
+
if state_or_province_name.nil?
|
182
|
+
fail ArgumentError, 'state_or_province_name cannot be nil'
|
183
|
+
end
|
184
|
+
|
185
|
+
@state_or_province_name = state_or_province_name
|
186
|
+
end
|
187
|
+
|
188
|
+
# Custom attribute writer method with validation
|
189
|
+
# @param [Object] not_before Value to be assigned
|
190
|
+
def not_before=(not_before)
|
191
|
+
if not_before.nil?
|
192
|
+
fail ArgumentError, 'not_before cannot be nil'
|
193
|
+
end
|
194
|
+
|
195
|
+
@not_before = not_before
|
196
|
+
end
|
197
|
+
|
198
|
+
# Custom attribute writer method with validation
|
199
|
+
# @param [Object] not_after Value to be assigned
|
200
|
+
def not_after=(not_after)
|
201
|
+
if not_after.nil?
|
202
|
+
fail ArgumentError, 'not_after cannot be nil'
|
203
|
+
end
|
204
|
+
|
205
|
+
@not_after = not_after
|
206
|
+
end
|
207
|
+
|
208
|
+
# Checks equality by comparing each attribute.
|
209
|
+
# @param [Object] Object to be compared
|
210
|
+
def ==(o)
|
211
|
+
return true if self.equal?(o)
|
212
|
+
self.class == o.class &&
|
213
|
+
serial_number == o.serial_number &&
|
214
|
+
common_name == o.common_name &&
|
215
|
+
state_or_province_name == o.state_or_province_name &&
|
216
|
+
not_before == o.not_before &&
|
217
|
+
not_after == o.not_after
|
218
|
+
end
|
219
|
+
|
220
|
+
# @see the `==` method
|
221
|
+
# @param [Object] Object to be compared
|
222
|
+
def eql?(o)
|
223
|
+
self == o
|
224
|
+
end
|
225
|
+
|
226
|
+
# Calculates hash code according to all attributes.
|
227
|
+
# @return [Integer] Hash code
|
228
|
+
def hash
|
229
|
+
[serial_number, common_name, state_or_province_name, not_before, not_after].hash
|
230
|
+
end
|
231
|
+
|
232
|
+
# Builds the object from hash
|
233
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
234
|
+
# @return [Object] Returns the model itself
|
235
|
+
def self.build_from_hash(attributes)
|
236
|
+
return nil unless attributes.is_a?(Hash)
|
237
|
+
attributes = attributes.transform_keys(&:to_sym)
|
238
|
+
transformed_hash = {}
|
239
|
+
openapi_types.each_pair do |key, type|
|
240
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
241
|
+
transformed_hash["#{key}"] = nil
|
242
|
+
elsif type =~ /\AArray<(.*)>/i
|
243
|
+
# check to ensure the input is an array given that the attribute
|
244
|
+
# is documented as an array but the input is not
|
245
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
246
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
247
|
+
end
|
248
|
+
elsif !attributes[attribute_map[key]].nil?
|
249
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
250
|
+
end
|
251
|
+
end
|
252
|
+
new(transformed_hash)
|
253
|
+
end
|
254
|
+
|
255
|
+
# Deserializes the data based on type
|
256
|
+
# @param string type Data type
|
257
|
+
# @param string value Value to be deserialized
|
258
|
+
# @return [Object] Deserialized data
|
259
|
+
def self._deserialize(type, value)
|
260
|
+
case type.to_sym
|
261
|
+
when :Time
|
262
|
+
Time.parse(value)
|
263
|
+
when :Date
|
264
|
+
Date.parse(value)
|
265
|
+
when :String
|
266
|
+
value.to_s
|
267
|
+
when :Integer
|
268
|
+
value.to_i
|
269
|
+
when :Float
|
270
|
+
value.to_f
|
271
|
+
when :Boolean
|
272
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
273
|
+
true
|
274
|
+
else
|
275
|
+
false
|
276
|
+
end
|
277
|
+
when :Object
|
278
|
+
# generic object (usually a Hash), return directly
|
279
|
+
value
|
280
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
281
|
+
inner_type = Regexp.last_match[:inner_type]
|
282
|
+
value.map { |v| _deserialize(inner_type, v) }
|
283
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
284
|
+
k_type = Regexp.last_match[:k_type]
|
285
|
+
v_type = Regexp.last_match[:v_type]
|
286
|
+
{}.tap do |hash|
|
287
|
+
value.each do |k, v|
|
288
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
289
|
+
end
|
290
|
+
end
|
291
|
+
else # model
|
292
|
+
# models (e.g. Pet) or oneOf
|
293
|
+
klass = TrinsicApi.const_get(type)
|
294
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
298
|
+
# Returns the string representation of the object
|
299
|
+
# @return [String] String presentation of the object
|
300
|
+
def to_s
|
301
|
+
to_hash.to_s
|
302
|
+
end
|
303
|
+
|
304
|
+
# to_body is an alias to to_hash (backward compatibility)
|
305
|
+
# @return [Hash] Returns the object in the form of hash
|
306
|
+
def to_body
|
307
|
+
to_hash
|
308
|
+
end
|
309
|
+
|
310
|
+
# Returns the object in the form of hash
|
311
|
+
# @return [Hash] Returns the object in the form of hash
|
312
|
+
def to_hash
|
313
|
+
hash = {}
|
314
|
+
self.class.attribute_map.each_pair do |attr, param|
|
315
|
+
value = self.send(attr)
|
316
|
+
if value.nil?
|
317
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
318
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
319
|
+
end
|
320
|
+
|
321
|
+
hash[param] = _to_hash(value)
|
322
|
+
end
|
323
|
+
hash
|
324
|
+
end
|
325
|
+
|
326
|
+
# Outputs non-array value in the form of hash
|
327
|
+
# For object, use to_hash. Otherwise, just return the value
|
328
|
+
# @param [Object] value Any valid value
|
329
|
+
# @return [Hash] Returns the value in the form of hash
|
330
|
+
def _to_hash(value)
|
331
|
+
if value.is_a?(Array)
|
332
|
+
value.compact.map { |v| _to_hash(v) }
|
333
|
+
elsif value.is_a?(Hash)
|
334
|
+
{}.tap do |hash|
|
335
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
336
|
+
end
|
337
|
+
elsif value.respond_to? :to_hash
|
338
|
+
value.to_hash
|
339
|
+
else
|
340
|
+
value
|
341
|
+
end
|
342
|
+
end
|
343
|
+
|
344
|
+
end
|
345
|
+
|
346
|
+
end
|
@@ -0,0 +1,40 @@
|
|
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 MdlExchangeMechanism
|
18
|
+
NATIVE_APP = "NativeApp".freeze
|
19
|
+
DIGITAL_CREDENTIALS_API = "DigitalCredentialsApi".freeze
|
20
|
+
|
21
|
+
def self.all_vars
|
22
|
+
@all_vars ||= [NATIVE_APP, DIGITAL_CREDENTIALS_API].freeze
|
23
|
+
end
|
24
|
+
|
25
|
+
# Builds the enum from string
|
26
|
+
# @param [String] The enum value in the form of the string
|
27
|
+
# @return [String] The enum value
|
28
|
+
def self.build_from_hash(value)
|
29
|
+
new.build_from_hash(value)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Builds the enum from string
|
33
|
+
# @param [String] The enum value in the form of the string
|
34
|
+
# @return [String] The enum value
|
35
|
+
def build_from_hash(value)
|
36
|
+
return value if MdlExchangeMechanism.all_vars.include?(value)
|
37
|
+
raise "Invalid ENUM value #{value} for class #MdlExchangeMechanism"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|