mailsafepro 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +256 -0
  5. data/Rakefile +10 -0
  6. data/docs/APIKeyCreateRequest.md +20 -0
  7. data/docs/APIKeyListResponse.md +22 -0
  8. data/docs/APIKeyMeta.md +34 -0
  9. data/docs/APIKeysApi.md +1241 -0
  10. data/docs/AuthenticationApi.md +1171 -0
  11. data/docs/BatchEmailResponse.md +28 -0
  12. data/docs/BatchValidationRequest.md +26 -0
  13. data/docs/BillingApi.md +689 -0
  14. data/docs/BodyChangePlanBillingBillingChangePlanPost.md +18 -0
  15. data/docs/CheckoutRequest.md +18 -0
  16. data/docs/CheckoutSessionResponse.md +18 -0
  17. data/docs/DNSInfo.md +26 -0
  18. data/docs/DNSRecordDKIM.md +26 -0
  19. data/docs/DNSRecordDMARC.md +24 -0
  20. data/docs/DNSRecordSPF.md +24 -0
  21. data/docs/DefaultApi.md +141 -0
  22. data/docs/DeveloperToolsApi.md +154 -0
  23. data/docs/EmailResponse.md +46 -0
  24. data/docs/EmailValidationApi.md +479 -0
  25. data/docs/EmailValidationRequest.md +26 -0
  26. data/docs/HTTPValidationError.md +18 -0
  27. data/docs/HealthApi.md +937 -0
  28. data/docs/JobCreateRequest.md +32 -0
  29. data/docs/JobCreateResponse.md +22 -0
  30. data/docs/JobResultEntry.md +34 -0
  31. data/docs/JobResultsPage.md +26 -0
  32. data/docs/JobStatusResponse.md +28 -0
  33. data/docs/JobsApi.md +433 -0
  34. data/docs/KeyRotationRequest.md +22 -0
  35. data/docs/LogsApi.md +154 -0
  36. data/docs/PlanEnum.md +15 -0
  37. data/docs/PriorityEnum.md +15 -0
  38. data/docs/RegisterEndpoint.md +18 -0
  39. data/docs/ResponseTestNotificationBillingBillingTestNotificationPostValue.md +15 -0
  40. data/docs/RiskLevelEnum.md +15 -0
  41. data/docs/RotateSecret.md +18 -0
  42. data/docs/SMTPInfo.md +26 -0
  43. data/docs/SubscriptionResponse.md +24 -0
  44. data/docs/UserLogin.md +20 -0
  45. data/docs/UserRegister.md +22 -0
  46. data/docs/ValidationApi.md +479 -0
  47. data/docs/ValidationError.md +22 -0
  48. data/docs/ValidationErrorLocInner.md +15 -0
  49. data/docs/WebhookCreate.md +24 -0
  50. data/docs/WebhookResponse.md +22 -0
  51. data/docs/WebhookUpdate.md +24 -0
  52. data/docs/WebhooksApi.md +776 -0
  53. data/docs/WebhooksManagementApi.md +500 -0
  54. data/git_push.sh +57 -0
  55. data/lib/mailsafepro/api/api_keys_api.rb +1148 -0
  56. data/lib/mailsafepro/api/authentication_api.rb +1114 -0
  57. data/lib/mailsafepro/api/billing_api.rb +670 -0
  58. data/lib/mailsafepro/api/default_api.rb +149 -0
  59. data/lib/mailsafepro/api/developer_tools_api.rb +155 -0
  60. data/lib/mailsafepro/api/email_validation_api.rb +486 -0
  61. data/lib/mailsafepro/api/health_api.rb +877 -0
  62. data/lib/mailsafepro/api/jobs_api.rb +452 -0
  63. data/lib/mailsafepro/api/logs_api.rb +155 -0
  64. data/lib/mailsafepro/api/validation_api.rb +486 -0
  65. data/lib/mailsafepro/api/webhooks_api.rb +768 -0
  66. data/lib/mailsafepro/api/webhooks_management_api.rb +480 -0
  67. data/lib/mailsafepro/api_client.rb +397 -0
  68. data/lib/mailsafepro/api_error.rb +58 -0
  69. data/lib/mailsafepro/api_model_base.rb +88 -0
  70. data/lib/mailsafepro/configuration.rb +316 -0
  71. data/lib/mailsafepro/models/api_key_create_request.rb +185 -0
  72. data/lib/mailsafepro/models/api_key_list_response.rb +240 -0
  73. data/lib/mailsafepro/models/api_key_meta.rb +338 -0
  74. data/lib/mailsafepro/models/batch_email_response.rb +348 -0
  75. data/lib/mailsafepro/models/batch_validation_request.rb +290 -0
  76. data/lib/mailsafepro/models/body_change_plan_billing_billing_change_plan_post.rb +164 -0
  77. data/lib/mailsafepro/models/checkout_request.rb +166 -0
  78. data/lib/mailsafepro/models/checkout_session_response.rb +165 -0
  79. data/lib/mailsafepro/models/dns_info.rb +193 -0
  80. data/lib/mailsafepro/models/dns_record_dkim.rb +189 -0
  81. data/lib/mailsafepro/models/dns_record_dmarc.rb +179 -0
  82. data/lib/mailsafepro/models/dns_record_spf.rb +179 -0
  83. data/lib/mailsafepro/models/email_response.rb +454 -0
  84. data/lib/mailsafepro/models/email_validation_request.rb +252 -0
  85. data/lib/mailsafepro/models/http_validation_error.rb +149 -0
  86. data/lib/mailsafepro/models/job_create_request.rb +251 -0
  87. data/lib/mailsafepro/models/job_create_response.rb +216 -0
  88. data/lib/mailsafepro/models/job_result_entry.rb +257 -0
  89. data/lib/mailsafepro/models/job_results_page.rb +270 -0
  90. data/lib/mailsafepro/models/job_status_response.rb +231 -0
  91. data/lib/mailsafepro/models/key_rotation_request.rb +269 -0
  92. data/lib/mailsafepro/models/plan_enum.rb +41 -0
  93. data/lib/mailsafepro/models/priority_enum.rb +41 -0
  94. data/lib/mailsafepro/models/register_endpoint.rb +173 -0
  95. data/lib/mailsafepro/models/response_test_notification_billing_billing_test_notification_post_value.rb +103 -0
  96. data/lib/mailsafepro/models/risk_level_enum.rb +42 -0
  97. data/lib/mailsafepro/models/rotate_secret.rb +164 -0
  98. data/lib/mailsafepro/models/smtp_info.rb +206 -0
  99. data/lib/mailsafepro/models/subscription_response.rb +196 -0
  100. data/lib/mailsafepro/models/user_login.rb +211 -0
  101. data/lib/mailsafepro/models/user_register.rb +243 -0
  102. data/lib/mailsafepro/models/validation_error.rb +218 -0
  103. data/lib/mailsafepro/models/validation_error_loc_inner.rb +103 -0
  104. data/lib/mailsafepro/models/webhook_create.rb +213 -0
  105. data/lib/mailsafepro/models/webhook_response.rb +185 -0
  106. data/lib/mailsafepro/models/webhook_update.rb +204 -0
  107. data/lib/mailsafepro/version.rb +15 -0
  108. data/lib/mailsafepro.rb +88 -0
  109. data/mailsafepro.gemspec +39 -0
  110. data/spec/api/api_keys_api_spec.rb +245 -0
  111. data/spec/api/authentication_api_spec.rb +239 -0
  112. data/spec/api/billing_api_spec.rb +155 -0
  113. data/spec/api/default_api_spec.rb +60 -0
  114. data/spec/api/developer_tools_api_spec.rb +62 -0
  115. data/spec/api/email_validation_api_spec.rb +125 -0
  116. data/spec/api/health_api_spec.rb +200 -0
  117. data/spec/api/jobs_api_spec.rb +119 -0
  118. data/spec/api/logs_api_spec.rb +62 -0
  119. data/spec/api/validation_api_spec.rb +125 -0
  120. data/spec/api/webhooks_api_spec.rb +172 -0
  121. data/spec/api/webhooks_management_api_spec.rb +120 -0
  122. data/spec/models/api_key_create_request_spec.rb +42 -0
  123. data/spec/models/api_key_list_response_spec.rb +48 -0
  124. data/spec/models/api_key_meta_spec.rb +84 -0
  125. data/spec/models/batch_email_response_spec.rb +66 -0
  126. data/spec/models/batch_validation_request_spec.rb +60 -0
  127. data/spec/models/body_change_plan_billing_billing_change_plan_post_spec.rb +36 -0
  128. data/spec/models/checkout_request_spec.rb +36 -0
  129. data/spec/models/checkout_session_response_spec.rb +36 -0
  130. data/spec/models/dns_info_spec.rb +60 -0
  131. data/spec/models/dns_record_dkim_spec.rb +60 -0
  132. data/spec/models/dns_record_dmarc_spec.rb +54 -0
  133. data/spec/models/dns_record_spf_spec.rb +54 -0
  134. data/spec/models/email_response_spec.rb +120 -0
  135. data/spec/models/email_validation_request_spec.rb +60 -0
  136. data/spec/models/http_validation_error_spec.rb +36 -0
  137. data/spec/models/job_create_request_spec.rb +78 -0
  138. data/spec/models/job_create_response_spec.rb +48 -0
  139. data/spec/models/job_result_entry_spec.rb +84 -0
  140. data/spec/models/job_results_page_spec.rb +60 -0
  141. data/spec/models/job_status_response_spec.rb +66 -0
  142. data/spec/models/key_rotation_request_spec.rb +48 -0
  143. data/spec/models/plan_enum_spec.rb +30 -0
  144. data/spec/models/priority_enum_spec.rb +30 -0
  145. data/spec/models/register_endpoint_spec.rb +36 -0
  146. data/spec/models/response_test_notification_billing_billing_test_notification_post_value_spec.rb +21 -0
  147. data/spec/models/risk_level_enum_spec.rb +30 -0
  148. data/spec/models/rotate_secret_spec.rb +36 -0
  149. data/spec/models/smtp_info_spec.rb +60 -0
  150. data/spec/models/subscription_response_spec.rb +54 -0
  151. data/spec/models/user_login_spec.rb +42 -0
  152. data/spec/models/user_register_spec.rb +48 -0
  153. data/spec/models/validation_error_loc_inner_spec.rb +21 -0
  154. data/spec/models/validation_error_spec.rb +48 -0
  155. data/spec/models/webhook_create_spec.rb +54 -0
  156. data/spec/models/webhook_response_spec.rb +48 -0
  157. data/spec/models/webhook_update_spec.rb +54 -0
  158. data/spec/spec_helper.rb +111 -0
  159. metadata +291 -0
