onfido 5.0.0 → 5.1.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.
@@ -0,0 +1,232 @@
1
+ =begin
2
+ #Onfido API v3.6
3
+
4
+ #The Onfido 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.11.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Onfido
17
+ class DeviceIntelligenceProperties
18
+ attr_accessor :device
19
+
20
+ attr_accessor :ip
21
+
22
+ attr_accessor :geolocation
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'device' => :'device',
28
+ :'ip' => :'ip',
29
+ :'geolocation' => :'geolocation'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'device' => :'DeviceIntelligenceBreakdownPropertiesDevice',
42
+ :'ip' => :'DeviceIntelligenceBreakdownPropertiesIp',
43
+ :'geolocation' => :'DeviceIntelligenceBreakdownPropertiesGeolocation'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::DeviceIntelligenceProperties` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::DeviceIntelligenceProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'device')
69
+ self.device = attributes[:'device']
70
+ end
71
+
72
+ if attributes.key?(:'ip')
73
+ self.ip = attributes[:'ip']
74
+ end
75
+
76
+ if attributes.key?(:'geolocation')
77
+ self.geolocation = attributes[:'geolocation']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ device == o.device &&
102
+ ip == o.ip &&
103
+ geolocation == o.geolocation
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [device, ip, geolocation].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ attributes = attributes.transform_keys(&:to_sym)
124
+ transformed_hash = {}
125
+ openapi_types.each_pair do |key, type|
126
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = nil
128
+ elsif type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[attribute_map[key]].is_a?(Array)
132
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
133
+ end
134
+ elsif !attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
136
+ end
137
+ end
138
+ new(transformed_hash)
139
+ end
140
+
141
+ # Deserializes the data based on type
142
+ # @param string type Data type
143
+ # @param string value Value to be deserialized
144
+ # @return [Object] Deserialized data
145
+ def self._deserialize(type, value)
146
+ case type.to_sym
147
+ when :Time
148
+ Time.parse(value)
149
+ when :Date
150
+ Date.parse(value)
151
+ when :String
152
+ value.to_s
153
+ when :Integer
154
+ value.to_i
155
+ when :Float
156
+ value.to_f
157
+ when :Boolean
158
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
+ true
160
+ else
161
+ false
162
+ end
163
+ when :Object
164
+ # generic object (usually a Hash), return directly
165
+ value
166
+ when /\AArray<(?<inner_type>.+)>\z/
167
+ inner_type = Regexp.last_match[:inner_type]
168
+ value.map { |v| _deserialize(inner_type, v) }
169
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
+ k_type = Regexp.last_match[:k_type]
171
+ v_type = Regexp.last_match[:v_type]
172
+ {}.tap do |hash|
173
+ value.each do |k, v|
174
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
+ end
176
+ end
177
+ else # model
178
+ # models (e.g. Pet) or oneOf
179
+ klass = Onfido.const_get(type)
180
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
181
+ end
182
+ end
183
+
184
+ # Returns the string representation of the object
185
+ # @return [String] String presentation of the object
186
+ def to_s
187
+ to_hash.to_s
188
+ end
189
+
190
+ # to_body is an alias to to_hash (backward compatibility)
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_body
193
+ to_hash
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ # Outputs non-array value in the form of hash
213
+ # For object, use to_hash. Otherwise, just return the value
214
+ # @param [Object] value Any valid value
215
+ # @return [Hash] Returns the value in the form of hash
216
+ def _to_hash(value)
217
+ if value.is_a?(Array)
218
+ value.compact.map { |v| _to_hash(v) }
219
+ elsif value.is_a?(Hash)
220
+ {}.tap do |hash|
221
+ value.each { |k, v| hash[k] = _to_hash(v) }
222
+ end
223
+ elsif value.respond_to? :to_hash
224
+ value.to_hash
225
+ else
226
+ value
227
+ end
228
+ end
229
+
230
+ end
231
+
232
+ end
@@ -37,6 +37,8 @@ module Onfido
37
37
 
38
38
  attr_accessor :breakdown
39
39
 
40
+ attr_accessor :properties
41
+
40
42
  class EnumAttributeValidator
41
43
  attr_reader :datatype
42
44
  attr_reader :allowable_values
@@ -70,7 +72,8 @@ module Onfido
70
72
  :'sub_result' => :'sub_result',
71
73
  :'check_id' => :'check_id',
72
74
  :'name' => :'name',
73
- :'breakdown' => :'breakdown'
75
+ :'breakdown' => :'breakdown',
76
+ :'properties' => :'properties'
74
77
  }
75
78
  end
76
79
 
@@ -90,7 +93,8 @@ module Onfido
90
93
  :'sub_result' => :'ReportSubResult',
91
94
  :'check_id' => :'String',
92
95
  :'name' => :'ReportName',
93
- :'breakdown' => :'DeviceIntelligenceBreakdown'
96
+ :'breakdown' => :'DeviceIntelligenceBreakdown',
97
+ :'properties' => :'DeviceIntelligenceProperties'
94
98
  }
95
99
  end
96
100
 
@@ -161,6 +165,10 @@ module Onfido
161
165
  if attributes.key?(:'breakdown')
162
166
  self.breakdown = attributes[:'breakdown']
163
167
  end
168
+
169
+ if attributes.key?(:'properties')
170
+ self.properties = attributes[:'properties']
171
+ end
164
172
  end
165
173
 
166
174
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -201,7 +209,8 @@ module Onfido
201
209
  sub_result == o.sub_result &&
202
210
  check_id == o.check_id &&
203
211
  name == o.name &&
204
- breakdown == o.breakdown
212
+ breakdown == o.breakdown &&
213
+ properties == o.properties
205
214
  end
206
215
 
207
216
  # @see the `==` method
@@ -213,7 +222,7 @@ module Onfido
213
222
  # Calculates hash code according to all attributes.
214
223
  # @return [Integer] Hash code
215
224
  def hash
216
- [id, created_at, href, status, result, sub_result, check_id, name, breakdown].hash
225
+ [id, created_at, href, status, result, sub_result, check_id, name, breakdown, properties].hash
217
226
  end
218
227
 
219
228
  # Builds the object from hash
@@ -228,7 +228,7 @@ module Onfido
228
228
  :'address_lines' => :'DocumentPropertiesAddressLines',
229
229
  :'barcode' => :'Array<DocumentPropertiesBarcodeInner>',
230
230
  :'nfc' => :'DocumentPropertiesNfc',
231
- :'driving_licence_information' => :'DocumentPropertiesDrivingLicenceInformation',
231
+ :'driving_licence_information' => :'Array<DocumentPropertiesDrivingLicenceInformationItem>',
232
232
  :'document_classification' => :'DocumentPropertiesDocumentClassification',
233
233
  :'extracted_data' => :'DocumentPropertiesExtractedData'
234
234
  }
@@ -428,7 +428,9 @@ module Onfido
428
428
  end
429
429
 
430
430
  if attributes.key?(:'driving_licence_information')
431
- self.driving_licence_information = attributes[:'driving_licence_information']
431
+ if (value = attributes[:'driving_licence_information']).is_a?(Array)
432
+ self.driving_licence_information = value
433
+ end
432
434
  end
433
435
 
434
436
  if attributes.key?(:'document_classification')
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Onfido
17
- class DocumentPropertiesDrivingLicenceInformation
17
+ class DocumentPropertiesDrivingLicenceInformationItem
18
18
  attr_accessor :category
19
19
 
20
20
  attr_accessor :obtainment_date
@@ -58,13 +58,13 @@ module Onfido
58
58
  # @param [Hash] attributes Model attributes in the form of hash
59
59
  def initialize(attributes = {})
60
60
  if (!attributes.is_a?(Hash))
61
- fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::DocumentPropertiesDrivingLicenceInformation` initialize method"
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::DocumentPropertiesDrivingLicenceInformationItem` initialize method"
62
62
  end
63
63
 
64
64
  # check to see if the attribute exists and convert string to symbol for hash key
65
65
  attributes = attributes.each_with_object({}) { |(k, v), h|
66
66
  if (!self.class.attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::DocumentPropertiesDrivingLicenceInformation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::DocumentPropertiesDrivingLicenceInformationItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
68
  end
69
69
  h[k.to_sym] = v
70
70
  }
@@ -251,7 +251,7 @@ module Onfido
251
251
  :'address_lines' => :'DocumentPropertiesAddressLines',
252
252
  :'barcode' => :'Array<DocumentPropertiesBarcodeInner>',
253
253
  :'nfc' => :'DocumentPropertiesNfc',
254
- :'driving_licence_information' => :'DocumentPropertiesDrivingLicenceInformation',
254
+ :'driving_licence_information' => :'Array<DocumentPropertiesDrivingLicenceInformationItem>',
255
255
  :'document_classification' => :'DocumentPropertiesDocumentClassification',
256
256
  :'extracted_data' => :'DocumentPropertiesExtractedData',
257
257
  :'drivers_licence' => :'Boolean',
@@ -464,7 +464,9 @@ module Onfido
464
464
  end
465
465
 
466
466
  if attributes.key?(:'driving_licence_information')
467
- self.driving_licence_information = attributes[:'driving_licence_information']
467
+ if (value = attributes[:'driving_licence_information']).is_a?(Array)
468
+ self.driving_licence_information = value
469
+ end
468
470
  end
469
471
 
470
472
  if attributes.key?(:'document_classification')
@@ -27,6 +27,21 @@ module Onfido
27
27
  # Webhook version used to control the payload object when sending webhooks.
28
28
  attr_accessor :payload_version
29
29
 
30
+ # Determines if the webhook will fetch OAuth access tokens to send in the Authorization header.
31
+ attr_accessor :oauth_enabled
32
+
33
+ # The url to fetch the OAuth access token using client credentials grant.
34
+ attr_accessor :oauth_server_url
35
+
36
+ # The client id to authenticate the client credentials grant.
37
+ attr_accessor :oauth_server_client_id
38
+
39
+ # The client secret to authenticate the client credentials grant.
40
+ attr_accessor :oauth_server_client_secret
41
+
42
+ # The scopes to be sent when requesting the access token.
43
+ attr_accessor :oauth_server_scope
44
+
30
45
  # The unique identifier of the webhook.
31
46
  attr_accessor :id
32
47
 
@@ -46,6 +61,11 @@ module Onfido
46
61
  :'events' => :'events',
47
62
  :'environments' => :'environments',
48
63
  :'payload_version' => :'payload_version',
64
+ :'oauth_enabled' => :'oauth_enabled',
65
+ :'oauth_server_url' => :'oauth_server_url',
66
+ :'oauth_server_client_id' => :'oauth_server_client_id',
67
+ :'oauth_server_client_secret' => :'oauth_server_client_secret',
68
+ :'oauth_server_scope' => :'oauth_server_scope',
49
69
  :'id' => :'id',
50
70
  :'url' => :'url',
51
71
  :'token' => :'token',
@@ -65,6 +85,11 @@ module Onfido
65
85
  :'events' => :'Array<WebhookEventType>',
66
86
  :'environments' => :'Array<String>',
67
87
  :'payload_version' => :'Integer',
88
+ :'oauth_enabled' => :'Boolean',
89
+ :'oauth_server_url' => :'String',
90
+ :'oauth_server_client_id' => :'String',
91
+ :'oauth_server_client_secret' => :'String',
92
+ :'oauth_server_scope' => :'String',
68
93
  :'id' => :'String',
69
94
  :'url' => :'String',
70
95
  :'token' => :'String',
@@ -121,6 +146,26 @@ module Onfido
121
146
  self.payload_version = attributes[:'payload_version']
122
147
  end
123
148
 
149
+ if attributes.key?(:'oauth_enabled')
150
+ self.oauth_enabled = attributes[:'oauth_enabled']
151
+ end
152
+
153
+ if attributes.key?(:'oauth_server_url')
154
+ self.oauth_server_url = attributes[:'oauth_server_url']
155
+ end
156
+
157
+ if attributes.key?(:'oauth_server_client_id')
158
+ self.oauth_server_client_id = attributes[:'oauth_server_client_id']
159
+ end
160
+
161
+ if attributes.key?(:'oauth_server_client_secret')
162
+ self.oauth_server_client_secret = attributes[:'oauth_server_client_secret']
163
+ end
164
+
165
+ if attributes.key?(:'oauth_server_scope')
166
+ self.oauth_server_scope = attributes[:'oauth_server_scope']
167
+ end
168
+
124
169
  if attributes.key?(:'id')
125
170
  self.id = attributes[:'id']
126
171
  else
@@ -169,6 +214,11 @@ module Onfido
169
214
  events == o.events &&
170
215
  environments == o.environments &&
171
216
  payload_version == o.payload_version &&
217
+ oauth_enabled == o.oauth_enabled &&
218
+ oauth_server_url == o.oauth_server_url &&
219
+ oauth_server_client_id == o.oauth_server_client_id &&
220
+ oauth_server_client_secret == o.oauth_server_client_secret &&
221
+ oauth_server_scope == o.oauth_server_scope &&
172
222
  id == o.id &&
173
223
  url == o.url &&
174
224
  token == o.token &&
@@ -184,7 +234,7 @@ module Onfido
184
234
  # Calculates hash code according to all attributes.
185
235
  # @return [Integer] Hash code
186
236
  def hash
187
- [enabled, events, environments, payload_version, id, url, token, href].hash
237
+ [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
188
238
  end
189
239
 
190
240
  # Builds the object from hash
@@ -27,6 +27,21 @@ module Onfido
27
27
  # Webhook version used to control the payload object when sending webhooks.
28
28
  attr_accessor :payload_version
29
29
 
30
+ # Determines if the webhook will fetch OAuth access tokens to send in the Authorization header.
31
+ attr_accessor :oauth_enabled
32
+
33
+ # The url to fetch the OAuth access token using client credentials grant.
34
+ attr_accessor :oauth_server_url
35
+
36
+ # The client id to authenticate the client credentials grant.
37
+ attr_accessor :oauth_server_client_id
38
+
39
+ # The client secret to authenticate the client credentials grant.
40
+ attr_accessor :oauth_server_client_secret
41
+
42
+ # The scopes to be sent when requesting the access token.
43
+ attr_accessor :oauth_server_scope
44
+
30
45
  # The url that will listen to notifications (must be https).
31
46
  attr_accessor :url
32
47
 
@@ -37,6 +52,11 @@ module Onfido
37
52
  :'events' => :'events',
38
53
  :'environments' => :'environments',
39
54
  :'payload_version' => :'payload_version',
55
+ :'oauth_enabled' => :'oauth_enabled',
56
+ :'oauth_server_url' => :'oauth_server_url',
57
+ :'oauth_server_client_id' => :'oauth_server_client_id',
58
+ :'oauth_server_client_secret' => :'oauth_server_client_secret',
59
+ :'oauth_server_scope' => :'oauth_server_scope',
40
60
  :'url' => :'url'
41
61
  }
42
62
  end
@@ -53,6 +73,11 @@ module Onfido
53
73
  :'events' => :'Array<WebhookEventType>',
54
74
  :'environments' => :'Array<String>',
55
75
  :'payload_version' => :'Integer',
76
+ :'oauth_enabled' => :'Boolean',
77
+ :'oauth_server_url' => :'String',
78
+ :'oauth_server_client_id' => :'String',
79
+ :'oauth_server_client_secret' => :'String',
80
+ :'oauth_server_scope' => :'String',
56
81
  :'url' => :'String'
57
82
  }
58
83
  end
@@ -106,6 +131,26 @@ module Onfido
106
131
  self.payload_version = attributes[:'payload_version']
107
132
  end
108
133
 
134
+ if attributes.key?(:'oauth_enabled')
135
+ self.oauth_enabled = attributes[:'oauth_enabled']
136
+ end
137
+
138
+ if attributes.key?(:'oauth_server_url')
139
+ self.oauth_server_url = attributes[:'oauth_server_url']
140
+ end
141
+
142
+ if attributes.key?(:'oauth_server_client_id')
143
+ self.oauth_server_client_id = attributes[:'oauth_server_client_id']
144
+ end
145
+
146
+ if attributes.key?(:'oauth_server_client_secret')
147
+ self.oauth_server_client_secret = attributes[:'oauth_server_client_secret']
148
+ end
149
+
150
+ if attributes.key?(:'oauth_server_scope')
151
+ self.oauth_server_scope = attributes[:'oauth_server_scope']
152
+ end
153
+
109
154
  if attributes.key?(:'url')
110
155
  self.url = attributes[:'url']
111
156
  else
@@ -142,6 +187,11 @@ module Onfido
142
187
  events == o.events &&
143
188
  environments == o.environments &&
144
189
  payload_version == o.payload_version &&
190
+ oauth_enabled == o.oauth_enabled &&
191
+ oauth_server_url == o.oauth_server_url &&
192
+ oauth_server_client_id == o.oauth_server_client_id &&
193
+ oauth_server_client_secret == o.oauth_server_client_secret &&
194
+ oauth_server_scope == o.oauth_server_scope &&
145
195
  url == o.url
146
196
  end
147
197
 
@@ -154,7 +204,7 @@ module Onfido
154
204
  # Calculates hash code according to all attributes.
155
205
  # @return [Integer] Hash code
156
206
  def hash
157
- [enabled, events, environments, payload_version, url].hash
207
+ [enabled, events, environments, payload_version, oauth_enabled, oauth_server_url, oauth_server_client_id, oauth_server_client_secret, oauth_server_scope, url].hash
158
208
  end
159
209
 
160
210
  # Builds the object from hash
@@ -27,13 +27,33 @@ module Onfido
27
27
  # Webhook version used to control the payload object when sending webhooks.
28
28
  attr_accessor :payload_version
29
29
 
30
+ # Determines if the webhook will fetch OAuth access tokens to send in the Authorization header.
31
+ attr_accessor :oauth_enabled
32
+
33
+ # The url to fetch the OAuth access token using client credentials grant.
34
+ attr_accessor :oauth_server_url
35
+
36
+ # The client id to authenticate the client credentials grant.
37
+ attr_accessor :oauth_server_client_id
38
+
39
+ # The client secret to authenticate the client credentials grant.
40
+ attr_accessor :oauth_server_client_secret
41
+
42
+ # The scopes to be sent when requesting the access token.
43
+ attr_accessor :oauth_server_scope
44
+
30
45
  # Attribute mapping from ruby-style variable name to JSON key.
31
46
  def self.attribute_map
32
47
  {
33
48
  :'enabled' => :'enabled',
34
49
  :'events' => :'events',
35
50
  :'environments' => :'environments',
36
- :'payload_version' => :'payload_version'
51
+ :'payload_version' => :'payload_version',
52
+ :'oauth_enabled' => :'oauth_enabled',
53
+ :'oauth_server_url' => :'oauth_server_url',
54
+ :'oauth_server_client_id' => :'oauth_server_client_id',
55
+ :'oauth_server_client_secret' => :'oauth_server_client_secret',
56
+ :'oauth_server_scope' => :'oauth_server_scope'
37
57
  }
38
58
  end
39
59
 
@@ -48,7 +68,12 @@ module Onfido
48
68
  :'enabled' => :'Boolean',
49
69
  :'events' => :'Array<WebhookEventType>',
50
70
  :'environments' => :'Array<String>',
51
- :'payload_version' => :'Integer'
71
+ :'payload_version' => :'Integer',
72
+ :'oauth_enabled' => :'Boolean',
73
+ :'oauth_server_url' => :'String',
74
+ :'oauth_server_client_id' => :'String',
75
+ :'oauth_server_client_secret' => :'String',
76
+ :'oauth_server_scope' => :'String'
52
77
  }
53
78
  end
54
79
 
@@ -92,6 +117,26 @@ module Onfido
92
117
  if attributes.key?(:'payload_version')
93
118
  self.payload_version = attributes[:'payload_version']
94
119
  end
120
+
121
+ if attributes.key?(:'oauth_enabled')
122
+ self.oauth_enabled = attributes[:'oauth_enabled']
123
+ end
124
+
125
+ if attributes.key?(:'oauth_server_url')
126
+ self.oauth_server_url = attributes[:'oauth_server_url']
127
+ end
128
+
129
+ if attributes.key?(:'oauth_server_client_id')
130
+ self.oauth_server_client_id = attributes[:'oauth_server_client_id']
131
+ end
132
+
133
+ if attributes.key?(:'oauth_server_client_secret')
134
+ self.oauth_server_client_secret = attributes[:'oauth_server_client_secret']
135
+ end
136
+
137
+ if attributes.key?(:'oauth_server_scope')
138
+ self.oauth_server_scope = attributes[:'oauth_server_scope']
139
+ end
95
140
  end
96
141
 
97
142
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -117,7 +162,12 @@ module Onfido
117
162
  enabled == o.enabled &&
118
163
  events == o.events &&
119
164
  environments == o.environments &&
120
- payload_version == o.payload_version
165
+ payload_version == o.payload_version &&
166
+ oauth_enabled == o.oauth_enabled &&
167
+ oauth_server_url == o.oauth_server_url &&
168
+ oauth_server_client_id == o.oauth_server_client_id &&
169
+ oauth_server_client_secret == o.oauth_server_client_secret &&
170
+ oauth_server_scope == o.oauth_server_scope
121
171
  end
122
172
 
123
173
  # @see the `==` method
@@ -129,7 +179,7 @@ module Onfido
129
179
  # Calculates hash code according to all attributes.
130
180
  # @return [Integer] Hash code
131
181
  def hash
132
- [enabled, events, environments, payload_version].hash
182
+ [enabled, events, environments, payload_version, oauth_enabled, oauth_server_url, oauth_server_client_id, oauth_server_client_secret, oauth_server_scope].hash
133
183
  end
134
184
 
135
185
  # Builds the object from hash