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
|
@@ -19,62 +19,72 @@ module Svix
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
#
|
23
|
-
#
|
24
|
-
# @param
|
22
|
+
# Get App Usage Stats
|
23
|
+
# Get basic statistics for all applications.
|
24
|
+
# @param since [Time]
|
25
|
+
# @param _until [Time]
|
25
26
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @option opts [
|
27
|
-
# @option opts [String] :
|
28
|
-
# @return [
|
29
|
-
def
|
30
|
-
data, _status_code, _headers =
|
27
|
+
# @option opts [Integer] :limit (default to 50)
|
28
|
+
# @option opts [String] :iterator The app's ID
|
29
|
+
# @return [ListResponseApplicationStats]
|
30
|
+
def get_app_usage_stats_api_v1_app_stats_usage_get(since, _until, opts = {})
|
31
|
+
data, _status_code, _headers = get_app_usage_stats_api_v1_app_stats_usage_get_with_http_info(since, _until, opts)
|
31
32
|
data
|
32
33
|
end
|
33
34
|
|
34
|
-
#
|
35
|
-
#
|
36
|
-
# @param
|
35
|
+
# Get App Usage Stats
|
36
|
+
# Get basic statistics for all applications.
|
37
|
+
# @param since [Time]
|
38
|
+
# @param _until [Time]
|
37
39
|
# @param [Hash] opts the optional parameters
|
38
|
-
# @option opts [
|
39
|
-
# @option opts [String] :
|
40
|
-
# @return [Array<(
|
41
|
-
def
|
40
|
+
# @option opts [Integer] :limit
|
41
|
+
# @option opts [String] :iterator The app's ID
|
42
|
+
# @return [Array<(ListResponseApplicationStats, Integer, Hash)>] ListResponseApplicationStats data, response status code and response headers
|
43
|
+
def get_app_usage_stats_api_v1_app_stats_usage_get_with_http_info(since, _until, opts = {})
|
42
44
|
if @api_client.config.debugging
|
43
|
-
@api_client.config.logger.debug 'Calling API: ApplicationApi.
|
45
|
+
@api_client.config.logger.debug 'Calling API: ApplicationApi.get_app_usage_stats_api_v1_app_stats_usage_get ...'
|
44
46
|
end
|
45
|
-
# verify the required parameter '
|
46
|
-
if @api_client.config.client_side_validation &&
|
47
|
-
fail ArgumentError, "Missing the required parameter '
|
47
|
+
# verify the required parameter 'since' is set
|
48
|
+
if @api_client.config.client_side_validation && since.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'since' when calling ApplicationApi.get_app_usage_stats_api_v1_app_stats_usage_get"
|
48
50
|
end
|
51
|
+
# verify the required parameter '_until' is set
|
52
|
+
if @api_client.config.client_side_validation && _until.nil?
|
53
|
+
fail ArgumentError, "Missing the required parameter '_until' when calling ApplicationApi.get_app_usage_stats_api_v1_app_stats_usage_get"
|
54
|
+
end
|
55
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
56
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ApplicationApi.get_app_usage_stats_api_v1_app_stats_usage_get, must be smaller than or equal to 250.'
|
57
|
+
end
|
58
|
+
|
49
59
|
# resource path
|
50
|
-
local_var_path = '/api/v1/app/'
|
60
|
+
local_var_path = '/api/v1/app/stats/usage/'
|
51
61
|
|
52
62
|
# query parameters
|
53
63
|
query_params = opts[:query_params] || {}
|
54
|
-
query_params[:'
|
64
|
+
query_params[:'since'] = since
|
65
|
+
query_params[:'until'] = _until
|
66
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
67
|
+
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
55
68
|
|
56
69
|
# header parameters
|
57
70
|
header_params = opts[:header_params] || {}
|
58
71
|
# HTTP header 'Accept' (if needed)
|
59
72
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
-
# HTTP header 'Content-Type'
|
61
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
62
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
63
73
|
|
64
74
|
# form parameters
|
65
75
|
form_params = opts[:form_params] || {}
|
66
76
|
|
67
77
|
# http body (model)
|
68
|
-
post_body = opts[:debug_body]
|
78
|
+
post_body = opts[:debug_body]
|
69
79
|
|
70
80
|
# return_type
|
71
|
-
return_type = opts[:debug_return_type] || '
|
81
|
+
return_type = opts[:debug_return_type] || 'ListResponseApplicationStats'
|
72
82
|
|
73
83
|
# auth_names
|
74
84
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
75
85
|
|
76
86
|
new_options = opts.merge(
|
77
|
-
:operation => :"ApplicationApi.
|
87
|
+
:operation => :"ApplicationApi.get_app_usage_stats_api_v1_app_stats_usage_get",
|
78
88
|
:header_params => header_params,
|
79
89
|
:query_params => query_params,
|
80
90
|
:form_params => form_params,
|
@@ -83,51 +93,55 @@ module Svix
|
|
83
93
|
:return_type => return_type
|
84
94
|
)
|
85
95
|
|
86
|
-
data, status_code, headers = @api_client.call_api(:
|
96
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
87
97
|
if @api_client.config.debugging
|
88
|
-
@api_client.config.logger.debug "API called: ApplicationApi#
|
98
|
+
@api_client.config.logger.debug "API called: ApplicationApi#get_app_usage_stats_api_v1_app_stats_usage_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
99
|
end
|
90
100
|
return data, status_code, headers
|
91
101
|
end
|
92
102
|
|
93
|
-
#
|
94
|
-
#
|
95
|
-
# @param app_id [String]
|
103
|
+
# Patch Application
|
104
|
+
# Partially update an application.
|
105
|
+
# @param app_id [String] The app's ID or UID
|
106
|
+
# @param application_patch [ApplicationPatch]
|
96
107
|
# @param [Hash] opts the optional parameters
|
97
|
-
# @
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
nil
|
108
|
+
# @return [ApplicationOut]
|
109
|
+
def patch_application(app_id, application_patch, opts = {})
|
110
|
+
data, _status_code, _headers = patch_application_with_http_info(app_id, application_patch, opts)
|
111
|
+
data
|
102
112
|
end
|
103
113
|
|
104
|
-
#
|
105
|
-
#
|
106
|
-
# @param app_id [String]
|
114
|
+
# Patch Application
|
115
|
+
# Partially update an application.
|
116
|
+
# @param app_id [String] The app's ID or UID
|
117
|
+
# @param application_patch [ApplicationPatch]
|
107
118
|
# @param [Hash] opts the optional parameters
|
108
|
-
# @
|
109
|
-
|
110
|
-
def delete_application_api_v1_app_app_id_delete_with_http_info(app_id, opts = {})
|
119
|
+
# @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
|
120
|
+
def patch_application_with_http_info(app_id, application_patch, opts = {})
|
111
121
|
if @api_client.config.debugging
|
112
|
-
@api_client.config.logger.debug 'Calling API: ApplicationApi.
|
122
|
+
@api_client.config.logger.debug 'Calling API: ApplicationApi.patch_application ...'
|
113
123
|
end
|
114
124
|
# verify the required parameter 'app_id' is set
|
115
125
|
if @api_client.config.client_side_validation && app_id.nil?
|
116
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling ApplicationApi.
|
126
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ApplicationApi.patch_application"
|
117
127
|
end
|
118
128
|
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
119
|
-
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.
|
129
|
+
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.patch_application, the character length must be smaller than or equal to 256.'
|
120
130
|
end
|
121
131
|
|
122
132
|
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
123
|
-
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.
|
133
|
+
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.patch_application, the character length must be great than or equal to 1.'
|
124
134
|
end
|
125
135
|
|
126
136
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
127
137
|
if @api_client.config.client_side_validation && app_id !~ pattern
|
128
|
-
fail ArgumentError, "invalid value for 'app_id' when calling ApplicationApi.
|
138
|
+
fail ArgumentError, "invalid value for 'app_id' when calling ApplicationApi.patch_application, must conform to the pattern #{pattern}."
|
129
139
|
end
|
130
140
|
|
141
|
+
# verify the required parameter 'application_patch' is set
|
142
|
+
if @api_client.config.client_side_validation && application_patch.nil?
|
143
|
+
fail ArgumentError, "Missing the required parameter 'application_patch' when calling ApplicationApi.patch_application"
|
144
|
+
end
|
131
145
|
# resource path
|
132
146
|
local_var_path = '/api/v1/app/{app_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
133
147
|
|
@@ -138,22 +152,23 @@ module Svix
|
|
138
152
|
header_params = opts[:header_params] || {}
|
139
153
|
# HTTP header 'Accept' (if needed)
|
140
154
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
141
|
-
|
155
|
+
# HTTP header 'Content-Type'
|
156
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
142
157
|
|
143
158
|
# form parameters
|
144
159
|
form_params = opts[:form_params] || {}
|
145
160
|
|
146
161
|
# http body (model)
|
147
|
-
post_body = opts[:debug_body]
|
162
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(application_patch)
|
148
163
|
|
149
164
|
# return_type
|
150
|
-
return_type = opts[:debug_return_type]
|
165
|
+
return_type = opts[:debug_return_type] || 'ApplicationOut'
|
151
166
|
|
152
167
|
# auth_names
|
153
168
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
154
169
|
|
155
170
|
new_options = opts.merge(
|
156
|
-
:operation => :"ApplicationApi.
|
171
|
+
:operation => :"ApplicationApi.patch_application",
|
157
172
|
:header_params => header_params,
|
158
173
|
:query_params => query_params,
|
159
174
|
:form_params => form_params,
|
@@ -162,76 +177,130 @@ module Svix
|
|
162
177
|
:return_type => return_type
|
163
178
|
)
|
164
179
|
|
165
|
-
data, status_code, headers = @api_client.call_api(:
|
180
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
166
181
|
if @api_client.config.debugging
|
167
|
-
@api_client.config.logger.debug "API called: ApplicationApi#
|
182
|
+
@api_client.config.logger.debug "API called: ApplicationApi#patch_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
168
183
|
end
|
169
184
|
return data, status_code, headers
|
170
185
|
end
|
171
186
|
|
172
|
-
#
|
173
|
-
#
|
174
|
-
# @param
|
175
|
-
# @param since [Time]
|
176
|
-
# @param _until [Time]
|
187
|
+
# Create Application
|
188
|
+
# Create a new application.
|
189
|
+
# @param application_in [ApplicationIn]
|
177
190
|
# @param [Hash] opts the optional parameters
|
191
|
+
# @option opts [Boolean] :get_if_exists Get an existing application, or create a new one if doesn't exist. It's two separate functions in the libs. (default to false)
|
178
192
|
# @option opts [String] :idempotency_key The request's idempotency key
|
179
|
-
# @return [
|
180
|
-
def
|
181
|
-
data, _status_code, _headers =
|
193
|
+
# @return [ApplicationOut]
|
194
|
+
def v1_application_create(application_in, opts = {})
|
195
|
+
data, _status_code, _headers = v1_application_create_with_http_info(application_in, opts)
|
182
196
|
data
|
183
197
|
end
|
184
198
|
|
185
|
-
#
|
186
|
-
#
|
187
|
-
# @param
|
188
|
-
# @param since [Time]
|
189
|
-
# @param _until [Time]
|
199
|
+
# Create Application
|
200
|
+
# Create a new application.
|
201
|
+
# @param application_in [ApplicationIn]
|
190
202
|
# @param [Hash] opts the optional parameters
|
203
|
+
# @option opts [Boolean] :get_if_exists Get an existing application, or create a new one if doesn't exist. It's two separate functions in the libs.
|
191
204
|
# @option opts [String] :idempotency_key The request's idempotency key
|
192
|
-
# @return [Array<(
|
193
|
-
def
|
205
|
+
# @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
|
206
|
+
def v1_application_create_with_http_info(application_in, opts = {})
|
194
207
|
if @api_client.config.debugging
|
195
|
-
@api_client.config.logger.debug 'Calling API: ApplicationApi.
|
208
|
+
@api_client.config.logger.debug 'Calling API: ApplicationApi.v1_application_create ...'
|
209
|
+
end
|
210
|
+
# verify the required parameter 'application_in' is set
|
211
|
+
if @api_client.config.client_side_validation && application_in.nil?
|
212
|
+
fail ArgumentError, "Missing the required parameter 'application_in' when calling ApplicationApi.v1_application_create"
|
213
|
+
end
|
214
|
+
# resource path
|
215
|
+
local_var_path = '/api/v1/app/'
|
216
|
+
|
217
|
+
# query parameters
|
218
|
+
query_params = opts[:query_params] || {}
|
219
|
+
query_params[:'get_if_exists'] = opts[:'get_if_exists'] if !opts[:'get_if_exists'].nil?
|
220
|
+
|
221
|
+
# header parameters
|
222
|
+
header_params = opts[:header_params] || {}
|
223
|
+
# HTTP header 'Accept' (if needed)
|
224
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
225
|
+
# HTTP header 'Content-Type'
|
226
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
227
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
228
|
+
|
229
|
+
# form parameters
|
230
|
+
form_params = opts[:form_params] || {}
|
231
|
+
|
232
|
+
# http body (model)
|
233
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(application_in)
|
234
|
+
|
235
|
+
# return_type
|
236
|
+
return_type = opts[:debug_return_type] || 'ApplicationOut'
|
237
|
+
|
238
|
+
# auth_names
|
239
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
240
|
+
|
241
|
+
new_options = opts.merge(
|
242
|
+
:operation => :"ApplicationApi.v1_application_create",
|
243
|
+
:header_params => header_params,
|
244
|
+
:query_params => query_params,
|
245
|
+
:form_params => form_params,
|
246
|
+
:body => post_body,
|
247
|
+
:auth_names => auth_names,
|
248
|
+
:return_type => return_type
|
249
|
+
)
|
250
|
+
|
251
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
252
|
+
if @api_client.config.debugging
|
253
|
+
@api_client.config.logger.debug "API called: ApplicationApi#v1_application_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
254
|
+
end
|
255
|
+
return data, status_code, headers
|
256
|
+
end
|
257
|
+
|
258
|
+
# Delete Application
|
259
|
+
# Delete an application.
|
260
|
+
# @param app_id [String] The app's ID or UID
|
261
|
+
# @param [Hash] opts the optional parameters
|
262
|
+
# @return [nil]
|
263
|
+
def v1_application_delete(app_id, opts = {})
|
264
|
+
v1_application_delete_with_http_info(app_id, opts)
|
265
|
+
nil
|
266
|
+
end
|
267
|
+
|
268
|
+
# Delete Application
|
269
|
+
# Delete an application.
|
270
|
+
# @param app_id [String] The app's ID or UID
|
271
|
+
# @param [Hash] opts the optional parameters
|
272
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
273
|
+
def v1_application_delete_with_http_info(app_id, opts = {})
|
274
|
+
if @api_client.config.debugging
|
275
|
+
@api_client.config.logger.debug 'Calling API: ApplicationApi.v1_application_delete ...'
|
196
276
|
end
|
197
277
|
# verify the required parameter 'app_id' is set
|
198
278
|
if @api_client.config.client_side_validation && app_id.nil?
|
199
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling ApplicationApi.
|
279
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ApplicationApi.v1_application_delete"
|
200
280
|
end
|
201
281
|
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
202
|
-
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.
|
282
|
+
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.v1_application_delete, the character length must be smaller than or equal to 256.'
|
203
283
|
end
|
204
284
|
|
205
285
|
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
206
|
-
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.
|
286
|
+
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.v1_application_delete, the character length must be great than or equal to 1.'
|
207
287
|
end
|
208
288
|
|
209
289
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
210
290
|
if @api_client.config.client_side_validation && app_id !~ pattern
|
211
|
-
fail ArgumentError, "invalid value for 'app_id' when calling ApplicationApi.
|
291
|
+
fail ArgumentError, "invalid value for 'app_id' when calling ApplicationApi.v1_application_delete, must conform to the pattern #{pattern}."
|
212
292
|
end
|
213
293
|
|
214
|
-
# verify the required parameter 'since' is set
|
215
|
-
if @api_client.config.client_side_validation && since.nil?
|
216
|
-
fail ArgumentError, "Missing the required parameter 'since' when calling ApplicationApi.get_app_stats_api_v1_app_app_id_stats_get"
|
217
|
-
end
|
218
|
-
# verify the required parameter '_until' is set
|
219
|
-
if @api_client.config.client_side_validation && _until.nil?
|
220
|
-
fail ArgumentError, "Missing the required parameter '_until' when calling ApplicationApi.get_app_stats_api_v1_app_app_id_stats_get"
|
221
|
-
end
|
222
294
|
# resource path
|
223
|
-
local_var_path = '/api/v1/app/{app_id}/
|
295
|
+
local_var_path = '/api/v1/app/{app_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
224
296
|
|
225
297
|
# query parameters
|
226
298
|
query_params = opts[:query_params] || {}
|
227
|
-
query_params[:'since'] = since
|
228
|
-
query_params[:'until'] = _until
|
229
299
|
|
230
300
|
# header parameters
|
231
301
|
header_params = opts[:header_params] || {}
|
232
302
|
# HTTP header 'Accept' (if needed)
|
233
303
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
234
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
235
304
|
|
236
305
|
# form parameters
|
237
306
|
form_params = opts[:form_params] || {}
|
@@ -240,13 +309,13 @@ module Svix
|
|
240
309
|
post_body = opts[:debug_body]
|
241
310
|
|
242
311
|
# return_type
|
243
|
-
return_type = opts[:debug_return_type]
|
312
|
+
return_type = opts[:debug_return_type]
|
244
313
|
|
245
314
|
# auth_names
|
246
315
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
247
316
|
|
248
317
|
new_options = opts.merge(
|
249
|
-
:operation => :"ApplicationApi.
|
318
|
+
:operation => :"ApplicationApi.v1_application_delete",
|
250
319
|
:header_params => header_params,
|
251
320
|
:query_params => query_params,
|
252
321
|
:form_params => form_params,
|
@@ -255,67 +324,59 @@ module Svix
|
|
255
324
|
:return_type => return_type
|
256
325
|
)
|
257
326
|
|
258
|
-
data, status_code, headers = @api_client.call_api(:
|
327
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
259
328
|
if @api_client.config.debugging
|
260
|
-
@api_client.config.logger.debug "API called: ApplicationApi#
|
329
|
+
@api_client.config.logger.debug "API called: ApplicationApi#v1_application_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
261
330
|
end
|
262
331
|
return data, status_code, headers
|
263
332
|
end
|
264
333
|
|
265
|
-
# Get
|
266
|
-
# Get
|
267
|
-
# @param
|
268
|
-
# @param _until [Time]
|
334
|
+
# Get Application
|
335
|
+
# Get an application.
|
336
|
+
# @param app_id [String] The app's ID or UID
|
269
337
|
# @param [Hash] opts the optional parameters
|
270
|
-
# @
|
271
|
-
|
272
|
-
|
273
|
-
# @return [ListResponseApplicationStats]
|
274
|
-
def get_app_usage_stats_api_v1_app_stats_usage_get(since, _until, opts = {})
|
275
|
-
data, _status_code, _headers = get_app_usage_stats_api_v1_app_stats_usage_get_with_http_info(since, _until, opts)
|
338
|
+
# @return [ApplicationOut]
|
339
|
+
def v1_application_get(app_id, opts = {})
|
340
|
+
data, _status_code, _headers = v1_application_get_with_http_info(app_id, opts)
|
276
341
|
data
|
277
342
|
end
|
278
343
|
|
279
|
-
# Get
|
280
|
-
# Get
|
281
|
-
# @param
|
282
|
-
# @param _until [Time]
|
344
|
+
# Get Application
|
345
|
+
# Get an application.
|
346
|
+
# @param app_id [String] The app's ID or UID
|
283
347
|
# @param [Hash] opts the optional parameters
|
284
|
-
# @
|
285
|
-
|
286
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
287
|
-
# @return [Array<(ListResponseApplicationStats, Integer, Hash)>] ListResponseApplicationStats data, response status code and response headers
|
288
|
-
def get_app_usage_stats_api_v1_app_stats_usage_get_with_http_info(since, _until, opts = {})
|
348
|
+
# @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
|
349
|
+
def v1_application_get_with_http_info(app_id, opts = {})
|
289
350
|
if @api_client.config.debugging
|
290
|
-
@api_client.config.logger.debug 'Calling API: ApplicationApi.
|
351
|
+
@api_client.config.logger.debug 'Calling API: ApplicationApi.v1_application_get ...'
|
291
352
|
end
|
292
|
-
# verify the required parameter '
|
293
|
-
if @api_client.config.client_side_validation &&
|
294
|
-
fail ArgumentError, "Missing the required parameter '
|
353
|
+
# verify the required parameter 'app_id' is set
|
354
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
355
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ApplicationApi.v1_application_get"
|
295
356
|
end
|
296
|
-
|
297
|
-
|
298
|
-
fail ArgumentError, "Missing the required parameter '_until' when calling ApplicationApi.get_app_usage_stats_api_v1_app_stats_usage_get"
|
357
|
+
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
358
|
+
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.v1_application_get, the character length must be smaller than or equal to 256.'
|
299
359
|
end
|
300
|
-
|
301
|
-
|
360
|
+
|
361
|
+
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
362
|
+
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.v1_application_get, the character length must be great than or equal to 1.'
|
363
|
+
end
|
364
|
+
|
365
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
366
|
+
if @api_client.config.client_side_validation && app_id !~ pattern
|
367
|
+
fail ArgumentError, "invalid value for 'app_id' when calling ApplicationApi.v1_application_get, must conform to the pattern #{pattern}."
|
302
368
|
end
|
303
369
|
|
304
370
|
# resource path
|
305
|
-
local_var_path = '/api/v1/app/
|
371
|
+
local_var_path = '/api/v1/app/{app_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
306
372
|
|
307
373
|
# query parameters
|
308
374
|
query_params = opts[:query_params] || {}
|
309
|
-
query_params[:'since'] = since
|
310
|
-
query_params[:'until'] = _until
|
311
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
312
|
-
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
313
375
|
|
314
376
|
# header parameters
|
315
377
|
header_params = opts[:header_params] || {}
|
316
378
|
# HTTP header 'Accept' (if needed)
|
317
379
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
318
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
319
380
|
|
320
381
|
# form parameters
|
321
382
|
form_params = opts[:form_params] || {}
|
@@ -324,13 +385,13 @@ module Svix
|
|
324
385
|
post_body = opts[:debug_body]
|
325
386
|
|
326
387
|
# return_type
|
327
|
-
return_type = opts[:debug_return_type] || '
|
388
|
+
return_type = opts[:debug_return_type] || 'ApplicationOut'
|
328
389
|
|
329
390
|
# auth_names
|
330
391
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
331
392
|
|
332
393
|
new_options = opts.merge(
|
333
|
-
:operation => :"ApplicationApi.
|
394
|
+
:operation => :"ApplicationApi.v1_application_get",
|
334
395
|
:header_params => header_params,
|
335
396
|
:query_params => query_params,
|
336
397
|
:form_params => form_params,
|
@@ -341,60 +402,71 @@ module Svix
|
|
341
402
|
|
342
403
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
343
404
|
if @api_client.config.debugging
|
344
|
-
@api_client.config.logger.debug "API called: ApplicationApi#
|
405
|
+
@api_client.config.logger.debug "API called: ApplicationApi#v1_application_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
345
406
|
end
|
346
407
|
return data, status_code, headers
|
347
408
|
end
|
348
409
|
|
349
|
-
# Get
|
350
|
-
# Get
|
351
|
-
# @param
|
410
|
+
# Get App Stats
|
411
|
+
# Get basic statistics for the application
|
412
|
+
# @param since [Time]
|
413
|
+
# @param _until [Time]
|
414
|
+
# @param app_id [String] The app's ID or UID
|
352
415
|
# @param [Hash] opts the optional parameters
|
353
|
-
# @
|
354
|
-
|
355
|
-
|
356
|
-
data, _status_code, _headers = get_application_api_v1_app_app_id_get_with_http_info(app_id, opts)
|
416
|
+
# @return [ApplicationStats]
|
417
|
+
def v1_application_get_stats(since, _until, app_id, opts = {})
|
418
|
+
data, _status_code, _headers = v1_application_get_stats_with_http_info(since, _until, app_id, opts)
|
357
419
|
data
|
358
420
|
end
|
359
421
|
|
360
|
-
# Get
|
361
|
-
# Get
|
362
|
-
# @param
|
422
|
+
# Get App Stats
|
423
|
+
# Get basic statistics for the application
|
424
|
+
# @param since [Time]
|
425
|
+
# @param _until [Time]
|
426
|
+
# @param app_id [String] The app's ID or UID
|
363
427
|
# @param [Hash] opts the optional parameters
|
364
|
-
# @
|
365
|
-
|
366
|
-
def get_application_api_v1_app_app_id_get_with_http_info(app_id, opts = {})
|
428
|
+
# @return [Array<(ApplicationStats, Integer, Hash)>] ApplicationStats data, response status code and response headers
|
429
|
+
def v1_application_get_stats_with_http_info(since, _until, app_id, opts = {})
|
367
430
|
if @api_client.config.debugging
|
368
|
-
@api_client.config.logger.debug 'Calling API: ApplicationApi.
|
431
|
+
@api_client.config.logger.debug 'Calling API: ApplicationApi.v1_application_get_stats ...'
|
432
|
+
end
|
433
|
+
# verify the required parameter 'since' is set
|
434
|
+
if @api_client.config.client_side_validation && since.nil?
|
435
|
+
fail ArgumentError, "Missing the required parameter 'since' when calling ApplicationApi.v1_application_get_stats"
|
436
|
+
end
|
437
|
+
# verify the required parameter '_until' is set
|
438
|
+
if @api_client.config.client_side_validation && _until.nil?
|
439
|
+
fail ArgumentError, "Missing the required parameter '_until' when calling ApplicationApi.v1_application_get_stats"
|
369
440
|
end
|
370
441
|
# verify the required parameter 'app_id' is set
|
371
442
|
if @api_client.config.client_side_validation && app_id.nil?
|
372
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling ApplicationApi.
|
443
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ApplicationApi.v1_application_get_stats"
|
373
444
|
end
|
374
445
|
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
375
|
-
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.
|
446
|
+
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.v1_application_get_stats, the character length must be smaller than or equal to 256.'
|
376
447
|
end
|
377
448
|
|
378
449
|
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
379
|
-
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.
|
450
|
+
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.v1_application_get_stats, the character length must be great than or equal to 1.'
|
380
451
|
end
|
381
452
|
|
382
453
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
383
454
|
if @api_client.config.client_side_validation && app_id !~ pattern
|
384
|
-
fail ArgumentError, "invalid value for 'app_id' when calling ApplicationApi.
|
455
|
+
fail ArgumentError, "invalid value for 'app_id' when calling ApplicationApi.v1_application_get_stats, must conform to the pattern #{pattern}."
|
385
456
|
end
|
386
457
|
|
387
458
|
# resource path
|
388
|
-
local_var_path = '/api/v1/app/{app_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
459
|
+
local_var_path = '/api/v1/app/{app_id}/stats/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
389
460
|
|
390
461
|
# query parameters
|
391
462
|
query_params = opts[:query_params] || {}
|
463
|
+
query_params[:'since'] = since
|
464
|
+
query_params[:'until'] = _until
|
392
465
|
|
393
466
|
# header parameters
|
394
467
|
header_params = opts[:header_params] || {}
|
395
468
|
# HTTP header 'Accept' (if needed)
|
396
469
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
397
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
398
470
|
|
399
471
|
# form parameters
|
400
472
|
form_params = opts[:form_params] || {}
|
@@ -403,13 +475,13 @@ module Svix
|
|
403
475
|
post_body = opts[:debug_body]
|
404
476
|
|
405
477
|
# return_type
|
406
|
-
return_type = opts[:debug_return_type] || '
|
478
|
+
return_type = opts[:debug_return_type] || 'ApplicationStats'
|
407
479
|
|
408
480
|
# auth_names
|
409
481
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
410
482
|
|
411
483
|
new_options = opts.merge(
|
412
|
-
:operation => :"ApplicationApi.
|
484
|
+
:operation => :"ApplicationApi.v1_application_get_stats",
|
413
485
|
:header_params => header_params,
|
414
486
|
:query_params => query_params,
|
415
487
|
:form_params => form_params,
|
@@ -420,7 +492,7 @@ module Svix
|
|
420
492
|
|
421
493
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
422
494
|
if @api_client.config.debugging
|
423
|
-
@api_client.config.logger.debug "API called: ApplicationApi#
|
495
|
+
@api_client.config.logger.debug "API called: ApplicationApi#v1_application_get_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
424
496
|
end
|
425
497
|
return data, status_code, headers
|
426
498
|
end
|
@@ -428,30 +500,32 @@ module Svix
|
|
428
500
|
# List Applications
|
429
501
|
# List of all the organization's applications.
|
430
502
|
# @param [Hash] opts the optional parameters
|
431
|
-
# @option opts [
|
432
|
-
# @option opts [
|
503
|
+
# @option opts [Integer] :limit
|
504
|
+
# @option opts [String] :iterator The app's ID
|
433
505
|
# @option opts [Ordering] :order
|
434
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
435
506
|
# @return [ListResponseApplicationOut]
|
436
|
-
def
|
437
|
-
data, _status_code, _headers =
|
507
|
+
def v1_application_list(opts = {})
|
508
|
+
data, _status_code, _headers = v1_application_list_with_http_info(opts)
|
438
509
|
data
|
439
510
|
end
|
440
511
|
|
441
512
|
# List Applications
|
442
513
|
# List of all the organization's applications.
|
443
514
|
# @param [Hash] opts the optional parameters
|
444
|
-
# @option opts [String] :iterator
|
445
515
|
# @option opts [Integer] :limit
|
516
|
+
# @option opts [String] :iterator The app's ID
|
446
517
|
# @option opts [Ordering] :order
|
447
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
448
518
|
# @return [Array<(ListResponseApplicationOut, Integer, Hash)>] ListResponseApplicationOut data, response status code and response headers
|
449
|
-
def
|
519
|
+
def v1_application_list_with_http_info(opts = {})
|
450
520
|
if @api_client.config.debugging
|
451
|
-
@api_client.config.logger.debug 'Calling API: ApplicationApi.
|
521
|
+
@api_client.config.logger.debug 'Calling API: ApplicationApi.v1_application_list ...'
|
452
522
|
end
|
453
523
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
454
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ApplicationApi.
|
524
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ApplicationApi.v1_application_list, must be smaller than or equal to 250.'
|
525
|
+
end
|
526
|
+
|
527
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
528
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ApplicationApi.v1_application_list, must be greater than or equal to 1.'
|
455
529
|
end
|
456
530
|
|
457
531
|
# resource path
|
@@ -459,15 +533,14 @@ module Svix
|
|
459
533
|
|
460
534
|
# query parameters
|
461
535
|
query_params = opts[:query_params] || {}
|
462
|
-
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
463
536
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
537
|
+
query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
|
464
538
|
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
465
539
|
|
466
540
|
# header parameters
|
467
541
|
header_params = opts[:header_params] || {}
|
468
542
|
# HTTP header 'Accept' (if needed)
|
469
543
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
470
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
471
544
|
|
472
545
|
# form parameters
|
473
546
|
form_params = opts[:form_params] || {}
|
@@ -482,7 +555,7 @@ module Svix
|
|
482
555
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
483
556
|
|
484
557
|
new_options = opts.merge(
|
485
|
-
:operation => :"ApplicationApi.
|
558
|
+
:operation => :"ApplicationApi.v1_application_list",
|
486
559
|
:header_params => header_params,
|
487
560
|
:query_params => query_params,
|
488
561
|
:form_params => form_params,
|
@@ -493,54 +566,52 @@ module Svix
|
|
493
566
|
|
494
567
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
495
568
|
if @api_client.config.debugging
|
496
|
-
@api_client.config.logger.debug "API called: ApplicationApi#
|
569
|
+
@api_client.config.logger.debug "API called: ApplicationApi#v1_application_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
497
570
|
end
|
498
571
|
return data, status_code, headers
|
499
572
|
end
|
500
573
|
|
501
574
|
# Update Application
|
502
575
|
# Update an application.
|
503
|
-
# @param app_id [String]
|
576
|
+
# @param app_id [String] The app's ID or UID
|
504
577
|
# @param application_in [ApplicationIn]
|
505
578
|
# @param [Hash] opts the optional parameters
|
506
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
507
579
|
# @return [ApplicationOut]
|
508
|
-
def
|
509
|
-
data, _status_code, _headers =
|
580
|
+
def v1_application_update(app_id, application_in, opts = {})
|
581
|
+
data, _status_code, _headers = v1_application_update_with_http_info(app_id, application_in, opts)
|
510
582
|
data
|
511
583
|
end
|
512
584
|
|
513
585
|
# Update Application
|
514
586
|
# Update an application.
|
515
|
-
# @param app_id [String]
|
587
|
+
# @param app_id [String] The app's ID or UID
|
516
588
|
# @param application_in [ApplicationIn]
|
517
589
|
# @param [Hash] opts the optional parameters
|
518
|
-
# @option opts [String] :idempotency_key The request's idempotency key
|
519
590
|
# @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
|
520
|
-
def
|
591
|
+
def v1_application_update_with_http_info(app_id, application_in, opts = {})
|
521
592
|
if @api_client.config.debugging
|
522
|
-
@api_client.config.logger.debug 'Calling API: ApplicationApi.
|
593
|
+
@api_client.config.logger.debug 'Calling API: ApplicationApi.v1_application_update ...'
|
523
594
|
end
|
524
595
|
# verify the required parameter 'app_id' is set
|
525
596
|
if @api_client.config.client_side_validation && app_id.nil?
|
526
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling ApplicationApi.
|
597
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ApplicationApi.v1_application_update"
|
527
598
|
end
|
528
599
|
if @api_client.config.client_side_validation && app_id.to_s.length > 256
|
529
|
-
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.
|
600
|
+
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.v1_application_update, the character length must be smaller than or equal to 256.'
|
530
601
|
end
|
531
602
|
|
532
603
|
if @api_client.config.client_side_validation && app_id.to_s.length < 1
|
533
|
-
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.
|
604
|
+
fail ArgumentError, 'invalid value for "app_id" when calling ApplicationApi.v1_application_update, the character length must be great than or equal to 1.'
|
534
605
|
end
|
535
606
|
|
536
607
|
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
537
608
|
if @api_client.config.client_side_validation && app_id !~ pattern
|
538
|
-
fail ArgumentError, "invalid value for 'app_id' when calling ApplicationApi.
|
609
|
+
fail ArgumentError, "invalid value for 'app_id' when calling ApplicationApi.v1_application_update, must conform to the pattern #{pattern}."
|
539
610
|
end
|
540
611
|
|
541
612
|
# verify the required parameter 'application_in' is set
|
542
613
|
if @api_client.config.client_side_validation && application_in.nil?
|
543
|
-
fail ArgumentError, "Missing the required parameter 'application_in' when calling ApplicationApi.
|
614
|
+
fail ArgumentError, "Missing the required parameter 'application_in' when calling ApplicationApi.v1_application_update"
|
544
615
|
end
|
545
616
|
# resource path
|
546
617
|
local_var_path = '/api/v1/app/{app_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
@@ -554,7 +625,6 @@ module Svix
|
|
554
625
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
555
626
|
# HTTP header 'Content-Type'
|
556
627
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
557
|
-
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
558
628
|
|
559
629
|
# form parameters
|
560
630
|
form_params = opts[:form_params] || {}
|
@@ -569,7 +639,7 @@ module Svix
|
|
569
639
|
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
570
640
|
|
571
641
|
new_options = opts.merge(
|
572
|
-
:operation => :"ApplicationApi.
|
642
|
+
:operation => :"ApplicationApi.v1_application_update",
|
573
643
|
:header_params => header_params,
|
574
644
|
:query_params => query_params,
|
575
645
|
:form_params => form_params,
|
@@ -580,7 +650,7 @@ module Svix
|
|
580
650
|
|
581
651
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
582
652
|
if @api_client.config.debugging
|
583
|
-
@api_client.config.logger.debug "API called: ApplicationApi#
|
653
|
+
@api_client.config.logger.debug "API called: ApplicationApi#v1_application_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
584
654
|
end
|
585
655
|
return data, status_code, headers
|
586
656
|
end
|