svix 0.48.0 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -231,99 +231,87 @@ module Svix
231
231
  return data, status_code, headers
232
232
  end
233
233
 
234
- # List Attempted Destinations By Endpoint
235
- # List attempts by endpoint id
236
- # @param app_id [String]
234
+ # List Attempted Messages
235
+ # List messages for a particular endpoint. Additionally includes metadata about the latest message attempt. The `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
237
236
  # @param endpoint_id [String]
237
+ # @param app_id [String]
238
238
  # @param [Hash] opts the optional parameters
239
239
  # @option opts [String] :iterator
240
240
  # @option opts [Integer] :limit (default to 50)
241
241
  # @option opts [MessageStatus] :status
242
- # @option opts [Array<String>] :event_types
243
- # @option opts [String] :channel
244
242
  # @option opts [Time] :before
243
+ # @option opts [Time] :after
245
244
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
246
- # @return [ListResponseMessageAttemptOut]
247
- def list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get(app_id, endpoint_id, opts = {})
248
- data, _status_code, _headers = list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get_with_http_info(app_id, endpoint_id, opts)
245
+ # @return [ListResponseEndpointMessageOut]
246
+ def list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get(endpoint_id, app_id, opts = {})
247
+ data, _status_code, _headers = list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get_with_http_info(endpoint_id, app_id, opts)
249
248
  data
250
249
  end
251
250
 
252
- # List Attempted Destinations By Endpoint
253
- # List attempts by endpoint id
254
- # @param app_id [String]
251
+ # List Attempted Messages
252
+ # List messages for a particular endpoint. Additionally includes metadata about the latest message attempt. The &#x60;before&#x60; parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
255
253
  # @param endpoint_id [String]
254
+ # @param app_id [String]
256
255
  # @param [Hash] opts the optional parameters
257
256
  # @option opts [String] :iterator
258
257
  # @option opts [Integer] :limit
259
258
  # @option opts [MessageStatus] :status
260
- # @option opts [Array<String>] :event_types
261
- # @option opts [String] :channel
262
259
  # @option opts [Time] :before
260
+ # @option opts [Time] :after
263
261
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
264
- # @return [Array<(ListResponseMessageAttemptOut, Integer, Hash)>] ListResponseMessageAttemptOut data, response status code and response headers
265
- def list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get_with_http_info(app_id, endpoint_id, opts = {})
262
+ # @return [Array<(ListResponseEndpointMessageOut, Integer, Hash)>] ListResponseEndpointMessageOut data, response status code and response headers
263
+ def list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get_with_http_info(endpoint_id, app_id, opts = {})
266
264
  if @api_client.config.debugging
267
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get ...'
268
- end
269
- # verify the required parameter 'app_id' is set
270
- if @api_client.config.client_side_validation && app_id.nil?
271
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get"
272
- end
273
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
274
- fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be smaller than or equal to 256.'
275
- end
276
-
277
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
278
- fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be great than or equal to 1.'
279
- end
280
-
281
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
282
- if @api_client.config.client_side_validation && app_id !~ pattern
283
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must conform to the pattern #{pattern}."
265
+ @api_client.config.logger.debug 'Calling API: MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get ...'
284
266
  end
285
-
286
267
  # verify the required parameter 'endpoint_id' is set
287
268
  if @api_client.config.client_side_validation && endpoint_id.nil?
288
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get"
269
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get"
289
270
  end
290
271
  if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
291
- fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be smaller than or equal to 256.'
272
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, the character length must be smaller than or equal to 256.'
292
273
  end
293
274
 
294
275
  if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
295
- fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be great than or equal to 1.'
276
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, the character length must be great than or equal to 1.'
296
277
  end
297
278
 
298
279
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
299
280
  if @api_client.config.client_side_validation && endpoint_id !~ pattern
300
- fail ArgumentError, "invalid value for 'endpoint_id' when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must conform to the pattern #{pattern}."
281
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, must conform to the pattern #{pattern}."
301
282
  end
