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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +256 -0
- data/Rakefile +10 -0
- data/docs/APIKeyCreateRequest.md +20 -0
- data/docs/APIKeyListResponse.md +22 -0
- data/docs/APIKeyMeta.md +34 -0
- data/docs/APIKeysApi.md +1241 -0
- data/docs/AuthenticationApi.md +1171 -0
- data/docs/BatchEmailResponse.md +28 -0
- data/docs/BatchValidationRequest.md +26 -0
- data/docs/BillingApi.md +689 -0
- data/docs/BodyChangePlanBillingBillingChangePlanPost.md +18 -0
- data/docs/CheckoutRequest.md +18 -0
- data/docs/CheckoutSessionResponse.md +18 -0
- data/docs/DNSInfo.md +26 -0
- data/docs/DNSRecordDKIM.md +26 -0
- data/docs/DNSRecordDMARC.md +24 -0
- data/docs/DNSRecordSPF.md +24 -0
- data/docs/DefaultApi.md +141 -0
- data/docs/DeveloperToolsApi.md +154 -0
- data/docs/EmailResponse.md +46 -0
- data/docs/EmailValidationApi.md +479 -0
- data/docs/EmailValidationRequest.md +26 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/HealthApi.md +937 -0
- data/docs/JobCreateRequest.md +32 -0
- data/docs/JobCreateResponse.md +22 -0
- data/docs/JobResultEntry.md +34 -0
- data/docs/JobResultsPage.md +26 -0
- data/docs/JobStatusResponse.md +28 -0
- data/docs/JobsApi.md +433 -0
- data/docs/KeyRotationRequest.md +22 -0
- data/docs/LogsApi.md +154 -0
- data/docs/PlanEnum.md +15 -0
- data/docs/PriorityEnum.md +15 -0
- data/docs/RegisterEndpoint.md +18 -0
- data/docs/ResponseTestNotificationBillingBillingTestNotificationPostValue.md +15 -0
- data/docs/RiskLevelEnum.md +15 -0
- data/docs/RotateSecret.md +18 -0
- data/docs/SMTPInfo.md +26 -0
- data/docs/SubscriptionResponse.md +24 -0
- data/docs/UserLogin.md +20 -0
- data/docs/UserRegister.md +22 -0
- data/docs/ValidationApi.md +479 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/WebhookCreate.md +24 -0
- data/docs/WebhookResponse.md +22 -0
- data/docs/WebhookUpdate.md +24 -0
- data/docs/WebhooksApi.md +776 -0
- data/docs/WebhooksManagementApi.md +500 -0
- data/git_push.sh +57 -0
- data/lib/mailsafepro/api/api_keys_api.rb +1148 -0
- data/lib/mailsafepro/api/authentication_api.rb +1114 -0
- data/lib/mailsafepro/api/billing_api.rb +670 -0
- data/lib/mailsafepro/api/default_api.rb +149 -0
- data/lib/mailsafepro/api/developer_tools_api.rb +155 -0
- data/lib/mailsafepro/api/email_validation_api.rb +486 -0
- data/lib/mailsafepro/api/health_api.rb +877 -0
- data/lib/mailsafepro/api/jobs_api.rb +452 -0
- data/lib/mailsafepro/api/logs_api.rb +155 -0
- data/lib/mailsafepro/api/validation_api.rb +486 -0
- data/lib/mailsafepro/api/webhooks_api.rb +768 -0
- data/lib/mailsafepro/api/webhooks_management_api.rb +480 -0
- data/lib/mailsafepro/api_client.rb +397 -0
- data/lib/mailsafepro/api_error.rb +58 -0
- data/lib/mailsafepro/api_model_base.rb +88 -0
- data/lib/mailsafepro/configuration.rb +316 -0
- data/lib/mailsafepro/models/api_key_create_request.rb +185 -0
- data/lib/mailsafepro/models/api_key_list_response.rb +240 -0
- data/lib/mailsafepro/models/api_key_meta.rb +338 -0
- data/lib/mailsafepro/models/batch_email_response.rb +348 -0
- data/lib/mailsafepro/models/batch_validation_request.rb +290 -0
- data/lib/mailsafepro/models/body_change_plan_billing_billing_change_plan_post.rb +164 -0
- data/lib/mailsafepro/models/checkout_request.rb +166 -0
- data/lib/mailsafepro/models/checkout_session_response.rb +165 -0
- data/lib/mailsafepro/models/dns_info.rb +193 -0
- data/lib/mailsafepro/models/dns_record_dkim.rb +189 -0
- data/lib/mailsafepro/models/dns_record_dmarc.rb +179 -0
- data/lib/mailsafepro/models/dns_record_spf.rb +179 -0
- data/lib/mailsafepro/models/email_response.rb +454 -0
- data/lib/mailsafepro/models/email_validation_request.rb +252 -0
- data/lib/mailsafepro/models/http_validation_error.rb +149 -0
- data/lib/mailsafepro/models/job_create_request.rb +251 -0
- data/lib/mailsafepro/models/job_create_response.rb +216 -0
- data/lib/mailsafepro/models/job_result_entry.rb +257 -0
- data/lib/mailsafepro/models/job_results_page.rb +270 -0
- data/lib/mailsafepro/models/job_status_response.rb +231 -0
- data/lib/mailsafepro/models/key_rotation_request.rb +269 -0
- data/lib/mailsafepro/models/plan_enum.rb +41 -0
- data/lib/mailsafepro/models/priority_enum.rb +41 -0
- data/lib/mailsafepro/models/register_endpoint.rb +173 -0
- data/lib/mailsafepro/models/response_test_notification_billing_billing_test_notification_post_value.rb +103 -0
- data/lib/mailsafepro/models/risk_level_enum.rb +42 -0
- data/lib/mailsafepro/models/rotate_secret.rb +164 -0
- data/lib/mailsafepro/models/smtp_info.rb +206 -0
- data/lib/mailsafepro/models/subscription_response.rb +196 -0
- data/lib/mailsafepro/models/user_login.rb +211 -0
- data/lib/mailsafepro/models/user_register.rb +243 -0
- data/lib/mailsafepro/models/validation_error.rb +218 -0
- data/lib/mailsafepro/models/validation_error_loc_inner.rb +103 -0
- data/lib/mailsafepro/models/webhook_create.rb +213 -0
- data/lib/mailsafepro/models/webhook_response.rb +185 -0
- data/lib/mailsafepro/models/webhook_update.rb +204 -0
- data/lib/mailsafepro/version.rb +15 -0
- data/lib/mailsafepro.rb +88 -0
- data/mailsafepro.gemspec +39 -0
- data/spec/api/api_keys_api_spec.rb +245 -0
- data/spec/api/authentication_api_spec.rb +239 -0
- data/spec/api/billing_api_spec.rb +155 -0
- data/spec/api/default_api_spec.rb +60 -0
- data/spec/api/developer_tools_api_spec.rb +62 -0
- data/spec/api/email_validation_api_spec.rb +125 -0
- data/spec/api/health_api_spec.rb +200 -0
- data/spec/api/jobs_api_spec.rb +119 -0
- data/spec/api/logs_api_spec.rb +62 -0
- data/spec/api/validation_api_spec.rb +125 -0
- data/spec/api/webhooks_api_spec.rb +172 -0
- data/spec/api/webhooks_management_api_spec.rb +120 -0
- data/spec/models/api_key_create_request_spec.rb +42 -0
- data/spec/models/api_key_list_response_spec.rb +48 -0
- data/spec/models/api_key_meta_spec.rb +84 -0
- data/spec/models/batch_email_response_spec.rb +66 -0
- data/spec/models/batch_validation_request_spec.rb +60 -0
- data/spec/models/body_change_plan_billing_billing_change_plan_post_spec.rb +36 -0
- data/spec/models/checkout_request_spec.rb +36 -0
- data/spec/models/checkout_session_response_spec.rb +36 -0
- data/spec/models/dns_info_spec.rb +60 -0
- data/spec/models/dns_record_dkim_spec.rb +60 -0
- data/spec/models/dns_record_dmarc_spec.rb +54 -0
- data/spec/models/dns_record_spf_spec.rb +54 -0
- data/spec/models/email_response_spec.rb +120 -0
- data/spec/models/email_validation_request_spec.rb +60 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/job_create_request_spec.rb +78 -0
- data/spec/models/job_create_response_spec.rb +48 -0
- data/spec/models/job_result_entry_spec.rb +84 -0
- data/spec/models/job_results_page_spec.rb +60 -0
- data/spec/models/job_status_response_spec.rb +66 -0
- data/spec/models/key_rotation_request_spec.rb +48 -0
- data/spec/models/plan_enum_spec.rb +30 -0
- data/spec/models/priority_enum_spec.rb +30 -0
- data/spec/models/register_endpoint_spec.rb +36 -0
- data/spec/models/response_test_notification_billing_billing_test_notification_post_value_spec.rb +21 -0
- data/spec/models/risk_level_enum_spec.rb +30 -0
- data/spec/models/rotate_secret_spec.rb +36 -0
- data/spec/models/smtp_info_spec.rb +60 -0
- data/spec/models/subscription_response_spec.rb +54 -0
- data/spec/models/user_login_spec.rb +42 -0
- data/spec/models/user_register_spec.rb +48 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/webhook_create_spec.rb +54 -0
- data/spec/models/webhook_response_spec.rb +48 -0
- data/spec/models/webhook_update_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +291 -0
|
@@ -0,0 +1,480 @@
|
|
|
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 WebhooksManagementApi
|
|
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: WebhooksManagementApi.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 WebhooksManagementApi.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 => :"WebhooksManagementApi.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: WebhooksManagementApi#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: WebhooksManagementApi.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 WebhooksManagementApi.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 => :"WebhooksManagementApi.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: WebhooksManagementApi#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: WebhooksManagementApi.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 WebhooksManagementApi.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 WebhooksManagementApi.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 => :"WebhooksManagementApi.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: WebhooksManagementApi#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: WebhooksManagementApi.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 WebhooksManagementApi.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 => :"WebhooksManagementApi.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: WebhooksManagementApi#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: WebhooksManagementApi.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 => :"WebhooksManagementApi.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: WebhooksManagementApi#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
|
+
# Test Webhook
|
|
344
|
+
# Send test event to webhook.
|
|
345
|
+
# @param webhook_id [String]
|
|
346
|
+
# @param [Hash] opts the optional parameters
|
|
347
|
+
# @return [Object]
|
|
348
|
+
def test_webhook_webhooks_management_webhooks_webhook_id_test_post(webhook_id, opts = {})
|
|
349
|
+
data, _status_code, _headers = test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info(webhook_id, opts)
|
|
350
|
+
data
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# Test Webhook
|
|
354
|
+
# Send test event to webhook.
|
|
355
|
+
# @param webhook_id [String]
|
|
356
|
+
# @param [Hash] opts the optional parameters
|
|
357
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
358
|
+
def test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info(webhook_id, opts = {})
|
|
359
|
+
if @api_client.config.debugging
|
|
360
|
+
@api_client.config.logger.debug 'Calling API: WebhooksManagementApi.test_webhook_webhooks_management_webhooks_webhook_id_test_post ...'
|
|
361
|
+
end
|
|
362
|
+
# verify the required parameter 'webhook_id' is set
|
|
363
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
|
364
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksManagementApi.test_webhook_webhooks_management_webhooks_webhook_id_test_post"
|
|
365
|
+
end
|
|
366
|
+
# resource path
|
|
367
|
+
local_var_path = '/webhooks-management/webhooks/{webhook_id}/test'.sub('{' + 'webhook_id' + '}', CGI.escape(webhook_id.to_s))
|
|
368
|
+
|
|
369
|
+
# query parameters
|
|
370
|
+
query_params = opts[:query_params] || {}
|
|
371
|
+
|
|
372
|
+
# header parameters
|
|
373
|
+
header_params = opts[:header_params] || {}
|
|
374
|
+
# HTTP header 'Accept' (if needed)
|
|
375
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
376
|
+
|
|
377
|
+
# form parameters
|
|
378
|
+
form_params = opts[:form_params] || {}
|
|
379
|
+
|
|
380
|
+
# http body (model)
|
|
381
|
+
post_body = opts[:debug_body]
|
|
382
|
+
|
|
383
|
+
# return_type
|
|
384
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
385
|
+
|
|
386
|
+
# auth_names
|
|
387
|
+
auth_names = opts[:debug_auth_names] || ['Bearer']
|
|
388
|
+
|
|
389
|
+
new_options = opts.merge(
|
|
390
|
+
:operation => :"WebhooksManagementApi.test_webhook_webhooks_management_webhooks_webhook_id_test_post",
|
|
391
|
+
:header_params => header_params,
|
|
392
|
+
:query_params => query_params,
|
|
393
|
+
:form_params => form_params,
|
|
394
|
+
:body => post_body,
|
|
395
|
+
:auth_names => auth_names,
|
|
396
|
+
:return_type => return_type
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
400
|
+
if @api_client.config.debugging
|
|
401
|
+
@api_client.config.logger.debug "API called: WebhooksManagementApi#test_webhook_webhooks_management_webhooks_webhook_id_test_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
402
|
+
end
|
|
403
|
+
return data, status_code, headers
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
# Update Webhook
|
|
407
|
+
# Update webhook configuration.
|
|
408
|
+
# @param webhook_id [String]
|
|
409
|
+
# @param webhook_update [WebhookUpdate]
|
|
410
|
+
# @param [Hash] opts the optional parameters
|
|
411
|
+
# @return [Object]
|
|
412
|
+
def update_webhook_webhooks_management_webhooks_webhook_id_patch(webhook_id, webhook_update, opts = {})
|
|
413
|
+
data, _status_code, _headers = update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info(webhook_id, webhook_update, opts)
|
|
414
|
+
data
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
# Update Webhook
|
|
418
|
+
# Update webhook configuration.
|
|
419
|
+
# @param webhook_id [String]
|
|
420
|
+
# @param webhook_update [WebhookUpdate]
|
|
421
|
+
# @param [Hash] opts the optional parameters
|
|
422
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
423
|
+
def update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info(webhook_id, webhook_update, opts = {})
|
|
424
|
+
if @api_client.config.debugging
|
|
425
|
+
@api_client.config.logger.debug 'Calling API: WebhooksManagementApi.update_webhook_webhooks_management_webhooks_webhook_id_patch ...'
|
|
426
|
+
end
|
|
427
|
+
# verify the required parameter 'webhook_id' is set
|
|
428
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
|
429
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhooksManagementApi.update_webhook_webhooks_management_webhooks_webhook_id_patch"
|
|
430
|
+
end
|
|
431
|
+
# verify the required parameter 'webhook_update' is set
|
|
432
|
+
if @api_client.config.client_side_validation && webhook_update.nil?
|
|
433
|
+
fail ArgumentError, "Missing the required parameter 'webhook_update' when calling WebhooksManagementApi.update_webhook_webhooks_management_webhooks_webhook_id_patch"
|
|
434
|
+
end
|
|
435
|
+
# resource path
|
|
436
|
+
local_var_path = '/webhooks-management/webhooks/{webhook_id}'.sub('{' + 'webhook_id' + '}', CGI.escape(webhook_id.to_s))
|
|
437
|
+
|
|
438
|
+
# query parameters
|
|
439
|
+
query_params = opts[:query_params] || {}
|
|
440
|
+
|
|
441
|
+
# header parameters
|
|
442
|
+
header_params = opts[:header_params] || {}
|
|
443
|
+
# HTTP header 'Accept' (if needed)
|
|
444
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
445
|
+
# HTTP header 'Content-Type'
|
|
446
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
447
|
+
if !content_type.nil?
|
|
448
|
+
header_params['Content-Type'] = content_type
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
# form parameters
|
|
452
|
+
form_params = opts[:form_params] || {}
|
|
453
|
+
|
|
454
|
+
# http body (model)
|
|
455
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_update)
|
|
456
|
+
|
|
457
|
+
# return_type
|
|
458
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
459
|
+
|
|
460
|
+
# auth_names
|
|
461
|
+
auth_names = opts[:debug_auth_names] || ['Bearer']
|
|
462
|
+
|
|
463
|
+
new_options = opts.merge(
|
|
464
|
+
:operation => :"WebhooksManagementApi.update_webhook_webhooks_management_webhooks_webhook_id_patch",
|
|
465
|
+
:header_params => header_params,
|
|
466
|
+
:query_params => query_params,
|
|
467
|
+
:form_params => form_params,
|
|
468
|
+
:body => post_body,
|
|
469
|
+
:auth_names => auth_names,
|
|
470
|
+
:return_type => return_type
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
474
|
+
if @api_client.config.debugging
|
|
475
|
+
@api_client.config.logger.debug "API called: WebhooksManagementApi#update_webhook_webhooks_management_webhooks_webhook_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
476
|
+
end
|
|
477
|
+
return data, status_code, headers
|
|
478
|
+
end
|
|
479
|
+
end
|
|
480
|
+
end
|