trinsic_api 2.2.0 → 2.3.0.pre.alpha2

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 (100) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AddRedirectUriResponse.md +18 -0
  3. data/docs/AttachmentAccessKeys.md +2 -0
  4. data/docs/ContractField.md +2 -0
  5. data/docs/ContractIdentifierField.md +22 -0
  6. data/docs/CreateHostedProviderSessionResponse.md +1 -1
  7. data/docs/CreateVerificationProfileResponse.md +18 -0
  8. data/docs/CreateWidgetSessionResponse.md +1 -1
  9. data/docs/EnvironmentRedirectUrisAddRequest.md +18 -0
  10. data/docs/EnvironmentRedirectUrisApi.md +222 -0
  11. data/docs/FaydaProviderOutput.md +18 -0
  12. data/docs/Identifier.md +22 -0
  13. data/docs/IdentityData.md +5 -1
  14. data/docs/IntegrationStep.md +1 -1
  15. data/docs/KenyaNidBiometric2Input.md +22 -0
  16. data/docs/KenyaNidInput.md +1 -1
  17. data/docs/KenyaNidLookup2Input.md +18 -0
  18. data/docs/KenyaNidMatch2Input.md +28 -0
  19. data/docs/ListEnvironmentRedirectUrisResponse.md +20 -0
  20. data/docs/ListVerificationProfilesResponse.md +20 -0
  21. data/docs/MexicoCurpProviderOutput.md +18 -0
  22. data/docs/NigeriaNinInput.md +1 -1
  23. data/docs/PhilippinesDigitalNidProviderOutput.md +18 -0
  24. data/docs/PhilippinesPhysicalNidProviderOutput.md +18 -0
  25. data/docs/ProviderContract.md +2 -0
  26. data/docs/ProviderInput.md +8 -0
  27. data/docs/ProviderOutput.md +26 -0
  28. data/docs/RedirectUriResponse.md +20 -0
  29. data/docs/SexV1.md +15 -0
  30. data/docs/SouthAfricaNidInput.md +1 -1
  31. data/docs/SouthAfricaNidLookup2Input.md +18 -0
  32. data/docs/SpidBillingInformation.md +22 -0
  33. data/docs/SpidInput.md +3 -1
  34. data/docs/SpidProviderOutput.md +44 -0
  35. data/docs/VerificationProfileResponse.md +28 -0
  36. data/docs/VerificationProfilesApi.md +231 -0
  37. data/lib/trinsic_api/api/environment_redirect_uris_api.rb +228 -0
  38. data/lib/trinsic_api/api/verification_profiles_api.rb +273 -0
  39. data/lib/trinsic_api/models/add_redirect_uri_response.rb +237 -0
  40. data/lib/trinsic_api/models/attachment_access_keys.rb +11 -1
  41. data/lib/trinsic_api/models/contract_field.rb +28 -1
  42. data/lib/trinsic_api/models/contract_identifier_field.rb +315 -0
  43. data/lib/trinsic_api/models/create_verification_profile_response.rb +238 -0
  44. data/lib/trinsic_api/models/environment_redirect_uris_add_request.rb +237 -0
  45. data/lib/trinsic_api/models/fayda_provider_output.rb +222 -0
  46. data/lib/trinsic_api/models/identifier.rb +289 -0
  47. data/lib/trinsic_api/models/identity_data.rb +43 -5
  48. data/lib/trinsic_api/models/kenya_nid_biometric2_input.rb +246 -0
  49. data/lib/trinsic_api/models/kenya_nid_input.rb +1 -1
  50. data/lib/trinsic_api/models/kenya_nid_lookup2_input.rb +222 -0
  51. data/lib/trinsic_api/models/kenya_nid_match2_input.rb +299 -0
  52. data/lib/trinsic_api/models/list_environment_redirect_uris_response.rb +268 -0
  53. data/lib/trinsic_api/models/list_verification_profiles_response.rb +266 -0
  54. data/lib/trinsic_api/models/mexico_curp_provider_output.rb +222 -0
  55. data/lib/trinsic_api/models/nigeria_nin_input.rb +1 -1
  56. data/lib/trinsic_api/models/philippines_digital_nid_provider_output.rb +238 -0
  57. data/lib/trinsic_api/models/philippines_physical_nid_provider_output.rb +238 -0
  58. data/lib/trinsic_api/models/provider_contract.rb +14 -1
  59. data/lib/trinsic_api/models/provider_input.rb +45 -1
  60. data/lib/trinsic_api/models/provider_output.rb +261 -0
  61. data/lib/trinsic_api/models/redirect_uri_response.rb +263 -0
  62. data/lib/trinsic_api/models/sex_v1.rb +42 -0
  63. data/lib/trinsic_api/models/south_africa_nid_input.rb +1 -1
  64. data/lib/trinsic_api/models/south_africa_nid_lookup2_input.rb +222 -0
  65. data/lib/trinsic_api/models/spid_billing_information.rb +293 -0
  66. data/lib/trinsic_api/models/spid_input.rb +16 -5
  67. data/lib/trinsic_api/models/spid_provider_output.rb +397 -0
  68. data/lib/trinsic_api/models/verification_profile_response.rb +375 -0
  69. data/lib/trinsic_api/version.rb +1 -1
  70. data/lib/trinsic_api.rb +23 -0
  71. data/spec/api/environment_redirect_uris_api_spec.rb +72 -0
  72. data/spec/api/verification_profiles_api_spec.rb +76 -0
  73. data/spec/models/add_redirect_uri_response_spec.rb +36 -0
  74. data/spec/models/attachment_access_keys_spec.rb +6 -0
  75. data/spec/models/contract_field_spec.rb +6 -0
  76. data/spec/models/contract_identifier_field_spec.rb +48 -0
  77. data/spec/models/create_verification_profile_response_spec.rb +36 -0
  78. data/spec/models/environment_redirect_uris_add_request_spec.rb +36 -0
  79. data/spec/models/fayda_provider_output_spec.rb +36 -0
  80. data/spec/models/identifier_spec.rb +48 -0
  81. data/spec/models/identity_data_spec.rb +12 -0
  82. data/spec/models/kenya_nid_biometric2_input_spec.rb +48 -0
  83. data/spec/models/kenya_nid_lookup2_input_spec.rb +36 -0
  84. data/spec/models/kenya_nid_match2_input_spec.rb +66 -0
  85. data/spec/models/list_environment_redirect_uris_response_spec.rb +42 -0
  86. data/spec/models/list_verification_profiles_response_spec.rb +42 -0
  87. data/spec/models/mexico_curp_provider_output_spec.rb +36 -0
  88. data/spec/models/philippines_digital_nid_provider_output_spec.rb +36 -0
  89. data/spec/models/philippines_physical_nid_provider_output_spec.rb +36 -0
  90. data/spec/models/provider_contract_spec.rb +6 -0
  91. data/spec/models/provider_input_spec.rb +24 -0
  92. data/spec/models/provider_output_spec.rb +60 -0
  93. data/spec/models/redirect_uri_response_spec.rb +42 -0
  94. data/spec/models/sex_v1_spec.rb +30 -0
  95. data/spec/models/south_africa_nid_lookup2_input_spec.rb +36 -0
  96. data/spec/models/spid_billing_information_spec.rb +48 -0
  97. data/spec/models/spid_input_spec.rb +6 -0
  98. data/spec/models/spid_provider_output_spec.rb +114 -0
  99. data/spec/models/verification_profile_response_spec.rb +66 -0
  100. metadata +94 -2