302
283
 
303
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
304
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must be smaller than or equal to 250.'
284
+ # verify the required parameter 'app_id' is set
285
+ if @api_client.config.client_side_validation && app_id.nil?
286
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get"
287
+ end
288
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
289
+ fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, the character length must be smaller than or equal to 256.'
305
290
  end
306
291
 
307
- if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
308
- fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be smaller than or equal to 128.'
292
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
293
+ fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, the character length must be great than or equal to 1.'
309
294
  end
310
295
 
311
296
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
312
- if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
313
- fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must conform to the pattern #{pattern}."
297
+ if @api_client.config.client_side_validation && app_id !~ pattern
298
+ fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, must conform to the pattern #{pattern}."
299
+ end
300
+
301
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
302
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, must be smaller than or equal to 250.'
314
303
  end
315
304
 
316
305
  # resource path
317
- local_var_path = '/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
306
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
318
307
 
319
308
  # query parameters
320
309
  query_params = opts[:query_params] || {}
321
310
  query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
322
311
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
323
312
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
324
- query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
325
- query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
326
313
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
314
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
327
315
 
328
316
  # header parameters
329
317
  header_params = opts[:header_params] || {}
@@ -338,13 +326,13 @@ module Svix
338
326
  post_body = opts[:debug_body]
339
327
 
340
328
  # return_type
341
- return_type = opts[:debug_return_type] || 'ListResponseMessageAttemptOut'
329
+ return_type = opts[:debug_return_type] || 'ListResponseEndpointMessageOut'
342
330
 
343
331
  # auth_names
344
332
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
345
333
 
