svix 0.36.0 → 0.40.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/svix/api/application_api.rb +1 -1
- data/lib/svix/api/authentication_api.rb +1 -1
- data/lib/svix/api/endpoint_api.rb +302 -1
- data/lib/svix/api/event_type_api.rb +1 -1
- data/lib/svix/api/health_api.rb +1 -1
- data/lib/svix/api/message_api.rb +1 -1
- data/lib/svix/api/message_attempt_api.rb +1 -1
- data/lib/svix/api/organization_settings_api.rb +79 -0
- data/lib/svix/api/statistics_api.rb +205 -0
- data/lib/svix/api_client.rb +1 -1
- data/lib/svix/api_error.rb +1 -1
- data/lib/svix/configuration.rb +1 -1
- data/lib/svix/endpoint_api.rb +13 -1
- data/lib/svix/event_type_api.rb +4 -0
- data/lib/svix/models/application_in.rb +1 -1
- data/lib/svix/models/application_out.rb +1 -1
- data/lib/svix/models/attempt_statistics_data.rb +231 -0
- data/lib/svix/models/attempt_statistics_response.rb +265 -0
- data/lib/svix/models/border_radii_config.rb +236 -0
- data/lib/svix/models/border_radius_config.rb +236 -0
- data/lib/svix/models/border_radius_enum.rb +40 -0
- data/lib/svix/models/custom_theme_override.rb +227 -0
- data/lib/svix/models/dashboard_access_out.rb +1 -1
- data/lib/svix/models/endpoint_created_event.rb +1 -1
- data/lib/svix/models/endpoint_created_event_data.rb +1 -1
- data/lib/svix/models/endpoint_deleted_event.rb +1 -1
- data/lib/svix/models/endpoint_deleted_event_data.rb +1 -1
- data/lib/svix/models/endpoint_disabled_event.rb +1 -1
- data/lib/svix/models/endpoint_disabled_event_data.rb +1 -1
- data/lib/svix/models/endpoint_headers_in.rb +225 -0
- data/lib/svix/models/endpoint_headers_out.rb +252 -0
- data/lib/svix/models/endpoint_in.rb +1 -1
- data/lib/svix/models/endpoint_message_out.rb +1 -1
- data/lib/svix/models/endpoint_out.rb +1 -1
- data/lib/svix/models/endpoint_secret_out.rb +1 -1
- data/lib/svix/models/endpoint_secret_rotate_in.rb +1 -1
- data/lib/svix/models/endpoint_stats.rb +1 -1
- data/lib/svix/models/endpoint_update.rb +1 -1
- data/lib/svix/models/endpoint_updated_event.rb +1 -1
- data/lib/svix/models/endpoint_updated_event_data.rb +1 -1
- data/lib/svix/models/event_example_in.rb +1 -1
- data/lib/svix/models/event_type_example_out.rb +1 -1
- data/lib/svix/models/event_type_in.rb +1 -1
- data/lib/svix/models/event_type_out.rb +1 -1
- data/lib/svix/models/event_type_schema_in.rb +1 -1
- data/lib/svix/models/event_type_update.rb +1 -1
- data/lib/svix/models/font_size_config.rb +218 -0
- data/lib/svix/models/http_error_out.rb +1 -1
- data/lib/svix/models/http_validation_error.rb +1 -1
- data/lib/svix/models/list_response_application_out.rb +1 -1
- 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_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 +1 -1
- data/lib/svix/models/list_response_message_out.rb +1 -1
- data/lib/svix/models/message_attempt_endpoint_out.rb +1 -1
- data/lib/svix/models/message_attempt_exhausted_event.rb +1 -1
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +1 -1
- data/lib/svix/models/message_attempt_failed_event.rb +1 -1
- data/lib/svix/models/message_attempt_out.rb +1 -1
- data/lib/svix/models/message_attempt_trigger_type.rb +1 -1
- data/lib/svix/models/message_endpoint_out.rb +1 -1
- data/lib/svix/models/message_in.rb +41 -5
- data/lib/svix/models/message_out.rb +1 -1
- data/lib/svix/models/message_status.rb +1 -1
- data/lib/svix/models/portal_settings_out.rb +286 -0
- data/lib/svix/models/radii_enum.rb +39 -0
- data/lib/svix/models/recover_in.rb +1 -1
- data/lib/svix/models/settings_out.rb +323 -0
- data/lib/svix/models/statistics_period.rb +37 -0
- data/lib/svix/models/validation_error.rb +1 -1
- data/lib/svix/models/webhook_types.rb +1 -1
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +3 -1
- data/svix.gemspec +1 -1
- metadata +21 -6
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
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
|
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/). ## 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
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
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
|
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/). ## 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
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -22,12 +22,16 @@ module Svix
|
|
22
22
|
|
23
23
|
attr_accessor :payload
|
24
24
|
|
25
|
+
# The retention period for the payload (in days).
|
26
|
+
attr_accessor :payload_retention_period
|
27
|
+
|
25
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
29
|
def self.attribute_map
|
27
30
|
{
|
28
31
|
:'event_id' => :'eventId',
|
29
32
|
:'event_type' => :'eventType',
|
30
|
-
:'payload' => :'payload'
|
33
|
+
:'payload' => :'payload',
|
34
|
+
:'payload_retention_period' => :'payloadRetentionPeriod'
|
31
35
|
}
|
32
36
|
end
|
33
37
|
|
@@ -41,7 +45,8 @@ module Svix
|
|
41
45
|
{
|
42
46
|
:'event_id' => :'String',
|
43
47
|
:'event_type' => :'String',
|
44
|
-
:'payload' => :'Object'
|
48
|
+
:'payload' => :'Object',
|
49
|
+
:'payload_retention_period' => :'Integer'
|
45
50
|
}
|
46
51
|
end
|
47
52
|
|
@@ -77,6 +82,12 @@ module Svix
|
|
77
82
|
if attributes.key?(:'payload')
|
78
83
|
self.payload = attributes[:'payload']
|
79
84
|
end
|
85
|
+
|
86
|
+
if attributes.key?(:'payload_retention_period')
|
87
|
+
self.payload_retention_period = attributes[:'payload_retention_period']
|
88
|
+
else
|
89
|
+
self.payload_retention_period = 90
|
90
|
+
end
|
80
91
|
end
|
81
92
|
|
82
93
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -113,6 +124,14 @@ module Svix
|
|
113
124
|
invalid_properties.push('invalid value for "payload", payload cannot be nil.')
|
114
125
|
end
|
115
126
|
|
127
|
+
if !@payload_retention_period.nil? && @payload_retention_period > 90
|
128
|
+
invalid_properties.push('invalid value for "payload_retention_period", must be smaller than or equal to 90.')
|
129
|
+
end
|
130
|
+
|
131
|
+
if !@payload_retention_period.nil? && @payload_retention_period < 5
|
132
|
+
invalid_properties.push('invalid value for "payload_retention_period", must be greater than or equal to 5.')
|
133
|
+
end
|
134
|
+
|
116
135
|
invalid_properties
|
117
136
|
end
|
118
137
|
|
@@ -126,6 +145,8 @@ module Svix
|
|
126
145
|
return false if @event_type.to_s.length > 256
|
127
146
|
return false if @event_type !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
128
147
|
return false if @payload.nil?
|
148
|
+
return false if !@payload_retention_period.nil? && @payload_retention_period > 90
|
149
|
+
return false if !@payload_retention_period.nil? && @payload_retention_period < 5
|
129
150
|
true
|
130
151
|
end
|
131
152
|
|
@@ -167,6 +188,20 @@ module Svix
|
|
167
188
|
@event_type = event_type
|
168
189
|
end
|
169
190
|
|
191
|
+
# Custom attribute writer method with validation
|
192
|
+
# @param [Object] payload_retention_period Value to be assigned
|
193
|
+
def payload_retention_period=(payload_retention_period)
|
194
|
+
if !payload_retention_period.nil? && payload_retention_period > 90
|
195
|
+
fail ArgumentError, 'invalid value for "payload_retention_period", must be smaller than or equal to 90.'
|
196
|
+
end
|
197
|
+
|
198
|
+
if !payload_retention_period.nil? && payload_retention_period < 5
|
199
|
+
fail ArgumentError, 'invalid value for "payload_retention_period", must be greater than or equal to 5.'
|
200
|
+
end
|
201
|
+
|
202
|
+
@payload_retention_period = payload_retention_period
|
203
|
+
end
|
204
|
+
|
170
205
|
# Checks equality by comparing each attribute.
|
171
206
|
# @param [Object] Object to be compared
|
172
207
|
def ==(o)
|
@@ -174,7 +209,8 @@ module Svix
|
|
174
209
|
self.class == o.class &&
|
175
210
|
event_id == o.event_id &&
|
176
211
|
event_type == o.event_type &&
|
177
|
-
payload == o.payload
|
212
|
+
payload == o.payload &&
|
213
|
+
payload_retention_period == o.payload_retention_period
|
178
214
|
end
|
179
215
|
|
180
216
|
# @see the `==` method
|
@@ -186,7 +222,7 @@ module Svix
|
|
186
222
|
# Calculates hash code according to all attributes.
|
187
223
|
# @return [Integer] Hash code
|
188
224
|
def hash
|
189
|
-
[event_id, event_type, payload].hash
|
225
|
+
[event_id, event_type, payload, payload_retention_period].hash
|
190
226
|
end
|
191
227
|
|
192
228
|
# Builds the object from hash
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
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
|
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/). ## 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
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
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
|
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/). ## 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
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -0,0 +1,286 @@
|
|
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/). ## 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 PortalSettingsOut
|
18
|
+
attr_accessor :custom_color
|
19
|
+
|
20
|
+
attr_accessor :custom_font_family
|
21
|
+
|
22
|
+
attr_accessor :custom_logo_url
|
23
|
+
|
24
|
+
attr_accessor :custom_theme_override
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'custom_color' => :'customColor',
|
30
|
+
:'custom_font_family' => :'customFontFamily',
|
31
|
+
:'custom_logo_url' => :'customLogoUrl',
|
32
|
+
:'custom_theme_override' => :'customThemeOverride'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'custom_color' => :'String',
|
45
|
+
:'custom_font_family' => :'String',
|
46
|
+
:'custom_logo_url' => :'String',
|
47
|
+
:'custom_theme_override' => :'CustomThemeOverride'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::PortalSettingsOut` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::PortalSettingsOut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'custom_color')
|
73
|
+
self.custom_color = attributes[:'custom_color']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'custom_font_family')
|
77
|
+
self.custom_font_family = attributes[:'custom_font_family']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'custom_logo_url')
|
81
|
+
self.custom_logo_url = attributes[:'custom_logo_url']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'custom_theme_override')
|
85
|
+
self.custom_theme_override = attributes[:'custom_theme_override']
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
+
# @return Array for valid properties with the reasons
|
91
|
+
def list_invalid_properties
|
92
|
+
invalid_properties = Array.new
|
93
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_ ]+$/)
|
94
|
+
if !@custom_font_family.nil? && @custom_font_family !~ pattern
|
95
|
+
invalid_properties.push("invalid value for \"custom_font_family\", must conform to the pattern #{pattern}.")
|
96
|
+
end
|
97
|
+
|
98
|
+
if !@custom_logo_url.nil? && @custom_logo_url.to_s.length > 65536
|
99
|
+
invalid_properties.push('invalid value for "custom_logo_url", the character length must be smaller than or equal to 65536.')
|
100
|
+
end
|
101
|
+
|
102
|
+
if !@custom_logo_url.nil? && @custom_logo_url.to_s.length < 1
|
103
|
+
invalid_properties.push('invalid value for "custom_logo_url", the character length must be great than or equal to 1.')
|
104
|
+
end
|
105
|
+
|
106
|
+
invalid_properties
|
107
|
+
end
|
108
|
+
|
109
|
+
# Check to see if the all the properties in the model are valid
|
110
|
+
# @return true if the model is valid
|
111
|
+
def valid?
|
112
|
+
return false if !@custom_font_family.nil? && @custom_font_family !~ Regexp.new(/^[a-zA-Z0-9\-_ ]+$/)
|
113
|
+
return false if !@custom_logo_url.nil? && @custom_logo_url.to_s.length > 65536
|
114
|
+
return false if !@custom_logo_url.nil? && @custom_logo_url.to_s.length < 1
|
115
|
+
true
|
116
|
+
end
|
117
|
+
|
118
|
+
# Custom attribute writer method with validation
|
119
|
+
# @param [Object] custom_font_family Value to be assigned
|
120
|
+
def custom_font_family=(custom_font_family)
|
121
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_ ]+$/)
|
122
|
+
if !custom_font_family.nil? && custom_font_family !~ pattern
|
123
|
+
fail ArgumentError, "invalid value for \"custom_font_family\", must conform to the pattern #{pattern}."
|
124
|
+
end
|
125
|
+
|
126
|
+
@custom_font_family = custom_font_family
|
127
|
+
end
|
128
|
+
|
129
|
+
# Custom attribute writer method with validation
|
130
|
+
# @param [Object] custom_logo_url Value to be assigned
|
131
|
+
def custom_logo_url=(custom_logo_url)
|
132
|
+
if !custom_logo_url.nil? && custom_logo_url.to_s.length > 65536
|
133
|
+
fail ArgumentError, 'invalid value for "custom_logo_url", the character length must be smaller than or equal to 65536.'
|
134
|
+
end
|
135
|
+
|
136
|
+
if !custom_logo_url.nil? && custom_logo_url.to_s.length < 1
|
137
|
+
fail ArgumentError, 'invalid value for "custom_logo_url", the character length must be great than or equal to 1.'
|
138
|
+
end
|
139
|
+
|
140
|
+
@custom_logo_url = custom_logo_url
|
141
|
+
end
|
142
|
+
|
143
|
+
# Checks equality by comparing each attribute.
|
144
|
+
# @param [Object] Object to be compared
|
145
|
+
def ==(o)
|
146
|
+
return true if self.equal?(o)
|
147
|
+
self.class == o.class &&
|
148
|
+
custom_color == o.custom_color &&
|
149
|
+
custom_font_family == o.custom_font_family &&
|
150
|
+
custom_logo_url == o.custom_logo_url &&
|
151
|
+
custom_theme_override == o.custom_theme_override
|
152
|
+
end
|
153
|
+
|
154
|
+
# @see the `==` method
|
155
|
+
# @param [Object] Object to be compared
|
156
|
+
def eql?(o)
|
157
|
+
self == o
|
158
|
+
end
|
159
|
+
|
160
|
+
# Calculates hash code according to all attributes.
|
161
|
+
# @return [Integer] Hash code
|
162
|
+
def hash
|
163
|
+
[custom_color, custom_font_family, custom_logo_url, custom_theme_override].hash
|
164
|
+
end
|
165
|
+
|
166
|
+
# Builds the object from hash
|
167
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
168
|
+
# @return [Object] Returns the model itself
|
169
|
+
def self.build_from_hash(attributes)
|
170
|
+
new.build_from_hash(attributes)
|
171
|
+
end
|
172
|
+
|
173
|
+
# Builds the object from hash
|
174
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
175
|
+
# @return [Object] Returns the model itself
|
176
|
+
def build_from_hash(attributes)
|
177
|
+
return nil unless attributes.is_a?(Hash)
|
178
|
+
self.class.openapi_types.each_pair do |key, type|
|
179
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
180
|
+
self.send("#{key}=", nil)
|
181
|
+
elsif type =~ /\AArray<(.*)>/i
|
182
|
+
# check to ensure the input is an array given that the attribute
|
183
|
+
# is documented as an array but the input is not
|
184
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
185
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
186
|
+
end
|
187
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
188
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
self
|
193
|
+
end
|
194
|
+
|
195
|
+
# Deserializes the data based on type
|
196
|
+
# @param string type Data type
|
197
|
+
# @param string value Value to be deserialized
|
198
|
+
# @return [Object] Deserialized data
|
199
|
+
def _deserialize(type, value)
|
200
|
+
case type.to_sym
|
201
|
+
when :Time
|
202
|
+
Time.parse(value)
|
203
|
+
when :Date
|
204
|
+
Date.parse(value)
|
205
|
+
when :String
|
206
|
+
value.to_s
|
207
|
+
when :Integer
|
208
|
+
value.to_i
|
209
|
+
when :Float
|
210
|
+
value.to_f
|
211
|
+
when :Boolean
|
212
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
213
|
+
true
|
214
|
+
else
|
215
|
+
false
|
216
|
+
end
|
217
|
+
when :Object
|
218
|
+
# generic object (usually a Hash), return directly
|
219
|
+
value
|
220
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
221
|
+
inner_type = Regexp.last_match[:inner_type]
|
222
|
+
value.map { |v| _deserialize(inner_type, v) }
|
223
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
224
|
+
k_type = Regexp.last_match[:k_type]
|
225
|
+
v_type = Regexp.last_match[:v_type]
|
226
|
+
{}.tap do |hash|
|
227
|
+
value.each do |k, v|
|
228
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
229
|
+
end
|
230
|
+
end
|
231
|
+
else # model
|
232
|
+
# models (e.g. Pet) or oneOf
|
233
|
+
klass = Svix.const_get(type)
|
234
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the string representation of the object
|
239
|
+
# @return [String] String presentation of the object
|
240
|
+
def to_s
|
241
|
+
to_hash.to_s
|
242
|
+
end
|
243
|
+
|
244
|
+
# to_body is an alias to to_hash (backward compatibility)
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
246
|
+
def to_body
|
247
|
+
to_hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Returns the object in the form of hash
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
252
|
+
def to_hash
|
253
|
+
hash = {}
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
255
|
+
value = self.send(attr)
|
256
|
+
if value.nil?
|
257
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
258
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
259
|
+
end
|
260
|
+
|
261
|
+
hash[param] = _to_hash(value)
|
262
|
+
end
|
263
|
+
hash
|
264
|
+
end
|
265
|
+
|
266
|
+
# Outputs non-array value in the form of hash
|
267
|
+
# For object, use to_hash. Otherwise, just return the value
|
268
|
+
# @param [Object] value Any valid value
|
269
|
+
# @return [Hash] Returns the value in the form of hash
|
270
|
+
def _to_hash(value)
|
271
|
+
if value.is_a?(Array)
|
272
|
+
value.compact.map { |v| _to_hash(v) }
|
273
|
+
elsif value.is_a?(Hash)
|
274
|
+
{}.tap do |hash|
|
275
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
276
|
+
end
|
277
|
+
elsif value.respond_to? :to_hash
|
278
|
+
value.to_hash
|
279
|
+
else
|
280
|
+
value
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
end
|
285
|
+
|
286
|
+
end
|
@@ -0,0 +1,39 @@
|
|
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 RadiiEnum
|
18
|
+
NONE = "none".freeze
|
19
|
+
LG = "lg".freeze
|
20
|
+
SM = "sm".freeze
|
21
|
+
FULL = "full".freeze
|
22
|
+
|
23
|
+
# Builds the enum from string
|
24
|
+
# @param [String] The enum value in the form of the string
|
25
|
+
# @return [String] The enum value
|
26
|
+
def self.build_from_hash(value)
|
27
|
+
new.build_from_hash(value)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Builds the enum from string
|
31
|
+
# @param [String] The enum value in the form of the string
|
32
|
+
# @return [String] The enum value
|
33
|
+
def build_from_hash(value)
|
34
|
+
constantValues = RadiiEnum.constants.select { |c| RadiiEnum::const_get(c) == value }
|
35
|
+
raise "Invalid ENUM value #{value} for class #RadiiEnum" if constantValues.empty?
|
36
|
+
value
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
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
|
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/). ## 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
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|