@@ -0,0 +1,293 @@
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
+ # Billing information for a SPID Verification.
18
+ class SpidBillingInformation
19
+ # Whether this SPID verification has resulted in a billable event.
20
+ attr_accessor :is_billable
21
+
22
+ # The billable verification type for this SPID verification. Possible values: \"Authentication\" | \"Registration\"
23
+ attr_accessor :verification_type
24
+
25
+ # The billable verification level for this SPID verification. Possible values: 1 | 2 | 3
26
+ attr_accessor :verification_level
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'is_billable' => :'isBillable',
32
+ :'verification_type' => :'verificationType',
33
+ :'verification_level' => :'verificationLevel'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'is_billable' => :'Boolean',
51
+ :'verification_type' => :'String',
52
+ :'verification_level' => :'Integer'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::SpidBillingInformation` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::SpidBillingInformation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'is_billable')
79
+ self.is_billable = attributes[:'is_billable']
80
+ else
81
+ self.is_billable = nil
82
+ end
83
+
84
+ if attributes.key?(:'verification_type')
85
+ self.verification_type = attributes[:'verification_type']
86
+ else
87
+ self.verification_type = nil
88
+ end
89
+
90
+ if attributes.key?(:'verification_level')
91
+ self.verification_level = attributes[:'verification_level']
92
+ else
93
+ self.verification_level = nil
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @is_billable.nil?
103
+ invalid_properties.push('invalid value for "is_billable", is_billable cannot be nil.')
104
+ end
105
+
106
+ if @verification_type.nil?
107
+ invalid_properties.push('invalid value for "verification_type", verification_type cannot be nil.')
108
+ end
109
+
110
+ if @verification_level.nil?
111
+ invalid_properties.push('invalid value for "verification_level", verification_level cannot be nil.')
112
+ end
113
+
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
+ return false if @is_billable.nil?
122
+ return false if @verification_type.nil?
123
+ return false if @verification_level.nil?
124
+ true
125
+ end
126
+
127
+ # Custom attribute writer method with validation
128
+ # @param [Object] is_billable Value to be assigned
129
+ def is_billable=(is_billable)
130
+ if is_billable.nil?
131
+ fail ArgumentError, 'is_billable cannot be nil'
132
+ end
133
+
134
+ @is_billable = is_billable
135
+ end
136
+
137
+ # Custom attribute writer method with validation
138
+ # @param [Object] verification_type Value to be assigned
139
+ def verification_type=(verification_type)
140
+ if verification_type.nil?
141
+ fail ArgumentError, 'verification_type cannot be nil'
142
+ end
143
+
144
+ @verification_type = verification_type
145
+ end
146
+
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] verification_level Value to be assigned
149
+ def verification_level=(verification_level)
150
+ if verification_level.nil?
151
+ fail ArgumentError, 'verification_level cannot be nil'
152
+ end
153
+
154
+ @verification_level = verification_level
155
+ end
156
+
157
+ # Checks equality by comparing each attribute.
158
+ # @param [Object] Object to be compared
159
+ def ==(o)
160
+ return true if self.equal?(o)
161
+ self.class == o.class &&
162
+ is_billable == o.is_billable &&
163
+ verification_type == o.verification_type &&
164
+ verification_level == o.verification_level
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [is_billable, verification_type, verification_level].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ attributes = attributes.transform_keys(&:to_sym)
185
+ transformed_hash = {}
186
+ openapi_types.each_pair do |key, type|
187
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = nil
189
+ elsif type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[attribute_map[key]].is_a?(Array)
193
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
194
+ end
195
+ elsif !attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
197
+ end
198
+ end
199
+ new(transformed_hash)
200
+ end
201
+
202
+ # Deserializes the data based on type
203
+ # @param string type Data type
204
+ # @param string value Value to be deserialized
205
+ # @return [Object] Deserialized data
206
+ def self._deserialize(type, value)
207
+ case type.to_sym
208
+ when :Time
209
+ Time.parse(value)
210
+ when :Date
211
+ Date.parse(value)
212
+ when :String
213
+ value.to_s
214
+ when :Integer
215
+ value.to_i
216
+ when :Float
217
+ value.to_f
218
+ when :Boolean
219
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
220
+ true
221
+ else
222
+ false
223
+ end
224
+ when :Object
225
+ # generic object (usually a Hash), return directly
226
+ value
227
+ when /\AArray<(?<inner_type>.+)>\z/
228
+ inner_type = Regexp.last_match[:inner_type]
229
+ value.map { |v| _deserialize(inner_type, v) }
230
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
231
+ k_type = Regexp.last_match[:k_type]
232
+ v_type = Regexp.last_match[:v_type]
233
+ {}.tap do |hash|
234
+ value.each do |k, v|
235
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
236
+ end
237
+ end
238
+ else # model
239
+ # models (e.g. Pet) or oneOf
240
+ klass = TrinsicApi.const_get(type)
241
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
242
+ end
243
+ end
244
+
245
+ # Returns the string representation of the object
246
+ # @return [String] String presentation of the object
247
+ def to_s
248
+ to_hash.to_s
249
+ end
250
+
251
+ # to_body is an alias to to_hash (backward compatibility)
252
+ # @return [Hash] Returns the object in the form of hash
253
+ def to_body
254
+ to_hash
255
+ end
256
+
257
+ # Returns the object in the form of hash
258
+ # @return [Hash] Returns the object in the form of hash
259
+ def to_hash
260
+ hash = {}
261
+ self.class.attribute_map.each_pair do |attr, param|
262
+ value = self.send(attr)
263
+ if value.nil?
264
+ is_nullable = self.class.openapi_nullable.include?(attr)
265
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
266
+ end
267
+
268
+ hash[param] = _to_hash(value)
269
+ end
270
+ hash
271
+ end
272
+
273
+ # Outputs non-array value in the form of hash
274
+ # For object, use to_hash. Otherwise, just return the value
275
+ # @param [Object] value Any valid value
276
+ # @return [Hash] Returns the value in the form of hash
277
+ def _to_hash(value)
278
+ if value.is_a?(Array)
279
+ value.compact.map { |v| _to_hash(v) }
280
+ elsif value.is_a?(Hash)
281
+ {}.tap do |hash|
282
+ value.each { |k, v| hash[k] = _to_hash(v) }
283
+ end
284
+ elsif value.respond_to? :to_hash
285
+ value.to_hash
286
+ else
287
+ value
288
+ end
289
+ end
290
+
291
+ end
292
+
293
+ end
@@ -18,10 +18,14 @@ module TrinsicApi
18
18
  # The ID of the specific IDP to invoke within SPID. If not specified, the user will be prompted to select an IDP.
19
19
  attr_accessor :sub_provider_id
20
20
 
21
+ # Only applicable if period-based billing is enabled for your Verification Profile. Contact Trinsic to enable this. A secret UTF-8 string between 32 and 64 characters in length, used to enable privacy-preserving tracking of unique user verifications during a billing period. WARNING: This value must NOT change during the course of a billing period for a given Verification Profile, or double-billing may occur. If multiple Verification Profiles are configured to use the same Trinsic-managed SPID Service Provider, the same Billing Tracking Secret must be provided across all such Verification Profiles.
22
+ attr_accessor :billing_tracking_secret
23
+
21
24
  # Attribute mapping from ruby-style variable name to JSON key.
22
25
  def self.attribute_map
23
26
  {
24
- :'sub_provider_id' => :'subProviderId'
27
+ :'sub_provider_id' => :'subProviderId',
28
+ :'billing_tracking_secret' => :'billingTrackingSecret'
25
29
  }
26
30
  end
27
31
 
@@ -38,14 +42,16 @@ module TrinsicApi
38
42
  # Attribute type mapping.
39
43
  def self.openapi_types
40
44
  {
41
- :'sub_provider_id' => :'String'
45
+ :'sub_provider_id' => :'String',
46
+ :'billing_tracking_secret' => :'String'
42
47
  }
43
48
  end
44
49
 
45
50
  # List of attributes with nullable: true
46
51
  def self.openapi_nullable
47
52
  Set.new([
48
- :'sub_provider_id'
53
+ :'sub_provider_id',
54
+ :'billing_tracking_secret'
49
55
  ])
50
56
  end
51
57
 
@@ -68,6 +74,10 @@ module TrinsicApi
68
74
  if attributes.key?(:'sub_provider_id')
69
75
  self.sub_provider_id = attributes[:'sub_provider_id']
70
76
  end
77
+
78
+ if attributes.key?(:'billing_tracking_secret')
79
+ self.billing_tracking_secret = attributes[:'billing_tracking_secret']
80
+ end
71
81
  end
72
82
 
73
83
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -90,7 +100,8 @@ module TrinsicApi
90
100
  def ==(o)
91
101
  return true if self.equal?(o)
92
102
  self.class == o.class &&
93
- sub_provider_id == o.sub_provider_id
103
+ sub_provider_id == o.sub_provider_id &&
104
+ billing_tracking_secret == o.billing_tracking_secret
94
105
  end
95
106
 
96
107
  # @see the `==` method
@@ -102,7 +113,7 @@ module TrinsicApi
102
113
  # Calculates hash code according to all attributes.
103
114
  # @return [Integer] Hash code
104
115
  def hash
105
- [sub_provider_id].hash
116
+ [sub_provider_id, billing_tracking_secret].hash
106
117
  end
107
118
 
108
119
  # Builds the object from hash