346
334
  new_options = opts.merge(
347
- :operation => :"MessageAttemptApi.list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get",
335
+ :operation => :"MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get",
348
336
  :header_params => header_params,
349
337
  :query_params => query_params,
350
338
  :form_params => form_params,
@@ -355,120 +343,123 @@ module Svix
355
343
 
356
344
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
357
345
  if @api_client.config.debugging
358
- @api_client.config.logger.debug "API called: MessageAttemptApi#list_attempted_destinations_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
346
+ @api_client.config.logger.debug "API called: MessageAttemptApi#list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
359
347
  end
360
348
  return data, status_code, headers
361
349
  end
362
350
 
363
- # List Attempted Destinations By Msg
364
- # List attempts by message id
351
+ # List Attempts
352
+ # Deprecated: Please use \"List Attempts by Endpoint\" and \"List Attempts by Msg\" instead. `msg_id`: Use a message id or a message `eventId`
365
353
  # @param app_id [String]
366
354
  # @param msg_id [String]
367
355
  # @param [Hash] opts the optional parameters
368
- # @option opts [String] :endpoint_id
369
356
  # @option opts [String] :iterator
370
357
  # @option opts [Integer] :limit (default to 50)
371
- # @option opts [MessageStatus] :status
358
+ # @option opts [String] :endpoint_id
372
359
  # @option opts [Array<String>] :event_types
373
360
  # @option opts [String] :channel
361
+ # @option opts [MessageStatus] :status
374
362
  # @option opts [Time] :before
363
+ # @option opts [Time] :after
375
364
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
376
365
  # @return [ListResponseMessageAttemptOut]
377
- def list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get(app_id, msg_id, opts = {})
378
- data, _status_code, _headers = list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get_with_http_info(app_id, msg_id, opts)
366
+ def list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get(app_id, msg_id, opts = {})
367
+ data, _status_code, _headers = list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get_with_http_info(app_id, msg_id, opts)
379
368
  data
380
369
  end
381
370
 
382
- # List Attempted Destinations By Msg
383
- # List attempts by message id
371
+ # List Attempts
372
+ # Deprecated: Please use \&quot;List Attempts by Endpoint\&quot; and \&quot;List Attempts by Msg\&quot; instead. &#x60;msg_id&#x60;: Use a message id or a message &#x60;eventId&#x60;
384
373
  # @param app_id [String]
385
374
  # @param msg_id [String]
386
375
  # @param [Hash] opts the optional parameters
387
- # @option opts [String] :endpoint_id
388
376
  # @option opts [String] :iterator
389
377
  # @option opts [Integer] :limit
390
- # @option opts [MessageStatus] :status
378
+ # @option opts [String] :endpoint_id
391
379
  # @option opts [Array<String>] :event_types
392
380
  # @option opts [String] :channel
381
+ # @option opts [MessageStatus] :status
393
382
  # @option opts [Time] :before
383
+ # @option opts [Time] :after
394
384
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
395
385
  # @return [Array<(ListResponseMessageAttemptOut, Integer, Hash)>] ListResponseMessageAttemptOut data, response status code and response headers
396
- def list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get_with_http_info(app_id, msg_id, opts = {})
386
+ def list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get_with_http_info(app_id, msg_id, opts = {})
397
387
  if @api_client.config.debugging
398
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get ...'
388
+ @api_client.config.logger.debug 'Calling API: MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get ...'
399
389
  end
400
390
  # verify the required parameter 'app_id' is set
401
391
  if @api_client.config.client_side_validation && app_id.nil?
402
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get"
392
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get"
403
393
  end
404
394
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
405
- fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 256.'
395
+ fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be smaller than or equal to 256.'
406
396
  end
407
397
 
408
398
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
409
- fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be great than or equal to 1.'
399
+ fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be great than or equal to 1.'
410
400
  end
411
401
 
412
402
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
413
403
  if @api_client.config.client_side_validation && app_id !~ pattern
414
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
404
+ fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must conform to the pattern #{pattern}."
415
405
  end
416
406
 
417
407
  # verify the required parameter 'msg_id' is set
418
408
  if @api_client.config.client_side_validation && msg_id.nil?
419
- fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get"
409
+ fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get"
420
410
  end
421
411
  if @api_client.config.client_side_validation && msg_id.to_s.length > 256
422
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 256.'
412
+ fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be smaller than or equal to 256.'
423
413
  end
424
414
 
425
415
  if @api_client.config.client_side_validation && msg_id.to_s.length < 1
426
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be great than or equal to 1.'
416
+ fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be great than or equal to 1.'
427
417
  end
428
418
 
429
419
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
430
420
  if @api_client.config.client_side_validation && msg_id !~ pattern
431
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
421
+ fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must conform to the pattern #{pattern}."
422
+ end
423
+
424
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
425
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must be smaller than or equal to 250.'
432
426
  end
433
427
 
434
428
  if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'].to_s.length > 256
435
- fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 256.'
429
+ fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be smaller than or equal to 256.'
436
430
  end
437
431
 
438
432
  if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'].to_s.length < 1
439
- fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be great than or equal to 1.'
433
+ fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be great than or equal to 1.'
440
434
  end
441
435
 
442
436
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
443
437
  if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'] !~ pattern
444
- fail ArgumentError, "invalid value for 'opts[:\"endpoint_id\"]' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
445
- end
446
-
447
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
448
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must be smaller than or equal to 250.'
438
+ fail ArgumentError, "invalid value for 'opts[:\"endpoint_id\"]' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must conform to the pattern #{pattern}."
449
439
  end
450
440
 
451
441
  if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
452
- fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 128.'
442
+ fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be smaller than or equal to 128.'
453
443
  end
454
444
 
455
445
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
456
446
  if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
457
- fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
447
+ fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must conform to the pattern #{pattern}."
458
448
  end
459
449
 
460
450
  # resource path
461
- local_var_path = '/api/v1/app/{app_id}/attempt/msg/{msg_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
451
+ local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/attempt/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
462
452
 
463
453
  # query parameters
464
454
  query_params = opts[:query_params] || {}
465
- query_params[:'endpoint_id'] = opts[:'endpoint_id'] if !opts[:'endpoint_id'].nil?
466
455
  query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
467
456
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
468
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
457
+ query_params[:'endpoint_id'] = opts[:'endpoint_id'] if !opts[:'endpoint_id'].nil?
469
458
  query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
470
459
  query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
460
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
471
461
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
462
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
472
463
 
473
464
  # header parameters
474
465
  header_params = opts[:header_params] || {}
@@ -489,7 +480,7 @@ module Svix
489
480
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
490
481
 
491
482
  new_options = opts.merge(
492
- :operation => :"MessageAttemptApi.list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get",
483
+ :operation => :"MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get",
493
484
  :header_params => header_params,
494
485
  :query_params => query_params,
495
486
  :form_params => form_params,
@@ -500,89 +491,110 @@ module Svix
500
491
 
501
492
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
502
493
  if @api_client.config.debugging
503
- @api_client.config.logger.debug "API called: MessageAttemptApi#list_attempted_destinations_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
494
+ @api_client.config.logger.debug "API called: MessageAttemptApi#list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
504
495
  end
505
496
  return data, status_code, headers
506
497
  end
507
498
 
508
- # List Attempted Messages
509
- # List messages for a particular endpoint. Additionally includes metadata about the latest message attempt. The `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
510
- # @param endpoint_id [String]
499
+ # List Attempts By Endpoint
500
+ # List attempts by endpoint id
511
501
  # @param app_id [String]
502
+ # @param endpoint_id [String]
512
503
  # @param [Hash] opts the optional parameters
513
504
  # @option opts [String] :iterator
514
505
  # @option opts [Integer] :limit (default to 50)
515
506
  # @option opts [MessageStatus] :status
507
+ # @option opts [StatusCodeClass] :status_code_class
508
+ # @option opts [Array<String>] :event_types
509
+ # @option opts [String] :channel
516
510
  # @option opts [Time] :before
511
+ # @option opts [Time] :after
517
512
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
518
- # @return [ListResponseEndpointMessageOut]
519
- def list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get(endpoint_id, app_id, opts = {})
520
- data, _status_code, _headers = list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get_with_http_info(endpoint_id, app_id, opts)
513
+ # @return [ListResponseMessageAttemptOut]
514
+ def list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get(app_id, endpoint_id, opts = {})
515
+ data, _status_code, _headers = list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get_with_http_info(app_id, endpoint_id, opts)
521
516
  data
522
517
  end
523
518
 
524
- # List Attempted Messages
525
- # List messages for a particular endpoint. Additionally includes metadata about the latest message attempt. The &#x60;before&#x60; parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.
526
- # @param endpoint_id [String]
519
+ # List Attempts By Endpoint
520
+ # List attempts by endpoint id
527
521
  # @param app_id [String]
522
+ # @param endpoint_id [String]
528
523
  # @param [Hash] opts the optional parameters
529
524
  # @option opts [String] :iterator
530
525
  # @option opts [Integer] :limit
531
526
  # @option opts [MessageStatus] :status
527
+ # @option opts [StatusCodeClass] :status_code_class
528
+ # @option opts [Array<String>] :event_types
529
+ # @option opts [String] :channel
532
530
  # @option opts [Time] :before
531
+ # @option opts [Time] :after
533
532
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
534
- # @return [Array<(ListResponseEndpointMessageOut, Integer, Hash)>] ListResponseEndpointMessageOut data, response status code and response headers
535
- def list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get_with_http_info(endpoint_id, app_id, opts = {})
533
+ # @return [Array<(ListResponseMessageAttemptOut, Integer, Hash)>] ListResponseMessageAttemptOut data, response status code and response headers
534
+ def list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get_with_http_info(app_id, endpoint_id, opts = {})
536
535
  if @api_client.config.debugging
537
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get ...'
536
+ @api_client.config.logger.debug 'Calling API: MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get ...'
537
+ end
538
+ # verify the required parameter 'app_id' is set
539
+ if @api_client.config.client_side_validation && app_id.nil?
540
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get"
541
+ end
542
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
543
+ fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be smaller than or equal to 256.'
538
544
  end
545
+
546
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
547
+ fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be great than or equal to 1.'
548
+ end
549
+
550
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
551
+ if @api_client.config.client_side_validation && app_id !~ pattern
552
+ fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must conform to the pattern #{pattern}."
553
+ end
554
+
539
555
  # verify the required parameter 'endpoint_id' is set
540
556
  if @api_client.config.client_side_validation && endpoint_id.nil?
541
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get"
557
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get"
542
558
  end
543
559
  if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
544
- fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, the character length must be smaller than or equal to 256.'
560
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be smaller than or equal to 256.'
545
561
  end
546
562
 
547
563
  if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
548
- fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, the character length must be great than or equal to 1.'
564
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be great than or equal to 1.'
549
565
  end
550
566
 
551
567
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
552
568
  if @api_client.config.client_side_validation && endpoint_id !~ pattern
553
- fail ArgumentError, "invalid value for 'endpoint_id' when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, must conform to the pattern #{pattern}."
569
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must conform to the pattern #{pattern}."
554
570
  end
555
571
 
556
- # verify the required parameter 'app_id' is set
557
- if @api_client.config.client_side_validation && app_id.nil?
558
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get"
559
- end
560
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
561
- fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, the character length must be smaller than or equal to 256.'
572
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
573
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must be smaller than or equal to 250.'
562
574
  end
563
575
 
564
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
565
- fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, the character length must be great than or equal to 1.'
576
+ if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
577
+ fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, the character length must be smaller than or equal to 128.'
566
578
  end
567
579
 
568
580
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
569
- if @api_client.config.client_side_validation && app_id !~ pattern
570
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, must conform to the pattern #{pattern}."
571
- end
572
-
573
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
574
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get, must be smaller than or equal to 250.'
581
+ if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
582
+ fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get, must conform to the pattern #{pattern}."
575
583
  end
576
584
 
577
585
  # resource path
578
- local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s)).sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
586
+ local_var_path = '/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
579
587
 
