svix 1.38.0 → 1.39.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/README.md +8 -1
  4. data/lib/svix/api/application_api.rb +23 -14
  5. data/lib/svix/api/authentication_api.rb +23 -11
  6. data/lib/svix/api/background_tasks_api.rb +3 -3
  7. data/lib/svix/api/broadcast_api.rb +6 -3
  8. data/lib/svix/api/endpoint_api.rb +86 -44
  9. data/lib/svix/api/environment_api.rb +8 -5
  10. data/lib/svix/api/environment_settings_api.rb +2 -2
  11. data/lib/svix/api/event_type_api.rb +39 -21
  12. data/lib/svix/api/events_api.rb +2 -2
  13. data/lib/svix/api/health_api.rb +2 -2
  14. data/lib/svix/api/inbound_api.rb +7 -4
  15. data/lib/svix/api/integration_api.rb +16 -10
  16. data/lib/svix/api/message_api.rb +21 -15
  17. data/lib/svix/api/message_attempt_api.rb +25 -25
  18. data/lib/svix/api/sink_api.rb +7 -4
  19. data/lib/svix/api/statistics_api.rb +9 -6
  20. data/lib/svix/api/stream_api.rb +19 -10
  21. data/lib/svix/api/transformation_template_api.rb +49 -22
  22. data/lib/svix/api/webhook_endpoint_api.rb +572 -0
  23. data/lib/svix/api_client.rb +45 -28
  24. data/lib/svix/api_error.rb +2 -1
  25. data/lib/svix/configuration.rb +42 -12
  26. data/lib/svix/models/aggregate_event_types_out.rb +43 -19
  27. data/lib/svix/models/app_portal_access_in.rb +19 -19
  28. data/lib/svix/models/app_portal_access_out.rb +19 -19
  29. data/lib/svix/models/app_usage_stats_in.rb +19 -19
  30. data/lib/svix/models/app_usage_stats_out.rb +43 -19
  31. data/lib/svix/models/application_in.rb +17 -19
  32. data/lib/svix/models/application_out.rb +25 -19
  33. data/lib/svix/models/application_patch.rb +15 -19
  34. data/lib/svix/models/application_stats.rb +19 -19
  35. data/lib/svix/models/application_token_expire_in.rb +15 -19
  36. data/lib/svix/models/attempt_statistics_data.rb +15 -19
  37. data/lib/svix/models/attempt_statistics_response.rb +45 -19
  38. data/lib/svix/models/auth_token_out.rb +21 -19
  39. data/lib/svix/models/azure_blob_storage_config.rb +21 -19
  40. data/lib/svix/models/background_task_out.rb +45 -19
  41. data/lib/svix/models/background_task_status.rb +7 -4
  42. data/lib/svix/models/background_task_type.rb +7 -4
  43. data/lib/svix/models/big_query_config.rb +271 -0
  44. data/lib/svix/models/border_radius_config.rb +37 -19
  45. data/lib/svix/models/border_radius_enum.rb +7 -4
  46. data/lib/svix/models/client_secret_jwt_params_in.rb +41 -19
  47. data/lib/svix/models/completion_choice.rb +21 -19
  48. data/lib/svix/models/completion_message.rb +19 -19
  49. data/lib/svix/models/create_message_token_in.rb +17 -19
  50. data/lib/svix/models/create_stream_in.rb +30 -23
  51. data/lib/svix/models/custom_color_palette.rb +15 -19
  52. data/lib/svix/models/custom_strings_override.rb +15 -19
  53. data/lib/svix/models/custom_theme_override.rb +15 -19
  54. data/lib/svix/models/dashboard_access_out.rb +19 -19
  55. data/lib/svix/models/duration.rb +19 -19
  56. data/lib/svix/models/endpoint_created_event.rb +17 -19
  57. data/lib/svix/models/endpoint_created_event_data.rb +19 -19
  58. data/lib/svix/models/endpoint_deleted_event.rb +17 -19
  59. data/lib/svix/models/endpoint_deleted_event_data.rb +19 -19
  60. data/lib/svix/models/endpoint_disabled_event.rb +17 -19
  61. data/lib/svix/models/endpoint_disabled_event_data.rb +21 -19
  62. data/lib/svix/models/endpoint_headers_in.rb +17 -19
  63. data/lib/svix/models/endpoint_headers_out.rb +19 -19
  64. data/lib/svix/models/endpoint_headers_patch_in.rb +17 -19
  65. data/lib/svix/models/endpoint_in.rb +17 -19
  66. data/lib/svix/models/endpoint_message_out.rb +47 -19
  67. data/lib/svix/models/endpoint_mtls_config_in.rb +17 -19
  68. data/lib/svix/models/endpoint_oauth_config_in.rb +45 -19
  69. data/lib/svix/models/endpoint_out.rb +29 -19
  70. data/lib/svix/models/endpoint_patch.rb +20 -20
  71. data/lib/svix/models/endpoint_secret_out.rb +17 -19
  72. data/lib/svix/models/endpoint_secret_rotate_in.rb +15 -21
  73. data/lib/svix/models/endpoint_stats.rb +23 -19
  74. data/lib/svix/models/endpoint_transformation_in.rb +15 -19
  75. data/lib/svix/models/endpoint_transformation_out.rb +15 -19
  76. data/lib/svix/models/endpoint_transformation_simulate_in.rb +21 -19
  77. data/lib/svix/models/endpoint_transformation_simulate_out.rb +41 -19
  78. data/lib/svix/models/endpoint_update.rb +17 -19
  79. data/lib/svix/models/endpoint_updated_event.rb +17 -19
  80. data/lib/svix/models/endpoint_updated_event_data.rb +19 -19
  81. data/lib/svix/models/environment_in.rb +19 -19
  82. data/lib/svix/models/environment_out.rb +21 -19
  83. data/lib/svix/models/environment_settings_out.rb +15 -19
  84. data/lib/svix/models/event_example_in.rb +17 -19
  85. data/lib/svix/models/event_in.rb +17 -19
  86. data/lib/svix/models/event_out.rb +19 -19
  87. data/lib/svix/models/event_stream_out.rb +21 -19
  88. data/lib/svix/models/event_type_example_out.rb +17 -19
  89. data/lib/svix/models/event_type_from_open_api.rb +95 -20
  90. data/lib/svix/models/event_type_import_open_api_in.rb +15 -19
  91. data/lib/svix/models/event_type_import_open_api_out.rb +17 -19
  92. data/lib/svix/models/event_type_import_open_api_out_data.rb +17 -19
  93. data/lib/svix/models/event_type_in.rb +19 -19
  94. data/lib/svix/models/event_type_out.rb +25 -19
  95. data/lib/svix/models/event_type_patch.rb +15 -19
  96. data/lib/svix/models/event_type_schema_in.rb +17 -19
  97. data/lib/svix/models/event_type_update.rb +17 -19
  98. data/lib/svix/models/export_event_type_out.rb +43 -19
  99. data/lib/svix/models/font_size_config.rb +15 -19
  100. data/lib/svix/models/generate_in.rb +17 -19
  101. data/lib/svix/models/generate_out.rb +25 -19
  102. data/lib/svix/models/google_cloud_storage_config.rb +19 -19
  103. data/lib/svix/models/http_error_out.rb +19 -19
  104. data/lib/svix/models/http_validation_error.rb +17 -19
  105. data/lib/svix/models/hubspot_oauth_config_in.rb +17 -19
  106. data/lib/svix/models/inbound_path_params.rb +19 -19
  107. data/lib/svix/models/incoming_webhook_payload_out.rb +15 -19
  108. data/lib/svix/models/integration_in.rb +17 -19
  109. data/lib/svix/models/integration_key_out.rb +17 -19
  110. data/lib/svix/models/integration_out.rb +23 -19
  111. data/lib/svix/models/integration_update.rb +17 -19
  112. data/lib/svix/models/kafka_security_protocol_type.rb +7 -4
  113. data/lib/svix/models/list_response_application_out.rb +19 -19
  114. data/lib/svix/models/list_response_application_stats.rb +19 -19
  115. data/lib/svix/models/list_response_background_task_out.rb +19 -19
  116. data/lib/svix/models/list_response_endpoint_message_out.rb +19 -19
  117. data/lib/svix/models/list_response_endpoint_out.rb +19 -19
  118. data/lib/svix/models/list_response_event_type_out.rb +19 -19
  119. data/lib/svix/models/list_response_integration_out.rb +19 -19
  120. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +19 -19
  121. data/lib/svix/models/list_response_message_attempt_out.rb +19 -19
  122. data/lib/svix/models/list_response_message_endpoint_out.rb +19 -19
  123. data/lib/svix/models/list_response_message_out.rb +19 -19
  124. data/lib/svix/models/list_response_operational_webhook_endpoint_out.rb +259 -0
  125. data/lib/svix/models/list_response_sink_out.rb +19 -19
  126. data/lib/svix/models/list_response_stream_out.rb +19 -19
  127. data/lib/svix/models/list_response_stream_sink_out.rb +19 -19
  128. data/lib/svix/models/list_response_template_out.rb +19 -19
  129. data/lib/svix/models/message_attempt_endpoint_out.rb +57 -19
  130. data/lib/svix/models/message_attempt_exhausted_event.rb +17 -19
  131. data/lib/svix/models/message_attempt_exhausted_event_data.rb +23 -19
  132. data/lib/svix/models/message_attempt_failed_data.rb +21 -19
  133. data/lib/svix/models/message_attempt_failing_event.rb +17 -19
  134. data/lib/svix/models/message_attempt_failing_event_data.rb +23 -19
  135. data/lib/svix/models/message_attempt_headers_out.rb +19 -19
  136. data/lib/svix/models/message_attempt_out.rb +57 -19
  137. data/lib/svix/models/message_attempt_recovered_event.rb +17 -19
  138. data/lib/svix/models/message_attempt_recovered_event_data.rb +23 -19
  139. data/lib/svix/models/message_attempt_trigger_type.rb +7 -4
  140. data/lib/svix/models/message_broadcast_in.rb +19 -19
  141. data/lib/svix/models/message_broadcast_out.rb +43 -19
  142. data/lib/svix/models/message_endpoint_out.rb +51 -19
  143. data/lib/svix/models/message_events_out.rb +21 -19
  144. data/lib/svix/models/message_in.rb +19 -19
  145. data/lib/svix/models/message_out.rb +23 -19
  146. data/lib/svix/models/message_raw_payload_out.rb +17 -19
  147. data/lib/svix/models/message_status.rb +7 -4
  148. data/lib/svix/models/message_subscriber_auth_token_out.rb +19 -19
  149. data/lib/svix/models/o_auth_payload_in.rb +19 -19
  150. data/lib/svix/models/o_auth_payload_out.rb +15 -19
  151. data/lib/svix/models/oauth2_auth_method_in.rb +7 -4
  152. data/lib/svix/models/oauth2_grant_type_in.rb +7 -4
  153. data/lib/svix/models/oauth_jws_signing_algorithm.rb +7 -4
  154. data/lib/svix/models/one_time_token_in.rb +17 -19
  155. data/lib/svix/models/one_time_token_out.rb +17 -19
  156. data/lib/svix/models/operational_webhook_endpoint_in.rb +408 -0
  157. data/lib/svix/models/operational_webhook_endpoint_out.rb +442 -0
  158. data/lib/svix/models/operational_webhook_endpoint_secret_in.rb +233 -0
  159. data/lib/svix/models/operational_webhook_endpoint_secret_out.rb +243 -0
  160. data/lib/svix/models/operational_webhook_endpoint_update.rb +380 -0
  161. data/lib/svix/models/ordering.rb +7 -4
  162. data/lib/svix/models/recover_in.rb +17 -19
  163. data/lib/svix/models/recover_out.rb +43 -19
  164. data/lib/svix/models/redshift_config.rb +25 -19
  165. data/lib/svix/models/replay_in.rb +17 -19
  166. data/lib/svix/models/replay_out.rb +43 -19
  167. data/lib/svix/models/retry_schedule_in_out.rb +15 -19
  168. data/lib/svix/models/rotated_url_out.rb +17 -19
  169. data/lib/svix/models/s3_config.rb +23 -19
  170. data/lib/svix/models/settings_in.rb +15 -19
  171. data/lib/svix/models/settings_out.rb +15 -19
  172. data/lib/svix/models/sink_http_config.rb +17 -19
  173. data/lib/svix/models/sink_in.rb +4 -4
  174. data/lib/svix/models/sink_in_one_of.rb +21 -19
  175. data/lib/svix/models/sink_in_one_of1.rb +25 -19
  176. data/lib/svix/models/sink_in_one_of2.rb +23 -19
  177. data/lib/svix/models/sink_in_one_of3.rb +19 -19
  178. data/lib/svix/models/sink_otel_v1_config.rb +17 -19
  179. data/lib/svix/models/sink_out.rb +4 -4
  180. data/lib/svix/models/sink_payload_format.rb +7 -4
  181. data/lib/svix/models/sink_status.rb +7 -4
  182. data/lib/svix/models/sink_status_in.rb +7 -4
  183. data/lib/svix/models/sink_transform_in.rb +15 -19
  184. data/lib/svix/models/sink_transformation_out.rb +15 -19
  185. data/lib/svix/models/snowflake_config.rb +21 -19
  186. data/lib/svix/models/statistics_period.rb +7 -4
  187. data/lib/svix/models/status_code_class.rb +7 -4
  188. data/lib/svix/models/stream_in.rb +24 -22
  189. data/lib/svix/models/stream_out.rb +28 -22
  190. data/lib/svix/models/stream_patch.rb +22 -22
  191. data/lib/svix/models/stream_sink_in.rb +6 -5
  192. data/lib/svix/models/stream_sink_in_one_of.rb +19 -19
  193. data/lib/svix/models/stream_sink_in_one_of1.rb +19 -19
  194. data/lib/svix/models/stream_sink_in_one_of2.rb +19 -19
  195. data/lib/svix/models/stream_sink_in_one_of3.rb +19 -19
  196. data/lib/svix/models/stream_sink_in_one_of4.rb +19 -19
  197. data/lib/svix/models/stream_sink_in_one_of5.rb +19 -19
  198. data/lib/svix/models/stream_sink_in_one_of6.rb +19 -19
  199. data/lib/svix/models/stream_sink_in_one_of7.rb +271 -0
  200. data/lib/svix/models/stream_sink_out.rb +6 -5
  201. data/lib/svix/models/stream_sink_patch.rb +6 -5
  202. data/lib/svix/models/template_in.rb +43 -21
  203. data/lib/svix/models/template_out.rb +57 -19
  204. data/lib/svix/models/template_patch.rb +43 -21
  205. data/lib/svix/models/template_update.rb +41 -19
  206. data/lib/svix/models/transformation_http_method.rb +7 -4
  207. data/lib/svix/models/transformation_simulate_in.rb +21 -19
  208. data/lib/svix/models/transformation_simulate_out.rb +41 -19
  209. data/lib/svix/models/transformation_template_kind.rb +7 -4
  210. data/lib/svix/models/validation_error.rb +21 -19
  211. data/lib/svix/operational_webhook_endpoint_api.rb +37 -0
  212. data/lib/svix/version.rb +1 -1
  213. data/svix.gemspec +12 -2
  214. metadata +40 -21
