svix 0.34.1 → 0.39.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,225 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each of your users. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
5
+
6
+ The version of the OpenAPI document: 1.4
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Svix
17
+ class EndpointHeadersIn
18
+ attr_accessor :headers
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'headers' => :'headers'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'headers' => :'Hash<String, String>'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointHeadersIn` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::EndpointHeadersIn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'headers')
61
+ if (value = attributes[:'headers']).is_a?(Hash)
62
+ self.headers = value
63
+ end
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ if @headers.nil?
72
+ invalid_properties.push('invalid value for "headers", headers cannot be nil.')
73
+ end
74
+
75
+ invalid_properties
76
+ end
77
+
78
+ # Check to see if the all the properties in the model are valid
79
+ # @return true if the model is valid
80
+ def valid?
81
+ return false if @headers.nil?
82
+ true
83
+ end
84
+
85
+ # Checks equality by comparing each attribute.
86
+ # @param [Object] Object to be compared
87
+ def ==(o)
88
+ return true if self.equal?(o)
89
+ self.class == o.class &&
90
+ headers == o.headers
91
+ end
92
+
93
+ # @see the `==` method
94
+ # @param [Object] Object to be compared
95
+ def eql?(o)
96
+ self == o
97
+ end
98
+
99
+ # Calculates hash code according to all attributes.
100
+ # @return [Integer] Hash code
101
+ def hash
102
+ [headers].hash
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def self.build_from_hash(attributes)
109
+ new.build_from_hash(attributes)
110
+ end
111
+
112
+ # Builds the object from hash
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ # @return [Object] Returns the model itself
115
+ def build_from_hash(attributes)
116
+ return nil unless attributes.is_a?(Hash)
117
+ self.class.openapi_types.each_pair do |key, type|
118
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
+ self.send("#{key}=", nil)
120
+ elsif type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :Time
141
+ Time.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :Boolean
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ # models (e.g. Pet) or oneOf
172
+ klass = Svix.const_get(type)
173
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+
223
+ end
224
+
225
+ end
@@ -0,0 +1,252 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each of your users. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
5
+
6
+ The version of the OpenAPI document: 1.4
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Svix
17
+ # The value of the headers is returned in the `headers` field. Sensitive headers that have been redacted are returned in the sensitive field.
18
+ class EndpointHeadersOut
19
+ attr_accessor :headers
20
+
21
+ attr_accessor :sensitive
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'headers' => :'headers',
27
+ :'sensitive' => :'sensitive'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'headers' => :'Hash<String, String>',
40
+ :'sensitive' => :'Array<String>'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointHeadersOut` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::EndpointHeadersOut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'headers')
66
+ if (value = attributes[:'headers']).is_a?(Hash)
67
+ self.headers = value
68
+ end
69
+ end
70
+
71
+ if attributes.key?(:'sensitive')
72
+ if (value = attributes[:'sensitive']).is_a?(Array)
73
+ self.sensitive = value
74
+ end
75
+ end
76
+ end
77
+
78
+ # Show invalid properties with the reasons. Usually used together with valid?
79
+ # @return Array for valid properties with the reasons
80
+ def list_invalid_properties
81
+ invalid_properties = Array.new
82
+ if @headers.nil?
83
+ invalid_properties.push('invalid value for "headers", headers cannot be nil.')
84
+ end
85
+
86
+ if @sensitive.nil?
87
+ invalid_properties.push('invalid value for "sensitive", sensitive cannot be nil.')
88
+ end
89
+
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ return false if @headers.nil?
97
+ return false if @sensitive.nil?
98
+ true
99
+ end
100
+
101
+ # Custom attribute writer method with validation
102
+ # @param [Object] sensitive Value to be assigned
103
+ def sensitive=(sensitive)
104
+ if sensitive.nil?
105
+ fail ArgumentError, 'sensitive cannot be nil'
106
+ end
107
+
108
+ @sensitive = sensitive
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ headers == o.headers &&
117
+ sensitive == o.sensitive
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [headers, sensitive].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ new.build_from_hash(attributes)
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ self.class.openapi_types.each_pair do |key, type|
145
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
146
+ self.send("#{key}=", nil)
147
+ elsif type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
151
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
152
+ end
153
+ elsif !attributes[self.class.attribute_map[key]].nil?
154
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
155
+ end
156
+ end
157
+
158
+ self
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def _deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = Svix.const_get(type)
200
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -30,6 +30,8 @@ module Svix
30
30
  # Optional unique identifier for the endpoint
31
31
  attr_accessor :uid
32
32
 
33
+ attr_accessor :updated_at
34
+
33
35
  attr_accessor :url
34
36
 
35
37
  attr_accessor :version
@@ -44,6 +46,7 @@ module Svix
44
46
  :'id' => :'id',
45
47
  :'rate_limit' => :'rateLimit',
46
48
  :'uid' => :'uid',
49
+ :'updated_at' => :'updatedAt',
47
50
  :'url' => :'url',
48
51
  :'version' => :'version'
49
52
  }
@@ -64,6 +67,7 @@ module Svix
64
67
  :'id' => :'String',
65
68
  :'rate_limit' => :'Integer',
66
69
  :'uid' => :'String',
70
+ :'updated_at' => :'Time',
67
71
  :'url' => :'String',
68
72
  :'version' => :'Integer'
69
73
  }
@@ -124,6 +128,10 @@ module Svix
124
128
  self.uid = attributes[:'uid']
125
129
  end
126
130
 
131
+ if attributes.key?(:'updated_at')
132
+ self.updated_at = attributes[:'updated_at']
133
+ end
134
+
127
135
  if attributes.key?(:'url')