580
588
  # query parameters
581
589
  query_params = opts[:query_params] || {}
582
590
  query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
583
591
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
584
592
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
593
+ query_params[:'status_code_class'] = opts[:'status_code_class'] if !opts[:'status_code_class'].nil?
594
+ query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
595
+ query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
585
596
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
597
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
586
598
 
587
599
  # header parameters
588
600
  header_params = opts[:header_params] || {}
@@ -597,13 +609,13 @@ module Svix
597
609
  post_body = opts[:debug_body]
598
610
 
599
611
  # return_type
600
- return_type = opts[:debug_return_type] || 'ListResponseEndpointMessageOut'
612
+ return_type = opts[:debug_return_type] || 'ListResponseMessageAttemptOut'
601
613
 
602
614
  # auth_names
603
615
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
604
616
 
605
617
  new_options = opts.merge(
606
- :operation => :"MessageAttemptApi.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get",
618
+ :operation => :"MessageAttemptApi.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get",
607
619
  :header_params => header_params,
608
620
  :query_params => query_params,
609
621
  :form_params => form_params,
@@ -614,120 +626,126 @@ module Svix
614
626
 
615
627
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
616
628
  if @api_client.config.debugging
617
- @api_client.config.logger.debug "API called: MessageAttemptApi#list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
629
+ @api_client.config.logger.debug "API called: MessageAttemptApi#list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
618
630
  end
619
631
  return data, status_code, headers
620
632
  end
621
633
 
622
- # List Attempts
623
- # Deprecated: Please use the /attempt/ api instead. `msg_id`: Use a message id or a message `eventId`
634
+ # List Attempts By Msg
635
+ # List attempts by message id
624
636
  # @param app_id [String]
625
637
  # @param msg_id [String]
626
638
  # @param [Hash] opts the optional parameters
639
+ # @option opts [String] :endpoint_id
627
640
  # @option opts [String] :iterator
628
641
  # @option opts [Integer] :limit (default to 50)
629
- # @option opts [String] :endpoint_id
642
+ # @option opts [MessageStatus] :status
643
+ # @option opts [StatusCodeClass] :status_code_class
630
644
  # @option opts [Array<String>] :event_types
631
645
  # @option opts [String] :channel
632
- # @option opts [MessageStatus] :status
633
646
  # @option opts [Time] :before
647
+ # @option opts [Time] :after
634
648
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
635
649
  # @return [ListResponseMessageAttemptOut]
636
- def list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get(app_id, msg_id, opts = {})
637
- data, _status_code, _headers = list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get_with_http_info(app_id, msg_id, opts)
650
+ def list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get(app_id, msg_id, opts = {})
651
+ data, _status_code, _headers = list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get_with_http_info(app_id, msg_id, opts)
638
652
  data
639
653
  end
640
654
 
641
- # List Attempts
642
- # Deprecated: Please use the /attempt/ api instead. &#x60;msg_id&#x60;: Use a message id or a message &#x60;eventId&#x60;
655
+ # List Attempts By Msg
656
+ # List attempts by message id
643
657
  # @param app_id [String]
644
658
  # @param msg_id [String]
645
659
  # @param [Hash] opts the optional parameters
660
+ # @option opts [String] :endpoint_id
646
661
  # @option opts [String] :iterator
647
662
  # @option opts [Integer] :limit
648
- # @option opts [String] :endpoint_id
663
+ # @option opts [MessageStatus] :status
664
+ # @option opts [StatusCodeClass] :status_code_class
649
665
  # @option opts [Array<String>] :event_types
650
666
  # @option opts [String] :channel
651
- # @option opts [MessageStatus] :status
652
667
  # @option opts [Time] :before
668
+ # @option opts [Time] :after
653
669
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
654
670
  # @return [Array<(ListResponseMessageAttemptOut, Integer, Hash)>] ListResponseMessageAttemptOut data, response status code and response headers
655
- def list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get_with_http_info(app_id, msg_id, opts = {})
671
+ def list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get_with_http_info(app_id, msg_id, opts = {})
656
672
  if @api_client.config.debugging
657
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get ...'
673
+ @api_client.config.logger.debug 'Calling API: MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get ...'
658
674
  end
659
675
  # verify the required parameter 'app_id' is set
660
676
  if @api_client.config.client_side_validation && app_id.nil?
661
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get"
677
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get"
662
678
  end
663
679
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
664
- fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be smaller than or equal to 256.'
680
+ fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 256.'
665
681
  end
666
682
 
667
683
  if @api_client.config.client_side_validation && app_id.to_s.length < 1
668
- fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be great than or equal to 1.'
684
+ fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be great than or equal to 1.'
669
685
  end
670
686
 
671
687
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
672
688
  if @api_client.config.client_side_validation && app_id !~ pattern
673
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must conform to the pattern #{pattern}."
689
+ fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
674
690
  end
675
691
 
676
692
  # verify the required parameter 'msg_id' is set
677
693
  if @api_client.config.client_side_validation && msg_id.nil?
678
- fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get"
694
+ fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get"
679
695
  end
680
696
  if @api_client.config.client_side_validation && msg_id.to_s.length > 256
681
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be smaller than or equal to 256.'
697
+ fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 256.'
682
698
  end
683
699
 
684
700
  if @api_client.config.client_side_validation && msg_id.to_s.length < 1
685
- fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be great than or equal to 1.'
701
+ fail ArgumentError, 'invalid value for "msg_id" when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be great than or equal to 1.'
686
702
  end
687
703
 
688
704
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
689
705
  if @api_client.config.client_side_validation && msg_id !~ pattern
690
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must conform to the pattern #{pattern}."
691
- end
692
-
693
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
694
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must be smaller than or equal to 250.'
706
+ fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
695
707
  end
696
708
 
697
709
  if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'].to_s.length > 256
698
- fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be smaller than or equal to 256.'
710
+ fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 256.'
699
711
  end
700
712
 
701
713
  if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'].to_s.length < 1
702
- fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be great than or equal to 1.'
714
+ fail ArgumentError, 'invalid value for "opts[:"endpoint_id"]" when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be great than or equal to 1.'
703
715
  end
704
716
 
705
717
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
706
718
  if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'] !~ pattern
707
- fail ArgumentError, "invalid value for 'opts[:\"endpoint_id\"]' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must conform to the pattern #{pattern}."
719
+ fail ArgumentError, "invalid value for 'opts[:\"endpoint_id\"]' when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
720
+ end
721
+
722
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
723
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must be smaller than or equal to 250.'
708
724
  end
709
725
 
710
726
  if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
711
- fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, the character length must be smaller than or equal to 128.'
727
+ fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, the character length must be smaller than or equal to 128.'
712
728
  end
713
729
 
714
730
  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
715
731
  if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
716
- fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get, must conform to the pattern #{pattern}."
732
+ fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get, must conform to the pattern #{pattern}."
717
733
  end
718
734
 
719
735
  # resource path
720
- local_var_path = '/api/v1/app/{app_id}/msg/{msg_id}/attempt/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
736
+ local_var_path = '/api/v1/app/{app_id}/attempt/msg/{msg_id}/'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
721
737
 
722
738
  # query parameters
723
739
  query_params = opts[:query_params] || {}
740
+ query_params[:'endpoint_id'] = opts[:'endpoint_id'] if !opts[:'endpoint_id'].nil?
724
741
  query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
725
742
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
726
- query_params[:'endpoint_id'] = opts[:'endpoint_id'] if !opts[:'endpoint_id'].nil?
743
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
744
+ query_params[:'status_code_class'] = opts[:'status_code_class'] if !opts[:'status_code_class'].nil?
727
745
  query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
728
746
  query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
729
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
730
747
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
748
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
731
749
 
732
750
  # header parameters
733
751
  header_params = opts[:header_params] || {}
@@ -748,7 +766,7 @@ module Svix
748
766
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']
749
767
 
750
768
  new_options = opts.merge(
751
- :operation => :"MessageAttemptApi.list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get",
769
+ :operation => :"MessageAttemptApi.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get",
752
770
  :header_params => header_params,
753
771
  :query_params => query_params,
754
772
  :form_params => form_params,
@@ -759,7 +777,7 @@ module Svix
759
777
 
760
778
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
761
779
  if @api_client.config.debugging
762
- @api_client.config.logger.debug "API called: MessageAttemptApi#list_attempts_api_v1_app_app_id_msg_msg_id_attempt_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
780
+ @api_client.config.logger.debug "API called: MessageAttemptApi#list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
763
781
  end
764
782
  return data, status_code, headers
765
783
  end
@@ -776,6 +794,7 @@ module Svix
776
794
  # @option opts [String] :channel
777
795
  # @option opts [MessageStatus] :status
778
796
  # @option opts [Time] :before
797
+ # @option opts [Time] :after
779
798
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
780
799
  # @return [ListResponseMessageAttemptEndpointOut]
781
800
  def list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get(msg_id, app_id, endpoint_id, opts = {})
@@ -795,6 +814,7 @@ module Svix
795
814
  # @option opts [String] :channel
796
815
  # @option opts [MessageStatus] :status
797
816
  # @option opts [Time] :before
817
+ # @option opts [Time] :after
798
818
  # @option opts [String] :idempotency_key The request&#39;s idempotency key
799
819
  # @return [Array<(ListResponseMessageAttemptEndpointOut, Integer, Hash)>] ListResponseMessageAttemptEndpointOut data, response status code and response headers
800
820
  def list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get_with_http_info(msg_id, app_id, endpoint_id, opts = {})
@@ -876,6 +896,7 @@ module Svix
876
896
  query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
877
897
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
878
898
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
899
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
879
900
 
880
901
  # header parameters
881
902
  header_params = opts[:header_params] || {}