onfido 6.2.0 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +1 -1
  4. data/lib/onfido/api/default_api.rb +413 -0
  5. data/lib/onfido/api_client.rb +6 -2
  6. data/lib/onfido/models/biometric_token.rb +265 -0
  7. data/lib/onfido/models/biometric_token_data.rb +317 -0
  8. data/lib/onfido/models/biometric_token_response.rb +237 -0
  9. data/lib/onfido/models/biometric_token_updater.rb +262 -0
  10. data/lib/onfido/models/biometric_tokens_response.rb +239 -0
  11. data/lib/onfido/models/document_types.rb +3 -1
  12. data/lib/onfido/models/invalidated_biometric_token_response.rb +237 -0
  13. data/lib/onfido/models/invalidated_biometric_token_summary.rb +238 -0
  14. data/lib/onfido/models/invalidated_biometric_token_summary_deleted_items.rb +239 -0
  15. data/lib/onfido/models/invalidated_biometric_tokens_response.rb +237 -0
  16. data/lib/onfido/models/updated_biometric_token_response.rb +237 -0
  17. data/lib/onfido/models/watchlist_mesh_added_mentions.rb +247 -0
  18. data/lib/onfido/models/watchlist_mesh_alert_risk.rb +323 -0
  19. data/lib/onfido/models/watchlist_mesh_alert_risk1.rb +316 -0
  20. data/lib/onfido/models/watchlist_mesh_associate.rb +231 -0
  21. data/lib/onfido/models/watchlist_mesh_date_value.rb +231 -0
  22. data/lib/onfido/models/watchlist_mesh_field.rb +241 -0
  23. data/lib/onfido/models/watchlist_mesh_image.rb +231 -0
  24. data/lib/onfido/models/watchlist_mesh_lists.rb +309 -0
  25. data/lib/onfido/models/watchlist_mesh_media.rb +261 -0
  26. data/lib/onfido/models/watchlist_mesh_name.rb +231 -0
  27. data/lib/onfido/models/watchlist_mesh_pep.rb +369 -0
  28. data/lib/onfido/models/watchlist_mesh_person.rb +283 -0
  29. data/lib/onfido/models/watchlist_mesh_profile.rb +273 -0
  30. data/lib/onfido/models/watchlist_mesh_risk_decision.rb +43 -0
  31. data/lib/onfido/models/watchlist_mesh_risk_detail.rb +255 -0
  32. data/lib/onfido/models/watchlist_mesh_risk_indicators.rb +271 -0
  33. data/lib/onfido/models/watchlist_mesh_sanctions.rb +309 -0
  34. data/lib/onfido/models/webhook.rb +11 -1
  35. data/lib/onfido/models/webhook_builder.rb +11 -1
  36. data/lib/onfido/models/webhook_create.rb +11 -1
  37. data/lib/onfido/models/webhook_response.rb +11 -1
  38. data/lib/onfido/models/webhook_update.rb +11 -1
  39. data/lib/onfido/models/webhook_updater.rb +11 -1
  40. data/lib/onfido/version.rb +1 -1
  41. data/lib/onfido.rb +27 -0
  42. data/spec/integrations/biometric_token_spec.rb +122 -0
  43. data/spec/integrations/document_spec.rb +8 -1
  44. data/spec/integrations/media/nfc_data.json +11768 -0
  45. data/spec/integrations/watchlist_alert_risk_spec.rb +66 -0
  46. data/spec/shared_contexts/with_document.rb +0 -1
  47. data/spec/spec_helper.rb +6 -7
  48. metadata +55 -22