@@ -0,0 +1,572 @@
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 WebhookEndpointApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Operational Webhook Endpoint
23
+ # Create an operational webhook endpoint.
24
+ # @param operational_webhook_endpoint_in [OperationalWebhookEndpointIn]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :idempotency_key The request's idempotency key
27
+ # @return [OperationalWebhookEndpointOut]
28
+ def create_operational_webhook_endpoint(operational_webhook_endpoint_in, opts = {})
29
+ data, _status_code, _headers = create_operational_webhook_endpoint_with_http_info(operational_webhook_endpoint_in, opts)
30
+ data
31
+ end
32
+
33
+ # Create Operational Webhook Endpoint
34
+ # Create an operational webhook endpoint.
35
+ # @param operational_webhook_endpoint_in [OperationalWebhookEndpointIn]
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :idempotency_key The request's idempotency key
38
+ # @return [Array<(OperationalWebhookEndpointOut, Integer, Hash)>] OperationalWebhookEndpointOut data, response status code and response headers
39
+ def create_operational_webhook_endpoint_with_http_info(operational_webhook_endpoint_in, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: WebhookEndpointApi.create_operational_webhook_endpoint ...'
42
+ end
43
+ # verify the required parameter 'operational_webhook_endpoint_in' is set
44
+ if @api_client.config.client_side_validation && operational_webhook_endpoint_in.nil?
45
+ fail ArgumentError, "Missing the required parameter 'operational_webhook_endpoint_in' when calling WebhookEndpointApi.create_operational_webhook_endpoint"
46
+ end
47
+ # resource path
48
+ local_var_path = '/api/v1/operational-webhook/endpoint'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
57
+ # HTTP header 'Content-Type'
58
+ content_type = @api_client.select_header_content_type(['application/json'])
59
+ if !content_type.nil?
60
+ header_params['Content-Type'] = content_type
61
+ end
62
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(operational_webhook_endpoint_in)
69
+
70
+ # return_type
71
+ return_type = opts[:debug_return_type] || 'OperationalWebhookEndpointOut'
72
+
73
+ # auth_names
74
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
75
+
76
+ new_options = opts.merge(
77
+ :operation => :"WebhookEndpointApi.create_operational_webhook_endpoint",
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => return_type
84
+ )
85
+
86
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug "API called: WebhookEndpointApi#create_operational_webhook_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ end
90
+ return data, status_code, headers
91
+ end
92
+
93
+ # Delete Operational Webhook Endpoint
94
+ # Delete an operational webhook endpoint.
95
+ # @param endpoint_id [String] The ep&#39;s ID or UID
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [nil]
98
+ def delete_operational_webhook_endpoint(endpoint_id, opts = {})
99
+ delete_operational_webhook_endpoint_with_http_info(endpoint_id, opts)
100
+ nil
101
+ end
102
+
103
+ # Delete Operational Webhook Endpoint
104
+ # Delete an operational webhook endpoint.
105
+ # @param endpoint_id [String] The ep&#39;s ID or UID
106
+ # @param [Hash] opts the optional parameters
107
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
108
+ def delete_operational_webhook_endpoint_with_http_info(endpoint_id, opts = {})
109
+ if @api_client.config.debugging
110
+ @api_client.config.logger.debug 'Calling API: WebhookEndpointApi.delete_operational_webhook_endpoint ...'
111
+ end
112
+ # verify the required parameter 'endpoint_id' is set
113
+ if @api_client.config.client_side_validation && endpoint_id.nil?
114
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling WebhookEndpointApi.delete_operational_webhook_endpoint"
115
+ end
116
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
117
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling WebhookEndpointApi.delete_operational_webhook_endpoint, the character length must be smaller than or equal to 256.'
118
+ end
119
+
120
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
121
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling WebhookEndpointApi.delete_operational_webhook_endpoint, the character length must be great than or equal to 1.'
122
+ end
123
+
124
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
125
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
126
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling WebhookEndpointApi.delete_operational_webhook_endpoint, must conform to the pattern #{pattern}."
127
+ end
128
+
129
+ # resource path
130
+ local_var_path = '/api/v1/operational-webhook/endpoint/{endpoint_id}'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
131
+
132
+ # query parameters
133
+ query_params = opts[:query_params] || {}
134
+
135
+ # header parameters
136
+ header_params = opts[:header_params] || {}
137
+ # HTTP header 'Accept' (if needed)
138
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
139
+
140
+ # form parameters
141
+ form_params = opts[:form_params] || {}
142
+
143
+ # http body (model)
144
+ post_body = opts[:debug_body]
145
+
146
+ # return_type
147
+ return_type = opts[:debug_return_type]
148
+
149
+ # auth_names
150
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
151
+
152
+ new_options = opts.merge(
153
+ :operation => :"WebhookEndpointApi.delete_operational_webhook_endpoint",
154
+ :header_params => header_params,
155
+ :query_params => query_params,
156
+ :form_params => form_params,
157
+ :body => post_body,
158
+ :auth_names => auth_names,
159
+ :return_type => return_type
160
+ )
161
+
162
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
163
+ if @api_client.config.debugging
164
+ @api_client.config.logger.debug "API called: WebhookEndpointApi#delete_operational_webhook_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
165
+ end
166
+ return data, status_code, headers
167
+ end
168
+
169
+ # Get Operational Webhook Endpoint
170
+ # Get an operational webhook endpoint.
171
+ # @param endpoint_id [String] The ep&#39;s ID or UID
172
+ # @param [Hash] opts the optional parameters
173
+ # @return [OperationalWebhookEndpointOut]
174
+ def get_operational_webhook_endpoint(endpoint_id, opts = {})
175
+ data, _status_code, _headers = get_operational_webhook_endpoint_with_http_info(endpoint_id, opts)
176
+ data
177
+ end
178
+
179
+ # Get Operational Webhook Endpoint
180
+ # Get an operational webhook endpoint.
181
+ # @param endpoint_id [String] The ep&#39;s ID or UID
182
+ # @param [Hash] opts the optional parameters
183
+ # @return [Array<(OperationalWebhookEndpointOut, Integer, Hash)>] OperationalWebhookEndpointOut data, response status code and response headers
184
+ def get_operational_webhook_endpoint_with_http_info(endpoint_id, opts = {})
185
+ if @api_client.config.debugging
186
+ @api_client.config.logger.debug 'Calling API: WebhookEndpointApi.get_operational_webhook_endpoint ...'
187
+ end
188
+ # verify the required parameter 'endpoint_id' is set
189
+ if @api_client.config.client_side_validation && endpoint_id.nil?
190
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling WebhookEndpointApi.get_operational_webhook_endpoint"
191
+ end
192
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
193
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling WebhookEndpointApi.get_operational_webhook_endpoint, the character length must be smaller than or equal to 256.'
194
+ end
195
+
196
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
197
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling WebhookEndpointApi.get_operational_webhook_endpoint, the character length must be great than or equal to 1.'
198
+ end
199
+
200
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
201
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
202
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling WebhookEndpointApi.get_operational_webhook_endpoint, must conform to the pattern #{pattern}."
203
+ end
204
+
205
+ # resource path
206
+ local_var_path = '/api/v1/operational-webhook/endpoint/{endpoint_id}'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
207
+
208
+ # query parameters
209
+ query_params = opts[:query_params] || {}
210
+
211
+ # header parameters
212
+ header_params = opts[:header_params] || {}
213
+ # HTTP header 'Accept' (if needed)
214
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
215
+
216
+ # form parameters
217
+ form_params = opts[:form_params] || {}
218
+
219
+ # http body (model)
220
+ post_body = opts[:debug_body]
221
+
222
+ # return_type
223
+ return_type = opts[:debug_return_type] || 'OperationalWebhookEndpointOut'
224
+
225
+ # auth_names
226
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
227
+
228
+ new_options = opts.merge(
229
+ :operation => :"WebhookEndpointApi.get_operational_webhook_endpoint",
230
+ :header_params => header_params,
231
+ :query_params => query_params,
232
+ :form_params => form_params,
233
+ :body => post_body,
234
+ :auth_names => auth_names,
235
+ :return_type => return_type
236
+ )
237
+
238
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug "API called: WebhookEndpointApi#get_operational_webhook_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
241
+ end
242
+ return data, status_code, headers
243
+ end
244
+
245
+ # Get Operational Webhook Endpoint Secret
246
+ # Get an operational webhook endpoint's signing secret. This is used to verify the authenticity of the webhook. For more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).
247
+ # @param endpoint_id [String] The ep&#39;s ID or UID
248
+ # @param [Hash] opts the optional parameters
249
+ # @return [OperationalWebhookEndpointSecretOut]
250
+ def get_operational_webhook_endpoint_secret(endpoint_id, opts = {})
251
+ data, _status_code, _headers = get_operational_webhook_endpoint_secret_with_http_info(endpoint_id, opts)
252
+ data
253
+ end
254
+
255
+ # Get Operational Webhook Endpoint Secret
256
+ # Get an operational webhook endpoint&#39;s signing secret. This is used to verify the authenticity of the webhook. For more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).
257
+ # @param endpoint_id [String] The ep&#39;s ID or UID
258
+ # @param [Hash] opts the optional parameters
259
+ # @return [Array<(OperationalWebhookEndpointSecretOut, Integer, Hash)>] OperationalWebhookEndpointSecretOut data, response status code and response headers
260
+ def get_operational_webhook_endpoint_secret_with_http_info(endpoint_id, opts = {})
261
+ if @api_client.config.debugging
262
+ @api_client.config.logger.debug 'Calling API: WebhookEndpointApi.get_operational_webhook_endpoint_secret ...'
263
+ end
264
+ # verify the required parameter 'endpoint_id' is set
265
+ if @api_client.config.client_side_validation && endpoint_id.nil?
266
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling WebhookEndpointApi.get_operational_webhook_endpoint_secret"
267
+ end
268
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
269
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling WebhookEndpointApi.get_operational_webhook_endpoint_secret, the character length must be smaller than or equal to 256.'
270
+ end
271
+
272
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
273
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling WebhookEndpointApi.get_operational_webhook_endpoint_secret, the character length must be great than or equal to 1.'
274
+ end
275
+
276
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
277
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
278
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling WebhookEndpointApi.get_operational_webhook_endpoint_secret, must conform to the pattern #{pattern}."
279
+ end
280
+
281
+ # resource path
282
+ local_var_path = '/api/v1/operational-webhook/endpoint/{endpoint_id}/secret'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
283
+
284
+ # query parameters
285
+ query_params = opts[:query_params] || {}
286
+
287
+ # header parameters
288
+ header_params = opts[:header_params] || {}
289
+ # HTTP header 'Accept' (if needed)
290
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
291
+
292
+ # form parameters
293
+ form_params = opts[:form_params] || {}
294
+
295
+ # http body (model)
296
+ post_body = opts[:debug_body]
297
+
298
+ # return_type
299
+ return_type = opts[:debug_return_type] || 'OperationalWebhookEndpointSecretOut'
300
+
301
+ # auth_names
302
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
303
+
304
+ new_options = opts.merge(
305
+ :operation => :"WebhookEndpointApi.get_operational_webhook_endpoint_secret",
306
+ :header_params => header_params,
307
+ :query_params => query_params,
308
+ :form_params => form_params,
309
+ :body => post_body,
310
+ :auth_names => auth_names,
311
+ :return_type => return_type
312
+ )
313
+
314
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
315
+ if @api_client.config.debugging
316
+ @api_client.config.logger.debug "API called: WebhookEndpointApi#get_operational_webhook_endpoint_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
317
+ end
318
+ return data, status_code, headers
319
+ end
320
+
321
+ # List Operational Webhook Endpoints
322
+ # List operational webhook endpoints.
323
+ # @param [Hash] opts the optional parameters
324
+ # @option opts [Integer] :limit Limit the number of returned items
325
+ # @option opts [String] :iterator The iterator returned from a prior invocation
326
+ # @option opts [Ordering] :order The sorting order of the returned items
327
+ # @return [ListResponseOperationalWebhookEndpointOut]
328
+ def list_operational_webhook_endpoints(opts = {})
329
+ data, _status_code, _headers = list_operational_webhook_endpoints_with_http_info(opts)
330
+ data
331
+ end
332
+
333
+ # List Operational Webhook Endpoints
334
+ # List operational webhook endpoints.
335
+ # @param [Hash] opts the optional parameters
336
+ # @option opts [Integer] :limit Limit the number of returned items
337
+ # @option opts [String] :iterator The iterator returned from a prior invocation
338
+ # @option opts [Ordering] :order The sorting order of the returned items
339
+ # @return [Array<(ListResponseOperationalWebhookEndpointOut, Integer, Hash)>] ListResponseOperationalWebhookEndpointOut data, response status code and response headers
340
+ def list_operational_webhook_endpoints_with_http_info(opts = {})
341
+ if @api_client.config.debugging
342
+ @api_client.config.logger.debug 'Calling API: WebhookEndpointApi.list_operational_webhook_endpoints ...'
343
+ end
344
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
345
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WebhookEndpointApi.list_operational_webhook_endpoints, must be smaller than or equal to 250.'
346
+ end
347
+
348
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
349
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WebhookEndpointApi.list_operational_webhook_endpoints, must be greater than or equal to 1.'
350
+ end
351
+
352
+ # resource path
353
+ local_var_path = '/api/v1/operational-webhook/endpoint'
354
+
355
+ # query parameters
356
+ query_params = opts[:query_params] || {}
357
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
358
+ query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
359
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
360
+
361
+ # header parameters
362
+ header_params = opts[:header_params] || {}
363
+ # HTTP header 'Accept' (if needed)
364
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
365
+
366
+ # form parameters
367
+ form_params = opts[:form_params] || {}
368
+
369
+ # http body (model)
370
+ post_body = opts[:debug_body]
371
+
372
+ # return_type
373
+ return_type = opts[:debug_return_type] || 'ListResponseOperationalWebhookEndpointOut'
374
+
375
+ # auth_names
376
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
377
+
378
+ new_options = opts.merge(
379
+ :operation => :"WebhookEndpointApi.list_operational_webhook_endpoints",
380
+ :header_params => header_params,
381
+ :query_params => query_params,
382
+ :form_params => form_params,
383
+ :body => post_body,
384
+ :auth_names => auth_names,
385
+ :return_type => return_type
386
+ )
387
+
388
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
389
+ if @api_client.config.debugging
390
+ @api_client.config.logger.debug "API called: WebhookEndpointApi#list_operational_webhook_endpoints\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
391
+ end
392
+ return data, status_code, headers
393
+ end
394
+
395
+ # Rotate Operational Webhook Endpoint Secret
396
+ # Rotates an operational webhook endpoint's signing secret. The previous secret will remain valid for the next 24 hours.
397
+ # @param endpoint_id [String] The ep&#39;s ID or UID
398
+ # @param operational_webhook_endpoint_secret_in [OperationalWebhookEndpointSecretIn]
399
+ # @param [Hash] opts the optional parameters
400
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
401
+ # @return [nil]
402
+ def rotate_operational_webhook_endpoint_secret(endpoint_id, operational_webhook_endpoint_secret_in, opts = {})
403
+ rotate_operational_webhook_endpoint_secret_with_http_info(endpoint_id, operational_webhook_endpoint_secret_in, opts)
404
+ nil
405
+ end
406
+
407
+ # Rotate Operational Webhook Endpoint Secret
408
+ # Rotates an operational webhook endpoint&#39;s signing secret. The previous secret will remain valid for the next 24 hours.
409
+ # @param endpoint_id [String] The ep&#39;s ID or UID
410
+ # @param operational_webhook_endpoint_secret_in [OperationalWebhookEndpointSecretIn]
411
+ # @param [Hash] opts the optional parameters
412
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
413
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
414
+ def rotate_operational_webhook_endpoint_secret_with_http_info(endpoint_id, operational_webhook_endpoint_secret_in, opts = {})
415
+ if @api_client.config.debugging
416
+ @api_client.config.logger.debug 'Calling API: WebhookEndpointApi.rotate_operational_webhook_endpoint_secret ...'
417
+ end
418
+ # verify the required parameter 'endpoint_id' is set
419
+ if @api_client.config.client_side_validation && endpoint_id.nil?
420
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling WebhookEndpointApi.rotate_operational_webhook_endpoint_secret"
421
+ end
422
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
423
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling WebhookEndpointApi.rotate_operational_webhook_endpoint_secret, the character length must be smaller than or equal to 256.'
424
+ end
425
+
426
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
427
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling WebhookEndpointApi.rotate_operational_webhook_endpoint_secret, the character length must be great than or equal to 1.'
428
+ end
429
+
430
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
431
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
432
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling WebhookEndpointApi.rotate_operational_webhook_endpoint_secret, must conform to the pattern #{pattern}."
433
+ end
434
+
435
+ # verify the required parameter 'operational_webhook_endpoint_secret_in' is set
436
+ if @api_client.config.client_side_validation && operational_webhook_endpoint_secret_in.nil?
437
+ fail ArgumentError, "Missing the required parameter 'operational_webhook_endpoint_secret_in' when calling WebhookEndpointApi.rotate_operational_webhook_endpoint_secret"
438
+ end
439
+ # resource path
440
+ local_var_path = '/api/v1/operational-webhook/endpoint/{endpoint_id}/secret/rotate'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
441
+
442
+ # query parameters
443
+ query_params = opts[:query_params] || {}
444
+
445
+ # header parameters
446
+ header_params = opts[:header_params] || {}
447
+ # HTTP header 'Accept' (if needed)
448
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
449
+ # HTTP header 'Content-Type'
450
+ content_type = @api_client.select_header_content_type(['application/json'])
451
+ if !content_type.nil?
452
+ header_params['Content-Type'] = content_type
453
+ end
454
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
455
+
456
+ # form parameters
457
+ form_params = opts[:form_params] || {}
458
+
459
+ # http body (model)
460
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(operational_webhook_endpoint_secret_in)
461
+
462
+ # return_type
463
+ return_type = opts[:debug_return_type]
464
+
465
+ # auth_names
466
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
467
+
468
+ new_options = opts.merge(
469
+ :operation => :"WebhookEndpointApi.rotate_operational_webhook_endpoint_secret",
470
+ :header_params => header_params,
471
+ :query_params => query_params,
472
+ :form_params => form_params,
473
+ :body => post_body,
474
+ :auth_names => auth_names,
475
+ :return_type => return_type
476
+ )
477
+
478
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
479
+ if @api_client.config.debugging
480
+ @api_client.config.logger.debug "API called: WebhookEndpointApi#rotate_operational_webhook_endpoint_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
481
+ end
482
+ return data, status_code, headers
483
+ end
484
+
485
+ # Update Operational Webhook Endpoint
486
+ # Update an operational webhook endpoint.
487
+ # @param endpoint_id [String] The ep&#39;s ID or UID
488
+ # @param operational_webhook_endpoint_update [OperationalWebhookEndpointUpdate]
489
+ # @param [Hash] opts the optional parameters
490
+ # @return [OperationalWebhookEndpointOut]
491
+ def update_operational_webhook_endpoint(endpoint_id, operational_webhook_endpoint_update, opts = {})
492
+ data, _status_code, _headers = update_operational_webhook_endpoint_with_http_info(endpoint_id, operational_webhook_endpoint_update, opts)
493
+ data
494
+ end
495
+
496
+ # Update Operational Webhook Endpoint
497
+ # Update an operational webhook endpoint.
498
+ # @param endpoint_id [String] The ep&#39;s ID or UID
499
+ # @param operational_webhook_endpoint_update [OperationalWebhookEndpointUpdate]
500
+ # @param [Hash] opts the optional parameters
501
+ # @return [Array<(OperationalWebhookEndpointOut, Integer, Hash)>] OperationalWebhookEndpointOut data, response status code and response headers
502
+ def update_operational_webhook_endpoint_with_http_info(endpoint_id, operational_webhook_endpoint_update, opts = {})
503
+ if @api_client.config.debugging
504
+ @api_client.config.logger.debug 'Calling API: WebhookEndpointApi.update_operational_webhook_endpoint ...'
505
+ end
506
+ # verify the required parameter 'endpoint_id' is set
507
+ if @api_client.config.client_side_validation && endpoint_id.nil?
508
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling WebhookEndpointApi.update_operational_webhook_endpoint"
509
+ end
510
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
511
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling WebhookEndpointApi.update_operational_webhook_endpoint, the character length must be smaller than or equal to 256.'
512
+ end
513
+
514
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
515
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling WebhookEndpointApi.update_operational_webhook_endpoint, the character length must be great than or equal to 1.'
516
+ end
517
+
518
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
519
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
520
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling WebhookEndpointApi.update_operational_webhook_endpoint, must conform to the pattern #{pattern}."
521
+ end
522
+
523
+ # verify the required parameter 'operational_webhook_endpoint_update' is set
524
+ if @api_client.config.client_side_validation && operational_webhook_endpoint_update.nil?
525
+ fail ArgumentError, "Missing the required parameter 'operational_webhook_endpoint_update' when calling WebhookEndpointApi.update_operational_webhook_endpoint"
526
+ end
527
+ # resource path
528
+ local_var_path = '/api/v1/operational-webhook/endpoint/{endpoint_id}'.sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
529
+
530
+ # query parameters
531
+ query_params = opts[:query_params] || {}
532
+
533
+ # header parameters
534
+ header_params = opts[:header_params] || {}
535
+ # HTTP header 'Accept' (if needed)
536
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
537
+ # HTTP header 'Content-Type'
538
+ content_type = @api_client.select_header_content_type(['application/json'])
539
+ if !content_type.nil?
540
+ header_params['Content-Type'] = content_type
541
+ end
542
+
543
+ # form parameters
544
+ form_params = opts[:form_params] || {}
545
+
546
+ # http body (model)
547
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(operational_webhook_endpoint_update)
548
+
549
+ # return_type
550
+ return_type = opts[:debug_return_type] || 'OperationalWebhookEndpointOut'
551
+
552
+ # auth_names
553
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
554
+
555
+ new_options = opts.merge(
556
+ :operation => :"WebhookEndpointApi.update_operational_webhook_endpoint",
557
+ :header_params => header_params,
558
+ :query_params => query_params,
559
+ :form_params => form_params,
560
+ :body => post_body,
561
+ :auth_names => auth_names,
562
+ :return_type => return_type
563
+ )
564
+
565
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
566
+ if @api_client.config.debugging
567
+ @api_client.config.logger.debug "API called: WebhookEndpointApi#update_operational_webhook_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
568
+ end
569
+ return data, status_code, headers
570
+ end
571
+ end
572
+ end