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