@@ -0,0 +1,271 @@
1
+ =begin
2
+ #Onfido Public API v3.6
3
+
4
+ #The Onfido Public API (v3.6)
5
+
6
+ The version of the OpenAPI document: v3.6
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.16.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Onfido
17
+ class WatchlistMeshRiskIndicators
18
+ attr_accessor :aml_types
19
+
20
+ attr_accessor :lists
21
+
22
+ attr_accessor :media
23
+
24
+ attr_accessor :peps
25
+
26
+ attr_accessor :sanctions
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'aml_types' => :'aml_types',
32
+ :'lists' => :'lists',
33
+ :'media' => :'media',
34
+ :'peps' => :'peps',
35
+ :'sanctions' => :'sanctions'
36
+ }
37
+ end
38
+
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ acceptable_attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'aml_types' => :'Array<String>',
53
+ :'lists' => :'Array<WatchlistMeshLists>',
54
+ :'media' => :'Array<WatchlistMeshMedia>',
55
+ :'peps' => :'Array<WatchlistMeshPep>',
56
+ :'sanctions' => :'Array<WatchlistMeshSanctions>'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ :'aml_types',
64
+ :'lists',
65
+ :'media',
66
+ :'peps',
67
+ :'sanctions'
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 `Onfido::WatchlistMeshRiskIndicators` 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 `Onfido::WatchlistMeshRiskIndicators`. 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?(:'aml_types')
88
+ if (value = attributes[:'aml_types']).is_a?(Array)
89
+ self.aml_types = value
90
+ end
91
+ end
92
+
93
+ if attributes.key?(:'lists')
94
+ if (value = attributes[:'lists']).is_a?(Array)
95
+ self.lists = value
96
+ end
97
+ end
98
+
99
+ if attributes.key?(:'media')
100
+ if (value = attributes[:'media']).is_a?(Array)
101
+ self.media = value
102
+ end
103
+ end
104
+
105
+ if attributes.key?(:'peps')
106
+ if (value = attributes[:'peps']).is_a?(Array)
107
+ self.peps = value
108
+ end
109
+ end
110
+
111
+ if attributes.key?(:'sanctions')
112
+ if (value = attributes[:'sanctions']).is_a?(Array)
113
+ self.sanctions = value
114
+ end
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
+ invalid_properties
124
+ end
125
+
126
+ # Check to see if the all the properties in the model are valid
127
+ # @return true if the model is valid
128
+ def valid?
129
+ warn '[DEPRECATED] the `valid?` method is obsolete'
130
+ true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ aml_types == o.aml_types &&
139
+ lists == o.lists &&
140
+ media == o.media &&
141
+ peps == o.peps &&
142
+ sanctions == o.sanctions
143
+ end
144
+
145
+ # @see the `==` method
146
+ # @param [Object] Object to be compared
147
+ def eql?(o)
148
+ self == o
149
+ end
150
+
151
+ # Calculates hash code according to all attributes.
152
+ # @return [Integer] Hash code
153
+ def hash
154
+ [aml_types, lists, media, peps, sanctions].hash
155
+ end
156
+
157
+ # Builds the object from hash
158
+ # @param [Hash] attributes Model attributes in the form of hash
159
+ # @return [Object] Returns the model itself
160
+ def self.build_from_hash(attributes)
161
+ return nil unless attributes.is_a?(Hash)
162
+ attributes = attributes.transform_keys(&:to_sym)
163
+ transformed_hash = {}
164
+ openapi_types.each_pair do |key, type|
165
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = nil
167
+ elsif type =~ /\AArray<(.*)>/i
168
+ # check to ensure the input is an array given that the attribute
169
+ # is documented as an array but the input is not
170
+ if attributes[attribute_map[key]].is_a?(Array)
171
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
172
+ end
173
+ elsif !attributes[attribute_map[key]].nil?
174
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
175
+ end
176
+ end
177
+ new(transformed_hash)
178
+ end
179
+
180
+ # Deserializes the data based on type
181
+ # @param string type Data type
182
+ # @param string value Value to be deserialized
183
+ # @return [Object] Deserialized data
184
+ def self._deserialize(type, value)
185
+ case type.to_sym
186
+ when :Time
187
+ Time.parse(value)
188
+ when :Date
189
+ Date.parse(value)
190
+ when :String
191
+ value.to_s
192
+ when :Integer
193
+ value.to_i
194
+ when :Float
195
+ value.to_f
196
+ when :Boolean
197
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
198
+ true
199
+ else
200
+ false
201
+ end
202
+ when :Object
203
+ # generic object (usually a Hash), return directly
204
+ value
205
+ when /\AArray<(?<inner_type>.+)>\z/
206
+ inner_type = Regexp.last_match[:inner_type]
207
+ value.map { |v| _deserialize(inner_type, v) }
208
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
209
+ k_type = Regexp.last_match[:k_type]
210
+ v_type = Regexp.last_match[:v_type]
211
+ {}.tap do |hash|
212
+ value.each do |k, v|
213
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
214
+ end
215
+ end
216
+ else # model
217
+ # models (e.g. Pet) or oneOf
218
+ klass = Onfido.const_get(type)
219
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
220
+ end
221
+ end
222
+
223
+ # Returns the string representation of the object
224
+ # @return [String] String presentation of the object
225
+ def to_s
226
+ to_hash.to_s
227
+ end
228
+
229
+ # to_body is an alias to to_hash (backward compatibility)
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_body
232
+ to_hash
233
+ end
234
+
235
+ # Returns the object in the form of hash
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_hash
238
+ hash = {}
239
+ self.class.attribute_map.each_pair do |attr, param|
240
+ value = self.send(attr)
241
+ if value.nil?
242
+ is_nullable = self.class.openapi_nullable.include?(attr)
243
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
244
+ end
245
+
246
+ hash[param] = _to_hash(value)
247
+ end
248
+ hash
249
+ end
250
+
251
+ # Outputs non-array value in the form of hash
252
+ # For object, use to_hash. Otherwise, just return the value
253
+ # @param [Object] value Any valid value
254
+ # @return [Hash] Returns the value in the form of hash
255
+ def _to_hash(value)
256
+ if value.is_a?(Array)
257
+ value.compact.map { |v| _to_hash(v) }
258
+ elsif value.is_a?(Hash)
259
+ {}.tap do |hash|
260
+ value.each { |k, v| hash[k] = _to_hash(v) }
261
+ end
262
+ elsif value.respond_to? :to_hash
263
+ value.to_hash
264
+ else
265
+ value
266
+ end
267
+ end
268
+
269
+ end
270
+
271
+ end
@@ -0,0 +1,309 @@
1
+ =begin
2
+ #Onfido Public API v3.6
3
+
4
+ #The Onfido Public API (v3.6)
5
+
6
+ The version of the OpenAPI document: v3.6
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.16.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Onfido
17
+ class WatchlistMeshSanctions
18
+ attr_accessor :aml_types
19
+
20
+ attr_accessor :country_codes
21
+
22
+ attr_accessor :fields
23
+
24
+ attr_accessor :identifier
25
+
26
+ attr_accessor :listing_ended_utc
27
+
28
+ attr_accessor :listing_started_utc
29
+
30
+ attr_accessor :name
31
+
32
+ attr_accessor :related_urls
33
+
34
+ attr_accessor :url
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'aml_types' => :'aml_types',
40
+ :'country_codes' => :'country_codes',
41
+ :'fields' => :'fields',
42
+ :'identifier' => :'identifier',
43
+ :'listing_ended_utc' => :'listing_ended_utc',
44
+ :'listing_started_utc' => :'listing_started_utc',
45
+ :'name' => :'name',
46
+ :'related_urls' => :'related_urls',
47
+ :'url' => :'url'
48
+ }
49
+ end
50
+
51
+ # Returns attribute mapping this model knows about
52
+ def self.acceptable_attribute_map
53
+ attribute_map
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ acceptable_attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'aml_types' => :'Array<String>',
65
+ :'country_codes' => :'Array<String>',
66
+ :'fields' => :'Array<WatchlistMeshField>',
67
+ :'identifier' => :'String',
68
+ :'listing_ended_utc' => :'String',
69
+ :'listing_started_utc' => :'String',
70
+ :'name' => :'String',
71
+ :'related_urls' => :'Array<String>',
72
+ :'url' => :'String'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ :'aml_types',
80
+ :'country_codes',
81
+ :'fields',
82
+ :'identifier',
83
+ :'listing_ended_utc',
84
+ :'listing_started_utc',
85
+ :'name',
86
+ :'related_urls',
87
+ :'url'
88
+ ])
89
+ end
90
+
91
+ # Initializes the object
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ def initialize(attributes = {})
94
+ if (!attributes.is_a?(Hash))
95
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::WatchlistMeshSanctions` initialize method"
96
+ end
97
+
98
+ # check to see if the attribute exists and convert string to symbol for hash key
99
+ acceptable_attribute_map = self.class.acceptable_attribute_map
100
+ attributes = attributes.each_with_object({}) { |(k, v), h|
101
+ if (!acceptable_attribute_map.key?(k.to_sym))
102
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::WatchlistMeshSanctions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
103
+ end
104
+ h[k.to_sym] = v
105
+ }
106
+
107
+ if attributes.key?(:'aml_types')
108
+ if (value = attributes[:'aml_types']).is_a?(Array)
109
+ self.aml_types = value
110
+ end
111
+ end
112
+
113
+ if attributes.key?(:'country_codes')
114
+ if (value = attributes[:'country_codes']).is_a?(Array)
115
+ self.country_codes = value
116
+ end
117
+ end
118
+
119
+ if attributes.key?(:'fields')
120
+ if (value = attributes[:'fields']).is_a?(Array)
121
+ self.fields = value
122
+ end
123
+ end
124
+
125
+ if attributes.key?(:'identifier')
126
+ self.identifier = attributes[:'identifier']
127
+ end
128
+
129
+ if attributes.key?(:'listing_ended_utc')
130
+ self.listing_ended_utc = attributes[:'listing_ended_utc']
131
+ end
132
+
133
+ if attributes.key?(:'listing_started_utc')
134
+ self.listing_started_utc = attributes[:'listing_started_utc']
135
+ end
136
+
137
+ if attributes.key?(:'name')
138
+ self.name = attributes[:'name']
139
+ end
140
+
141
+ if attributes.key?(:'related_urls')
142
+ if (value = attributes[:'related_urls']).is_a?(Array)
143
+ self.related_urls = value
144
+ end
145
+ end
146
+
147
+ if attributes.key?(:'url')
148
+ self.url = attributes[:'url']
149
+ end
150
+ end
151
+
152
+ # Show invalid properties with the reasons. Usually used together with valid?
153
+ # @return Array for valid properties with the reasons
154
+ def list_invalid_properties
155
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
156
+ invalid_properties = Array.new
157
+ invalid_properties
158
+ end
159
+
160
+ # Check to see if the all the properties in the model are valid
161
+ # @return true if the model is valid
162
+ def valid?
163
+ warn '[DEPRECATED] the `valid?` method is obsolete'
164
+ true
165
+ end
166
+
167
+ # Checks equality by comparing each attribute.
168
+ # @param [Object] Object to be compared
169
+ def ==(o)
170
+ return true if self.equal?(o)
171
+ self.class == o.class &&
172
+ aml_types == o.aml_types &&
173
+ country_codes == o.country_codes &&
174
+ fields == o.fields &&
175
+ identifier == o.identifier &&
176
+ listing_ended_utc == o.listing_ended_utc &&
177
+ listing_started_utc == o.listing_started_utc &&
178
+ name == o.name &&
179
+ related_urls == o.related_urls &&
180
+ url == o.url
181
+ end
182
+
183
+ # @see the `==` method
184
+ # @param [Object] Object to be compared
185
+ def eql?(o)
186
+ self == o
187
+ end
188
+
189
+ # Calculates hash code according to all attributes.
190
+ # @return [Integer] Hash code
191
+ def hash
192
+ [aml_types, country_codes, fields, identifier, listing_ended_utc, listing_started_utc, name, related_urls, url].hash
193
+ end
194
+
195
+ # Builds the object from hash
196
+ # @param [Hash] attributes Model attributes in the form of hash
197
+ # @return [Object] Returns the model itself
198
+ def self.build_from_hash(attributes)
199
+ return nil unless attributes.is_a?(Hash)
200
+ attributes = attributes.transform_keys(&:to_sym)
201
+ transformed_hash = {}
202
+ openapi_types.each_pair do |key, type|
203
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
204
+ transformed_hash["#{key}"] = nil
205
+ elsif type =~ /\AArray<(.*)>/i
206
+ # check to ensure the input is an array given that the attribute
207
+ # is documented as an array but the input is not
208
+ if attributes[attribute_map[key]].is_a?(Array)
209
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
210
+ end
211
+ elsif !attributes[attribute_map[key]].nil?
212
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
213
+ end
214
+ end
215
+ new(transformed_hash)
216
+ end
217
+
218
+ # Deserializes the data based on type
219
+ # @param string type Data type
220
+ # @param string value Value to be deserialized
221
+ # @return [Object] Deserialized data
222
+ def self._deserialize(type, value)
223
+ case type.to_sym
224
+ when :Time
225
+ Time.parse(value)
226
+ when :Date
227
+ Date.parse(value)
228
+ when :String
229
+ value.to_s
230
+ when :Integer
231
+ value.to_i
232
+ when :Float
233
+ value.to_f
234
+ when :Boolean
235
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
236
+ true
237
+ else
238
+ false
239
+ end
240
+ when :Object
241
+ # generic object (usually a Hash), return directly
242
+ value
243
+ when /\AArray<(?<inner_type>.+)>\z/
244
+ inner_type = Regexp.last_match[:inner_type]
245
+ value.map { |v| _deserialize(inner_type, v) }
246
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
247
+ k_type = Regexp.last_match[:k_type]
248
+ v_type = Regexp.last_match[:v_type]
249
+ {}.tap do |hash|
250
+ value.each do |k, v|
251
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
252
+ end
253
+ end
254
+ else # model
255
+ # models (e.g. Pet) or oneOf
256
+ klass = Onfido.const_get(type)
257
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
258
+ end
259
+ end
260
+
261
+ # Returns the string representation of the object
262
+ # @return [String] String presentation of the object
263
+ def to_s
264
+ to_hash.to_s
265
+ end
266
+
267
+ # to_body is an alias to to_hash (backward compatibility)
268
+ # @return [Hash] Returns the object in the form of hash
269
+ def to_body
270
+ to_hash
271
+ end
272
+
273
+ # Returns the object in the form of hash
274
+ # @return [Hash] Returns the object in the form of hash
275
+ def to_hash
276
+ hash = {}
277
+ self.class.attribute_map.each_pair do |attr, param|
278
+ value = self.send(attr)
279
+ if value.nil?
280
+ is_nullable = self.class.openapi_nullable.include?(attr)
281
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
282
+ end
283
+
284
+ hash[param] = _to_hash(value)
285
+ end
286
+ hash
287
+ end
288
+
289
+ # Outputs non-array value in the form of hash
290
+ # For object, use to_hash. Otherwise, just return the value
291
+ # @param [Object] value Any valid value
292
+ # @return [Hash] Returns the value in the form of hash
293
+ def _to_hash(value)
294
+ if value.is_a?(Array)
295
+ value.compact.map { |v| _to_hash(v) }
296
+ elsif value.is_a?(Hash)
297
+ {}.tap do |hash|
298
+ value.each { |k, v| hash[k] = _to_hash(v) }
299
+ end
300
+ elsif value.respond_to? :to_hash
301
+ value.to_hash
302
+ else
303
+ value
304
+ end
305
+ end
306
+
307
+ end
308
+
309
+ end
@@ -45,6 +45,9 @@ module Onfido
45
45
  # The unique identifier of the webhook.
46
46
  attr_accessor :id
47
47
 
48
+ # Name of the webhook.
49
+ attr_accessor :name
50
+
48
51
  # The url that will listen to notifications (must be https).
49
52
  attr_accessor :url
50
53
 
@@ -67,6 +70,7 @@ module Onfido
67
70
  :'oauth_server_client_secret' => :'oauth_server_client_secret',
68
71
  :'oauth_server_scope' => :'oauth_server_scope',
69
72
  :'id' => :'id',
73
+ :'name' => :'name',
70
74
  :'url' => :'url',
71
75
  :'token' => :'token',
72
76
  :'href' => :'href'
@@ -96,6 +100,7 @@ module Onfido
96
100
  :'oauth_server_client_secret' => :'String',
97
101
  :'oauth_server_scope' => :'String',
98
102
  :'id' => :'String',
103
+ :'name' => :'String',
99
104
  :'url' => :'String',
100
105
  :'token' => :'String',
101
106
  :'href' => :'String'
@@ -178,6 +183,10 @@ module Onfido
178
183
  self.id = nil
179
184
  end
180
185
 
186
+ if attributes.key?(:'name')
187
+ self.name = attributes[:'name']
188
+ end
189
+
181
190
  if attributes.key?(:'url')
182
191
  self.url = attributes[:'url']
183
192
  end
@@ -236,6 +245,7 @@ module Onfido
236
245
  oauth_server_client_secret == o.oauth_server_client_secret &&
237
246
  oauth_server_scope == o.oauth_server_scope &&
238
247
  id == o.id &&
248
+ name == o.name &&
239
249
  url == o.url &&
240
250
  token == o.token &&
241
251
  href == o.href
@@ -250,7 +260,7 @@ module Onfido
250
260
  # Calculates hash code according to all attributes.
251
261
  # @return [Integer] Hash code
252
262
  def hash
253
- [enabled, events, environments, payload_version, oauth_enabled, oauth_server_url, oauth_server_client_id, oauth_server_client_secret, oauth_server_scope, id, url, token, href].hash
263
+ [enabled, events, environments, payload_version, oauth_enabled, oauth_server_url, oauth_server_client_id, oauth_server_client_secret, oauth_server_scope, id, name, url, token, href].hash
254
264
  end
255
265
 
256
266
  # Builds the object from hash
@@ -42,6 +42,9 @@ module Onfido
42
42
  # The scopes to be sent when requesting the access token.
43
43
  attr_accessor :oauth_server_scope
44
44
 
45
+ # Name of the webhook.
46
+ attr_accessor :name
47
+
45
48
  # The url that will listen to notifications (must be https).
46
49
  attr_accessor :url
47
50
 
@@ -57,6 +60,7 @@ module Onfido
57
60
  :'oauth_server_client_id' => :'oauth_server_client_id',
58
61
  :'oauth_server_client_secret' => :'oauth_server_client_secret',
59
62
  :'oauth_server_scope' => :'oauth_server_scope',
63
+ :'name' => :'name',
60
64
  :'url' => :'url'
61
65
  }
62
66
  end
@@ -83,6 +87,7 @@ module Onfido
83
87
  :'oauth_server_client_id' => :'String',
84
88
  :'oauth_server_client_secret' => :'String',
85
89
  :'oauth_server_scope' => :'String',
90
+ :'name' => :'String',
86
91
  :'url' => :'String'
87
92
  }
88
93
  end
@@ -157,6 +162,10 @@ module Onfido
157
162
  self.oauth_server_scope = attributes[:'oauth_server_scope']
158
163
  end
159
164
 
165
+ if attributes.key?(:'name')
166
+ self.name = attributes[:'name']
167
+ end
168
+
160
169
  if attributes.key?(:'url')
161
170
  self.url = attributes[:'url']
162
171
  else
@@ -208,6 +217,7 @@ module Onfido
208
217
  oauth_server_client_id == o.oauth_server_client_id &&
209
218
  oauth_server_client_secret == o.oauth_server_client_secret &&
210
219
  oauth_server_scope == o.oauth_server_scope &&
220
+ name == o.name &&
211
221
  url == o.url
212
222
  end
213
223
 
@@ -220,7 +230,7 @@ module Onfido
220
230
  # Calculates hash code according to all attributes.
221
231
  # @return [Integer] Hash code
222
232
  def hash
223
- [enabled, events, environments, payload_version, oauth_enabled, oauth_server_url, oauth_server_client_id, oauth_server_client_secret, oauth_server_scope, url].hash
233
+ [enabled, events, environments, payload_version, oauth_enabled, oauth_server_url, oauth_server_client_id, oauth_server_client_secret, oauth_server_scope, name, url].hash
224
234
  end
225
235
 
226
236
  # Builds the object from hash