svix 1.60.1 → 1.61.1

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 (297) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -1
  3. data/Gemfile.lock +35 -21
  4. data/README.md +0 -7
  5. data/lib/svix/api/application.rb +90 -0
  6. data/lib/svix/api/authentication.rb +61 -0
  7. data/lib/svix/api/background_task.rb +37 -0
  8. data/lib/svix/api/endpoint.rb +185 -0
  9. data/lib/svix/api/environment.rb +37 -0
  10. data/lib/svix/api/event_type.rb +92 -0
  11. data/lib/svix/api/health.rb +20 -0
  12. data/lib/svix/api/ingest_endpoint.rb +100 -0
  13. data/lib/svix/api/integration.rb +84 -0
  14. data/lib/svix/api/message.rb +107 -0
  15. data/lib/svix/api/message_attempt.rb +116 -0
  16. data/lib/svix/api/operational_webhook_endpoint.rb +100 -0
  17. data/lib/svix/api/statistics.rb +34 -0
  18. data/lib/svix/api_error.rb +7 -17
  19. data/lib/svix/errors.rb +9 -9
  20. data/lib/svix/http_error_out.rb +18 -0
  21. data/lib/svix/http_validation_error.rb +18 -0
  22. data/lib/svix/internal.rb +0 -9
  23. data/lib/svix/models/aggregate_event_types_out.rb +32 -292
  24. data/lib/svix/models/app_portal_access_in.rb +31 -278
  25. data/lib/svix/models/app_portal_access_out.rb +27 -243
  26. data/lib/svix/models/app_usage_stats_in.rb +30 -234
  27. data/lib/svix/models/app_usage_stats_out.rb +31 -320
  28. data/lib/svix/models/application_in.rb +31 -298
  29. data/lib/svix/models/application_out.rb +37 -371
  30. data/lib/svix/models/application_patch.rb +31 -272
  31. data/lib/svix/models/application_token_expire_in.rb +28 -219
  32. data/lib/svix/models/background_task_out.rb +31 -307
  33. data/lib/svix/models/background_task_status.rb +14 -25
  34. data/lib/svix/models/background_task_type.rb +23 -26
  35. data/lib/svix/models/connector_in.rb +58 -385
  36. data/lib/svix/models/connector_kind.rb +28 -26
  37. data/lib/svix/models/dashboard_access_out.rb +27 -243
  38. data/lib/svix/models/endpoint_headers_in.rb +25 -202
  39. data/lib/svix/models/endpoint_headers_out.rb +30 -230
  40. data/lib/svix/models/endpoint_headers_patch_in.rb +28 -202
  41. data/lib/svix/models/endpoint_in.rb +65 -449
  42. data/lib/svix/models/endpoint_message_out.rb +48 -467
  43. data/lib/svix/models/endpoint_out.rb +67 -528
  44. data/lib/svix/models/endpoint_patch.rb +61 -383
  45. data/lib/svix/models/endpoint_secret_out.rb +25 -222
  46. data/lib/svix/models/endpoint_secret_rotate_in.rb +28 -212
  47. data/lib/svix/models/endpoint_stats.rb +31 -245
  48. data/lib/svix/models/endpoint_transformation_in.rb +30 -226
  49. data/lib/svix/models/endpoint_transformation_out.rb +30 -228
  50. data/lib/svix/models/endpoint_update.rb +58 -422
  51. data/lib/svix/models/environment_in.rb +31 -212
  52. data/lib/svix/models/environment_out.rb +35 -255
  53. data/lib/svix/models/event_example_in.rb +27 -261
  54. data/lib/svix/models/event_type_from_open_api.rb +35 -341
  55. data/lib/svix/models/event_type_import_open_api_in.rb +37 -228
  56. data/lib/svix/models/event_type_import_open_api_out.rb +28 -200
  57. data/lib/svix/models/event_type_import_open_api_out_data.rb +31 -211
  58. data/lib/svix/models/event_type_in.rb +37 -347
  59. data/lib/svix/models/event_type_out.rb +58 -389
  60. data/lib/svix/models/event_type_patch.rb +35 -289
  61. data/lib/svix/models/event_type_update.rb +35 -301
  62. data/lib/svix/models/expung_all_contents_out.rb +29 -292
  63. data/lib/svix/models/expunge_all_contents_out.rb +55 -0
  64. data/lib/svix/models/ingest_endpoint_headers_in.rb +49 -0
  65. data/lib/svix/models/ingest_endpoint_headers_out.rb +52 -0
  66. data/lib/svix/models/ingest_endpoint_in.rb +64 -0
  67. data/lib/svix/models/ingest_endpoint_out.rb +70 -0
  68. data/lib/svix/models/ingest_endpoint_secret_in.rb +49 -0
  69. data/lib/svix/models/ingest_endpoint_secret_out.rb +49 -0
  70. data/lib/svix/models/ingest_endpoint_update.rb +61 -0
  71. data/lib/svix/models/integration_in.rb +27 -239
  72. data/lib/svix/models/integration_key_out.rb +25 -200
  73. data/lib/svix/models/integration_out.rb +33 -324
  74. data/lib/svix/models/integration_update.rb +27 -239
  75. data/lib/svix/models/list_response_application_out.rb +34 -237
  76. data/lib/svix/models/list_response_background_task_out.rb +34 -237
  77. data/lib/svix/models/list_response_endpoint_message_out.rb +34 -237
  78. data/lib/svix/models/list_response_endpoint_out.rb +34 -237
  79. data/lib/svix/models/list_response_event_type_out.rb +34 -237
  80. data/lib/svix/models/list_response_ingest_endpoint_out.rb +58 -0
  81. data/lib/svix/models/list_response_integration_out.rb +34 -237
  82. data/lib/svix/models/list_response_message_attempt_out.rb +34 -237
  83. data/lib/svix/models/list_response_message_endpoint_out.rb +34 -237
  84. data/lib/svix/models/list_response_message_out.rb +34 -237
  85. data/lib/svix/models/list_response_operational_webhook_endpoint_out.rb +34 -237
  86. data/lib/svix/models/message_attempt_out.rb +64 -521
  87. data/lib/svix/models/message_attempt_trigger_type.rb +20 -28
  88. data/lib/svix/models/message_endpoint_out.rb +70 -557
  89. data/lib/svix/models/message_in.rb +58 -450
  90. data/lib/svix/models/message_out.rb +37 -414
  91. data/lib/svix/models/message_status.rb +24 -30
  92. data/lib/svix/models/operational_webhook_endpoint_headers_in.rb +28 -202
  93. data/lib/svix/models/operational_webhook_endpoint_headers_out.rb +30 -229
  94. data/lib/svix/models/operational_webhook_endpoint_in.rb +42 -380
  95. data/lib/svix/models/operational_webhook_endpoint_out.rb +64 -458
  96. data/lib/svix/models/operational_webhook_endpoint_secret_in.rb +28 -212
  97. data/lib/svix/models/operational_webhook_endpoint_secret_out.rb +28 -222
  98. data/lib/svix/models/operational_webhook_endpoint_update.rb +40 -353
  99. data/lib/svix/models/ordering.rb +15 -25
  100. data/lib/svix/models/recover_in.rb +28 -210
  101. data/lib/svix/models/recover_out.rb +29 -292
  102. data/lib/svix/models/replay_in.rb +28 -210
  103. data/lib/svix/models/replay_out.rb +29 -292
  104. data/lib/svix/models/status_code_class.rb +28 -32
  105. data/lib/svix/models/template_out.rb +70 -514
  106. data/lib/svix/svix.rb +50 -50
  107. data/lib/svix/svix_http_client.rb +110 -0
  108. data/lib/svix/util.rb +44 -25
  109. data/lib/svix/validation_error.rb +28 -0
  110. data/lib/svix/version.rb +1 -1
  111. data/lib/svix/webhook.rb +69 -65
  112. data/lib/svix.rb +60 -37
  113. data/svix.gemspec +1 -10
  114. data/templates/api_extra/application_create.rb +16 -0
  115. data/templates/api_extra/message.rb +26 -0
  116. data/templates/api_resource.rb.jinja +71 -0
  117. data/templates/component_type.rb.jinja +7 -0
  118. data/templates/summary.rb.jinja +41 -0
  119. data/templates/types/integer_enum.rb.jinja +37 -0
  120. data/templates/types/string_enum.rb.jinja +37 -0
  121. data/templates/types/struct.rb.jinja +87 -0
  122. metadata +40 -194
  123. data/lib/svix/api/application_api.rb +0 -772
  124. data/lib/svix/api/authentication_api.rb +0 -791
  125. data/lib/svix/api/background_tasks_api.rb +0 -191
  126. data/lib/svix/api/broadcast_api.rb +0 -93
  127. data/lib/svix/api/endpoint_api.rb +0 -2752
  128. data/lib/svix/api/environment_api.rb +0 -153
  129. data/lib/svix/api/environment_settings_api.rb +0 -79
  130. data/lib/svix/api/event_type_api.rb +0 -852
  131. data/lib/svix/api/events_api.rb +0 -102
  132. data/lib/svix/api/health_api.rb +0 -79
  133. data/lib/svix/api/inbound_api.rb +0 -209
  134. data/lib/svix/api/integration_api.rb +0 -707
  135. data/lib/svix/api/message_api.rb +0 -1192
  136. data/lib/svix/api/message_attempt_api.rb +0 -1245
  137. data/lib/svix/api/statistics_api.rb +0 -333
  138. data/lib/svix/api/stream_api.rb +0 -659
  139. data/lib/svix/api/stream_event_types_api.rb +0 -486
  140. data/lib/svix/api/transformation_template_api.rb +0 -967
  141. data/lib/svix/api/webhook_endpoint_api.rb +0 -748
  142. data/lib/svix/api_client.rb +0 -423
  143. data/lib/svix/application_api.rb +0 -35
  144. data/lib/svix/authentication_api.rb +0 -21
  145. data/lib/svix/background_tasks_api.rb +0 -17
  146. data/lib/svix/configuration.rb +0 -312
  147. data/lib/svix/endpoint_api.rb +0 -80
  148. data/lib/svix/event_type_api.rb +0 -37
  149. data/lib/svix/integration_api.rb +0 -38
  150. data/lib/svix/message_api.rb +0 -54
  151. data/lib/svix/message_attempt_api.rb +0 -51
  152. data/lib/svix/models/active_application_out.rb +0 -373
  153. data/lib/svix/models/active_endpoint_out.rb +0 -355
  154. data/lib/svix/models/aggregated_event_types.rb +0 -305
  155. data/lib/svix/models/application_message_failure.rb +0 -277
  156. data/lib/svix/models/application_message_id_pair.rb +0 -317
  157. data/lib/svix/models/application_stats.rb +0 -323
  158. data/lib/svix/models/application_stats_out.rb +0 -324
  159. data/lib/svix/models/attempt_statistics_data.rb +0 -229
  160. data/lib/svix/models/attempt_statistics_response.rb +0 -291
  161. data/lib/svix/models/auth_token_out.rb +0 -325
  162. data/lib/svix/models/azure_blob_storage_config.rb +0 -253
  163. data/lib/svix/models/background_task_finished_event.rb +0 -272
  164. data/lib/svix/models/background_task_finished_event2.rb +0 -331
  165. data/lib/svix/models/big_query_config.rb +0 -271
  166. data/lib/svix/models/border_radius_config.rb +0 -254
  167. data/lib/svix/models/border_radius_enum.rb +0 -43
  168. data/lib/svix/models/client_secret_jwt_params_in.rb +0 -297
  169. data/lib/svix/models/completion_choice.rb +0 -253
  170. data/lib/svix/models/completion_message.rb +0 -237
  171. data/lib/svix/models/count_out.rb +0 -258
  172. data/lib/svix/models/create_stream_in.rb +0 -232
  173. data/lib/svix/models/create_token_in.rb +0 -248
  174. data/lib/svix/models/custom_color_palette.rb +0 -295
  175. data/lib/svix/models/custom_strings_override.rb +0 -235
  176. data/lib/svix/models/custom_theme_override.rb +0 -223
  177. data/lib/svix/models/data.rb +0 -108
  178. data/lib/svix/models/data_any_of.rb +0 -240
  179. data/lib/svix/models/data_any_of1.rb +0 -223
  180. data/lib/svix/models/data_any_of2.rb +0 -241
  181. data/lib/svix/models/data_any_of3.rb +0 -223
  182. data/lib/svix/models/data_any_of4.rb +0 -240
  183. data/lib/svix/models/duration.rb +0 -275
  184. data/lib/svix/models/endpoint_created_event.rb +0 -272
  185. data/lib/svix/models/endpoint_created_event_data.rb +0 -410
  186. data/lib/svix/models/endpoint_deleted_event.rb +0 -272
  187. data/lib/svix/models/endpoint_deleted_event_data.rb +0 -410
  188. data/lib/svix/models/endpoint_disabled_event.rb +0 -272
  189. data/lib/svix/models/endpoint_disabled_event_data.rb +0 -451
  190. data/lib/svix/models/endpoint_disabled_trigger.rb +0 -40
  191. data/lib/svix/models/endpoint_enabled_event.rb +0 -272
  192. data/lib/svix/models/endpoint_enabled_event_data.rb +0 -410
  193. data/lib/svix/models/endpoint_mtls_config_in.rb +0 -233
  194. data/lib/svix/models/endpoint_mtls_config_out.rb +0 -215
  195. data/lib/svix/models/endpoint_oauth_config_in.rb +0 -350
  196. data/lib/svix/models/endpoint_oauth_config_out.rb +0 -315
  197. data/lib/svix/models/endpoint_transformation_simulate_in.rb +0 -330
  198. data/lib/svix/models/endpoint_transformation_simulate_out.rb +0 -296
  199. data/lib/svix/models/endpoint_updated_event.rb +0 -272
  200. data/lib/svix/models/endpoint_updated_event_data.rb +0 -410
  201. data/lib/svix/models/environment_settings_out.rb +0 -455
  202. data/lib/svix/models/event_in.rb +0 -258
  203. data/lib/svix/models/event_out.rb +0 -274
  204. data/lib/svix/models/event_stream_out.rb +0 -255
  205. data/lib/svix/models/event_type_example_out.rb +0 -221
  206. data/lib/svix/models/event_type_schema_in.rb +0 -221
  207. data/lib/svix/models/export_event_type_out.rb +0 -315
  208. data/lib/svix/models/font_size_config.rb +0 -230
  209. data/lib/svix/models/generate_in.rb +0 -221
  210. data/lib/svix/models/generate_out.rb +0 -287
  211. data/lib/svix/models/google_cloud_storage_config.rb +0 -239
  212. data/lib/svix/models/http_error_out.rb +0 -237
  213. data/lib/svix/models/http_validation_error.rb +0 -223
  214. data/lib/svix/models/hubspot_oauth_config_in.rb +0 -221
  215. data/lib/svix/models/inbound_path_params.rb +0 -277
  216. data/lib/svix/models/incoming_webhook_payload_out.rb +0 -235
  217. data/lib/svix/models/kafka_security_protocol_type.rb +0 -41
  218. data/lib/svix/models/list_response_active_application_out.rb +0 -261
  219. data/lib/svix/models/list_response_application_stats.rb +0 -261
  220. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +0 -261
  221. data/lib/svix/models/list_response_sink_out.rb +0 -261
  222. data/lib/svix/models/list_response_stream_event_type_out.rb +0 -261
  223. data/lib/svix/models/list_response_stream_out.rb +0 -261
  224. data/lib/svix/models/list_response_stream_sink_out.rb +0 -261
  225. data/lib/svix/models/list_response_template_out.rb +0 -261
  226. data/lib/svix/models/message_attempt_endpoint_out.rb +0 -545
  227. data/lib/svix/models/message_attempt_exhausted_event.rb +0 -272
  228. data/lib/svix/models/message_attempt_exhausted_event_data.rb +0 -482
  229. data/lib/svix/models/message_attempt_failed_data.rb +0 -293
  230. data/lib/svix/models/message_attempt_failing_event.rb +0 -272
  231. data/lib/svix/models/message_attempt_failing_event_data.rb +0 -482
  232. data/lib/svix/models/message_attempt_headers_out.rb +0 -263
  233. data/lib/svix/models/message_attempt_recovered_event.rb +0 -272
  234. data/lib/svix/models/message_attempt_recovered_event_data.rb +0 -482
  235. data/lib/svix/models/message_broadcast_in.rb +0 -423
  236. data/lib/svix/models/message_broadcast_out.rb +0 -315
  237. data/lib/svix/models/message_events_out.rb +0 -255
  238. data/lib/svix/models/message_precheck_in.rb +0 -288
  239. data/lib/svix/models/message_precheck_out.rb +0 -221
  240. data/lib/svix/models/message_raw_payload_out.rb +0 -221
  241. data/lib/svix/models/message_subscriber_auth_token_out.rb +0 -237
  242. data/lib/svix/models/o_auth_payload_in.rb +0 -237
  243. data/lib/svix/models/o_auth_payload_out.rb +0 -235
  244. data/lib/svix/models/oauth2_auth_method_in_out.rb +0 -41
  245. data/lib/svix/models/oauth2_grant_type_in_out.rb +0 -40
  246. data/lib/svix/models/oauth_jws_signing_algorithm.rb +0 -39
  247. data/lib/svix/models/one_time_token_in.rb +0 -221
  248. data/lib/svix/models/one_time_token_out.rb +0 -221
  249. data/lib/svix/models/polling_endpoint_message_out.rb +0 -454
  250. data/lib/svix/models/polling_endpoint_out.rb +0 -255
  251. data/lib/svix/models/redshift_config.rb +0 -317
  252. data/lib/svix/models/retry_schedule_in_out.rb +0 -216
  253. data/lib/svix/models/rotate_poller_token_in.rb +0 -280
  254. data/lib/svix/models/rotated_url_out.rb +0 -221
  255. data/lib/svix/models/s3_config.rb +0 -269
  256. data/lib/svix/models/sink_http_config.rb +0 -242
  257. data/lib/svix/models/sink_in.rb +0 -108
  258. data/lib/svix/models/sink_in_one_of.rb +0 -287
  259. data/lib/svix/models/sink_in_one_of1.rb +0 -319
  260. data/lib/svix/models/sink_in_one_of2.rb +0 -325
  261. data/lib/svix/models/sink_in_one_of3.rb +0 -271
  262. data/lib/svix/models/sink_in_one_of4.rb +0 -255
  263. data/lib/svix/models/sink_otel_v1_config.rb +0 -221
  264. data/lib/svix/models/sink_out.rb +0 -108
  265. data/lib/svix/models/sink_payload_format.rb +0 -39
  266. data/lib/svix/models/sink_secret_out.rb +0 -233
  267. data/lib/svix/models/sink_status.rb +0 -41
  268. data/lib/svix/models/sink_status_in.rb +0 -40
  269. data/lib/svix/models/sink_transform_in.rb +0 -248
  270. data/lib/svix/models/sink_transformation_out.rb +0 -226
  271. data/lib/svix/models/snowflake_config.rb +0 -287
  272. data/lib/svix/models/statistics_period.rb +0 -40
  273. data/lib/svix/models/stream_event_type_in.rb +0 -262
  274. data/lib/svix/models/stream_event_type_out.rb +0 -294
  275. data/lib/svix/models/stream_event_type_patch.rb +0 -254
  276. data/lib/svix/models/stream_in.rb +0 -287
  277. data/lib/svix/models/stream_out.rb +0 -350
  278. data/lib/svix/models/stream_patch.rb +0 -261
  279. data/lib/svix/models/stream_portal_access_in.rb +0 -293
  280. data/lib/svix/models/stream_sink_in.rb +0 -111
  281. data/lib/svix/models/stream_sink_in_one_of.rb +0 -271
  282. data/lib/svix/models/stream_sink_in_one_of1.rb +0 -271
  283. data/lib/svix/models/stream_sink_in_one_of2.rb +0 -271
  284. data/lib/svix/models/stream_sink_in_one_of3.rb +0 -271
  285. data/lib/svix/models/stream_sink_in_one_of4.rb +0 -271
  286. data/lib/svix/models/stream_sink_in_one_of5.rb +0 -271
  287. data/lib/svix/models/stream_sink_in_one_of6.rb +0 -271
  288. data/lib/svix/models/stream_sink_in_one_of7.rb +0 -271
  289. data/lib/svix/models/stream_sink_out.rb +0 -111
  290. data/lib/svix/models/stream_sink_patch.rb +0 -111
  291. data/lib/svix/models/template_patch.rb +0 -382
  292. data/lib/svix/models/template_update.rb +0 -402
  293. data/lib/svix/models/transformation_http_method.rb +0 -41
  294. data/lib/svix/models/transformation_simulate_in.rb +0 -330
  295. data/lib/svix/models/transformation_simulate_out.rb +0 -296
  296. data/lib/svix/models/validation_error.rb +0 -259
  297. data/lib/svix/statistics_api.rb +0 -17
