svix 0.28.0 → 0.37.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +7 -1
  3. data/README.md +16 -3
  4. data/lib/svix/api/application_api.rb +386 -0
  5. data/lib/svix/api/authentication_api.rb +155 -0
  6. data/lib/svix/api/endpoint_api.rb +1281 -0
  7. data/lib/svix/api/event_type_api.rb +454 -0
  8. data/lib/svix/api/health_api.rb +77 -0
  9. data/lib/svix/api/message_api.rb +289 -0
  10. data/lib/svix/api/message_attempt_api.rb +678 -0
  11. data/lib/svix/api/statistics_api.rb +205 -0
  12. data/lib/svix/api_client.rb +399 -0
  13. data/lib/svix/api_error.rb +57 -0
  14. data/lib/svix/application_api.rb +29 -0
  15. data/lib/svix/authentication_api.rb +17 -0
  16. data/lib/svix/configuration.rb +277 -0
  17. data/lib/svix/endpoint_api.rb +55 -0
  18. data/{src → lib}/svix/errors.rb +0 -0
  19. data/lib/svix/event_type_api.rb +25 -0
  20. data/lib/svix/internal.rb +16 -0
  21. data/lib/svix/message_api.rb +21 -0
  22. data/lib/svix/message_attempt_api.rb +33 -0
  23. data/lib/svix/models/application_in.rb +277 -0
  24. data/lib/svix/models/application_out.rb +319 -0
  25. data/lib/svix/models/attempt_statistics_data.rb +231 -0
  26. data/lib/svix/models/attempt_statistics_response.rb +265 -0
  27. data/lib/svix/models/dashboard_access_out.rb +265 -0
  28. data/lib/svix/models/endpoint_created_event.rb +269 -0
  29. data/lib/svix/models/endpoint_created_event_data.rb +282 -0
  30. data/lib/svix/models/endpoint_deleted_event.rb +269 -0
  31. data/lib/svix/models/endpoint_deleted_event_data.rb +282 -0
  32. data/lib/svix/models/endpoint_disabled_event.rb +269 -0
  33. data/lib/svix/models/endpoint_disabled_event_data.rb +296 -0
  34. data/lib/svix/models/endpoint_headers_in.rb +225 -0
  35. data/lib/svix/models/endpoint_headers_out.rb +252 -0
  36. data/lib/svix/models/endpoint_in.rb +394 -0
  37. data/lib/svix/models/endpoint_message_out.rb +363 -0
  38. data/lib/svix/models/endpoint_out.rb +409 -0
  39. data/lib/svix/models/endpoint_secret_out.rb +245 -0
  40. data/lib/svix/models/endpoint_secret_rotate_in.rb +236 -0
  41. data/lib/svix/models/endpoint_stats.rb +265 -0
  42. data/lib/svix/models/endpoint_update.rb +367 -0
  43. data/lib/svix/models/endpoint_updated_event.rb +269 -0
  44. data/lib/svix/models/endpoint_updated_event_data.rb +282 -0
  45. data/lib/svix/models/endpointd_updated_event.rb +269 -0
  46. data/lib/svix/models/event_example_in.rb +253 -0
  47. data/lib/svix/models/event_type_example_out.rb +223 -0
  48. data/lib/svix/models/event_type_in.rb +290 -0
  49. data/lib/svix/models/event_type_out.rb +318 -0
  50. data/lib/svix/models/event_type_schema_in.rb +224 -0
  51. data/lib/svix/models/event_type_update.rb +246 -0
  52. data/lib/svix/models/http_error_out.rb +237 -0
  53. data/lib/svix/models/http_validation_error.rb +220 -0
  54. data/lib/svix/models/list_response_application_out.rb +248 -0
  55. data/lib/svix/models/list_response_endpoint_message_out.rb +248 -0
  56. data/lib/svix/models/list_response_endpoint_out.rb +248 -0
  57. data/lib/svix/models/list_response_event_type_out.rb +248 -0
  58. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +248 -0
  59. data/lib/svix/models/list_response_message_attempt_out.rb +248 -0
  60. data/lib/svix/models/list_response_message_endpoint_out.rb +248 -0
  61. data/lib/svix/models/list_response_message_out.rb +248 -0
  62. data/lib/svix/models/message_attempt_endpoint_out.rb +293 -0
  63. data/lib/svix/models/message_attempt_exhausted_event.rb +269 -0
  64. data/lib/svix/models/message_attempt_exhausted_event_data.rb +310 -0
  65. data/lib/svix/models/message_attempt_failed_event.rb +251 -0
  66. data/lib/svix/models/message_attempt_out.rb +307 -0
  67. data/lib/svix/models/message_attempt_trigger_type.rb +37 -0
  68. data/lib/svix/models/message_endpoint_out.rb +418 -0
  69. data/lib/svix/models/message_in.rb +312 -0
  70. data/lib/svix/models/message_out.rb +340 -0
  71. data/lib/svix/models/message_status.rb +39 -0
  72. data/lib/svix/models/recover_in.rb +223 -0
  73. data/lib/svix/models/statistics_period.rb +37 -0
  74. data/lib/svix/models/validation_error.rb +253 -0
  75. data/lib/svix/models/webhook_types.rb +280 -0
  76. data/lib/svix/svix.rb +43 -0
  77. data/{src → lib}/svix/util.rb +1 -1
  78. data/{src → lib}/svix/version.rb +1 -1
  79. data/{src → lib}/svix/webhook.rb +1 -1
  80. data/lib/svix.rb +80 -0
  81. data/svix.gemspec +16 -6
  82. metadata +100 -9
  83. data/.gitignore +0 -9
  84. data/src/svix.rb +0 -8