@@ -0,0 +1,768 @@
1
+ =begin
2
+ #Email Validation API — Enterprise-grade Email Verification
3
+
4
+ #API robusta y segura para validación y verificación de correos electrónicos. Soporta verificación individual y en lote, detección de brechas, y autenticación JWT. Cumple con GDPR y dispone de planes de pago flexibles. **🔗 Enlaces importantes:** - [Estado del sistema](https://mailsafepro.betteruptime.com) - [Documentación completa](https://email-validation-api-jlra.onrender.com/redoc) **📧 Contacto:** mailsafepro1@gmail.com
5
+
6
+ The version of the OpenAPI document: 2.5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.18.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module MailSafePro
16
+ class WebhooksApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Webhook
23
+ # Create a new webhook endpoint. Events available: - validation.completed: Single email validation finished - batch.completed: Batch validation finished - usage.limit_reached: API usage limit reached (80%)
24
+ # @param webhook_create [WebhookCreate]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [Object]
27
+ def create_webhook_webhooks_management_webhooks_post(webhook_create, opts = {})
28
+ data, _status_code, _headers = create_webhook_webhooks_management_webhooks_post_with_http_info(webhook_create, opts)
29
+ data
30
+ end
31
+
32
+ # Create Webhook
33
+ # Create a new webhook endpoint. Events available: - validation.completed: Single email validation finished - batch.completed: Batch validation finished - usage.limit_reached: API usage limit reached (80%)
34
+ # @param webhook_create [WebhookCreate]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
37
+ def create_webhook_webhooks_management_webhooks_post_with_http_info(webhook_create, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.create_webhook_webhooks_management_webhooks_post ...'
40
+ end
41
+ # verify the required parameter 'webhook_create' is set
42
+ if @api_client.config.client_side_validation && webhook_create.nil?
43
+ fail ArgumentError, "Missing the required parameter 'webhook_create' when calling WebhooksApi.create_webhook_webhooks_management_webhooks_post"
44
+ end
45
+ # resource path
46
+ local_var_path = '/webhooks-management/webhooks/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_create)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'Object'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['Bearer']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"WebhooksApi.create_webhook_webhooks_management_webhooks_post",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: WebhooksApi#create_webhook_webhooks_management_webhooks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Delete Webhook
91
+ # Delete webhook.
92
+ # @param webhook_id [String]
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [Object]
95
+ def delete_webhook_webhooks_management_webhooks_webhook_id_delete(webhook_id, opts = {})
96
+ data, _status_code, _headers = delete_webhook_webhooks_management_webhooks_webhook_id_delete_with_http_info(webhook_id, opts)
97
+ data
98
+ end
99
+
100
+ # Delete Webhook
101
+ # Delete webhook.
102
+ # @param webhook_id [String]
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
105
+ def delete_webhook_webhooks_management_webhooks_webhook_id_delete_with_http_info(webhook_id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.delete_webhook_webhooks_management_webhooks_webhook_id_delete ...'
108
+ end
109
+ # verify the required parameter 'webhook_id' is set
110
+ if @api_client.config.client_side_validation && webhook_id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksApi.delete_webhook_webhooks_management_webhooks_webhook_id_delete"
112
+ end
113
+ # resource path
114
+ local_var_path = '/webhooks-management/webhooks/{webhook_id}'.sub('{' + 'webhook_id' + '}', CGI.escape(webhook_id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
+
124
+ # form parameters
125
+ form_params = opts[:form_params] || {}
126
+
127
+ # http body (model)
128
+ post_body = opts[:debug_body]
129
+
130
+ # return_type
131
+ return_type = opts[:debug_return_type] || 'Object'
132
+
133
+ # auth_names
134
+ auth_names = opts[:debug_auth_names] || ['Bearer']
135
+
136
+ new_options = opts.merge(
137
+ :operation => :"WebhooksApi.delete_webhook_webhooks_management_webhooks_webhook_id_delete",
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => return_type
144
+ )
145
+
146
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: WebhooksApi#delete_webhook_webhooks_management_webhooks_webhook_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+
153
+ # Get Deliveries
154
+ # Get delivery history for webhook.
155
+ # @param webhook_id [String]
156
+ # @param [Hash] opts the optional parameters
157
+ # @option opts [Integer] :limit (default to 100)
158
+ # @return [Object]
159
+ def get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get(webhook_id, opts = {})
160
+ data, _status_code, _headers = get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get_with_http_info(webhook_id, opts)
161
+ data
162
+ end
163
+
164
+ # Get Deliveries
165
+ # Get delivery history for webhook.
166
+ # @param webhook_id [String]
167
+ # @param [Hash] opts the optional parameters
168
+ # @option opts [Integer] :limit (default to 100)
169
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
170
+ def get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get_with_http_info(webhook_id, opts = {})
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get ...'
173
+ end
174
+ # verify the required parameter 'webhook_id' is set
175
+ if @api_client.config.client_side_validation && webhook_id.nil?
176
+ fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksApi.get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get"
177
+ end
178
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
179
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WebhooksApi.get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get, must be smaller than or equal to 500.'
180
+ end
181
+
182
+ # resource path
183
+ local_var_path = '/webhooks-management/webhooks/{webhook_id}/deliveries'.sub('{' + 'webhook_id' + '}', CGI.escape(webhook_id.to_s))
184
+
185
+ # query parameters
186
+ query_params = opts[:query_params] || {}
187
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
188
+
189
+ # header parameters
190
+ header_params = opts[:header_params] || {}
191
+ # HTTP header 'Accept' (if needed)
192
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
193
+
194
+ # form parameters
195
+ form_params = opts[:form_params] || {}
196
+
197
+ # http body (model)
198
+ post_body = opts[:debug_body]
199
+
200
+ # return_type
201
+ return_type = opts[:debug_return_type] || 'Object'
202
+
203
+ # auth_names
204
+ auth_names = opts[:debug_auth_names] || ['Bearer']
205
+
206
+ new_options = opts.merge(
207
+ :operation => :"WebhooksApi.get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get",
208
+ :header_params => header_params,
209
+ :query_params => query_params,
210
+ :form_params => form_params,
211
+ :body => post_body,
212
+ :auth_names => auth_names,
213
+ :return_type => return_type
214
+ )
215
+
216
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
217
+ if @api_client.config.debugging
218
+ @api_client.config.logger.debug "API called: WebhooksApi#get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
219
+ end
220
+ return data, status_code, headers
221
+ end
222
+
223
+ # Get Webhook
224
+ # Get webhook details.
225
+ # @param webhook_id [String]
226
+ # @param [Hash] opts the optional parameters
227
+ # @return [Object]
228
+ def get_webhook_webhooks_management_webhooks_webhook_id_get(webhook_id, opts = {})
229
+ data, _status_code, _headers = get_webhook_webhooks_management_webhooks_webhook_id_get_with_http_info(webhook_id, opts)
230
+ data
231
+ end
232
+
233
+ # Get Webhook
234
+ # Get webhook details.
235
+ # @param webhook_id [String]
236
+ # @param [Hash] opts the optional parameters
237
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
238
+ def get_webhook_webhooks_management_webhooks_webhook_id_get_with_http_info(webhook_id, opts = {})
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.get_webhook_webhooks_management_webhooks_webhook_id_get ...'
241
+ end
242
+ # verify the required parameter 'webhook_id' is set
243
+ if @api_client.config.client_side_validation && webhook_id.nil?
244
+ fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksApi.get_webhook_webhooks_management_webhooks_webhook_id_get"
245
+ end
246
+ # resource path
247
+ local_var_path = '/webhooks-management/webhooks/{webhook_id}'.sub('{' + 'webhook_id' + '}', CGI.escape(webhook_id.to_s))
248
+
249
+ # query parameters
250
+ query_params = opts[:query_params] || {}
251
+
252
+ # header parameters
253
+ header_params = opts[:header_params] || {}
254
+ # HTTP header 'Accept' (if needed)
255
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
256
+
257
+ # form parameters
258
+ form_params = opts[:form_params] || {}
259
+
260
+ # http body (model)
261
+ post_body = opts[:debug_body]
262
+
263
+ # return_type
264
+ return_type = opts[:debug_return_type] || 'Object'
265
+
266
+ # auth_names
267
+ auth_names = opts[:debug_auth_names] || ['Bearer']
268
+
269
+ new_options = opts.merge(
270
+ :operation => :"WebhooksApi.get_webhook_webhooks_management_webhooks_webhook_id_get",
271
+ :header_params => header_params,
272
+ :query_params => query_params,
273
+ :form_params => form_params,
274
+ :body => post_body,
275
+ :auth_names => auth_names,
276
+ :return_type => return_type
277
+ )
278
+
279
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug "API called: WebhooksApi#get_webhook_webhooks_management_webhooks_webhook_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
282
+ end
283
+ return data, status_code, headers
284
+ end
285
+
286
+ # List Webhooks
287
+ # List all webhooks for authenticated user.
288
+ # @param [Hash] opts the optional parameters
289
+ # @return [Object]
290
+ def list_webhooks_webhooks_management_webhooks_get(opts = {})
291
+ data, _status_code, _headers = list_webhooks_webhooks_management_webhooks_get_with_http_info(opts)
292
+ data
293
+ end
294
+
295
+ # List Webhooks
296
+ # List all webhooks for authenticated user.
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
299
+ def list_webhooks_webhooks_management_webhooks_get_with_http_info(opts = {})
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.list_webhooks_webhooks_management_webhooks_get ...'
302
+ end
303
+ # resource path
304
+ local_var_path = '/webhooks-management/webhooks/'
305
+
306
+ # query parameters
307
+ query_params = opts[:query_params] || {}
308
+
309
+ # header parameters
310
+ header_params = opts[:header_params] || {}
311
+ # HTTP header 'Accept' (if needed)
312
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
313
+
314
+ # form parameters
315
+ form_params = opts[:form_params] || {}
316
+
317
+ # http body (model)
318
+ post_body = opts[:debug_body]
319
+
320
+ # return_type
321
+ return_type = opts[:debug_return_type] || 'Object'
322
+
323
+ # auth_names
324
+ auth_names = opts[:debug_auth_names] || ['Bearer']
325
+
326
+ new_options = opts.merge(
327
+ :operation => :"WebhooksApi.list_webhooks_webhooks_management_webhooks_get",
328
+ :header_params => header_params,
329
+ :query_params => query_params,
330
+ :form_params => form_params,
331
+ :body => post_body,
332
+ :auth_names => auth_names,
333
+ :return_type => return_type
334
+ )
335
+
336
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
337
+ if @api_client.config.debugging
338
+ @api_client.config.logger.debug "API called: WebhooksApi#list_webhooks_webhooks_management_webhooks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
339
+ end
340
+ return data, status_code, headers
341
+ end
342
+
343
+ # Register Endpoint
344
+ # @param register_endpoint [RegisterEndpoint]
345
+ # @param [Hash] opts the optional parameters
346
+ # @option opts [String] :x_api_key
347
+ # @option opts [String] :authorization
348
+ # @return [Object]
349
+ def register_endpoint_webhooks_v1_webhooks_endpoints_register_post(register_endpoint, opts = {})
350
+ data, _status_code, _headers = register_endpoint_webhooks_v1_webhooks_endpoints_register_post_with_http_info(register_endpoint, opts)
351
+ data
352
+ end
353
+
354
+ # Register Endpoint
355
+ # @param register_endpoint [RegisterEndpoint]
356
+ # @param [Hash] opts the optional parameters
357
+ # @option opts [String] :x_api_key
358
+ # @option opts [String] :authorization
359
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
360
+ def register_endpoint_webhooks_v1_webhooks_endpoints_register_post_with_http_info(register_endpoint, opts = {})
361
+ if @api_client.config.debugging
362
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.register_endpoint_webhooks_v1_webhooks_endpoints_register_post ...'
363
+ end
364
+ # verify the required parameter 'register_endpoint' is set
365
+ if @api_client.config.client_side_validation && register_endpoint.nil?
366
+ fail ArgumentError, "Missing the required parameter 'register_endpoint' when calling WebhooksApi.register_endpoint_webhooks_v1_webhooks_endpoints_register_post"
367
+ end
368
+ # resource path
369
+ local_var_path = '/webhooks/v1/webhooks/endpoints/register'
370
+
371
+ # query parameters
372
+ query_params = opts[:query_params] || {}
373
+
374
+ # header parameters
375
+ header_params = opts[:header_params] || {}
376
+ # HTTP header 'Accept' (if needed)
377
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
378
+ # HTTP header 'Content-Type'
379
+ content_type = @api_client.select_header_content_type(['application/json'])
380
+ if !content_type.nil?
381
+ header_params['Content-Type'] = content_type
382
+ end
383
+ header_params[:'X-API-Key'] = opts[:'x_api_key'] if !opts[:'x_api_key'].nil?
384
+ header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
385
+
386
+ # form parameters
387
+ form_params = opts[:form_params] || {}
388
+
389
+ # http body (model)
390
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(register_endpoint)
391
+
392
+ # return_type
393
+ return_type = opts[:debug_return_type] || 'Object'
394
+
395
+ # auth_names
396
+ auth_names = opts[:debug_auth_names] || []
397
+
398
+ new_options = opts.merge(
399
+ :operation => :"WebhooksApi.register_endpoint_webhooks_v1_webhooks_endpoints_register_post",
400
+ :header_params => header_params,
401
+ :query_params => query_params,
402
+ :form_params => form_params,
403
+ :body => post_body,
404
+ :auth_names => auth_names,
405
+ :return_type => return_type
406
+ )
407
+
408
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
409
+ if @api_client.config.debugging
410
+ @api_client.config.logger.debug "API called: WebhooksApi#register_endpoint_webhooks_v1_webhooks_endpoints_register_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
411
+ end
412
+ return data, status_code, headers
413
+ end
414
+
415
+ # Register Endpoint
416
+ # @param register_endpoint [RegisterEndpoint]
417
+ # @param [Hash] opts the optional parameters
418
+ # @option opts [String] :x_api_key
419
+ # @option opts [String] :authorization
420
+ # @return [Object]
421
+ def register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0(register_endpoint, opts = {})
422
+ data, _status_code, _headers = register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0_with_http_info(register_endpoint, opts)
423
+ data
424
+ end
425
+
426
+ # Register Endpoint
427
+ # @param register_endpoint [RegisterEndpoint]
428
+ # @param [Hash] opts the optional parameters
429
+ # @option opts [String] :x_api_key
430
+ # @option opts [String] :authorization
431
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
432
+ def register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0_with_http_info(register_endpoint, opts = {})
433
+ if @api_client.config.debugging
434
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0 ...'
435
+ end
436
+ # verify the required parameter 'register_endpoint' is set
437
+ if @api_client.config.client_side_validation && register_endpoint.nil?
438
+ fail ArgumentError, "Missing the required parameter 'register_endpoint' when calling WebhooksApi.register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0"
439
+ end
440
+ # resource path
441
+ local_var_path = '/webhooks/v1/webhooks/endpoints/register'
442
+
443
+ # query parameters
444
+ query_params = opts[:query_params] || {}
445
+
446
+ # header parameters
447
+ header_params = opts[:header_params] || {}
448
+ # HTTP header 'Accept' (if needed)
449
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
450
+ # HTTP header 'Content-Type'
451
+ content_type = @api_client.select_header_content_type(['application/json'])
452
+ if !content_type.nil?
453
+ header_params['Content-Type'] = content_type
454
+ end
455
+ header_params[:'X-API-Key'] = opts[:'x_api_key'] if !opts[:'x_api_key'].nil?
456
+ header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
457
+
458
+ # form parameters
459
+ form_params = opts[:form_params] || {}
460
+
461
+ # http body (model)
462
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(register_endpoint)
463
+
464
+ # return_type
465
+ return_type = opts[:debug_return_type] || 'Object'
466
+
467
+ # auth_names
468
+ auth_names = opts[:debug_auth_names] || []
469
+
470
+ new_options = opts.merge(
471
+ :operation => :"WebhooksApi.register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0",
472
+ :header_params => header_params,
473
+ :query_params => query_params,
474
+ :form_params => form_params,
475
+ :body => post_body,
476
+ :auth_names => auth_names,
477
+ :return_type => return_type
478
+ )
479
+
480
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
481
+ if @api_client.config.debugging
482
+ @api_client.config.logger.debug "API called: WebhooksApi#register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
483
+ end
484
+ return data, status_code, headers
485
+ end
486
+
487
+ # Rotate Secret
488
+ # @param rotate_secret [RotateSecret]
489
+ # @param [Hash] opts the optional parameters
490
+ # @option opts [String] :x_api_key
491
+ # @option opts [String] :authorization
492
+ # @return [Object]
493
+ def rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post(rotate_secret, opts = {})
494
+ data, _status_code, _headers = rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_with_http_info(rotate_secret, opts)
495
+ data
496
+ end
497
+
498
+ # Rotate Secret
499
+ # @param rotate_secret [RotateSecret]
500
+ # @param [Hash] opts the optional parameters
501
+ # @option opts [String] :x_api_key
502
+ # @option opts [String] :authorization
503
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
504
+ def rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_with_http_info(rotate_secret, opts = {})
505
+ if @api_client.config.debugging
506
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post ...'
507
+ end
508
+ # verify the required parameter 'rotate_secret' is set
509
+ if @api_client.config.client_side_validation && rotate_secret.nil?
510
+ fail ArgumentError, "Missing the required parameter 'rotate_secret' when calling WebhooksApi.rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post"
511
+ end
512
+ # resource path
513
+ local_var_path = '/webhooks/v1/webhooks/endpoints/rotate'
514
+
515
+ # query parameters
516
+ query_params = opts[:query_params] || {}
517
+
518
+ # header parameters
519
+ header_params = opts[:header_params] || {}
520
+ # HTTP header 'Accept' (if needed)
521
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
522
+ # HTTP header 'Content-Type'
523
+ content_type = @api_client.select_header_content_type(['application/json'])
524
+ if !content_type.nil?
525
+ header_params['Content-Type'] = content_type
526
+ end
527
+ header_params[:'X-API-Key'] = opts[:'x_api_key'] if !opts[:'x_api_key'].nil?
528
+ header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
529
+
530
+ # form parameters
531
+ form_params = opts[:form_params] || {}
532
+
533
+ # http body (model)
534
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(rotate_secret)
535
+
536
+ # return_type
537
+ return_type = opts[:debug_return_type] || 'Object'
538
+
539
+ # auth_names
540
+ auth_names = opts[:debug_auth_names] || []
541
+
542
+ new_options = opts.merge(
543
+ :operation => :"WebhooksApi.rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post",
544
+ :header_params => header_params,
545
+ :query_params => query_params,
546
+ :form_params => form_params,
547
+ :body => post_body,
548
+ :auth_names => auth_names,
549
+ :return_type => return_type
550
+ )
551
+
552
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
553
+ if @api_client.config.debugging
554
+ @api_client.config.logger.debug "API called: WebhooksApi#rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
555
+ end
556
+ return data, status_code, headers
557
+ end
558
+
559
+ # Rotate Secret
560
+ # @param rotate_secret [RotateSecret]
561
+ # @param [Hash] opts the optional parameters
562
+ # @option opts [String] :x_api_key
563
+ # @option opts [String] :authorization
564
+ # @return [Object]
565
+ def rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0(rotate_secret, opts = {})
566
+ data, _status_code, _headers = rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0_with_http_info(rotate_secret, opts)
567
+ data
568
+ end
569
+
570
+ # Rotate Secret
571
+ # @param rotate_secret [RotateSecret]
572
+ # @param [Hash] opts the optional parameters
573
+ # @option opts [String] :x_api_key
574
+ # @option opts [String] :authorization
575
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
576
+ def rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0_with_http_info(rotate_secret, opts = {})
577
+ if @api_client.config.debugging
578
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0 ...'
579
+ end
580
+ # verify the required parameter 'rotate_secret' is set
581
+ if @api_client.config.client_side_validation && rotate_secret.nil?
582
+ fail ArgumentError, "Missing the required parameter 'rotate_secret' when calling WebhooksApi.rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0"
583
+ end
584
+ # resource path
585
+ local_var_path = '/webhooks/v1/webhooks/endpoints/rotate'
586
+
587
+ # query parameters
588
+ query_params = opts[:query_params] || {}
589
+
590
+ # header parameters
591
+ header_params = opts[:header_params] || {}
592
+ # HTTP header 'Accept' (if needed)
593
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
594
+ # HTTP header 'Content-Type'
595
+ content_type = @api_client.select_header_content_type(['application/json'])
596
+ if !content_type.nil?
597
+ header_params['Content-Type'] = content_type
598
+ end
599
+ header_params[:'X-API-Key'] = opts[:'x_api_key'] if !opts[:'x_api_key'].nil?
600
+ header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
601
+
602
+ # form parameters
603
+ form_params = opts[:form_params] || {}
604
+
605
+ # http body (model)
606
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(rotate_secret)
607
+
608
+ # return_type
609
+ return_type = opts[:debug_return_type] || 'Object'
610
+
611
+ # auth_names
612
+ auth_names = opts[:debug_auth_names] || []
613
+
614
+ new_options = opts.merge(
615
+ :operation => :"WebhooksApi.rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0",
616
+ :header_params => header_params,
617
+ :query_params => query_params,
618
+ :form_params => form_params,
619
+ :body => post_body,
620
+ :auth_names => auth_names,
621
+ :return_type => return_type
622
+ )
623
+
624
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
625
+ if @api_client.config.debugging
626
+ @api_client.config.logger.debug "API called: WebhooksApi#rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
627
+ end
628
+ return data, status_code, headers
629
+ end
630
+
631
+ # Test Webhook
632
+ # Send test event to webhook.
633
+ # @param webhook_id [String]
634
+ # @param [Hash] opts the optional parameters
635
+ # @return [Object]
636
+ def test_webhook_webhooks_management_webhooks_webhook_id_test_post(webhook_id, opts = {})
637
+ data, _status_code, _headers = test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info(webhook_id, opts)
638
+ data
639
+ end
640
+
641
+ # Test Webhook
642
+ # Send test event to webhook.
643
+ # @param webhook_id [String]
644
+ # @param [Hash] opts the optional parameters
645
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
646
+ def test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info(webhook_id, opts = {})
647
+ if @api_client.config.debugging
648
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.test_webhook_webhooks_management_webhooks_webhook_id_test_post ...'
649
+ end
650
+ # verify the required parameter 'webhook_id' is set
651
+ if @api_client.config.client_side_validation && webhook_id.nil?
652
+ fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksApi.test_webhook_webhooks_management_webhooks_webhook_id_test_post"
653
+ end
654
+ # resource path
655
+ local_var_path = '/webhooks-management/webhooks/{webhook_id}/test'.sub('{' + 'webhook_id' + '}', CGI.escape(webhook_id.to_s))
656
+
657
+ # query parameters
658
+ query_params = opts[:query_params] || {}
659
+
660
+ # header parameters
661
+ header_params = opts[:header_params] || {}
662
+ # HTTP header 'Accept' (if needed)
663
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
664
+
665
+ # form parameters
666
+ form_params = opts[:form_params] || {}
667
+
668
+ # http body (model)
669
+ post_body = opts[:debug_body]
670
+
671
+ # return_type
672
+ return_type = opts[:debug_return_type] || 'Object'
673
+
674
+ # auth_names
675
+ auth_names = opts[:debug_auth_names] || ['Bearer']
676
+
677
+ new_options = opts.merge(
678
+ :operation => :"WebhooksApi.test_webhook_webhooks_management_webhooks_webhook_id_test_post",
679
+ :header_params => header_params,
680
+ :query_params => query_params,
681
+ :form_params => form_params,
682
+ :body => post_body,
683
+ :auth_names => auth_names,
684
+ :return_type => return_type
685
+ )
686
+
687
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
688
+ if @api_client.config.debugging
689
+ @api_client.config.logger.debug "API called: WebhooksApi#test_webhook_webhooks_management_webhooks_webhook_id_test_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
690
+ end
691
+ return data, status_code, headers
692
+ end
693
+
694
+ # Update Webhook
695
+ # Update webhook configuration.
696
+ # @param webhook_id [String]
697
+ # @param webhook_update [WebhookUpdate]
698
+ # @param [Hash] opts the optional parameters
699
+ # @return [Object]
700
+ def update_webhook_webhooks_management_webhooks_webhook_id_patch(webhook_id, webhook_update, opts = {})
701
+ data, _status_code, _headers = update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info(webhook_id, webhook_update, opts)
702
+ data
703
+ end
704
+
705
+ # Update Webhook
706
+ # Update webhook configuration.
707
+ # @param webhook_id [String]
708
+ # @param webhook_update [WebhookUpdate]
709
+ # @param [Hash] opts the optional parameters
710
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
711
+ def update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info(webhook_id, webhook_update, opts = {})
712
+ if @api_client.config.debugging
713
+ @api_client.config.logger.debug 'Calling API: WebhooksApi.update_webhook_webhooks_management_webhooks_webhook_id_patch ...'
714
+ end
715
+ # verify the required parameter 'webhook_id' is set
716
+ if @api_client.config.client_side_validation && webhook_id.nil?
717
+ fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksApi.update_webhook_webhooks_management_webhooks_webhook_id_patch"
718
+ end
719
+ # verify the required parameter 'webhook_update' is set
720
+ if @api_client.config.client_side_validation && webhook_update.nil?
721
+ fail ArgumentError, "Missing the required parameter 'webhook_update' when calling WebhooksApi.update_webhook_webhooks_management_webhooks_webhook_id_patch"
722
+ end
723
+ # resource path
724
+ local_var_path = '/webhooks-management/webhooks/{webhook_id}'.sub('{' + 'webhook_id' + '}', CGI.escape(webhook_id.to_s))
725
+
726
+ # query parameters
727
+ query_params = opts[:query_params] || {}
728
+
729
+ # header parameters
730
+ header_params = opts[:header_params] || {}
731
+ # HTTP header 'Accept' (if needed)
732
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
733
+ # HTTP header 'Content-Type'
734
+ content_type = @api_client.select_header_content_type(['application/json'])
735
+ if !content_type.nil?
736
+ header_params['Content-Type'] = content_type
737
+ end
738
+
739
+ # form parameters
740
+ form_params = opts[:form_params] || {}
741
+
742
+ # http body (model)
743
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_update)
744
+
745
+ # return_type
746
+ return_type = opts[:debug_return_type] || 'Object'
747
+
748
+ # auth_names
749
+ auth_names = opts[:debug_auth_names] || ['Bearer']
750
+
751
+ new_options = opts.merge(
752
+ :operation => :"WebhooksApi.update_webhook_webhooks_management_webhooks_webhook_id_patch",
753
+ :header_params => header_params,
754
+ :query_params => query_params,
755
+ :form_params => form_params,
756
+ :body => post_body,
757
+ :auth_names => auth_names,
758
+ :return_type => return_type
759
+ )
760
+
761
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
762
+ if @api_client.config.debugging
763
+ @api_client.config.logger.debug "API called: WebhooksApi#update_webhook_webhooks_management_webhooks_webhook_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
764
+ end
765
+ return data, status_code, headers
766
+ end
767
+ end
768
+ end