128
136
  self.url = attributes[:'url']
129
137
  end
@@ -162,6 +170,10 @@ module Svix
162
170
  invalid_properties.push("invalid value for \"uid\", must conform to the pattern #{pattern}.")
163
171
  end
164
172
 
173
+ if @updated_at.nil?
174
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
175
+ end
176
+
165
177
  if @url.nil?
166
178
  invalid_properties.push('invalid value for "url", url cannot be nil.')
167
179
  end
@@ -190,6 +202,7 @@ module Svix
190
202
  return false if !@uid.nil? && @uid.to_s.length > 256
191
203
  return false if !@uid.nil? && @uid.to_s.length < 1
192
204
  return false if !@uid.nil? && @uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
205
+ return false if @updated_at.nil?
193
206
  return false if @url.nil?
194
207
  return false if @url.to_s.length > 65536
195
208
  return false if @url.to_s.length < 1
@@ -256,6 +269,7 @@ module Svix
256
269
  id == o.id &&
257
270
  rate_limit == o.rate_limit &&
258
271
  uid == o.uid &&
272
+ updated_at == o.updated_at &&
259
273
  url == o.url &&
260
274
  version == o.version
261
275
  end
@@ -269,7 +283,7 @@ module Svix
269
283
  # Calculates hash code according to all attributes.
270
284
  # @return [Integer] Hash code
271
285
  def hash
272
- [created_at, description, disabled, filter_types, id, rate_limit, uid, url, version].hash
286
+ [created_at, description, disabled, filter_types, id, rate_limit, uid, updated_at, url, version].hash
273
287
  end
274
288
 
275
289
  # Builds the object from hash
@@ -17,6 +17,8 @@ module Svix
17
17
  class EventTypeOut
18
18
  attr_accessor :archived
19
19
 
20
+ attr_accessor :created_at
21
+
20
22
  attr_accessor :description
21
23
 
22
24
  attr_accessor :name
@@ -24,13 +26,17 @@ module Svix
24
26
  # The schema for the event type for a specific version as a JSON schema.
25
27
  attr_accessor :schemas
26
28
 
29
+ attr_accessor :updated_at
30
+
27
31
  # Attribute mapping from ruby-style variable name to JSON key.
28
32
  def self.attribute_map
29
33
  {
30
34
  :'archived' => :'archived',
35
+ :'created_at' => :'createdAt',
31
36
  :'description' => :'description',
32
37
  :'name' => :'name',
33
- :'schemas' => :'schemas'
38
+ :'schemas' => :'schemas',
39
+ :'updated_at' => :'updatedAt'
34
40
  }
35
41
  end
36
42
 
@@ -43,9 +49,11 @@ module Svix
43
49
  def self.openapi_types
44
50
  {
45
51
  :'archived' => :'Boolean',
52
+ :'created_at' => :'Time',
46
53
  :'description' => :'String',
47
54
  :'name' => :'String',
48
- :'schemas' => :'Hash<String, Object>'
55
+ :'schemas' => :'Hash<String, Object>',
56
+ :'updated_at' => :'Time'
49
57
  }
50
58
  end
51
59
 
@@ -76,6 +84,10 @@ module Svix
76
84
  self.archived = false
77
85
  end
78
86
 
87
+ if attributes.key?(:'created_at')
88
+ self.created_at = attributes[:'created_at']
89
+ end
90
+
79
91
  if attributes.key?(:'description')
80
92
  self.description = attributes[:'description']
81
93
  end
@@ -89,12 +101,20 @@ module Svix
89
101
  self.schemas = value
90
102
  end
91
103
  end
104
+
105
+ if attributes.key?(:'updated_at')
106
+ self.updated_at = attributes[:'updated_at']
107
+ end
92
108
  end
93
109
 
94
110
  # Show invalid properties with the reasons. Usually used together with valid?
95
111
  # @return Array for valid properties with the reasons
96
112
  def list_invalid_properties
97
113
  invalid_properties = Array.new
114
+ if @created_at.nil?
115
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
116
+ end
117
+
98
118
  if @description.nil?
99
119
  invalid_properties.push('invalid value for "description", description cannot be nil.')
100
120
  end
@@ -112,16 +132,22 @@ module Svix
112
132
  invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.")
113
133
  end
114
134
 
135
+ if @updated_at.nil?
136
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
137
+ end
138
+
115
139
  invalid_properties
116
140
  end
117
141
 
118
142
  # Check to see if the all the properties in the model are valid
119
143
  # @return true if the model is valid
120
144
  def valid?
145
+ return false if @created_at.nil?
121
146
  return false if @description.nil?
122
147
  return false if @name.nil?
123
148
  return false if @name.to_s.length > 256
124
149
  return false if @name !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
150
+ return false if @updated_at.nil?
125
151
  true
126
152
  end
127
153
 
@@ -150,9 +176,11 @@ module Svix
150
176
  return true if self.equal?(o)
151
177
  self.class == o.class &&
152
178
  archived == o.archived &&
179
+ created_at == o.created_at &&
153
180
  description == o.description &&
154
181
  name == o.name &&
155
- schemas == o.schemas
182
+ schemas == o.schemas &&
183
+ updated_at == o.updated_at
156
184
  end
157
185
 
158
186
  # @see the `==` method
@@ -164,7 +192,7 @@ module Svix
164
192
  # Calculates hash code according to all attributes.
165
193
  # @return [Integer] Hash code
166
194
  def hash
167
- [archived, description, name, schemas].hash
195
+ [archived, created_at, description, name, schemas, updated_at].hash
168
196
  end
169
197
 
170
198
  # Builds the object from hash