@@ -0,0 +1,1281 @@
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 'cgi'
14
+
15
+ module Svix
16
+ class EndpointApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Endpoint
23
+ # Create a new endpoint for the application. When `secret` is `null` the secret is automatically generated (recommended)
24
+ # @param app_id [String]
25
+ # @param endpoint_in [EndpointIn]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [EndpointOut]
28
+ def create_endpoint_api_v1_app_app_id_endpoint_post(app_id, endpoint_in, opts = {})
29
+ data, _status_code, _headers = create_endpoint_api_v1_app_app_id_endpoint_post_with_http_info(app_id, endpoint_in, opts)
30
+ data
31
+ end
32
+
33
+ # Create Endpoint
34
+ # Create a new endpoint for the application. When &#x60;secret&#x60; is &#x60;null&#x60; the secret is automatically generated (recommended)
35
+ # @param app_id [String]
36
+ # @param endpoint_in [EndpointIn]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(EndpointOut, Integer, Hash)>] EndpointOut data, response status code and response headers
39
+ def create_endpoint_api_v1_app_app_id_endpoint_post_with_http_info(app_id, endpoint_in, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: EndpointApi.create_endpoint_api_v1_app_app_id_endpoint_post ...'
42
+ end
43
+ # verify the required parameter 'app_id' is set
44
+ if @api_client.config.client_side_validation && app_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.create_endpoint_api_v1_app_app_id_endpoint_post"
46
+ end
47
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
48
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.create_endpoint_api_v1_app_app_id_endpoint_post, the character length must be smaller than or equal to 256.'
49
+ end
50
+
51
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
52
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.create_endpoint_api_v1_app_app_id_endpoint_post, the character length must be great than or equal to 1.'
53
+ end
54
+
55
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
56
+ if @api_client.config.client_side_validation && app_id !~ pattern
57
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.create_endpoint_api_v1_app_app_id_endpoint_post, must conform to the pattern #{pattern}."
58
+ end
59
+
60
+ # verify the required parameter 'endpoint_in' is set
61
+ if @api_client.config.client_side_validation && endpoint_in.nil?
62
+ fail ArgumentError, "Missing the required parameter 'endpoint_in' when calling EndpointApi.create_endpoint_api_v1_app_app_id_endpoint_post"
63
+ end
64
+ # resource path
65
+ local_var_path = '/api/v1/app/{app_id}/endpoint/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
66
+
67
+ # query parameters
68
+ query_params = opts[:query_params] || {}
69
+
70
+ # header parameters
71
+ header_params = opts[:header_params] || {}
72
+ # HTTP header 'Accept' (if needed)
73
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
74
+ # HTTP header 'Content-Type'
75
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
76
+
77
+ # form parameters
78
+ form_params = opts[:form_params] || {}
79
+
80
+ # http body (model)
81
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_in)
82
+
83
+ # return_type
84
+ return_type = opts[:debug_return_type] || 'EndpointOut'
85
+
86
+ # auth_names
87
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
88
+
89
+ new_options = opts.merge(
90
+ :operation => :"EndpointApi.create_endpoint_api_v1_app_app_id_endpoint_post",
91
+ :header_params => header_params,
92
+ :query_params => query_params,
93
+ :form_params => form_params,
94
+ :body => post_body,
95
+ :auth_names => auth_names,
96
+ :return_type => return_type
97
+ )
98
+
99
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
100
+ if @api_client.config.debugging
101
+ @api_client.config.logger.debug "API called: EndpointApi#create_endpoint_api_v1_app_app_id_endpoint_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
102
+ end
103
+ return data, status_code, headers
104
+ end
105
+
106
+ # Delete Endpoint
107
+ # Delete an endpoint.
108
+ # @param endpoint_id [String]
109
+ # @param app_id [String]
110
+ # @param [Hash] opts the optional parameters
111
+ # @return [nil]
112
+ def delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete(endpoint_id, app_id, opts = {})
113
+ delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete_with_http_info(endpoint_id, app_id, opts)
114
+ nil
115
+ end
116
+
117
+ # Delete Endpoint
118
+ # Delete an endpoint.
119
+ # @param endpoint_id [String]
120
+ # @param app_id [String]
121
+ # @param [Hash] opts the optional parameters
122
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
123
+ def delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete_with_http_info(endpoint_id, app_id, opts = {})
124
+ if @api_client.config.debugging
125
+ @api_client.config.logger.debug 'Calling API: EndpointApi.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete ...'
126
+ end
127
+ # verify the required parameter 'endpoint_id' is set
128
+ if @api_client.config.client_side_validation && endpoint_id.nil?
129
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete"
130
+ end
131
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
132
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete, the character length must be smaller than or equal to 256.'
133
+ end
134
+
135
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
136
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete, the character length must be great than or equal to 1.'
137
+ end
138
+
139
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
140
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
141
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete, must conform to the pattern #{pattern}."
142
+ end
143
+
144
+ # verify the required parameter 'app_id' is set
145
+ if @api_client.config.client_side_validation && app_id.nil?
146
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete"
147
+ end
148
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
149
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete, the character length must be smaller than or equal to 256.'
150
+ end
151
+
152
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
153
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete, the character length must be great than or equal to 1.'
154
+ end
155
+
156
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
157
+ if @api_client.config.client_side_validation && app_id !~ pattern
158
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete, must conform to the pattern #{pattern}."
159
+ end
160
+
161
+ # resource path
162
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
163
+
164
+ # query parameters
165
+ query_params = opts[:query_params] || {}
166
+
167
+ # header parameters
168
+ header_params = opts[:header_params] || {}
169
+ # HTTP header 'Accept' (if needed)
170
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
171
+
172
+ # form parameters
173
+ form_params = opts[:form_params] || {}
174
+
175
+ # http body (model)
176
+ post_body = opts[:debug_body]
177
+
178
+ # return_type
179
+ return_type = opts[:debug_return_type]
180
+
181
+ # auth_names
182
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
183
+
184
+ new_options = opts.merge(
185
+ :operation => :"EndpointApi.delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete",
186
+ :header_params => header_params,
187
+ :query_params => query_params,
188
+ :form_params => form_params,
189
+ :body => post_body,
190
+ :auth_names => auth_names,
191
+ :return_type => return_type
192
+ )
193
+
194
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: EndpointApi#delete_endpoint_api_v1_app_app_id_endpoint_endpoint_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ return data, status_code, headers
199
+ end
200
+
201
+ # Get Endpoint
202
+ # Get an application.
203
+ # @param endpoint_id [String]
204
+ # @param app_id [String]
205
+ # @param [Hash] opts the optional parameters
206
+ # @return [EndpointOut]
207
+ def get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get(endpoint_id, app_id, opts = {})
208
+ data, _status_code, _headers = get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get_with_http_info(endpoint_id, app_id, opts)
209
+ data
210
+ end
211
+
212
+ # Get Endpoint
213
+ # Get an application.
214
+ # @param endpoint_id [String]
215
+ # @param app_id [String]
216
+ # @param [Hash] opts the optional parameters
217
+ # @return [Array<(EndpointOut, Integer, Hash)>] EndpointOut data, response status code and response headers
218
+ def get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get_with_http_info(endpoint_id, app_id, opts = {})
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug 'Calling API: EndpointApi.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get ...'
221
+ end
222
+ # verify the required parameter 'endpoint_id' is set
223
+ if @api_client.config.client_side_validation && endpoint_id.nil?
224
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get"
225
+ end
226
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
227
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get, the character length must be smaller than or equal to 256.'
228
+ end
229
+
230
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
231
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get, the character length must be great than or equal to 1.'
232
+ end
233
+
234
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
235
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
236
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get, must conform to the pattern #{pattern}."
237
+ end
238
+
239
+ # verify the required parameter 'app_id' is set
240
+ if @api_client.config.client_side_validation && app_id.nil?
241
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get"
242
+ end
243
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
244
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get, the character length must be smaller than or equal to 256.'
245
+ end
246
+
247
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
248
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get, the character length must be great than or equal to 1.'
249
+ end
250
+
251
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
252
+ if @api_client.config.client_side_validation && app_id !~ pattern
253
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get, must conform to the pattern #{pattern}."
254
+ end
255
+
256
+ # resource path
257
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
258
+
259
+ # query parameters
260
+ query_params = opts[:query_params] || {}
261
+
262
+ # header parameters
263
+ header_params = opts[:header_params] || {}
264
+ # HTTP header 'Accept' (if needed)
265
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
266
+
267
+ # form parameters
268
+ form_params = opts[:form_params] || {}
269
+
270
+ # http body (model)
271
+ post_body = opts[:debug_body]
272
+
273
+ # return_type
274
+ return_type = opts[:debug_return_type] || 'EndpointOut'
275
+
276
+ # auth_names
277
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
278
+
279
+ new_options = opts.merge(
280
+ :operation => :"EndpointApi.get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get",
281
+ :header_params => header_params,
282
+ :query_params => query_params,
283
+ :form_params => form_params,
284
+ :body => post_body,
285
+ :auth_names => auth_names,
286
+ :return_type => return_type
287
+ )
288
+
289
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
290
+ if @api_client.config.debugging
291
+ @api_client.config.logger.debug "API called: EndpointApi#get_endpoint_api_v1_app_app_id_endpoint_endpoint_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
292
+ end
293
+ return data, status_code, headers
294
+ end
295
+
296
+ # Get Endpoint Headers
297
+ # Get the additional headers to be sent with the webhook
298
+ # @param endpoint_id [String]
299
+ # @param app_id [String]
300
+ # @param [Hash] opts the optional parameters
301
+ # @return [EndpointHeadersOut]
302
+ def get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get(endpoint_id, app_id, opts = {})
303
+ data, _status_code, _headers = get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get_with_http_info(endpoint_id, app_id, opts)
304
+ data
305
+ end
306
+
307
+ # Get Endpoint Headers
308
+ # Get the additional headers to be sent with the webhook
309
+ # @param endpoint_id [String]
310
+ # @param app_id [String]
311
+ # @param [Hash] opts the optional parameters
312
+ # @return [Array<(EndpointHeadersOut, Integer, Hash)>] EndpointHeadersOut data, response status code and response headers
313
+ def get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get_with_http_info(endpoint_id, app_id, opts = {})
314
+ if @api_client.config.debugging
315
+ @api_client.config.logger.debug 'Calling API: EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get ...'
316
+ end
317
+ # verify the required parameter 'endpoint_id' is set
318
+ if @api_client.config.client_side_validation && endpoint_id.nil?
319
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get"
320
+ end
321
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
322
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, the character length must be smaller than or equal to 256.'
323
+ end
324
+
325
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
326
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, the character length must be great than or equal to 1.'
327
+ end
328
+
329
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
330
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
331
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, must conform to the pattern #{pattern}."
332
+ end
333
+
334
+ # verify the required parameter 'app_id' is set
335
+ if @api_client.config.client_side_validation && app_id.nil?
336
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get"
337
+ end
338
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
339
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, the character length must be smaller than or equal to 256.'
340
+ end
341
+
342
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
343
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, the character length must be great than or equal to 1.'
344
+ end
345
+
346
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
347
+ if @api_client.config.client_side_validation && app_id !~ pattern
348
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get, must conform to the pattern #{pattern}."
349
+ end
350
+
351
+ # resource path
352
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
353
+
354
+ # query parameters
355
+ query_params = opts[:query_params] || {}
356
+
357
+ # header parameters
358
+ header_params = opts[:header_params] || {}
359
+ # HTTP header 'Accept' (if needed)
360
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
361
+
362
+ # form parameters
363
+ form_params = opts[:form_params] || {}
364
+
365
+ # http body (model)
366
+ post_body = opts[:debug_body]
367
+
368
+ # return_type
369
+ return_type = opts[:debug_return_type] || 'EndpointHeadersOut'
370
+
371
+ # auth_names
372
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
373
+
374
+ new_options = opts.merge(
375
+ :operation => :"EndpointApi.get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get",
376
+ :header_params => header_params,
377
+ :query_params => query_params,
378
+ :form_params => form_params,
379
+ :body => post_body,
380
+ :auth_names => auth_names,
381
+ :return_type => return_type
382
+ )
383
+
384
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
385
+ if @api_client.config.debugging
386
+ @api_client.config.logger.debug "API called: EndpointApi#get_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
387
+ end
388
+ return data, status_code, headers
389
+ end
390
+
391
+ # Get Endpoint Secret
392
+ # Get the endpoint's signing secret. This is used to verify the authenticity of the webhook. For more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).
393
+ # @param endpoint_id [String]
394
+ # @param app_id [String]
395
+ # @param [Hash] opts the optional parameters
396
+ # @return [EndpointSecretOut]
397
+ def get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get(endpoint_id, app_id, opts = {})
398
+ data, _status_code, _headers = get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get_with_http_info(endpoint_id, app_id, opts)
399
+ data
400
+ end
401
+
402
+ # Get Endpoint Secret
403
+ # Get the endpoint&#39;s signing secret. This is used to verify the authenticity of the webhook. For more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).
404
+ # @param endpoint_id [String]
405
+ # @param app_id [String]
406
+ # @param [Hash] opts the optional parameters
407
+ # @return [Array<(EndpointSecretOut, Integer, Hash)>] EndpointSecretOut data, response status code and response headers
408
+ def get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get_with_http_info(endpoint_id, app_id, opts = {})
409
+ if @api_client.config.debugging
410
+ @api_client.config.logger.debug 'Calling API: EndpointApi.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get ...'
411
+ end
412
+ # verify the required parameter 'endpoint_id' is set
413
+ if @api_client.config.client_side_validation && endpoint_id.nil?
414
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get"
415
+ end
416
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
417
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get, the character length must be smaller than or equal to 256.'
418
+ end
419
+
420
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
421
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get, the character length must be great than or equal to 1.'
422
+ end
423
+
424
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
425
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
426
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get, must conform to the pattern #{pattern}."
427
+ end
428
+
429
+ # verify the required parameter 'app_id' is set
430
+ if @api_client.config.client_side_validation && app_id.nil?
431
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get"
432
+ end
433
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
434
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get, the character length must be smaller than or equal to 256.'
435
+ end
436
+
437
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
438
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get, the character length must be great than or equal to 1.'
439
+ end
440
+
441
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
442
+ if @api_client.config.client_side_validation && app_id !~ pattern
443
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get, must conform to the pattern #{pattern}."
444
+ end
445
+
446
+ # resource path
447
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
448
+
449
+ # query parameters
450
+ query_params = opts[:query_params] || {}
451
+
452
+ # header parameters
453
+ header_params = opts[:header_params] || {}
454
+ # HTTP header 'Accept' (if needed)
455
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
456
+
457
+ # form parameters
458
+ form_params = opts[:form_params] || {}
459
+
460
+ # http body (model)
461
+ post_body = opts[:debug_body]
462
+
463
+ # return_type
464
+ return_type = opts[:debug_return_type] || 'EndpointSecretOut'
465
+
466
+ # auth_names
467
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
468
+
469
+ new_options = opts.merge(
470
+ :operation => :"EndpointApi.get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get",
471
+ :header_params => header_params,
472
+ :query_params => query_params,
473
+ :form_params => form_params,
474
+ :body => post_body,
475
+ :auth_names => auth_names,
476
+ :return_type => return_type
477
+ )
478
+
479
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
480
+ if @api_client.config.debugging
481
+ @api_client.config.logger.debug "API called: EndpointApi#get_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
482
+ end
483
+ return data, status_code, headers
484
+ end
485
+
486
+ # Get Endpoint Stats
487
+ # Get basic statistics for the endpoint.
488
+ # @param endpoint_id [String]
489
+ # @param app_id [String]
490
+ # @param [Hash] opts the optional parameters
491
+ # @return [EndpointStats]
492
+ def get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get(endpoint_id, app_id, opts = {})
493
+ data, _status_code, _headers = get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get_with_http_info(endpoint_id, app_id, opts)
494
+ data
495
+ end
496
+
497
+ # Get Endpoint Stats
498
+ # Get basic statistics for the endpoint.
499
+ # @param endpoint_id [String]
500
+ # @param app_id [String]
501
+ # @param [Hash] opts the optional parameters
502
+ # @return [Array<(EndpointStats, Integer, Hash)>] EndpointStats data, response status code and response headers
503
+ def get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get_with_http_info(endpoint_id, app_id, opts = {})
504
+ if @api_client.config.debugging
505
+ @api_client.config.logger.debug 'Calling API: EndpointApi.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get ...'
506
+ end
507
+ # verify the required parameter 'endpoint_id' is set
508
+ if @api_client.config.client_side_validation && endpoint_id.nil?
509
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get"
510
+ end
511
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
512
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get, the character length must be smaller than or equal to 256.'
513
+ end
514
+
515
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
516
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get, the character length must be great than or equal to 1.'
517
+ end
518
+
519
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
520
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
521
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get, must conform to the pattern #{pattern}."
522
+ end
523
+
524
+ # verify the required parameter 'app_id' is set
525
+ if @api_client.config.client_side_validation && app_id.nil?
526
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get"
527
+ end
528
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
529
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get, the character length must be smaller than or equal to 256.'
530
+ end
531
+
532
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
533
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get, the character length must be great than or equal to 1.'
534
+ end
535
+
536
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
537
+ if @api_client.config.client_side_validation && app_id !~ pattern
538
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get, must conform to the pattern #{pattern}."
539
+ end
540
+
541
+ # resource path
542
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
543
+
544
+ # query parameters
545
+ query_params = opts[:query_params] || {}
546
+
547
+ # header parameters
548
+ header_params = opts[:header_params] || {}
549
+ # HTTP header 'Accept' (if needed)
550
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
551
+
552
+ # form parameters
553
+ form_params = opts[:form_params] || {}
554
+
555
+ # http body (model)
556
+ post_body = opts[:debug_body]
557
+
558
+ # return_type
559
+ return_type = opts[:debug_return_type] || 'EndpointStats'
560
+
561
+ # auth_names
562
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
563
+
564
+ new_options = opts.merge(
565
+ :operation => :"EndpointApi.get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get",
566
+ :header_params => header_params,
567
+ :query_params => query_params,
568
+ :form_params => form_params,
569
+ :body => post_body,
570
+ :auth_names => auth_names,
571
+ :return_type => return_type
572
+ )
573
+
574
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
575
+ if @api_client.config.debugging
576
+ @api_client.config.logger.debug "API called: EndpointApi#get_endpoint_stats_api_v1_app_app_id_endpoint_endpoint_id_stats_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
577
+ end
578
+ return data, status_code, headers
579
+ end
580
+
581
+ # List Endpoints
582
+ # List the application's endpoints.
583
+ # @param app_id [String]
584
+ # @param [Hash] opts the optional parameters
585
+ # @option opts [String] :iterator
586
+ # @option opts [Integer] :limit (default to 50)
587
+ # @return [ListResponseEndpointOut]
588
+ def list_endpoints_api_v1_app_app_id_endpoint_get(app_id, opts = {})
589
+ data, _status_code, _headers = list_endpoints_api_v1_app_app_id_endpoint_get_with_http_info(app_id, opts)
590
+ data
591
+ end
592
+
593
+ # List Endpoints
594
+ # List the application&#39;s endpoints.
595
+ # @param app_id [String]
596
+ # @param [Hash] opts the optional parameters
597
+ # @option opts [String] :iterator
598
+ # @option opts [Integer] :limit
599
+ # @return [Array<(ListResponseEndpointOut, Integer, Hash)>] ListResponseEndpointOut data, response status code and response headers
600
+ def list_endpoints_api_v1_app_app_id_endpoint_get_with_http_info(app_id, opts = {})
601
+ if @api_client.config.debugging
602
+ @api_client.config.logger.debug 'Calling API: EndpointApi.list_endpoints_api_v1_app_app_id_endpoint_get ...'
603
+ end
604
+ # verify the required parameter 'app_id' is set
605
+ if @api_client.config.client_side_validation && app_id.nil?
606
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.list_endpoints_api_v1_app_app_id_endpoint_get"
607
+ end
608
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
609
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.list_endpoints_api_v1_app_app_id_endpoint_get, the character length must be smaller than or equal to 256.'
610
+ end
611
+
612
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
613
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.list_endpoints_api_v1_app_app_id_endpoint_get, the character length must be great than or equal to 1.'
614
+ end
615
+
616
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
617
+ if @api_client.config.client_side_validation && app_id !~ pattern
618
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.list_endpoints_api_v1_app_app_id_endpoint_get, must conform to the pattern #{pattern}."
619
+ end
620
+
621
+ # resource path
622
+ local_var_path = '/api/v1/app/{app_id}/endpoint/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
623
+
624
+ # query parameters
625
+ query_params = opts[:query_params] || {}
626
+ query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
627
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
628
+
629
+ # header parameters
630
+ header_params = opts[:header_params] || {}
631
+ # HTTP header 'Accept' (if needed)
632
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
633
+
634
+ # form parameters
635
+ form_params = opts[:form_params] || {}
636
+
637
+ # http body (model)
638
+ post_body = opts[:debug_body]
639
+
640
+ # return_type
641
+ return_type = opts[:debug_return_type] || 'ListResponseEndpointOut'
642
+
643
+ # auth_names
644
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
645
+
646
+ new_options = opts.merge(
647
+ :operation => :"EndpointApi.list_endpoints_api_v1_app_app_id_endpoint_get",
648
+ :header_params => header_params,
649
+ :query_params => query_params,
650
+ :form_params => form_params,
651
+ :body => post_body,
652
+ :auth_names => auth_names,
653
+ :return_type => return_type
654
+ )
655
+
656
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
657
+ if @api_client.config.debugging
658
+ @api_client.config.logger.debug "API called: EndpointApi#list_endpoints_api_v1_app_app_id_endpoint_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
659
+ end
660
+ return data, status_code, headers
661
+ end
662
+
663
+ # Patch Endpoint Headers
664
+ # Partially set the additional headers to be sent with the webhook
665
+ # @param app_id [String]
666
+ # @param endpoint_id [String]
667
+ # @param endpoint_headers_in [EndpointHeadersIn]
668
+ # @param [Hash] opts the optional parameters
669
+ # @return [nil]
670
+ def patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch(app_id, endpoint_id, endpoint_headers_in, opts = {})
671
+ patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts)
672
+ nil
673
+ end
674
+
675
+ # Patch Endpoint Headers
676
+ # Partially set the additional headers to be sent with the webhook
677
+ # @param app_id [String]
678
+ # @param endpoint_id [String]
679
+ # @param endpoint_headers_in [EndpointHeadersIn]
680
+ # @param [Hash] opts the optional parameters
681
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
682
+ def patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts = {})
683
+ if @api_client.config.debugging
684
+ @api_client.config.logger.debug 'Calling API: EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch ...'
685
+ end
686
+ # verify the required parameter 'app_id' is set
687
+ if @api_client.config.client_side_validation && app_id.nil?
688
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch"
689
+ end
690
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
691
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, the character length must be smaller than or equal to 256.'
692
+ end
693
+
694
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
695
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, the character length must be great than or equal to 1.'
696
+ end
697
+
698
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
699
+ if @api_client.config.client_side_validation && app_id !~ pattern
700
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, must conform to the pattern #{pattern}."
701
+ end
702
+
703
+ # verify the required parameter 'endpoint_id' is set
704
+ if @api_client.config.client_side_validation && endpoint_id.nil?
705
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch"
706
+ end
707
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
708
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, the character length must be smaller than or equal to 256.'
709
+ end
710
+
711
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
712
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, the character length must be great than or equal to 1.'
713
+ end
714
+
715
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
716
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
717
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch, must conform to the pattern #{pattern}."
718
+ end
719
+
720
+ # verify the required parameter 'endpoint_headers_in' is set
721
+ if @api_client.config.client_side_validation && endpoint_headers_in.nil?
722
+ fail ArgumentError, "Missing the required parameter 'endpoint_headers_in' when calling EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch"
723
+ end
724
+ # resource path
725
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
726
+
727
+ # query parameters
728
+ query_params = opts[:query_params] || {}
729
+
730
+ # header parameters
731
+ header_params = opts[:header_params] || {}
732
+ # HTTP header 'Accept' (if needed)
733
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
734
+ # HTTP header 'Content-Type'
735
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
736
+
737
+ # form parameters
738
+ form_params = opts[:form_params] || {}
739
+
740
+ # http body (model)
741
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_headers_in)
742
+
743
+ # return_type
744
+ return_type = opts[:debug_return_type]
745
+
746
+ # auth_names
747
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
748
+
749
+ new_options = opts.merge(
750
+ :operation => :"EndpointApi.patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch",
751
+ :header_params => header_params,
752
+ :query_params => query_params,
753
+ :form_params => form_params,
754
+ :body => post_body,
755
+ :auth_names => auth_names,
756
+ :return_type => return_type
757
+ )
758
+
759
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
760
+ if @api_client.config.debugging
761
+ @api_client.config.logger.debug "API called: EndpointApi#patch_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
762
+ end
763
+ return data, status_code, headers
764
+ end
765
+
766
+ # Resend Failed Webhooks
767
+ # Resend all failed messages since a given time.
768
+ # @param app_id [String]
769
+ # @param endpoint_id [String]
770
+ # @param recover_in [RecoverIn]
771
+ # @param [Hash] opts the optional parameters
772
+ # @return [Object]
773
+ def resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post(app_id, endpoint_id, recover_in, opts = {})
774
+ data, _status_code, _headers = resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts)
775
+ data
776
+ end
777
+
778
+ # Resend Failed Webhooks
779
+ # Resend all failed messages since a given time.
780
+ # @param app_id [String]
781
+ # @param endpoint_id [String]
782
+ # @param recover_in [RecoverIn]
783
+ # @param [Hash] opts the optional parameters
784
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
785
+ def resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post_with_http_info(app_id, endpoint_id, recover_in, opts = {})
786
+ if @api_client.config.debugging
787
+ @api_client.config.logger.debug 'Calling API: EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post ...'
788
+ end
789
+ # verify the required parameter 'app_id' is set
790
+ if @api_client.config.client_side_validation && app_id.nil?
791
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
792
+ end
793
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
794
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
795
+ end
796
+
797
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
798
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
799
+ end
800
+
801
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
802
+ if @api_client.config.client_side_validation && app_id !~ pattern
803
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
804
+ end
805
+
806
+ # verify the required parameter 'endpoint_id' is set
807
+ if @api_client.config.client_side_validation && endpoint_id.nil?
808
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
809
+ end
810
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
811
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be smaller than or equal to 256.'
812
+ end
813
+
814
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
815
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, the character length must be great than or equal to 1.'
816
+ end
817
+
818
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
819
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
820
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post, must conform to the pattern #{pattern}."
821
+ end
822
+
823
+ # verify the required parameter 'recover_in' is set
824
+ if @api_client.config.client_side_validation && recover_in.nil?
825
+ fail ArgumentError, "Missing the required parameter 'recover_in' when calling EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post"
826
+ end
827
+ # resource path
828
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
829
+
830
+ # query parameters
831
+ query_params = opts[:query_params] || {}
832
+
833
+ # header parameters
834
+ header_params = opts[:header_params] || {}
835
+ # HTTP header 'Accept' (if needed)
836
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
837
+ # HTTP header 'Content-Type'
838
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
839
+
840
+ # form parameters
841
+ form_params = opts[:form_params] || {}
842
+
843
+ # http body (model)
844
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(recover_in)
845
+
846
+ # return_type
847
+ return_type = opts[:debug_return_type] || 'Object'
848
+
849
+ # auth_names
850
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
851
+
852
+ new_options = opts.merge(
853
+ :operation => :"EndpointApi.resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post",
854
+ :header_params => header_params,
855
+ :query_params => query_params,
856
+ :form_params => form_params,
857
+ :body => post_body,
858
+ :auth_names => auth_names,
859
+ :return_type => return_type
860
+ )
861
+
862
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
863
+ if @api_client.config.debugging
864
+ @api_client.config.logger.debug "API called: EndpointApi#resend_failed_webhooks_api_v1_app_app_id_endpoint_endpoint_id_recover_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
865
+ end
866
+ return data, status_code, headers
867
+ end
868
+
869
+ # Rotate Endpoint Secret
870
+ # Rotates the endpoint's signing secret. The previous secret will be valid for the next 24 hours.
871
+ # @param endpoint_id [String]
872
+ # @param app_id [String]
873
+ # @param endpoint_secret_rotate_in [EndpointSecretRotateIn]
874
+ # @param [Hash] opts the optional parameters
875
+ # @return [nil]
876
+ def rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post(endpoint_id, app_id, endpoint_secret_rotate_in, opts = {})
877
+ rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post_with_http_info(endpoint_id, app_id, endpoint_secret_rotate_in, opts)
878
+ nil
879
+ end
880
+
881
+ # Rotate Endpoint Secret
882
+ # Rotates the endpoint&#39;s signing secret. The previous secret will be valid for the next 24 hours.
883
+ # @param endpoint_id [String]
884
+ # @param app_id [String]
885
+ # @param endpoint_secret_rotate_in [EndpointSecretRotateIn]
886
+ # @param [Hash] opts the optional parameters
887
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
888
+ def rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post_with_http_info(endpoint_id, app_id, endpoint_secret_rotate_in, opts = {})
889
+ if @api_client.config.debugging
890
+ @api_client.config.logger.debug 'Calling API: EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post ...'
891
+ end
892
+ # verify the required parameter 'endpoint_id' is set
893
+ if @api_client.config.client_side_validation && endpoint_id.nil?
894
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post"
895
+ end
896
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
897
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, the character length must be smaller than or equal to 256.'
898
+ end
899
+
900
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
901
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, the character length must be great than or equal to 1.'
902
+ end
903
+
904
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
905
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
906
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, must conform to the pattern #{pattern}."
907
+ end
908
+
909
+ # verify the required parameter 'app_id' is set
910
+ if @api_client.config.client_side_validation && app_id.nil?
911
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post"
912
+ end
913
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
914
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, the character length must be smaller than or equal to 256.'
915
+ end
916
+
917
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
918
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, the character length must be great than or equal to 1.'
919
+ end
920
+
921
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
922
+ if @api_client.config.client_side_validation && app_id !~ pattern
923
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post, must conform to the pattern #{pattern}."
924
+ end
925
+
926
+ # verify the required parameter 'endpoint_secret_rotate_in' is set
927
+ if @api_client.config.client_side_validation && endpoint_secret_rotate_in.nil?
928
+ fail ArgumentError, "Missing the required parameter 'endpoint_secret_rotate_in' when calling EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post"
929
+ end
930
+ # resource path
931
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
932
+
933
+ # query parameters
934
+ query_params = opts[:query_params] || {}
935
+
936
+ # header parameters
937
+ header_params = opts[:header_params] || {}
938
+ # HTTP header 'Accept' (if needed)
939
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
940
+ # HTTP header 'Content-Type'
941
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
942
+
943
+ # form parameters
944
+ form_params = opts[:form_params] || {}
945
+
946
+ # http body (model)
947
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_secret_rotate_in)
948
+
949
+ # return_type
950
+ return_type = opts[:debug_return_type]
951
+
952
+ # auth_names
953
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
954
+
955
+ new_options = opts.merge(
956
+ :operation => :"EndpointApi.rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post",
957
+ :header_params => header_params,
958
+ :query_params => query_params,
959
+ :form_params => form_params,
960
+ :body => post_body,
961
+ :auth_names => auth_names,
962
+ :return_type => return_type
963
+ )
964
+
965
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
966
+ if @api_client.config.debugging
967
+ @api_client.config.logger.debug "API called: EndpointApi#rotate_endpoint_secret_api_v1_app_app_id_endpoint_endpoint_id_secret_rotate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
968
+ end
969
+ return data, status_code, headers
970
+ end
971
+
972
+ # Send Event Type Example Message
973
+ # Send an example message for event
974
+ # @param app_id [String]
975
+ # @param endpoint_id [String]
976
+ # @param event_example_in [EventExampleIn]
977
+ # @param [Hash] opts the optional parameters
978
+ # @return [MessageOut]
979
+ def send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post(app_id, endpoint_id, event_example_in, opts = {})
980
+ data, _status_code, _headers = send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post_with_http_info(app_id, endpoint_id, event_example_in, opts)
981
+ data
982
+ end
983
+
984
+ # Send Event Type Example Message
985
+ # Send an example message for event
986
+ # @param app_id [String]
987
+ # @param endpoint_id [String]
988
+ # @param event_example_in [EventExampleIn]
989
+ # @param [Hash] opts the optional parameters
990
+ # @return [Array<(MessageOut, Integer, Hash)>] MessageOut data, response status code and response headers
991
+ def send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post_with_http_info(app_id, endpoint_id, event_example_in, opts = {})
992
+ if @api_client.config.debugging
993
+ @api_client.config.logger.debug 'Calling API: EndpointApi.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post ...'
994
+ end
995
+ # verify the required parameter 'app_id' is set
996
+ if @api_client.config.client_side_validation && app_id.nil?
997
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post"
998
+ end
999
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
1000
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post, the character length must be smaller than or equal to 256.'
1001
+ end
1002
+
1003
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
1004
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post, the character length must be great than or equal to 1.'
1005
+ end
1006
+
1007
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1008
+ if @api_client.config.client_side_validation && app_id !~ pattern
1009
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post, must conform to the pattern #{pattern}."
1010
+ end
1011
+
1012
+ # verify the required parameter 'endpoint_id' is set
1013
+ if @api_client.config.client_side_validation && endpoint_id.nil?
1014
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post"
1015
+ end
1016
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
1017
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post, the character length must be smaller than or equal to 256.'
1018
+ end
1019
+
1020
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
1021
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post, the character length must be great than or equal to 1.'
1022
+ end
1023
+
1024
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1025
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
1026
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post, must conform to the pattern #{pattern}."
1027
+ end
1028
+
1029
+ # verify the required parameter 'event_example_in' is set
1030
+ if @api_client.config.client_side_validation && event_example_in.nil?
1031
+ fail ArgumentError, "Missing the required parameter 'event_example_in' when calling EndpointApi.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post"
1032
+ end
1033
+ # resource path
1034
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
1035
+
1036
+ # query parameters
1037
+ query_params = opts[:query_params] || {}
1038
+
1039
+ # header parameters
1040
+ header_params = opts[:header_params] || {}
1041
+ # HTTP header 'Accept' (if needed)
1042
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1043
+ # HTTP header 'Content-Type'
1044
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1045
+
1046
+ # form parameters
1047
+ form_params = opts[:form_params] || {}
1048
+
1049
+ # http body (model)
1050
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(event_example_in)
1051
+
1052
+ # return_type
1053
+ return_type = opts[:debug_return_type] || 'MessageOut'
1054
+
1055
+ # auth_names
1056
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
1057
+
1058
+ new_options = opts.merge(
1059
+ :operation => :"EndpointApi.send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post",
1060
+ :header_params => header_params,
1061
+ :query_params => query_params,
1062
+ :form_params => form_params,
1063
+ :body => post_body,
1064
+ :auth_names => auth_names,
1065
+ :return_type => return_type
1066
+ )
1067
+
1068
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1069
+ if @api_client.config.debugging
1070
+ @api_client.config.logger.debug "API called: EndpointApi#send_event_type_example_message_api_v1_app_app_id_endpoint_endpoint_id_send_example_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1071
+ end
1072
+ return data, status_code, headers
1073
+ end
1074
+
1075
+ # Update Endpoint
1076
+ # Update an endpoint.
1077
+ # @param endpoint_id [String]
1078
+ # @param app_id [String]
1079
+ # @param endpoint_update [EndpointUpdate]
1080
+ # @param [Hash] opts the optional parameters
1081
+ # @return [EndpointOut]
1082
+ def update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put(endpoint_id, app_id, endpoint_update, opts = {})
1083
+ data, _status_code, _headers = update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put_with_http_info(endpoint_id, app_id, endpoint_update, opts)
1084
+ data
1085
+ end
1086
+
1087
+ # Update Endpoint
1088
+ # Update an endpoint.
1089
+ # @param endpoint_id [String]
1090
+ # @param app_id [String]
1091
+ # @param endpoint_update [EndpointUpdate]
1092
+ # @param [Hash] opts the optional parameters
1093
+ # @return [Array<(EndpointOut, Integer, Hash)>] EndpointOut data, response status code and response headers
1094
+ def update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put_with_http_info(endpoint_id, app_id, endpoint_update, opts = {})
1095
+ if @api_client.config.debugging
1096
+ @api_client.config.logger.debug 'Calling API: EndpointApi.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put ...'
1097
+ end
1098
+ # verify the required parameter 'endpoint_id' is set
1099
+ if @api_client.config.client_side_validation && endpoint_id.nil?
1100
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put"
1101
+ end
1102
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
1103
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put, the character length must be smaller than or equal to 256.'
1104
+ end
1105
+
1106
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
1107
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put, the character length must be great than or equal to 1.'
1108
+ end
1109
+
1110
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1111
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
1112
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put, must conform to the pattern #{pattern}."
1113
+ end
1114
+
1115
+ # verify the required parameter 'app_id' is set
1116
+ if @api_client.config.client_side_validation && app_id.nil?
1117
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put"
1118
+ end
1119
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
1120
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put, the character length must be smaller than or equal to 256.'
1121
+ end
1122
+
1123
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
1124
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put, the character length must be great than or equal to 1.'
1125
+ end
1126
+
1127
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1128
+ if @api_client.config.client_side_validation && app_id !~ pattern
1129
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put, must conform to the pattern #{pattern}."
1130
+ end
1131
+
1132
+ # verify the required parameter 'endpoint_update' is set
1133
+ if @api_client.config.client_side_validation && endpoint_update.nil?
1134
+ fail ArgumentError, "Missing the required parameter 'endpoint_update' when calling EndpointApi.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put"
1135
+ end
1136
+ # resource path
1137
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
1138
+
1139
+ # query parameters
1140
+ query_params = opts[:query_params] || {}
1141
+
1142
+ # header parameters
1143
+ header_params = opts[:header_params] || {}
1144
+ # HTTP header 'Accept' (if needed)
1145
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1146
+ # HTTP header 'Content-Type'
1147
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1148
+
1149
+ # form parameters
1150
+ form_params = opts[:form_params] || {}
1151
+
1152
+ # http body (model)
1153
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_update)
1154
+
1155
+ # return_type
1156
+ return_type = opts[:debug_return_type] || 'EndpointOut'
1157
+
1158
+ # auth_names
1159
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
1160
+
1161
+ new_options = opts.merge(
1162
+ :operation => :"EndpointApi.update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put",
1163
+ :header_params => header_params,
1164
+ :query_params => query_params,
1165
+ :form_params => form_params,
1166
+ :body => post_body,
1167
+ :auth_names => auth_names,
1168
+ :return_type => return_type
1169
+ )
1170
+
1171
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1172
+ if @api_client.config.debugging
1173
+ @api_client.config.logger.debug "API called: EndpointApi#update_endpoint_api_v1_app_app_id_endpoint_endpoint_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1174
+ end
1175
+ return data, status_code, headers
1176
+ end
1177
+
1178
+ # Update Endpoint Headers
1179
+ # Set the additional headers to be sent with the webhook
1180
+ # @param app_id [String]
1181
+ # @param endpoint_id [String]
1182
+ # @param endpoint_headers_in [EndpointHeadersIn]
1183
+ # @param [Hash] opts the optional parameters
1184
+ # @return [nil]
1185
+ def update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put(app_id, endpoint_id, endpoint_headers_in, opts = {})
1186
+ update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts)
1187
+ nil
1188
+ end
1189
+
1190
+ # Update Endpoint Headers
1191
+ # Set the additional headers to be sent with the webhook
1192
+ # @param app_id [String]
1193
+ # @param endpoint_id [String]
1194
+ # @param endpoint_headers_in [EndpointHeadersIn]
1195
+ # @param [Hash] opts the optional parameters
1196
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1197
+ def update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put_with_http_info(app_id, endpoint_id, endpoint_headers_in, opts = {})
1198
+ if @api_client.config.debugging
1199
+ @api_client.config.logger.debug 'Calling API: EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put ...'
1200
+ end
1201
+ # verify the required parameter 'app_id' is set
1202
+ if @api_client.config.client_side_validation && app_id.nil?
1203
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put"
1204
+ end
1205
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
1206
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, the character length must be smaller than or equal to 256.'
1207
+ end
1208
+
1209
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
1210
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, the character length must be great than or equal to 1.'
1211
+ end
1212
+
1213
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1214
+ if @api_client.config.client_side_validation && app_id !~ pattern
1215
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, must conform to the pattern #{pattern}."
1216
+ end
1217
+
1218
+ # verify the required parameter 'endpoint_id' is set
1219
+ if @api_client.config.client_side_validation && endpoint_id.nil?
1220
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put"
1221
+ end
1222
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
1223
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, the character length must be smaller than or equal to 256.'
1224
+ end
1225
+
1226
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
1227
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, the character length must be great than or equal to 1.'
1228
+ end
1229
+
1230
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1231
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
1232
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put, must conform to the pattern #{pattern}."
1233
+ end
1234
+
1235
+ # verify the required parameter 'endpoint_headers_in' is set
1236
+ if @api_client.config.client_side_validation && endpoint_headers_in.nil?
1237
+ fail ArgumentError, "Missing the required parameter 'endpoint_headers_in' when calling EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put"
1238
+ end
1239
+ # resource path
1240
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
1241
+
1242
+ # query parameters
1243
+ query_params = opts[:query_params] || {}
1244
+
1245
+ # header parameters
1246
+ header_params = opts[:header_params] || {}
1247
+ # HTTP header 'Accept' (if needed)
1248
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1249
+ # HTTP header 'Content-Type'
1250
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1251
+
1252
+ # form parameters
1253
+ form_params = opts[:form_params] || {}
1254
+
1255
+ # http body (model)
1256
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_headers_in)
1257
+
1258
+ # return_type
1259
+ return_type = opts[:debug_return_type]
1260
+
1261
+ # auth_names
1262
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
1263
+
1264
+ new_options = opts.merge(
1265
+ :operation => :"EndpointApi.update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put",
1266
+ :header_params => header_params,
1267
+ :query_params => query_params,
1268
+ :form_params => form_params,
1269
+ :body => post_body,
1270
+ :auth_names => auth_names,
1271
+ :return_type => return_type
1272
+ )
1273
+
1274
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1275
+ if @api_client.config.debugging
1276
+ @api_client.config.logger.debug "API called: EndpointApi#update_endpoint_headers_api_v1_app_app_id_endpoint_endpoint_id_headers_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1277
+ end
1278
+ return data, status_code, headers
1279
+ end
1280
+ end
1281
+ end