@@ -1,1245 +0,0 @@
1
- =begin
2
- #Svix API
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: 1.1.1
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module Svix
16
- class MessageAttemptApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Count Attempts By Endpoint
23
- # Like `v1.message-attempt.list-by-endpoint` but returning a count only.
24
- # @param app_id [String] The Application's ID or UID.
25
- # @param endpoint_id [String] The Endpoint's ID or UID.
26
- # @param [Hash] opts the optional parameters
27
- # @option opts [MessageStatus] :status Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)
28
- # @option opts [StatusCodeClass] :status_code_class Filter response based on the HTTP status code
29
- # @option opts [String] :channel Filter response based on the channel
30
- # @option opts [String] :tag Filter response based on the tag
31
- # @option opts [Time] :before Only include items created before a certain date
32
- # @option opts [Time] :after Only include items created after a certain date
33
- # @option opts [Array<String>] :event_types Filter response based on the event type
34
- # @return [CountOut]
35
- def v1_message_attempt_count_by_endpoint(app_id, endpoint_id, opts = {})
36
- data, _status_code, _headers = v1_message_attempt_count_by_endpoint_with_http_info(app_id, endpoint_id, opts)
37
- data
38
- end
39
-
40
- # Count Attempts By Endpoint
41
- # Like &#x60;v1.message-attempt.list-by-endpoint&#x60; but returning a count only.
42
- # @param app_id [String] The Application&#39;s ID or UID.
43
- # @param endpoint_id [String] The Endpoint&#39;s ID or UID.
44
- # @param [Hash] opts the optional parameters
45
- # @option opts [MessageStatus] :status Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)
46
- # @option opts [StatusCodeClass] :status_code_class Filter response based on the HTTP status code
47
- # @option opts [String] :channel Filter response based on the channel
48
- # @option opts [String] :tag Filter response based on the tag
49
- # @option opts [Time] :before Only include items created before a certain date
50
- # @option opts [Time] :after Only include items created after a certain date
51
- # @option opts [Array<String>] :event_types Filter response based on the event type
52
- # @return [Array<(CountOut, Integer, Hash)>] CountOut data, response status code and response headers
53
- def v1_message_attempt_count_by_endpoint_with_http_info(app_id, endpoint_id, opts = {})
54
- if @api_client.config.debugging
55
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.v1_message_attempt_count_by_endpoint ...'
56
- end
57
- # verify the required parameter 'app_id' is set
58
- if @api_client.config.client_side_validation && app_id.nil?
59
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint"
60
- end
61
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
62
- fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint, the character length must be smaller than or equal to 256.'
63
- end
64
-
65
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
66
- fail ArgumentError, 'invalid value for "app_id" when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint, the character length must be great than or equal to 1.'
67
- end
68
-
69
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
70
- if @api_client.config.client_side_validation && app_id !~ pattern
71
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint, must conform to the pattern #{pattern}."
72
- end
73
-
74
- # verify the required parameter 'endpoint_id' is set
75
- if @api_client.config.client_side_validation && endpoint_id.nil?
76
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint"
77
- end
78
- if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
79
- fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint, the character length must be smaller than or equal to 256.'
80
- end
81
-
82
- if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
83
- fail ArgumentError, 'invalid value for "endpoint_id" when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint, the character length must be great than or equal to 1.'
84
- end
85
-
86
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
87
- if @api_client.config.client_side_validation && endpoint_id !~ pattern
88
- fail ArgumentError, "invalid value for 'endpoint_id' when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint, must conform to the pattern #{pattern}."
89
- end
90
-
91
- if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
92
- fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint, the character length must be smaller than or equal to 128.'
93
- end
94
-
95
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.:]+$/)
96
- if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
97
- fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint, must conform to the pattern #{pattern}."
98
- end
99
-
100
- if @api_client.config.client_side_validation && !opts[:'tag'].nil? && opts[:'tag'].to_s.length > 128
101
- fail ArgumentError, 'invalid value for "opts[:"tag"]" when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint, the character length must be smaller than or equal to 128.'
102
- end
103
-
104
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
105
- if @api_client.config.client_side_validation && !opts[:'tag'].nil? && opts[:'tag'] !~ pattern
106
- fail ArgumentError, "invalid value for 'opts[:\"tag\"]' when calling MessageAttemptApi.v1_message_attempt_count_by_endpoint, must conform to the pattern #{pattern}."
107
- end
108
-
109
- # resource path
110
- local_var_path = '/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/count'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
111
-
112
- # query parameters
113
- query_params = opts[:query_params] || {}
114
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
115
- query_params[:'status_code_class'] = opts[:'status_code_class'] if !opts[:'status_code_class'].nil?
116
- query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
117
- query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
118
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
119
- query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
120
- query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
121
-
122
- # header parameters
123
- header_params = opts[:header_params] || {}
124
- # HTTP header 'Accept' (if needed)
125
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
126
-
127
- # form parameters
128
- form_params = opts[:form_params] || {}
129
-
130
- # http body (model)
131
- post_body = opts[:debug_body]
132
-
133
- # return_type
134
- return_type = opts[:debug_return_type] || 'CountOut'
135
-
136
- # auth_names
137
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
138
-
139
- new_options = opts.merge(
140
- :operation => :"MessageAttemptApi.v1_message_attempt_count_by_endpoint",
141
- :header_params => header_params,
142
- :query_params => query_params,
143
- :form_params => form_params,
144
- :body => post_body,
145
- :auth_names => auth_names,
146
- :return_type => return_type
147
- )
148
-
149
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
150
- if @api_client.config.debugging
151
- @api_client.config.logger.debug "API called: MessageAttemptApi#v1_message_attempt_count_by_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
- end
153
- return data, status_code, headers
154
- end
155
-
156
- # Delete attempt response body
157
- # Deletes the given attempt's response body. Useful when an endpoint accidentally returned sensitive content. The message can't be replayed or resent once its payload has been deleted or expired.
158
- # @param app_id [String] The Application&#39;s ID or UID.
159
- # @param msg_id [String] The Message&#39;s ID or UID.
160
- # @param attempt_id [String] The MessageAttempt&#39;s ID.
161
- # @param [Hash] opts the optional parameters
162
- # @return [nil]
163
- def v1_message_attempt_expunge_content(app_id, msg_id, attempt_id, opts = {})
164
- v1_message_attempt_expunge_content_with_http_info(app_id, msg_id, attempt_id, opts)
165
- nil
166
- end
167
-
168
- # Delete attempt response body
169
- # Deletes the given attempt&#39;s response body. Useful when an endpoint accidentally returned sensitive content. The message can&#39;t be replayed or resent once its payload has been deleted or expired.
170
- # @param app_id [String] The Application&#39;s ID or UID.
171
- # @param msg_id [String] The Message&#39;s ID or UID.
172
- # @param attempt_id [String] The MessageAttempt&#39;s ID.
173
- # @param [Hash] opts the optional parameters
174
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
175
- def v1_message_attempt_expunge_content_with_http_info(app_id, msg_id, attempt_id, opts = {})
176
- if @api_client.config.debugging
177
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.v1_message_attempt_expunge_content ...'
178
- end
179
- # verify the required parameter 'app_id' is set
180
- if @api_client.config.client_side_validation && app_id.nil?
181
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.v1_message_attempt_expunge_content"
182
- end
183
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
184
- 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.'
185
- end
186
-
187
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
188
- 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.'
189
- end
190
-
191
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
192
- if @api_client.config.client_side_validation && app_id !~ pattern
193
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.v1_message_attempt_expunge_content, must conform to the pattern #{pattern}."
194
- end
195
-
196
- # verify the required parameter 'msg_id' is set
197
- if @api_client.config.client_side_validation && msg_id.nil?
198
- fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.v1_message_attempt_expunge_content"
199
- end
200
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
201
- 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.'
202
- end
203
-
204
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
205
- 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.'
206
- end
207
-
208
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
209
- if @api_client.config.client_side_validation && msg_id !~ pattern
210
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.v1_message_attempt_expunge_content, must conform to the pattern #{pattern}."
211
- end
212
-
213
- # verify the required parameter 'attempt_id' is set
214
- if @api_client.config.client_side_validation && attempt_id.nil?
215
- fail ArgumentError, "Missing the required parameter 'attempt_id' when calling MessageAttemptApi.v1_message_attempt_expunge_content"
216
- end
217
- if @api_client.config.client_side_validation && attempt_id.to_s.length > 33
218
- fail ArgumentError, 'invalid value for "attempt_id" when calling MessageAttemptApi.v1_message_attempt_expunge_content, the character length must be smaller than or equal to 33.'
219
- end
220
-
221
- if @api_client.config.client_side_validation && attempt_id.to_s.length < 33
222
- fail ArgumentError, 'invalid value for "attempt_id" when calling MessageAttemptApi.v1_message_attempt_expunge_content, the character length must be great than or equal to 33.'
223
- end
224
-
225
- pattern = Regexp.new(/^atmpt_[A-Za-z0-9]{27}$/)
226
- if @api_client.config.client_side_validation && attempt_id !~ pattern
227
- fail ArgumentError, "invalid value for 'attempt_id' when calling MessageAttemptApi.v1_message_attempt_expunge_content, must conform to the pattern #{pattern}."
228
- end
229
-
230
- # resource path
231
- 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))
232
-
233
- # query parameters
234
- query_params = opts[:query_params] || {}
235
-
236
- # header parameters
237
- header_params = opts[:header_params] || {}
238
- # HTTP header 'Accept' (if needed)
239
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
240
-
241
- # form parameters
242
- form_params = opts[:form_params] || {}
243
-
244
- # http body (model)
245
- post_body = opts[:debug_body]
246
-
247
- # return_type
248
- return_type = opts[:debug_return_type]
249
-
250
- # auth_names
251
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
252
-
253
- new_options = opts.merge(
254
- :operation => :"MessageAttemptApi.v1_message_attempt_expunge_content",
255
- :header_params => header_params,
256
- :query_params => query_params,
257
- :form_params => form_params,
258
- :body => post_body,
259
- :auth_names => auth_names,
260
- :return_type => return_type
261
- )
262
-
263
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
264
- if @api_client.config.debugging
265
- @api_client.config.logger.debug "API called: MessageAttemptApi#v1_message_attempt_expunge_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
266
- end
267
- return data, status_code, headers
268
- end
269
-
270
- # Get Attempt
271
- # `msg_id`: Use a message id or a message `eventId`
272
- # @param app_id [String] The Application&#39;s ID or UID.
273
- # @param msg_id [String] The Message&#39;s ID or UID.
274
- # @param attempt_id [String] The MessageAttempt&#39;s ID.
275
- # @param [Hash] opts the optional parameters
276
- # @return [MessageAttemptOut]
277
- def v1_message_attempt_get(app_id, msg_id, attempt_id, opts = {})
278
- data, _status_code, _headers = v1_message_attempt_get_with_http_info(app_id, msg_id, attempt_id, opts)
279
- data
280
- end
281
-
282
- # Get Attempt
283
- # &#x60;msg_id&#x60;: Use a message id or a message &#x60;eventId&#x60;
284
- # @param app_id [String] The Application&#39;s ID or UID.
285
- # @param msg_id [String] The Message&#39;s ID or UID.
286
- # @param attempt_id [String] The MessageAttempt&#39;s ID.
287
- # @param [Hash] opts the optional parameters
288
- # @return [Array<(MessageAttemptOut, Integer, Hash)>] MessageAttemptOut data, response status code and response headers
289
- def v1_message_attempt_get_with_http_info(app_id, msg_id, attempt_id, opts = {})
290
- if @api_client.config.debugging
291
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.v1_message_attempt_get ...'
292
- end
293
- # verify the required parameter 'app_id' is set
294
- if @api_client.config.client_side_validation && app_id.nil?
295
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.v1_message_attempt_get"
296
- end
297
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
298
- 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.'
299
- end
300
-
301
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
302
- 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.'
303
- end
304
-
305
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
306
- if @api_client.config.client_side_validation && app_id !~ pattern
307
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.v1_message_attempt_get, must conform to the pattern #{pattern}."
308
- end
309
-
310
- # verify the required parameter 'msg_id' is set
311
- if @api_client.config.client_side_validation && msg_id.nil?
312
- fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.v1_message_attempt_get"
313
- end
314
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
315
- 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.'
316
- end
317
-
318
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
319
- 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.'
320
- end
321
-
322
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
323
- if @api_client.config.client_side_validation && msg_id !~ pattern
324
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.v1_message_attempt_get, must conform to the pattern #{pattern}."
325
- end
326
-
327
- # verify the required parameter 'attempt_id' is set
328
- if @api_client.config.client_side_validation && attempt_id.nil?
329
- fail ArgumentError, "Missing the required parameter 'attempt_id' when calling MessageAttemptApi.v1_message_attempt_get"
330
- end
331
- if @api_client.config.client_side_validation && attempt_id.to_s.length > 33
332
- fail ArgumentError, 'invalid value for "attempt_id" when calling MessageAttemptApi.v1_message_attempt_get, the character length must be smaller than or equal to 33.'
333
- end
334
-
335
- if @api_client.config.client_side_validation && attempt_id.to_s.length < 33
336
- fail ArgumentError, 'invalid value for "attempt_id" when calling MessageAttemptApi.v1_message_attempt_get, the character length must be great than or equal to 33.'
337
- end
338
-
339
- pattern = Regexp.new(/^atmpt_[A-Za-z0-9]{27}$/)
340
- if @api_client.config.client_side_validation && attempt_id !~ pattern
341
- fail ArgumentError, "invalid value for 'attempt_id' when calling MessageAttemptApi.v1_message_attempt_get, must conform to the pattern #{pattern}."
342
- end
343
-
344
- # resource path
345
- 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))
346
-
347
- # query parameters
348
- query_params = opts[:query_params] || {}
349
-
350
- # header parameters
351
- header_params = opts[:header_params] || {}
352
- # HTTP header 'Accept' (if needed)
353
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
354
-
355
- # form parameters
356
- form_params = opts[:form_params] || {}
357
-
358
- # http body (model)
359
- post_body = opts[:debug_body]
360
-
361
- # return_type
362
- return_type = opts[:debug_return_type] || 'MessageAttemptOut'
363
-
364
- # auth_names
365
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
366
-
367
- new_options = opts.merge(
368
- :operation => :"MessageAttemptApi.v1_message_attempt_get",
369
- :header_params => header_params,
370
- :query_params => query_params,
371
- :form_params => form_params,
372
- :body => post_body,
373
- :auth_names => auth_names,
374
- :return_type => return_type
375
- )
376
-
377
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
378
- if @api_client.config.debugging
379
- @api_client.config.logger.debug "API called: MessageAttemptApi#v1_message_attempt_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
380
- end
381
- return data, status_code, headers
382
- end
383
-
384
- # Get Attempt Headers
385
- # Calculate and return headers used on a given message attempt
386
- # @param app_id [String] The Application&#39;s ID or UID.
387
- # @param msg_id [String] The Message&#39;s ID or UID.
388
- # @param attempt_id [String] The MessageAttempt&#39;s ID.
389
- # @param [Hash] opts the optional parameters
390
- # @return [MessageAttemptHeadersOut]
391
- def v1_message_attempt_get_headers(app_id, msg_id, attempt_id, opts = {})
392
- data, _status_code, _headers = v1_message_attempt_get_headers_with_http_info(app_id, msg_id, attempt_id, opts)
393
- data
394
- end
395
-
396
- # Get Attempt Headers
397
- # Calculate and return headers used on a given message attempt
398
- # @param app_id [String] The Application&#39;s ID or UID.
399
- # @param msg_id [String] The Message&#39;s ID or UID.
400
- # @param attempt_id [String] The MessageAttempt&#39;s ID.
401
- # @param [Hash] opts the optional parameters
402
- # @return [Array<(MessageAttemptHeadersOut, Integer, Hash)>] MessageAttemptHeadersOut data, response status code and response headers
403
- def v1_message_attempt_get_headers_with_http_info(app_id, msg_id, attempt_id, opts = {})
404
- if @api_client.config.debugging
405
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.v1_message_attempt_get_headers ...'
406
- end
407
- # verify the required parameter 'app_id' is set
408
- if @api_client.config.client_side_validation && app_id.nil?
409
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.v1_message_attempt_get_headers"
410
- end
411
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
412
- 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.'
413
- end
414
-
415
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
416
- 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.'
417
- end
418
-
419
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
420
- if @api_client.config.client_side_validation && app_id !~ pattern
421
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.v1_message_attempt_get_headers, must conform to the pattern #{pattern}."
422
- end
423
-
424
- # verify the required parameter 'msg_id' is set
425
- if @api_client.config.client_side_validation && msg_id.nil?
426
- fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.v1_message_attempt_get_headers"
427
- end
428
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
429
- 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.'
430
- end
431
-
432
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
433
- 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.'
434
- end
435
-
436
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
437
- if @api_client.config.client_side_validation && msg_id !~ pattern
438
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.v1_message_attempt_get_headers, must conform to the pattern #{pattern}."
439
- end
440
-
441
- # verify the required parameter 'attempt_id' is set
442
- if @api_client.config.client_side_validation && attempt_id.nil?
443
- fail ArgumentError, "Missing the required parameter 'attempt_id' when calling MessageAttemptApi.v1_message_attempt_get_headers"
444
- end
445
- if @api_client.config.client_side_validation && attempt_id.to_s.length > 33
446
- fail ArgumentError, 'invalid value for "attempt_id" when calling MessageAttemptApi.v1_message_attempt_get_headers, the character length must be smaller than or equal to 33.'
447
- end
448
-
449
- if @api_client.config.client_side_validation && attempt_id.to_s.length < 33
450
- fail ArgumentError, 'invalid value for "attempt_id" when calling MessageAttemptApi.v1_message_attempt_get_headers, the character length must be great than or equal to 33.'
451
- end
452
-
453
- pattern = Regexp.new(/^atmpt_[A-Za-z0-9]{27}$/)
454
- if @api_client.config.client_side_validation && attempt_id !~ pattern
455
- fail ArgumentError, "invalid value for 'attempt_id' when calling MessageAttemptApi.v1_message_attempt_get_headers, must conform to the pattern #{pattern}."
456
- end
457
-
458
- # resource path
459
- 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))
460
-
461
- # query parameters
462
- query_params = opts[:query_params] || {}
463
-
464
- # header parameters
465
- header_params = opts[:header_params] || {}
466
- # HTTP header 'Accept' (if needed)
467
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
468
-
469
- # form parameters
470
- form_params = opts[:form_params] || {}
471
-
472
- # http body (model)
473
- post_body = opts[:debug_body]
474
-
475
- # return_type
476
- return_type = opts[:debug_return_type] || 'MessageAttemptHeadersOut'
477
-
478
- # auth_names
479
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
480
-
481
- new_options = opts.merge(
482
- :operation => :"MessageAttemptApi.v1_message_attempt_get_headers",
483
- :header_params => header_params,
484
- :query_params => query_params,
485
- :form_params => form_params,
486
- :body => post_body,
487
- :auth_names => auth_names,
488
- :return_type => return_type
489
- )
490
-
491
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
492
- if @api_client.config.debugging
493
- @api_client.config.logger.debug "API called: MessageAttemptApi#v1_message_attempt_get_headers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
494
- end
495
- return data, status_code, headers
496
- end
497
-
498
- # List Attempted Destinations
499
- # List endpoints attempted by a given message. Additionally includes metadata about the latest message attempt. By default, endpoints are listed in ascending order by ID.
500
- # @param app_id [String] The Application&#39;s ID or UID.
501
- # @param msg_id [String] The Message&#39;s ID or UID.
502
- # @param [Hash] opts the optional parameters
503
- # @option opts [Integer] :limit Limit the number of returned items
504
- # @option opts [String] :iterator The iterator returned from a prior invocation
505
- # @return [ListResponseMessageEndpointOut]
506
- def v1_message_attempt_list_attempted_destinations(app_id, msg_id, opts = {})
507
- data, _status_code, _headers = v1_message_attempt_list_attempted_destinations_with_http_info(app_id, msg_id, opts)
508
- data
509
- end
510
-
511
- # List Attempted Destinations
512
- # List endpoints attempted by a given message. Additionally includes metadata about the latest message attempt. By default, endpoints are listed in ascending order by ID.
513
- # @param app_id [String] The Application&#39;s ID or UID.
514
- # @param msg_id [String] The Message&#39;s ID or UID.
515
- # @param [Hash] opts the optional parameters
516
- # @option opts [Integer] :limit Limit the number of returned items
517
- # @option opts [String] :iterator The iterator returned from a prior invocation
518
- # @return [Array<(ListResponseMessageEndpointOut, Integer, Hash)>] ListResponseMessageEndpointOut data, response status code and response headers
519
- def v1_message_attempt_list_attempted_destinations_with_http_info(app_id, msg_id, opts = {})
520
- if @api_client.config.debugging
521
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.v1_message_attempt_list_attempted_destinations ...'
522
- end
523
- # verify the required parameter 'app_id' is set
524
- if @api_client.config.client_side_validation && app_id.nil?
525
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.v1_message_attempt_list_attempted_destinations"
526
- end
527
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
528
- 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.'
529
- end
530
-
531
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
532
- 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.'
533
- end
534
-
535
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
536
- if @api_client.config.client_side_validation && app_id !~ pattern
537
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.v1_message_attempt_list_attempted_destinations, must conform to the pattern #{pattern}."
538
- end
539
-
540
- # verify the required parameter 'msg_id' is set
541
- if @api_client.config.client_side_validation && msg_id.nil?
542
- fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.v1_message_attempt_list_attempted_destinations"
543
- end
544
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
545
- 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.'
546
- end
547
-
548
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
549
- 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.'
550
- end
551
-
552
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
553
- if @api_client.config.client_side_validation && msg_id !~ pattern
554
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.v1_message_attempt_list_attempted_destinations, must conform to the pattern #{pattern}."
555
- end
556
-
557
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
558
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.v1_message_attempt_list_attempted_destinations, must be smaller than or equal to 250.'
559
- end
560
-
561
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
562
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.v1_message_attempt_list_attempted_destinations, must be greater than or equal to 1.'
563
- end
564
-
565
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length > 30
566
- fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling MessageAttemptApi.v1_message_attempt_list_attempted_destinations, the character length must be smaller than or equal to 30.'
567
- end
568
-
569
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length < 30
570
- fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling MessageAttemptApi.v1_message_attempt_list_attempted_destinations, the character length must be great than or equal to 30.'
571
- end
572
-
573
- pattern = Regexp.new(/^ep_[A-Za-z0-9]{27}$/)
574
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'] !~ pattern
575
- fail ArgumentError, "invalid value for 'opts[:\"iterator\"]' when calling MessageAttemptApi.v1_message_attempt_list_attempted_destinations, must conform to the pattern #{pattern}."
576
- end
577
-
578
- # resource path
579
- 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))
580
-
581
- # query parameters
582
- query_params = opts[:query_params] || {}
583
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
584
- query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
585
-
586
- # header parameters
587
- header_params = opts[:header_params] || {}
588
- # HTTP header 'Accept' (if needed)
589
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
590
-
591
- # form parameters
592
- form_params = opts[:form_params] || {}
593
-
594
- # http body (model)
595
- post_body = opts[:debug_body]
596
-
597
- # return_type
598
- return_type = opts[:debug_return_type] || 'ListResponseMessageEndpointOut'
599
-
600
- # auth_names
601
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
602
-
603
- new_options = opts.merge(
604
- :operation => :"MessageAttemptApi.v1_message_attempt_list_attempted_destinations",
605
- :header_params => header_params,
606
- :query_params => query_params,
607
- :form_params => form_params,
608
- :body => post_body,
609
- :auth_names => auth_names,
610
- :return_type => return_type
611
- )
612
-
613
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
614
- if @api_client.config.debugging
615
- @api_client.config.logger.debug "API called: MessageAttemptApi#v1_message_attempt_list_attempted_destinations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
616
- end
617
- return data, status_code, headers
618
- end
619
-
620
- # List Attempted Messages
621
- # 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. Note that by default this endpoint is limited to retrieving 90 days' worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the `before` or `after` parameter as appropriate.
622
- # @param app_id [String] The Application&#39;s ID or UID.
623
- # @param endpoint_id [String] The Endpoint&#39;s ID or UID.
624
- # @param [Hash] opts the optional parameters
625
- # @option opts [Integer] :limit Limit the number of returned items
626
- # @option opts [String] :iterator The iterator returned from a prior invocation
627
- # @option opts [String] :channel Filter response based on the channel
628
- # @option opts [String] :tag Filter response based on the message tags
629
- # @option opts [MessageStatus] :status Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)
630
- # @option opts [Time] :before Only include items created before a certain date
631
- # @option opts [Time] :after Only include items created after a certain date
632
- # @option opts [Boolean] :with_content When &#x60;true&#x60; message payloads are included in the response (default to true)
633
- # @option opts [Array<String>] :event_types Filter response based on the event type
634
- # @return [ListResponseEndpointMessageOut]
635
- def v1_message_attempt_list_attempted_messages(app_id, endpoint_id, opts = {})
636
- data, _status_code, _headers = v1_message_attempt_list_attempted_messages_with_http_info(app_id, endpoint_id, opts)
637
- data
638
- end
639
-
640
- # List Attempted Messages
641
- # 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. Note that by default this endpoint is limited to retrieving 90 days&#39; worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the &#x60;before&#x60; or &#x60;after&#x60; parameter as appropriate.
642
- # @param app_id [String] The Application&#39;s ID or UID.
643
- # @param endpoint_id [String] The Endpoint&#39;s ID or UID.
644
- # @param [Hash] opts the optional parameters
645
- # @option opts [Integer] :limit Limit the number of returned items
646
- # @option opts [String] :iterator The iterator returned from a prior invocation
647
- # @option opts [String] :channel Filter response based on the channel
648
- # @option opts [String] :tag Filter response based on the message tags
649
- # @option opts [MessageStatus] :status Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)
650
- # @option opts [Time] :before Only include items created before a certain date
651
- # @option opts [Time] :after Only include items created after a certain date
652
- # @option opts [Boolean] :with_content When &#x60;true&#x60; message payloads are included in the response (default to true)
653
- # @option opts [Array<String>] :event_types Filter response based on the event type
654
- # @return [Array<(ListResponseEndpointMessageOut, Integer, Hash)>] ListResponseEndpointMessageOut data, response status code and response headers
655
- def v1_message_attempt_list_attempted_messages_with_http_info(app_id, endpoint_id, opts = {})
656
- if @api_client.config.debugging
657
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.v1_message_attempt_list_attempted_messages ...'
658
- end
659
- # verify the required parameter 'app_id' is set
660
- if @api_client.config.client_side_validation && app_id.nil?
661
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages"
662
- end
663
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
664
- 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.'
665
- end
666
-
667
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
668
- 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.'
669
- end
670
-
671
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
672
- if @api_client.config.client_side_validation && app_id !~ pattern
673
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, must conform to the pattern #{pattern}."
674
- end
675
-
676
- # verify the required parameter 'endpoint_id' is set
677
- if @api_client.config.client_side_validation && endpoint_id.nil?
678
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages"
679
- end
680
- if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
681
- 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.'
682
- end
683
-
684
- if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
685
- 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.'
686
- end
687
-
688
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
689
- if @api_client.config.client_side_validation && endpoint_id !~ pattern
690
- fail ArgumentError, "invalid value for 'endpoint_id' when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, must conform to the pattern #{pattern}."
691
- end
692
-
693
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
694
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, must be smaller than or equal to 250.'
695
- end
696
-
697
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
698
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, must be greater than or equal to 1.'
699
- end
700
-
701
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length > 31
702
- fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, the character length must be smaller than or equal to 31.'
703
- end
704
-
705
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length < 31
706
- fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, the character length must be great than or equal to 31.'
707
- end
708
-
709
- pattern = Regexp.new(/^msg_[A-Za-z0-9]{27}$/)
710
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'] !~ pattern
711
- fail ArgumentError, "invalid value for 'opts[:\"iterator\"]' when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, must conform to the pattern #{pattern}."
712
- end
713
-
714
- if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
715
- 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.'
716
- end
717
-
718
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.:]+$/)
719
- if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
720
- fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, must conform to the pattern #{pattern}."
721
- end
722
-
723
- if @api_client.config.client_side_validation && !opts[:'tag'].nil? && opts[:'tag'].to_s.length > 128
724
- fail ArgumentError, 'invalid value for "opts[:"tag"]" when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, the character length must be smaller than or equal to 128.'
725
- end
726
-
727
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
728
- if @api_client.config.client_side_validation && !opts[:'tag'].nil? && opts[:'tag'] !~ pattern
729
- fail ArgumentError, "invalid value for 'opts[:\"tag\"]' when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, must conform to the pattern #{pattern}."
730
- end
731
-
732
- # resource path
733
- 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))
734
-
735
- # query parameters
736
- query_params = opts[:query_params] || {}
737
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
738
- query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
739
- query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
740
- query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
741
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
742
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
743
- query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
744
- query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
745
- query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
746
-
747
- # header parameters
748
- header_params = opts[:header_params] || {}
749
- # HTTP header 'Accept' (if needed)
750
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
751
-
752
- # form parameters
753
- form_params = opts[:form_params] || {}
754
-
755
- # http body (model)
756
- post_body = opts[:debug_body]
757
-
758
- # return_type
759
- return_type = opts[:debug_return_type] || 'ListResponseEndpointMessageOut'
760
-
761
- # auth_names
762
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
763
-
764
- new_options = opts.merge(
765
- :operation => :"MessageAttemptApi.v1_message_attempt_list_attempted_messages",
766
- :header_params => header_params,
767
- :query_params => query_params,
768
- :form_params => form_params,
769
- :body => post_body,
770
- :auth_names => auth_names,
771
- :return_type => return_type
772
- )
773
-
774
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
775
- if @api_client.config.debugging
776
- @api_client.config.logger.debug "API called: MessageAttemptApi#v1_message_attempt_list_attempted_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
777
- end
778
- return data, status_code, headers
779
- end
780
-
781
- # List Attempts By Endpoint
782
- # List attempts by endpoint id Note that by default this endpoint is limited to retrieving 90 days' worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the `before` or `after` parameter as appropriate.
783
- # @param app_id [String] The Application&#39;s ID or UID.
784
- # @param endpoint_id [String] The Endpoint&#39;s ID or UID.
785
- # @param [Hash] opts the optional parameters
786
- # @option opts [Integer] :limit Limit the number of returned items
787
- # @option opts [String] :iterator The iterator returned from a prior invocation
788
- # @option opts [MessageStatus] :status Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)
789
- # @option opts [StatusCodeClass] :status_code_class Filter response based on the HTTP status code
790
- # @option opts [String] :channel Filter response based on the channel
791
- # @option opts [String] :tag Filter response based on the tag
792
- # @option opts [Time] :before Only include items created before a certain date
793
- # @option opts [Time] :after Only include items created after a certain date
794
- # @option opts [Boolean] :with_content When &#x60;true&#x60; attempt content is included in the response (default to true)
795
- # @option opts [Boolean] :with_msg When &#x60;true&#x60;, the message information is included in the response (default to false)
796
- # @option opts [Array<String>] :event_types Filter response based on the event type
797
- # @return [ListResponseMessageAttemptOut]
798
- def v1_message_attempt_list_by_endpoint(app_id, endpoint_id, opts = {})
799
- data, _status_code, _headers = v1_message_attempt_list_by_endpoint_with_http_info(app_id, endpoint_id, opts)
800
- data
801
- end
802
-
803
- # List Attempts By Endpoint
804
- # List attempts by endpoint id Note that by default this endpoint is limited to retrieving 90 days&#39; worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the &#x60;before&#x60; or &#x60;after&#x60; parameter as appropriate.
805
- # @param app_id [String] The Application&#39;s ID or UID.
806
- # @param endpoint_id [String] The Endpoint&#39;s ID or UID.
807
- # @param [Hash] opts the optional parameters
808
- # @option opts [Integer] :limit Limit the number of returned items
809
- # @option opts [String] :iterator The iterator returned from a prior invocation
810
- # @option opts [MessageStatus] :status Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)
811
- # @option opts [StatusCodeClass] :status_code_class Filter response based on the HTTP status code
812
- # @option opts [String] :channel Filter response based on the channel
813
- # @option opts [String] :tag Filter response based on the tag
814
- # @option opts [Time] :before Only include items created before a certain date
815
- # @option opts [Time] :after Only include items created after a certain date
816
- # @option opts [Boolean] :with_content When &#x60;true&#x60; attempt content is included in the response (default to true)
817
- # @option opts [Boolean] :with_msg When &#x60;true&#x60;, the message information is included in the response (default to false)
818
- # @option opts [Array<String>] :event_types Filter response based on the event type
819
- # @return [Array<(ListResponseMessageAttemptOut, Integer, Hash)>] ListResponseMessageAttemptOut data, response status code and response headers
820
- def v1_message_attempt_list_by_endpoint_with_http_info(app_id, endpoint_id, opts = {})
821
- if @api_client.config.debugging
822
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.v1_message_attempt_list_by_endpoint ...'
823
- end
824
- # verify the required parameter 'app_id' is set
825
- if @api_client.config.client_side_validation && app_id.nil?
826
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint"
827
- end
828
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
829
- 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.'
830
- end
831
-
832
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
833
- 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.'
834
- end
835
-
836
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
837
- if @api_client.config.client_side_validation && app_id !~ pattern
838
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, must conform to the pattern #{pattern}."
839
- end
840
-
841
- # verify the required parameter 'endpoint_id' is set
842
- if @api_client.config.client_side_validation && endpoint_id.nil?
843
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint"
844
- end
845
- if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
846
- 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.'
847
- end
848
-
849
- if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
850
- 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.'
851
- end
852
-
853
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
854
- if @api_client.config.client_side_validation && endpoint_id !~ pattern
855
- fail ArgumentError, "invalid value for 'endpoint_id' when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, must conform to the pattern #{pattern}."
856
- end
857
-
858
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
859
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, must be smaller than or equal to 250.'
860
- end
861
-
862
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
863
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, must be greater than or equal to 1.'
864
- end
865
-
866
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length > 33
867
- fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, the character length must be smaller than or equal to 33.'
868
- end
869
-
870
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length < 33
871
- fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, the character length must be great than or equal to 33.'
872
- end
873
-
874
- pattern = Regexp.new(/^atmpt_[A-Za-z0-9]{27}$/)
875
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'] !~ pattern
876
- fail ArgumentError, "invalid value for 'opts[:\"iterator\"]' when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, must conform to the pattern #{pattern}."
877
- end
878
-
879
- if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
880
- 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.'
881
- end
882
-
883
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.:]+$/)
884
- if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
885
- fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, must conform to the pattern #{pattern}."
886
- end
887
-
888
- if @api_client.config.client_side_validation && !opts[:'tag'].nil? && opts[:'tag'].to_s.length > 128
889
- fail ArgumentError, 'invalid value for "opts[:"tag"]" when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, the character length must be smaller than or equal to 128.'
890
- end
891
-
892
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
893
- if @api_client.config.client_side_validation && !opts[:'tag'].nil? && opts[:'tag'] !~ pattern
894
- fail ArgumentError, "invalid value for 'opts[:\"tag\"]' when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, must conform to the pattern #{pattern}."
895
- end
896
-
897
- # resource path
898
- 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))
899
-
900
- # query parameters
901
- query_params = opts[:query_params] || {}
902
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
903
- query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
904
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
905
- query_params[:'status_code_class'] = opts[:'status_code_class'] if !opts[:'status_code_class'].nil?
906
- query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
907
- query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
908
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
909
- query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
910
- query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
911
- query_params[:'with_msg'] = opts[:'with_msg'] if !opts[:'with_msg'].nil?
912
- query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
913
-
914
- # header parameters
915
- header_params = opts[:header_params] || {}
916
- # HTTP header 'Accept' (if needed)
917
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
918
-
919
- # form parameters
920
- form_params = opts[:form_params] || {}
921
-
922
- # http body (model)
923
- post_body = opts[:debug_body]
924
-
925
- # return_type
926
- return_type = opts[:debug_return_type] || 'ListResponseMessageAttemptOut'
927
-
928
- # auth_names
929
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
930
-
931
- new_options = opts.merge(
932
- :operation => :"MessageAttemptApi.v1_message_attempt_list_by_endpoint",
933
- :header_params => header_params,
934
- :query_params => query_params,
935
- :form_params => form_params,
936
- :body => post_body,
937
- :auth_names => auth_names,
938
- :return_type => return_type
939
- )
940
-
941
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
942
- if @api_client.config.debugging
943
- @api_client.config.logger.debug "API called: MessageAttemptApi#v1_message_attempt_list_by_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
944
- end
945
- return data, status_code, headers
946
- end
947
-
948
- # List Attempts By Msg
949
- # List attempts by message ID. Note that by default this endpoint is limited to retrieving 90 days' worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the `before` or `after` parameter as appropriate.
950
- # @param app_id [String] The Application&#39;s ID or UID.
951
- # @param msg_id [String] The Message&#39;s ID or UID.
952
- # @param [Hash] opts the optional parameters
953
- # @option opts [Integer] :limit Limit the number of returned items
954
- # @option opts [String] :iterator The iterator returned from a prior invocation
955
- # @option opts [MessageStatus] :status Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)
956
- # @option opts [StatusCodeClass] :status_code_class Filter response based on the HTTP status code
957
- # @option opts [String] :channel Filter response based on the channel
958
- # @option opts [String] :tag Filter response based on the tag
959
- # @option opts [String] :endpoint_id Filter the attempts based on the attempted endpoint
960
- # @option opts [Time] :before Only include items created before a certain date
961
- # @option opts [Time] :after Only include items created after a certain date
962
- # @option opts [Boolean] :with_content When &#x60;true&#x60; attempt content is included in the response (default to true)
963
- # @option opts [Array<String>] :event_types Filter response based on the event type
964
- # @return [ListResponseMessageAttemptOut]
965
- def v1_message_attempt_list_by_msg(app_id, msg_id, opts = {})
966
- data, _status_code, _headers = v1_message_attempt_list_by_msg_with_http_info(app_id, msg_id, opts)
967
- data
968
- end
969
-
970
- # List Attempts By Msg
971
- # List attempts by message ID. Note that by default this endpoint is limited to retrieving 90 days&#39; worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the &#x60;before&#x60; or &#x60;after&#x60; parameter as appropriate.
972
- # @param app_id [String] The Application&#39;s ID or UID.
973
- # @param msg_id [String] The Message&#39;s ID or UID.
974
- # @param [Hash] opts the optional parameters
975
- # @option opts [Integer] :limit Limit the number of returned items
976
- # @option opts [String] :iterator The iterator returned from a prior invocation
977
- # @option opts [MessageStatus] :status Filter response based on the status of the attempt: Success (0), Pending (1), Failed (2), or Sending (3)
978
- # @option opts [StatusCodeClass] :status_code_class Filter response based on the HTTP status code
979
- # @option opts [String] :channel Filter response based on the channel
980
- # @option opts [String] :tag Filter response based on the tag
981
- # @option opts [String] :endpoint_id Filter the attempts based on the attempted endpoint
982
- # @option opts [Time] :before Only include items created before a certain date
983
- # @option opts [Time] :after Only include items created after a certain date
984
- # @option opts [Boolean] :with_content When &#x60;true&#x60; attempt content is included in the response (default to true)
985
- # @option opts [Array<String>] :event_types Filter response based on the event type
986
- # @return [Array<(ListResponseMessageAttemptOut, Integer, Hash)>] ListResponseMessageAttemptOut data, response status code and response headers
987
- def v1_message_attempt_list_by_msg_with_http_info(app_id, msg_id, opts = {})
988
- if @api_client.config.debugging
989
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.v1_message_attempt_list_by_msg ...'
990
- end
991
- # verify the required parameter 'app_id' is set
992
- if @api_client.config.client_side_validation && app_id.nil?
993
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.v1_message_attempt_list_by_msg"
994
- end
995
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
996
- 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.'
997
- end
998
-
999
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
1000
- 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.'
1001
- end
1002
-
1003
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1004
- if @api_client.config.client_side_validation && app_id !~ pattern
1005
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.v1_message_attempt_list_by_msg, must conform to the pattern #{pattern}."
1006
- end
1007
-
1008
- # verify the required parameter 'msg_id' is set
1009
- if @api_client.config.client_side_validation && msg_id.nil?
1010
- fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.v1_message_attempt_list_by_msg"
1011
- end
1012
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
1013
- 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.'
1014
- end
1015
-
1016
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
1017
- 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.'
1018
- end
1019
-
1020
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1021
- if @api_client.config.client_side_validation && msg_id !~ pattern
1022
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.v1_message_attempt_list_by_msg, must conform to the pattern #{pattern}."
1023
- end
1024
-
1025
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
1026
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.v1_message_attempt_list_by_msg, must be smaller than or equal to 250.'
1027
- end
1028
-
1029
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1030
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MessageAttemptApi.v1_message_attempt_list_by_msg, must be greater than or equal to 1.'
1031
- end
1032
-
1033
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length > 33
1034
- fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling MessageAttemptApi.v1_message_attempt_list_by_msg, the character length must be smaller than or equal to 33.'
1035
- end
1036
-
1037
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'].to_s.length < 33
1038
- fail ArgumentError, 'invalid value for "opts[:"iterator"]" when calling MessageAttemptApi.v1_message_attempt_list_by_msg, the character length must be great than or equal to 33.'
1039
- end
1040
-
1041
- pattern = Regexp.new(/^atmpt_[A-Za-z0-9]{27}$/)
1042
- if @api_client.config.client_side_validation && !opts[:'iterator'].nil? && opts[:'iterator'] !~ pattern
1043
- fail ArgumentError, "invalid value for 'opts[:\"iterator\"]' when calling MessageAttemptApi.v1_message_attempt_list_by_msg, must conform to the pattern #{pattern}."
1044
- end
1045
-
1046
- if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'].to_s.length > 128
1047
- 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.'
1048
- end
1049
-
1050
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.:]+$/)
1051
- if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
1052
- fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.v1_message_attempt_list_by_msg, must conform to the pattern #{pattern}."
1053
- end
1054
-
1055
- if @api_client.config.client_side_validation && !opts[:'tag'].nil? && opts[:'tag'].to_s.length > 128
1056
- fail ArgumentError, 'invalid value for "opts[:"tag"]" when calling MessageAttemptApi.v1_message_attempt_list_by_msg, the character length must be smaller than or equal to 128.'
1057
- end
1058
-
1059
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1060
- if @api_client.config.client_side_validation && !opts[:'tag'].nil? && opts[:'tag'] !~ pattern
1061
- fail ArgumentError, "invalid value for 'opts[:\"tag\"]' when calling MessageAttemptApi.v1_message_attempt_list_by_msg, must conform to the pattern #{pattern}."
1062
- end
1063
-
1064
- if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'].to_s.length > 256
1065
- 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.'
1066
- end
1067
-
1068
- if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'].to_s.length < 1
1069
- 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.'
1070
- end
1071
-
1072
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1073
- if @api_client.config.client_side_validation && !opts[:'endpoint_id'].nil? && opts[:'endpoint_id'] !~ pattern
1074
- fail ArgumentError, "invalid value for 'opts[:\"endpoint_id\"]' when calling MessageAttemptApi.v1_message_attempt_list_by_msg, must conform to the pattern #{pattern}."
1075
- end
1076
-
1077
- # resource path
1078
- local_var_path = '/api/v1/app/{app_id}/attempt/msg/{msg_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'msg_id' + '}', CGI.escape(msg_id.to_s))
1079
-
1080
- # query parameters
1081
- query_params = opts[:query_params] || {}
1082
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1083
- query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
1084
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
1085
- query_params[:'status_code_class'] = opts[:'status_code_class'] if !opts[:'status_code_class'].nil?
1086
- query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil?
1087
- query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
1088
- query_params[:'endpoint_id'] = opts[:'endpoint_id'] if !opts[:'endpoint_id'].nil?
1089
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1090
- query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1091
- query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
1092
- query_params[:'event_types'] = @api_client.build_collection_param(opts[:'event_types'], :multi) if !opts[:'event_types'].nil?
1093
-
1094
- # header parameters
1095
- header_params = opts[:header_params] || {}
1096
- # HTTP header 'Accept' (if needed)
1097
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1098
-
1099
- # form parameters
1100
- form_params = opts[:form_params] || {}
1101
-
1102
- # http body (model)
1103
- post_body = opts[:debug_body]
1104
-
1105
- # return_type
1106
- return_type = opts[:debug_return_type] || 'ListResponseMessageAttemptOut'
1107
-
1108
- # auth_names
1109
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
1110
-
1111
- new_options = opts.merge(
1112
- :operation => :"MessageAttemptApi.v1_message_attempt_list_by_msg",
1113
- :header_params => header_params,
1114
- :query_params => query_params,
1115
- :form_params => form_params,
1116
- :body => post_body,
1117
- :auth_names => auth_names,
1118
- :return_type => return_type
1119
- )
1120
-
1121
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1122
- if @api_client.config.debugging
1123
- @api_client.config.logger.debug "API called: MessageAttemptApi#v1_message_attempt_list_by_msg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1124
- end
1125
- return data, status_code, headers
1126
- end
1127
-
1128
- # Resend Webhook
1129
- # Resend a message to the specified endpoint.
1130
- # @param app_id [String] The Application&#39;s ID or UID.
1131
- # @param msg_id [String] The Message&#39;s ID or UID.
1132
- # @param endpoint_id [String] The Endpoint&#39;s ID or UID.
1133
- # @param [Hash] opts the optional parameters
1134
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
1135
- # @return [nil]
1136
- def v1_message_attempt_resend(app_id, msg_id, endpoint_id, opts = {})
1137
- v1_message_attempt_resend_with_http_info(app_id, msg_id, endpoint_id, opts)
1138
- nil
1139
- end
1140
-
1141
- # Resend Webhook
1142
- # Resend a message to the specified endpoint.
1143
- # @param app_id [String] The Application&#39;s ID or UID.
1144
- # @param msg_id [String] The Message&#39;s ID or UID.
1145
- # @param endpoint_id [String] The Endpoint&#39;s ID or UID.
1146
- # @param [Hash] opts the optional parameters
1147
- # @option opts [String] :idempotency_key The request&#39;s idempotency key
1148
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1149
- def v1_message_attempt_resend_with_http_info(app_id, msg_id, endpoint_id, opts = {})
1150
- if @api_client.config.debugging
1151
- @api_client.config.logger.debug 'Calling API: MessageAttemptApi.v1_message_attempt_resend ...'
1152
- end
1153
- # verify the required parameter 'app_id' is set
1154
- if @api_client.config.client_side_validation && app_id.nil?
1155
- fail ArgumentError, "Missing the required parameter 'app_id' when calling MessageAttemptApi.v1_message_attempt_resend"
1156
- end
1157
- if @api_client.config.client_side_validation && app_id.to_s.length > 256
1158
- 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.'
1159
- end
1160
-
1161
- if @api_client.config.client_side_validation && app_id.to_s.length < 1
1162
- 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.'
1163
- end
1164
-
1165
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1166
- if @api_client.config.client_side_validation && app_id !~ pattern
1167
- fail ArgumentError, "invalid value for 'app_id' when calling MessageAttemptApi.v1_message_attempt_resend, must conform to the pattern #{pattern}."
1168
- end
1169
-
1170
- # verify the required parameter 'msg_id' is set
1171
- if @api_client.config.client_side_validation && msg_id.nil?
1172
- fail ArgumentError, "Missing the required parameter 'msg_id' when calling MessageAttemptApi.v1_message_attempt_resend"
1173
- end
1174
- if @api_client.config.client_side_validation && msg_id.to_s.length > 256
1175
- 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.'
1176
- end
1177
-
1178
- if @api_client.config.client_side_validation && msg_id.to_s.length < 1
1179
- 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.'
1180
- end
1181
-
1182
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1183
- if @api_client.config.client_side_validation && msg_id !~ pattern
1184
- fail ArgumentError, "invalid value for 'msg_id' when calling MessageAttemptApi.v1_message_attempt_resend, must conform to the pattern #{pattern}."
1185
- end
1186
-
1187
- # verify the required parameter 'endpoint_id' is set
1188
- if @api_client.config.client_side_validation && endpoint_id.nil?
1189
- fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling MessageAttemptApi.v1_message_attempt_resend"
1190
- end
1191
- if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
1192
- 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.'
1193
- end
1194
-
1195
- if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
1196
- 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.'
1197
- end
1198
-
1199
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1200
- if @api_client.config.client_side_validation && endpoint_id !~ pattern
1201
- fail ArgumentError, "invalid value for 'endpoint_id' when calling MessageAttemptApi.v1_message_attempt_resend, must conform to the pattern #{pattern}."
1202
- end
1203
-
1204
- # resource path
1205
- 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))
1206
-
1207
- # query parameters
1208
- query_params = opts[:query_params] || {}
1209
-
1210
- # header parameters
1211
- header_params = opts[:header_params] || {}
1212
- # HTTP header 'Accept' (if needed)
1213
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1214
- header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
1215
-
1216
- # form parameters
1217
- form_params = opts[:form_params] || {}
1218
-
1219
- # http body (model)
1220
- post_body = opts[:debug_body]
1221
-
1222
- # return_type
1223
- return_type = opts[:debug_return_type]
1224
-
1225
- # auth_names
1226
- auth_names = opts[:debug_auth_names] || ['HTTPBearer']
1227
-
1228
- new_options = opts.merge(
1229
- :operation => :"MessageAttemptApi.v1_message_attempt_resend",
1230
- :header_params => header_params,
1231
- :query_params => query_params,
1232
- :form_params => form_params,
1233
- :body => post_body,
1234
- :auth_names => auth_names,
1235
- :return_type => return_type
1236
- )
1237
-
1238
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1239
- if @api_client.config.debugging
1240
- @api_client.config.logger.debug "API called: MessageAttemptApi#v1_message_attempt_resend\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1241
- end
1242
- return data, status_code, headers
1243
- end
1244
- end
1245
- end