svix 0.83.1 → 0.84.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/svix/api/application_api.rb +251 -181
- data/lib/svix/api/authentication_api.rb +84 -152
- data/lib/svix/api/background_tasks_api.rb +165 -0
- data/lib/svix/api/endpoint_api.rb +591 -511
- data/lib/svix/api/environment_api.rb +15 -15
- data/lib/svix/api/environment_settings_api.rb +7 -10
- data/lib/svix/api/event_type_api.rb +160 -85
- data/lib/svix/api/health_api.rb +7 -10
- data/lib/svix/api/integration_api.rb +136 -143
- data/lib/svix/api/message_api.rb +103 -105
- data/lib/svix/api/message_attempt_api.rb +419 -419
- data/lib/svix/api/statistics_api.rb +110 -48
- data/lib/svix/api_client.rb +1 -1
- data/lib/svix/api_error.rb +1 -1
- data/lib/svix/application_api.rb +22 -22
- data/lib/svix/authentication_api.rb +3 -3
- data/lib/svix/configuration.rb +2 -1
- data/lib/svix/endpoint_api.rb +16 -16
- data/lib/svix/event_type_api.rb +19 -19
- data/lib/svix/integration_api.rb +26 -26
- data/lib/svix/message_api.rb +4 -4
- data/lib/svix/message_attempt_api.rb +8 -8
- data/lib/svix/models/app_portal_access_in.rb +2 -1
- data/lib/svix/models/app_portal_access_out.rb +1 -1
- data/lib/svix/models/app_usage_stats_in.rb +255 -0
- data/lib/svix/models/app_usage_stats_out.rb +251 -0
- data/lib/svix/models/application_in.rb +35 -2
- data/lib/svix/models/application_out.rb +23 -3
- data/lib/svix/models/application_patch.rb +300 -0
- data/lib/svix/models/application_stats.rb +3 -2
- data/lib/svix/models/application_token_expire_in.rb +1 -1
- data/lib/svix/models/attempt_statistics_data.rb +1 -1
- data/lib/svix/models/attempt_statistics_response.rb +1 -1
- data/lib/svix/models/{webhook_types.rb → background_task_out.rb} +41 -70
- data/lib/svix/models/background_task_status.rb +38 -0
- data/lib/svix/models/background_task_type.rb +38 -0
- data/lib/svix/models/border_radius_config.rb +1 -1
- data/lib/svix/models/border_radius_enum.rb +1 -1
- data/lib/svix/models/custom_color_palette.rb +1 -1
- data/lib/svix/models/custom_theme_override.rb +1 -1
- data/lib/svix/models/dashboard_access_out.rb +1 -1
- data/lib/svix/models/endpoint_created_event.rb +6 -1
- data/lib/svix/models/endpoint_created_event_data.rb +5 -3
- data/lib/svix/models/endpoint_deleted_event.rb +6 -1
- data/lib/svix/models/endpoint_deleted_event_data.rb +5 -3
- data/lib/svix/models/endpoint_disabled_event.rb +6 -1
- data/lib/svix/models/endpoint_disabled_event_data.rb +6 -3
- data/lib/svix/models/endpoint_headers_in.rb +1 -1
- data/lib/svix/models/endpoint_headers_out.rb +1 -1
- data/lib/svix/models/endpoint_headers_patch_in.rb +1 -1
- data/lib/svix/models/endpoint_in.rb +20 -11
- data/lib/svix/models/endpoint_message_out.rb +4 -1
- data/lib/svix/models/endpoint_out.rb +35 -16
- data/lib/svix/models/endpoint_patch.rb +406 -0
- data/lib/svix/models/endpoint_secret_out.rb +1 -1
- data/lib/svix/models/endpoint_secret_rotate_in.rb +3 -1
- data/lib/svix/models/endpoint_stats.rb +1 -1
- data/lib/svix/models/endpoint_transformation_in.rb +1 -3
- data/lib/svix/models/endpoint_transformation_out.rb +1 -1
- data/lib/svix/models/endpoint_transformation_simulate_in.rb +8 -1
- data/lib/svix/models/endpoint_transformation_simulate_out.rb +1 -1
- data/lib/svix/models/endpoint_update.rb +20 -11
- data/lib/svix/models/endpoint_updated_event.rb +6 -1
- data/lib/svix/models/endpoint_updated_event_data.rb +5 -3
- data/lib/svix/models/environment_in.rb +1 -1
- data/lib/svix/models/environment_out.rb +1 -1
- data/lib/svix/models/environment_settings_out.rb +1 -1
- data/lib/svix/models/event_example_in.rb +2 -1
- data/lib/svix/models/event_type_example_out.rb +5 -3
- data/lib/svix/models/event_type_in.rb +2 -1
- data/lib/svix/models/event_type_out.rb +2 -1
- data/lib/svix/models/event_type_patch.rb +275 -0
- data/lib/svix/models/event_type_schema_in.rb +1 -2
- data/lib/svix/models/event_type_update.rb +1 -1
- data/lib/svix/models/font_size_config.rb +1 -1
- data/lib/svix/models/http_error_out.rb +1 -1
- data/lib/svix/models/http_validation_error.rb +6 -1
- data/lib/svix/models/integration_in.rb +1 -1
- data/lib/svix/models/integration_key_out.rb +1 -1
- data/lib/svix/models/integration_out.rb +2 -1
- data/lib/svix/models/integration_update.rb +1 -1
- data/lib/svix/models/list_response_application_out.rb +1 -1
- data/lib/svix/models/list_response_application_stats.rb +16 -6
- data/lib/svix/models/list_response_background_task_out.rb +259 -0
- data/lib/svix/models/list_response_endpoint_message_out.rb +1 -1
- data/lib/svix/models/list_response_endpoint_out.rb +1 -1
- data/lib/svix/models/list_response_event_type_out.rb +1 -1
- data/lib/svix/models/list_response_integration_out.rb +16 -6
- data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +1 -1
- data/lib/svix/models/list_response_message_attempt_out.rb +1 -1
- data/lib/svix/models/list_response_message_endpoint_out.rb +16 -6
- data/lib/svix/models/list_response_message_out.rb +1 -1
- data/lib/svix/models/message_attempt_endpoint_out.rb +4 -1
- data/lib/svix/models/message_attempt_exhausted_event.rb +6 -1
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +7 -3
- data/lib/svix/models/message_attempt_failed_data.rb +2 -1
- data/lib/svix/models/message_attempt_failing_event.rb +6 -1
- data/lib/svix/models/message_attempt_failing_event_data.rb +7 -3
- data/lib/svix/models/message_attempt_headers_out.rb +28 -2
- data/lib/svix/models/message_attempt_out.rb +4 -1
- data/lib/svix/models/message_attempt_trigger_type.rb +1 -1
- data/lib/svix/models/message_endpoint_out.rb +47 -30
- data/lib/svix/models/message_in.rb +2 -2
- data/lib/svix/models/message_out.rb +3 -1
- data/lib/svix/models/message_status.rb +1 -1
- data/lib/svix/models/ordering.rb +1 -1
- data/lib/svix/models/recover_in.rb +1 -1
- data/lib/svix/models/{one_time_token_out.rb → recover_out.rb} +42 -14
- data/lib/svix/models/replay_in.rb +1 -1
- data/lib/svix/models/{one_time_token_in.rb → replay_out.rb} +42 -14
- data/lib/svix/models/settings_in.rb +1 -1
- data/lib/svix/models/settings_out.rb +1 -1
- data/lib/svix/models/statistics_period.rb +1 -1
- data/lib/svix/models/status_code_class.rb +1 -1
- data/lib/svix/models/transformation_http_method.rb +2 -2
- data/lib/svix/models/validation_error.rb +5 -1
- data/lib/svix/version.rb +1 -1
- metadata +14 -5
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
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 user on your platform. - `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/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## 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
5
|
|
6
|
-
The version of the OpenAPI document: 1.4
|
6
|
+
The version of the OpenAPI document: 1.4.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.2.0
|
@@ -20,12 +20,14 @@ module Svix
|
|
20
20
|
|
21
21
|
attr_accessor :created_at
|
22
22
|
|
23
|
+
# An example endpoint name
|
23
24
|
attr_accessor :description
|
24
25
|
|
25
26
|
attr_accessor :disabled
|
26
27
|
|
27
28
|
attr_accessor :filter_types
|
28
29
|
|
30
|
+
# The ep's ID
|
29
31
|
attr_accessor :id
|
30
32
|
|
31
33
|
attr_accessor :metadata
|
@@ -87,7 +89,6 @@ module Svix
|
|
87
89
|
Set.new([
|
88
90
|
:'channels',
|
89
91
|
:'filter_types',
|
90
|
-
:'metadata',
|
91
92
|
:'rate_limit',
|
92
93
|
:'uid',
|
93
94
|
])
|
@@ -120,8 +121,6 @@ module Svix
|
|
120
121
|
|
121
122
|
if attributes.key?(:'description')
|
122
123
|
self.description = attributes[:'description']
|
123
|
-
else
|
124
|
-
self.description = ''
|
125
124
|
end
|
126
125
|
|
127
126
|
if attributes.key?(:'disabled')
|
@@ -183,6 +182,10 @@ module Svix
|
|
183
182
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
184
183
|
end
|
185
184
|
|
185
|
+
if @description.nil?
|
186
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
187
|
+
end
|
188
|
+
|
186
189
|
if !@filter_types.nil? && @filter_types.length < 1
|
187
190
|
invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
|
188
191
|
end
|
@@ -191,12 +194,12 @@ module Svix
|
|
191
194
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
192
195
|
end
|
193
196
|
|
194
|
-
if
|
195
|
-
invalid_properties.push('invalid value for "
|
197
|
+
if @metadata.nil?
|
198
|
+
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
196
199
|
end
|
197
200
|
|
198
|
-
if !@rate_limit.nil? && @rate_limit <
|
199
|
-
invalid_properties.push('invalid value for "rate_limit", must be greater than or equal to
|
201
|
+
if !@rate_limit.nil? && @rate_limit < 0
|
202
|
+
invalid_properties.push('invalid value for "rate_limit", must be greater than or equal to 0.')
|
200
203
|
end
|
201
204
|
|
202
205
|
if !@uid.nil? && @uid.to_s.length > 256
|
@@ -232,6 +235,10 @@ module Svix
|
|
232
235
|
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
233
236
|
end
|
234
237
|
|
238
|
+
if @version < 1
|
239
|
+
invalid_properties.push('invalid value for "version", must be greater than or equal to 1.')
|
240
|
+
end
|
241
|
+
|
235
242
|
invalid_properties
|
236
243
|
end
|
237
244
|
|
@@ -241,10 +248,11 @@ module Svix
|
|
241
248
|
return false if !@channels.nil? && @channels.length > 10
|
242
249
|
return false if !@channels.nil? && @channels.length < 1
|
243
250
|
return false if @created_at.nil?
|
251
|
+
return false if @description.nil?
|
244
252
|
return false if !@filter_types.nil? && @filter_types.length < 1
|
245
253
|
return false if @id.nil?
|
246
|
-
return false if
|
247
|
-
return false if !@rate_limit.nil? && @rate_limit <
|
254
|
+
return false if @metadata.nil?
|
255
|
+
return false if !@rate_limit.nil? && @rate_limit < 0
|
248
256
|
return false if !@uid.nil? && @uid.to_s.length > 256
|
249
257
|
return false if !@uid.nil? && @uid.to_s.length < 1
|
250
258
|
return false if !@uid.nil? && @uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
@@ -253,6 +261,7 @@ module Svix
|
|
253
261
|
return false if @url.to_s.length > 65536
|
254
262
|
return false if @url.to_s.length < 1
|
255
263
|
return false if @version.nil?
|
264
|
+
return false if @version < 1
|
256
265
|
true
|
257
266
|
end
|
258
267
|
|
@@ -283,12 +292,8 @@ module Svix
|
|
283
292
|
# Custom attribute writer method with validation
|
284
293
|
# @param [Object] rate_limit Value to be assigned
|
285
294
|
def rate_limit=(rate_limit)
|
286
|
-
if !rate_limit.nil? && rate_limit
|
287
|
-
fail ArgumentError, 'invalid value for "rate_limit", must be
|
288
|
-
end
|
289
|
-
|
290
|
-
if !rate_limit.nil? && rate_limit < 1
|
291
|
-
fail ArgumentError, 'invalid value for "rate_limit", must be greater than or equal to 1.'
|
295
|
+
if !rate_limit.nil? && rate_limit < 0
|
296
|
+
fail ArgumentError, 'invalid value for "rate_limit", must be greater than or equal to 0.'
|
292
297
|
end
|
293
298
|
|
294
299
|
@rate_limit = rate_limit
|
@@ -331,6 +336,20 @@ module Svix
|
|
331
336
|
@url = url
|
332
337
|
end
|
333
338
|
|
339
|
+
# Custom attribute writer method with validation
|
340
|
+
# @param [Object] version Value to be assigned
|
341
|
+
def version=(version)
|
342
|
+
if version.nil?
|
343
|
+
fail ArgumentError, 'version cannot be nil'
|
344
|
+
end
|
345
|
+
|
346
|
+
if version < 1
|
347
|
+
fail ArgumentError, 'invalid value for "version", must be greater than or equal to 1.'
|
348
|
+
end
|
349
|
+
|
350
|
+
@version = version
|
351
|
+
end
|
352
|
+
|
334
353
|
# Checks equality by comparing each attribute.
|
335
354
|
# @param [Object] Object to be compared
|
336
355
|
def ==(o)
|
@@ -0,0 +1,406 @@
|
|
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 user on your platform. - `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/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## 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.1
|
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 EndpointPatch
|
18
|
+
attr_accessor :channels
|
19
|
+
|
20
|
+
attr_accessor :description
|
21
|
+
|
22
|
+
attr_accessor :disabled
|
23
|
+
|
24
|
+
attr_accessor :filter_types
|
25
|
+
|
26
|
+
attr_accessor :metadata
|
27
|
+
|
28
|
+
attr_accessor :rate_limit
|
29
|
+
|
30
|
+
# The endpoint's verification secret. If `null` is passed, a secret is automatically generated. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24.
|
31
|
+
attr_accessor :secret
|
32
|
+
|
33
|
+
# The ep's UID
|
34
|
+
attr_accessor :uid
|
35
|
+
|
36
|
+
attr_accessor :url
|
37
|
+
|
38
|
+
attr_accessor :version
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'channels' => :'channels',
|
44
|
+
:'description' => :'description',
|
45
|
+
:'disabled' => :'disabled',
|
46
|
+
:'filter_types' => :'filterTypes',
|
47
|
+
:'metadata' => :'metadata',
|
48
|
+
:'rate_limit' => :'rateLimit',
|
49
|
+
:'secret' => :'secret',
|
50
|
+
:'uid' => :'uid',
|
51
|
+
:'url' => :'url',
|
52
|
+
:'version' => :'version'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Returns all the JSON keys this model knows about
|
57
|
+
def self.acceptable_attributes
|
58
|
+
attribute_map.values
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute type mapping.
|
62
|
+
def self.openapi_types
|
63
|
+
{
|
64
|
+
:'channels' => :'Array<String>',
|
65
|
+
:'description' => :'String',
|
66
|
+
:'disabled' => :'Boolean',
|
67
|
+
:'filter_types' => :'Array<String>',
|
68
|
+
:'metadata' => :'Hash<String, String>',
|
69
|
+
:'rate_limit' => :'Integer',
|
70
|
+
:'secret' => :'String',
|
71
|
+
:'uid' => :'String',
|
72
|
+
:'url' => :'String',
|
73
|
+
:'version' => :'Integer'
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
# List of attributes with nullable: true
|
78
|
+
def self.openapi_nullable
|
79
|
+
Set.new([
|
80
|
+
:'channels',
|
81
|
+
:'filter_types',
|
82
|
+
:'rate_limit',
|
83
|
+
:'secret',
|
84
|
+
:'uid',
|
85
|
+
])
|
86
|
+
end
|
87
|
+
|
88
|
+
# Initializes the object
|
89
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
90
|
+
def initialize(attributes = {})
|
91
|
+
if (!attributes.is_a?(Hash))
|
92
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointPatch` initialize method"
|
93
|
+
end
|
94
|
+
|
95
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
96
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
97
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
98
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::EndpointPatch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
99
|
+
end
|
100
|
+
h[k.to_sym] = v
|
101
|
+
}
|
102
|
+
|
103
|
+
if attributes.key?(:'channels')
|
104
|
+
if (value = attributes[:'channels']).is_a?(Array)
|
105
|
+
self.channels = value
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'description')
|
110
|
+
self.description = attributes[:'description']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'disabled')
|
114
|
+
self.disabled = attributes[:'disabled']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'filter_types')
|
118
|
+
if (value = attributes[:'filter_types']).is_a?(Array)
|
119
|
+
self.filter_types = value
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'metadata')
|
124
|
+
if (value = attributes[:'metadata']).is_a?(Hash)
|
125
|
+
self.metadata = value
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'rate_limit')
|
130
|
+
self.rate_limit = attributes[:'rate_limit']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'secret')
|
134
|
+
self.secret = attributes[:'secret']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.key?(:'uid')
|
138
|
+
self.uid = attributes[:'uid']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'url')
|
142
|
+
self.url = attributes[:'url']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.key?(:'version')
|
146
|
+
self.version = attributes[:'version']
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
151
|
+
# @return Array for valid properties with the reasons
|
152
|
+
def list_invalid_properties
|
153
|
+
invalid_properties = Array.new
|
154
|
+
if !@rate_limit.nil? && @rate_limit < 0
|
155
|
+
invalid_properties.push('invalid value for "rate_limit", must be greater than or equal to 0.')
|
156
|
+
end
|
157
|
+
|
158
|
+
pattern = Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
|
159
|
+
if !@secret.nil? && @secret !~ pattern
|
160
|
+
invalid_properties.push("invalid value for \"secret\", must conform to the pattern #{pattern}.")
|
161
|
+
end
|
162
|
+
|
163
|
+
if !@uid.nil? && @uid.to_s.length > 256
|
164
|
+
invalid_properties.push('invalid value for "uid", the character length must be smaller than or equal to 256.')
|
165
|
+
end
|
166
|
+
|
167
|
+
if !@uid.nil? && @uid.to_s.length < 1
|
168
|
+
invalid_properties.push('invalid value for "uid", the character length must be great than or equal to 1.')
|
169
|
+
end
|
170
|
+
|
171
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
172
|
+
if !@uid.nil? && @uid !~ pattern
|
173
|
+
invalid_properties.push("invalid value for \"uid\", must conform to the pattern #{pattern}.")
|
174
|
+
end
|
175
|
+
|
176
|
+
if !@version.nil? && @version < 0
|
177
|
+
invalid_properties.push('invalid value for "version", must be greater than or equal to 0.')
|
178
|
+
end
|
179
|
+
|
180
|
+
invalid_properties
|
181
|
+
end
|
182
|
+
|
183
|
+
# Check to see if the all the properties in the model are valid
|
184
|
+
# @return true if the model is valid
|
185
|
+
def valid?
|
186
|
+
return false if !@rate_limit.nil? && @rate_limit < 0
|
187
|
+
return false if !@secret.nil? && @secret !~ Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
|
188
|
+
return false if !@uid.nil? && @uid.to_s.length > 256
|
189
|
+
return false if !@uid.nil? && @uid.to_s.length < 1
|
190
|
+
return false if !@uid.nil? && @uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
191
|
+
return false if !@version.nil? && @version < 0
|
192
|
+
true
|
193
|
+
end
|
194
|
+
|
195
|
+
# Custom attribute writer method with validation
|
196
|
+
# @param [Object] channels Value to be assigned
|
197
|
+
def channels=(channels)
|
198
|
+
@channels = channels
|
199
|
+
end
|
200
|
+
|
201
|
+
# Custom attribute writer method with validation
|
202
|
+
# @param [Object] filter_types Value to be assigned
|
203
|
+
def filter_types=(filter_types)
|
204
|
+
@filter_types = filter_types
|
205
|
+
end
|
206
|
+
|
207
|
+
# Custom attribute writer method with validation
|
208
|
+
# @param [Object] rate_limit Value to be assigned
|
209
|
+
def rate_limit=(rate_limit)
|
210
|
+
if !rate_limit.nil? && rate_limit < 0
|
211
|
+
fail ArgumentError, 'invalid value for "rate_limit", must be greater than or equal to 0.'
|
212
|
+
end
|
213
|
+
|
214
|
+
@rate_limit = rate_limit
|
215
|
+
end
|
216
|
+
|
217
|
+
# Custom attribute writer method with validation
|
218
|
+
# @param [Object] secret Value to be assigned
|
219
|
+
def secret=(secret)
|
220
|
+
pattern = Regexp.new(/^(whsec_)?[a-zA-Z0-9+\/=]{32,100}$/)
|
221
|
+
if !secret.nil? && secret !~ pattern
|
222
|
+
fail ArgumentError, "invalid value for \"secret\", must conform to the pattern #{pattern}."
|
223
|
+
end
|
224
|
+
|
225
|
+
@secret = secret
|
226
|
+
end
|
227
|
+
|
228
|
+
# Custom attribute writer method with validation
|
229
|
+
# @param [Object] uid Value to be assigned
|
230
|
+
def uid=(uid)
|
231
|
+
if !uid.nil? && uid.to_s.length > 256
|
232
|
+
fail ArgumentError, 'invalid value for "uid", the character length must be smaller than or equal to 256.'
|
233
|
+
end
|
234
|
+
|
235
|
+
if !uid.nil? && uid.to_s.length < 1
|
236
|
+
fail ArgumentError, 'invalid value for "uid", the character length must be great than or equal to 1.'
|
237
|
+
end
|
238
|
+
|
239
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
240
|
+
if !uid.nil? && uid !~ pattern
|
241
|
+
fail ArgumentError, "invalid value for \"uid\", must conform to the pattern #{pattern}."
|
242
|
+
end
|
243
|
+
|
244
|
+
@uid = uid
|
245
|
+
end
|
246
|
+
|
247
|
+
# Custom attribute writer method with validation
|
248
|
+
# @param [Object] version Value to be assigned
|
249
|
+
def version=(version)
|
250
|
+
if !version.nil? && version < 0
|
251
|
+
fail ArgumentError, 'invalid value for "version", must be greater than or equal to 0.'
|
252
|
+
end
|
253
|
+
|
254
|
+
@version = version
|
255
|
+
end
|
256
|
+
|
257
|
+
# Checks equality by comparing each attribute.
|
258
|
+
# @param [Object] Object to be compared
|
259
|
+
def ==(o)
|
260
|
+
return true if self.equal?(o)
|
261
|
+
self.class == o.class &&
|
262
|
+
channels == o.channels &&
|
263
|
+
description == o.description &&
|
264
|
+
disabled == o.disabled &&
|
265
|
+
filter_types == o.filter_types &&
|
266
|
+
metadata == o.metadata &&
|
267
|
+
rate_limit == o.rate_limit &&
|
268
|
+
secret == o.secret &&
|
269
|
+
uid == o.uid &&
|
270
|
+
url == o.url &&
|
271
|
+
version == o.version
|
272
|
+
end
|
273
|
+
|
274
|
+
# @see the `==` method
|
275
|
+
# @param [Object] Object to be compared
|
276
|
+
def eql?(o)
|
277
|
+
self == o
|
278
|
+
end
|
279
|
+
|
280
|
+
# Calculates hash code according to all attributes.
|
281
|
+
# @return [Integer] Hash code
|
282
|
+
def hash
|
283
|
+
[channels, description, disabled, filter_types, metadata, rate_limit, secret, uid, url, version].hash
|
284
|
+
end
|
285
|
+
|
286
|
+
# Builds the object from hash
|
287
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
288
|
+
# @return [Object] Returns the model itself
|
289
|
+
def self.build_from_hash(attributes)
|
290
|
+
new.build_from_hash(attributes)
|
291
|
+
end
|
292
|
+
|
293
|
+
# Builds the object from hash
|
294
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
295
|
+
# @return [Object] Returns the model itself
|
296
|
+
def build_from_hash(attributes)
|
297
|
+
return nil unless attributes.is_a?(Hash)
|
298
|
+
self.class.openapi_types.each_pair do |key, type|
|
299
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
300
|
+
self.send("#{key}=", nil)
|
301
|
+
elsif type =~ /\AArray<(.*)>/i
|
302
|
+
# check to ensure the input is an array given that the attribute
|
303
|
+
# is documented as an array but the input is not
|
304
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
305
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
306
|
+
end
|
307
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
308
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
312
|
+
self
|
313
|
+
end
|
314
|
+
|
315
|
+
# Deserializes the data based on type
|
316
|
+
# @param string type Data type
|
317
|
+
# @param string value Value to be deserialized
|
318
|
+
# @return [Object] Deserialized data
|
319
|
+
def _deserialize(type, value)
|
320
|
+
case type.to_sym
|
321
|
+
when :Time
|
322
|
+
Time.parse(value)
|
323
|
+
when :Date
|
324
|
+
Date.parse(value)
|
325
|
+
when :String
|
326
|
+
value.to_s
|
327
|
+
when :Integer
|
328
|
+
value.to_i
|
329
|
+
when :Float
|
330
|
+
value.to_f
|
331
|
+
when :Boolean
|
332
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
333
|
+
true
|
334
|
+
else
|
335
|
+
false
|
336
|
+
end
|
337
|
+
when :Object
|
338
|
+
# generic object (usually a Hash), return directly
|
339
|
+
value
|
340
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
341
|
+
inner_type = Regexp.last_match[:inner_type]
|
342
|
+
value.map { |v| _deserialize(inner_type, v) }
|
343
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
344
|
+
k_type = Regexp.last_match[:k_type]
|
345
|
+
v_type = Regexp.last_match[:v_type]
|
346
|
+
{}.tap do |hash|
|
347
|
+
value.each do |k, v|
|
348
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
349
|
+
end
|
350
|
+
end
|
351
|
+
else # model
|
352
|
+
# models (e.g. Pet) or oneOf
|
353
|
+
klass = Svix.const_get(type)
|
354
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
355
|
+
end
|
356
|
+
end
|
357
|
+
|
358
|
+
# Returns the string representation of the object
|
359
|
+
# @return [String] String presentation of the object
|
360
|
+
def to_s
|
361
|
+
to_hash.to_s
|
362
|
+
end
|
363
|
+
|
364
|
+
# to_body is an alias to to_hash (backward compatibility)
|
365
|
+
# @return [Hash] Returns the object in the form of hash
|
366
|
+
def to_body
|
367
|
+
to_hash
|
368
|
+
end
|
369
|
+
|
370
|
+
# Returns the object in the form of hash
|
371
|
+
# @return [Hash] Returns the object in the form of hash
|
372
|
+
def to_hash
|
373
|
+
hash = {}
|
374
|
+
self.class.attribute_map.each_pair do |attr, param|
|
375
|
+
value = self.send(attr)
|
376
|
+
if value.nil?
|
377
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
378
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
379
|
+
end
|
380
|
+
|
381
|
+
hash[param] = _to_hash(value)
|
382
|
+
end
|
383
|
+
hash
|
384
|
+
end
|
385
|
+
|
386
|
+
# Outputs non-array value in the form of hash
|
387
|
+
# For object, use to_hash. Otherwise, just return the value
|
388
|
+
# @param [Object] value Any valid value
|
389
|
+
# @return [Hash] Returns the value in the form of hash
|
390
|
+
def _to_hash(value)
|
391
|
+
if value.is_a?(Array)
|
392
|
+
value.compact.map { |v| _to_hash(v) }
|
393
|
+
elsif value.is_a?(Hash)
|
394
|
+
{}.tap do |hash|
|
395
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
396
|
+
end
|
397
|
+
elsif value.respond_to? :to_hash
|
398
|
+
value.to_hash
|
399
|
+
else
|
400
|
+
value
|
401
|
+
end
|
402
|
+
end
|
403
|
+
|
404
|
+
end
|
405
|
+
|
406
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
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 user on your platform. - `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/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## 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
5
|
|
6
|
-
The version of the OpenAPI document: 1.4
|
6
|
+
The version of the OpenAPI document: 1.4.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.2.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
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 user on your platform. - `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/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## 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
5
|
|
6
|
-
The version of the OpenAPI document: 1.4
|
6
|
+
The version of the OpenAPI document: 1.4.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.2.0
|
@@ -61,6 +61,8 @@ module Svix
|
|
61
61
|
|
62
62
|
if attributes.key?(:'key')
|
63
63
|
self.key = attributes[:'key']
|
64
|
+
else
|
65
|
+
self.key = 'null'
|
64
66
|
end
|
65
67
|
end
|
66
68
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
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 user on your platform. - `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/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## 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
5
|
|
6
|
-
The version of the OpenAPI document: 1.4
|
6
|
+
The version of the OpenAPI document: 1.4.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.2.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
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 user on your platform. - `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/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## 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
5
|
|
6
|
-
The version of the OpenAPI document: 1.4
|
6
|
+
The version of the OpenAPI document: 1.4.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.2.0
|
@@ -68,8 +68,6 @@ module Svix
|
|
68
68
|
|
69
69
|
if attributes.key?(:'enabled')
|
70
70
|
self.enabled = attributes[:'enabled']
|
71
|
-
else
|
72
|
-
self.enabled = false
|
73
71
|
end
|
74
72
|
end
|
75
73
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
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 user on your platform. - `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/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## 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
5
|
|
6
|
-
The version of the OpenAPI document: 1.4
|
6
|
+
The version of the OpenAPI document: 1.4.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.2.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
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 user on your platform. - `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/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## 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
5
|
|
6
|
-
The version of the OpenAPI document: 1.4
|
6
|
+
The version of the OpenAPI document: 1.4.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 5.2.0
|
@@ -19,6 +19,7 @@ module Svix
|
|
19
19
|
|
20
20
|
attr_accessor :code
|
21
21
|
|
22
|
+
# The event type's name
|
22
23
|
attr_accessor :event_type
|
23
24
|
|
24
25
|
attr_accessor :payload
|
@@ -138,6 +139,12 @@ module Svix
|
|
138
139
|
true
|
139
140
|
end
|
140
141
|
|
142
|
+
# Custom attribute writer method with validation
|
143
|
+
# @param [Object] channels Value to be assigned
|
144
|
+
def channels=(channels)
|
145
|
+
@channels = channels
|
146
|
+
end
|
147
|
+
|
141
148
|
# Custom attribute writer method with validation
|
142
149
|
# @param [Object] code Value to be assigned
|
143
150
|
def code=(code)
|