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
data/docs/WebhooksApi.md
ADDED
|
@@ -0,0 +1,776 @@
|
|
|
1
|
+
# MailSafePro::WebhooksApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_webhook_webhooks_management_webhooks_post**](WebhooksApi.md#create_webhook_webhooks_management_webhooks_post) | **POST** /webhooks-management/webhooks/ | Create Webhook |
|
|
8
|
+
| [**delete_webhook_webhooks_management_webhooks_webhook_id_delete**](WebhooksApi.md#delete_webhook_webhooks_management_webhooks_webhook_id_delete) | **DELETE** /webhooks-management/webhooks/{webhook_id} | Delete Webhook |
|
|
9
|
+
| [**get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get**](WebhooksApi.md#get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get) | **GET** /webhooks-management/webhooks/{webhook_id}/deliveries | Get Deliveries |
|
|
10
|
+
| [**get_webhook_webhooks_management_webhooks_webhook_id_get**](WebhooksApi.md#get_webhook_webhooks_management_webhooks_webhook_id_get) | **GET** /webhooks-management/webhooks/{webhook_id} | Get Webhook |
|
|
11
|
+
| [**list_webhooks_webhooks_management_webhooks_get**](WebhooksApi.md#list_webhooks_webhooks_management_webhooks_get) | **GET** /webhooks-management/webhooks/ | List Webhooks |
|
|
12
|
+
| [**register_endpoint_webhooks_v1_webhooks_endpoints_register_post**](WebhooksApi.md#register_endpoint_webhooks_v1_webhooks_endpoints_register_post) | **POST** /webhooks/v1/webhooks/endpoints/register | Register Endpoint |
|
|
13
|
+
| [**register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0**](WebhooksApi.md#register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0) | **POST** /webhooks/v1/webhooks/endpoints/register | Register Endpoint |
|
|
14
|
+
| [**rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post**](WebhooksApi.md#rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post) | **POST** /webhooks/v1/webhooks/endpoints/rotate | Rotate Secret |
|
|
15
|
+
| [**rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0**](WebhooksApi.md#rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0) | **POST** /webhooks/v1/webhooks/endpoints/rotate | Rotate Secret |
|
|
16
|
+
| [**test_webhook_webhooks_management_webhooks_webhook_id_test_post**](WebhooksApi.md#test_webhook_webhooks_management_webhooks_webhook_id_test_post) | **POST** /webhooks-management/webhooks/{webhook_id}/test | Test Webhook |
|
|
17
|
+
| [**update_webhook_webhooks_management_webhooks_webhook_id_patch**](WebhooksApi.md#update_webhook_webhooks_management_webhooks_webhook_id_patch) | **PATCH** /webhooks-management/webhooks/{webhook_id} | Update Webhook |
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## create_webhook_webhooks_management_webhooks_post
|
|
21
|
+
|
|
22
|
+
> Object create_webhook_webhooks_management_webhooks_post(webhook_create)
|
|
23
|
+
|
|
24
|
+
Create Webhook
|
|
25
|
+
|
|
26
|
+
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%)
|
|
27
|
+
|
|
28
|
+
### Examples
|
|
29
|
+
|
|
30
|
+
```ruby
|
|
31
|
+
require 'time'
|
|
32
|
+
require 'mailsafepro'
|
|
33
|
+
# setup authorization
|
|
34
|
+
MailSafePro.configure do |config|
|
|
35
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
36
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
api_instance = MailSafePro::WebhooksApi.new
|
|
40
|
+
webhook_create = MailSafePro::WebhookCreate.new({url: 'url_example'}) # WebhookCreate |
|
|
41
|
+
|
|
42
|
+
begin
|
|
43
|
+
# Create Webhook
|
|
44
|
+
result = api_instance.create_webhook_webhooks_management_webhooks_post(webhook_create)
|
|
45
|
+
p result
|
|
46
|
+
rescue MailSafePro::ApiError => e
|
|
47
|
+
puts "Error when calling WebhooksApi->create_webhook_webhooks_management_webhooks_post: #{e}"
|
|
48
|
+
end
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### Using the create_webhook_webhooks_management_webhooks_post_with_http_info variant
|
|
52
|
+
|
|
53
|
+
This returns an Array which contains the response data, status code and headers.
|
|
54
|
+
|
|
55
|
+
> <Array(Object, Integer, Hash)> create_webhook_webhooks_management_webhooks_post_with_http_info(webhook_create)
|
|
56
|
+
|
|
57
|
+
```ruby
|
|
58
|
+
begin
|
|
59
|
+
# Create Webhook
|
|
60
|
+
data, status_code, headers = api_instance.create_webhook_webhooks_management_webhooks_post_with_http_info(webhook_create)
|
|
61
|
+
p status_code # => 2xx
|
|
62
|
+
p headers # => { ... }
|
|
63
|
+
p data # => Object
|
|
64
|
+
rescue MailSafePro::ApiError => e
|
|
65
|
+
puts "Error when calling WebhooksApi->create_webhook_webhooks_management_webhooks_post_with_http_info: #{e}"
|
|
66
|
+
end
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Parameters
|
|
70
|
+
|
|
71
|
+
| Name | Type | Description | Notes |
|
|
72
|
+
| ---- | ---- | ----------- | ----- |
|
|
73
|
+
| **webhook_create** | [**WebhookCreate**](WebhookCreate.md) | | |
|
|
74
|
+
|
|
75
|
+
### Return type
|
|
76
|
+
|
|
77
|
+
**Object**
|
|
78
|
+
|
|
79
|
+
### Authorization
|
|
80
|
+
|
|
81
|
+
[Bearer](../README.md#Bearer)
|
|
82
|
+
|
|
83
|
+
### HTTP request headers
|
|
84
|
+
|
|
85
|
+
- **Content-Type**: application/json
|
|
86
|
+
- **Accept**: application/json
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## delete_webhook_webhooks_management_webhooks_webhook_id_delete
|
|
90
|
+
|
|
91
|
+
> Object delete_webhook_webhooks_management_webhooks_webhook_id_delete(webhook_id)
|
|
92
|
+
|
|
93
|
+
Delete Webhook
|
|
94
|
+
|
|
95
|
+
Delete webhook.
|
|
96
|
+
|
|
97
|
+
### Examples
|
|
98
|
+
|
|
99
|
+
```ruby
|
|
100
|
+
require 'time'
|
|
101
|
+
require 'mailsafepro'
|
|
102
|
+
# setup authorization
|
|
103
|
+
MailSafePro.configure do |config|
|
|
104
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
105
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
api_instance = MailSafePro::WebhooksApi.new
|
|
109
|
+
webhook_id = 'webhook_id_example' # String |
|
|
110
|
+
|
|
111
|
+
begin
|
|
112
|
+
# Delete Webhook
|
|
113
|
+
result = api_instance.delete_webhook_webhooks_management_webhooks_webhook_id_delete(webhook_id)
|
|
114
|
+
p result
|
|
115
|
+
rescue MailSafePro::ApiError => e
|
|
116
|
+
puts "Error when calling WebhooksApi->delete_webhook_webhooks_management_webhooks_webhook_id_delete: #{e}"
|
|
117
|
+
end
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### Using the delete_webhook_webhooks_management_webhooks_webhook_id_delete_with_http_info variant
|
|
121
|
+
|
|
122
|
+
This returns an Array which contains the response data, status code and headers.
|
|
123
|
+
|
|
124
|
+
> <Array(Object, Integer, Hash)> delete_webhook_webhooks_management_webhooks_webhook_id_delete_with_http_info(webhook_id)
|
|
125
|
+
|
|
126
|
+
```ruby
|
|
127
|
+
begin
|
|
128
|
+
# Delete Webhook
|
|
129
|
+
data, status_code, headers = api_instance.delete_webhook_webhooks_management_webhooks_webhook_id_delete_with_http_info(webhook_id)
|
|
130
|
+
p status_code # => 2xx
|
|
131
|
+
p headers # => { ... }
|
|
132
|
+
p data # => Object
|
|
133
|
+
rescue MailSafePro::ApiError => e
|
|
134
|
+
puts "Error when calling WebhooksApi->delete_webhook_webhooks_management_webhooks_webhook_id_delete_with_http_info: #{e}"
|
|
135
|
+
end
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Parameters
|
|
139
|
+
|
|
140
|
+
| Name | Type | Description | Notes |
|
|
141
|
+
| ---- | ---- | ----------- | ----- |
|
|
142
|
+
| **webhook_id** | **String** | | |
|
|
143
|
+
|
|
144
|
+
### Return type
|
|
145
|
+
|
|
146
|
+
**Object**
|
|
147
|
+
|
|
148
|
+
### Authorization
|
|
149
|
+
|
|
150
|
+
[Bearer](../README.md#Bearer)
|
|
151
|
+
|
|
152
|
+
### HTTP request headers
|
|
153
|
+
|
|
154
|
+
- **Content-Type**: Not defined
|
|
155
|
+
- **Accept**: application/json
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get
|
|
159
|
+
|
|
160
|
+
> Object get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get(webhook_id, opts)
|
|
161
|
+
|
|
162
|
+
Get Deliveries
|
|
163
|
+
|
|
164
|
+
Get delivery history for webhook.
|
|
165
|
+
|
|
166
|
+
### Examples
|
|
167
|
+
|
|
168
|
+
```ruby
|
|
169
|
+
require 'time'
|
|
170
|
+
require 'mailsafepro'
|
|
171
|
+
# setup authorization
|
|
172
|
+
MailSafePro.configure do |config|
|
|
173
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
174
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
api_instance = MailSafePro::WebhooksApi.new
|
|
178
|
+
webhook_id = 'webhook_id_example' # String |
|
|
179
|
+
opts = {
|
|
180
|
+
limit: 56 # Integer |
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
begin
|
|
184
|
+
# Get Deliveries
|
|
185
|
+
result = api_instance.get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get(webhook_id, opts)
|
|
186
|
+
p result
|
|
187
|
+
rescue MailSafePro::ApiError => e
|
|
188
|
+
puts "Error when calling WebhooksApi->get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get: #{e}"
|
|
189
|
+
end
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### Using the get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get_with_http_info variant
|
|
193
|
+
|
|
194
|
+
This returns an Array which contains the response data, status code and headers.
|
|
195
|
+
|
|
196
|
+
> <Array(Object, Integer, Hash)> get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get_with_http_info(webhook_id, opts)
|
|
197
|
+
|
|
198
|
+
```ruby
|
|
199
|
+
begin
|
|
200
|
+
# Get Deliveries
|
|
201
|
+
data, status_code, headers = api_instance.get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get_with_http_info(webhook_id, opts)
|
|
202
|
+
p status_code # => 2xx
|
|
203
|
+
p headers # => { ... }
|
|
204
|
+
p data # => Object
|
|
205
|
+
rescue MailSafePro::ApiError => e
|
|
206
|
+
puts "Error when calling WebhooksApi->get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get_with_http_info: #{e}"
|
|
207
|
+
end
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Parameters
|
|
211
|
+
|
|
212
|
+
| Name | Type | Description | Notes |
|
|
213
|
+
| ---- | ---- | ----------- | ----- |
|
|
214
|
+
| **webhook_id** | **String** | | |
|
|
215
|
+
| **limit** | **Integer** | | [optional][default to 100] |
|
|
216
|
+
|
|
217
|
+
### Return type
|
|
218
|
+
|
|
219
|
+
**Object**
|
|
220
|
+
|
|
221
|
+
### Authorization
|
|
222
|
+
|
|
223
|
+
[Bearer](../README.md#Bearer)
|
|
224
|
+
|
|
225
|
+
### HTTP request headers
|
|
226
|
+
|
|
227
|
+
- **Content-Type**: Not defined
|
|
228
|
+
- **Accept**: application/json
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
## get_webhook_webhooks_management_webhooks_webhook_id_get
|
|
232
|
+
|
|
233
|
+
> Object get_webhook_webhooks_management_webhooks_webhook_id_get(webhook_id)
|
|
234
|
+
|
|
235
|
+
Get Webhook
|
|
236
|
+
|
|
237
|
+
Get webhook details.
|
|
238
|
+
|
|
239
|
+
### Examples
|
|
240
|
+
|
|
241
|
+
```ruby
|
|
242
|
+
require 'time'
|
|
243
|
+
require 'mailsafepro'
|
|
244
|
+
# setup authorization
|
|
245
|
+
MailSafePro.configure do |config|
|
|
246
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
247
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
api_instance = MailSafePro::WebhooksApi.new
|
|
251
|
+
webhook_id = 'webhook_id_example' # String |
|
|
252
|
+
|
|
253
|
+
begin
|
|
254
|
+
# Get Webhook
|
|
255
|
+
result = api_instance.get_webhook_webhooks_management_webhooks_webhook_id_get(webhook_id)
|
|
256
|
+
p result
|
|
257
|
+
rescue MailSafePro::ApiError => e
|
|
258
|
+
puts "Error when calling WebhooksApi->get_webhook_webhooks_management_webhooks_webhook_id_get: #{e}"
|
|
259
|
+
end
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
#### Using the get_webhook_webhooks_management_webhooks_webhook_id_get_with_http_info variant
|
|
263
|
+
|
|
264
|
+
This returns an Array which contains the response data, status code and headers.
|
|
265
|
+
|
|
266
|
+
> <Array(Object, Integer, Hash)> get_webhook_webhooks_management_webhooks_webhook_id_get_with_http_info(webhook_id)
|
|
267
|
+
|
|
268
|
+
```ruby
|
|
269
|
+
begin
|
|
270
|
+
# Get Webhook
|
|
271
|
+
data, status_code, headers = api_instance.get_webhook_webhooks_management_webhooks_webhook_id_get_with_http_info(webhook_id)
|
|
272
|
+
p status_code # => 2xx
|
|
273
|
+
p headers # => { ... }
|
|
274
|
+
p data # => Object
|
|
275
|
+
rescue MailSafePro::ApiError => e
|
|
276
|
+
puts "Error when calling WebhooksApi->get_webhook_webhooks_management_webhooks_webhook_id_get_with_http_info: #{e}"
|
|
277
|
+
end
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Parameters
|
|
281
|
+
|
|
282
|
+
| Name | Type | Description | Notes |
|
|
283
|
+
| ---- | ---- | ----------- | ----- |
|
|
284
|
+
| **webhook_id** | **String** | | |
|
|
285
|
+
|
|
286
|
+
### Return type
|
|
287
|
+
|
|
288
|
+
**Object**
|
|
289
|
+
|
|
290
|
+
### Authorization
|
|
291
|
+
|
|
292
|
+
[Bearer](../README.md#Bearer)
|
|
293
|
+
|
|
294
|
+
### HTTP request headers
|
|
295
|
+
|
|
296
|
+
- **Content-Type**: Not defined
|
|
297
|
+
- **Accept**: application/json
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
## list_webhooks_webhooks_management_webhooks_get
|
|
301
|
+
|
|
302
|
+
> Object list_webhooks_webhooks_management_webhooks_get
|
|
303
|
+
|
|
304
|
+
List Webhooks
|
|
305
|
+
|
|
306
|
+
List all webhooks for authenticated user.
|
|
307
|
+
|
|
308
|
+
### Examples
|
|
309
|
+
|
|
310
|
+
```ruby
|
|
311
|
+
require 'time'
|
|
312
|
+
require 'mailsafepro'
|
|
313
|
+
# setup authorization
|
|
314
|
+
MailSafePro.configure do |config|
|
|
315
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
316
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
api_instance = MailSafePro::WebhooksApi.new
|
|
320
|
+
|
|
321
|
+
begin
|
|
322
|
+
# List Webhooks
|
|
323
|
+
result = api_instance.list_webhooks_webhooks_management_webhooks_get
|
|
324
|
+
p result
|
|
325
|
+
rescue MailSafePro::ApiError => e
|
|
326
|
+
puts "Error when calling WebhooksApi->list_webhooks_webhooks_management_webhooks_get: #{e}"
|
|
327
|
+
end
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
#### Using the list_webhooks_webhooks_management_webhooks_get_with_http_info variant
|
|
331
|
+
|
|
332
|
+
This returns an Array which contains the response data, status code and headers.
|
|
333
|
+
|
|
334
|
+
> <Array(Object, Integer, Hash)> list_webhooks_webhooks_management_webhooks_get_with_http_info
|
|
335
|
+
|
|
336
|
+
```ruby
|
|
337
|
+
begin
|
|
338
|
+
# List Webhooks
|
|
339
|
+
data, status_code, headers = api_instance.list_webhooks_webhooks_management_webhooks_get_with_http_info
|
|
340
|
+
p status_code # => 2xx
|
|
341
|
+
p headers # => { ... }
|
|
342
|
+
p data # => Object
|
|
343
|
+
rescue MailSafePro::ApiError => e
|
|
344
|
+
puts "Error when calling WebhooksApi->list_webhooks_webhooks_management_webhooks_get_with_http_info: #{e}"
|
|
345
|
+
end
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Parameters
|
|
349
|
+
|
|
350
|
+
This endpoint does not need any parameter.
|
|
351
|
+
|
|
352
|
+
### Return type
|
|
353
|
+
|
|
354
|
+
**Object**
|
|
355
|
+
|
|
356
|
+
### Authorization
|
|
357
|
+
|
|
358
|
+
[Bearer](../README.md#Bearer)
|
|
359
|
+
|
|
360
|
+
### HTTP request headers
|
|
361
|
+
|
|
362
|
+
- **Content-Type**: Not defined
|
|
363
|
+
- **Accept**: application/json
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
## register_endpoint_webhooks_v1_webhooks_endpoints_register_post
|
|
367
|
+
|
|
368
|
+
> Object register_endpoint_webhooks_v1_webhooks_endpoints_register_post(register_endpoint, opts)
|
|
369
|
+
|
|
370
|
+
Register Endpoint
|
|
371
|
+
|
|
372
|
+
### Examples
|
|
373
|
+
|
|
374
|
+
```ruby
|
|
375
|
+
require 'time'
|
|
376
|
+
require 'mailsafepro'
|
|
377
|
+
|
|
378
|
+
api_instance = MailSafePro::WebhooksApi.new
|
|
379
|
+
register_endpoint = MailSafePro::RegisterEndpoint.new({callback_url: 'callback_url_example'}) # RegisterEndpoint |
|
|
380
|
+
opts = {
|
|
381
|
+
x_api_key: 'x_api_key_example', # String |
|
|
382
|
+
authorization: 'authorization_example' # String |
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
begin
|
|
386
|
+
# Register Endpoint
|
|
387
|
+
result = api_instance.register_endpoint_webhooks_v1_webhooks_endpoints_register_post(register_endpoint, opts)
|
|
388
|
+
p result
|
|
389
|
+
rescue MailSafePro::ApiError => e
|
|
390
|
+
puts "Error when calling WebhooksApi->register_endpoint_webhooks_v1_webhooks_endpoints_register_post: #{e}"
|
|
391
|
+
end
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
#### Using the register_endpoint_webhooks_v1_webhooks_endpoints_register_post_with_http_info variant
|
|
395
|
+
|
|
396
|
+
This returns an Array which contains the response data, status code and headers.
|
|
397
|
+
|
|
398
|
+
> <Array(Object, Integer, Hash)> register_endpoint_webhooks_v1_webhooks_endpoints_register_post_with_http_info(register_endpoint, opts)
|
|
399
|
+
|
|
400
|
+
```ruby
|
|
401
|
+
begin
|
|
402
|
+
# Register Endpoint
|
|
403
|
+
data, status_code, headers = api_instance.register_endpoint_webhooks_v1_webhooks_endpoints_register_post_with_http_info(register_endpoint, opts)
|
|
404
|
+
p status_code # => 2xx
|
|
405
|
+
p headers # => { ... }
|
|
406
|
+
p data # => Object
|
|
407
|
+
rescue MailSafePro::ApiError => e
|
|
408
|
+
puts "Error when calling WebhooksApi->register_endpoint_webhooks_v1_webhooks_endpoints_register_post_with_http_info: #{e}"
|
|
409
|
+
end
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### Parameters
|
|
413
|
+
|
|
414
|
+
| Name | Type | Description | Notes |
|
|
415
|
+
| ---- | ---- | ----------- | ----- |
|
|
416
|
+
| **register_endpoint** | [**RegisterEndpoint**](RegisterEndpoint.md) | | |
|
|
417
|
+
| **x_api_key** | **String** | | [optional] |
|
|
418
|
+
| **authorization** | **String** | | [optional] |
|
|
419
|
+
|
|
420
|
+
### Return type
|
|
421
|
+
|
|
422
|
+
**Object**
|
|
423
|
+
|
|
424
|
+
### Authorization
|
|
425
|
+
|
|
426
|
+
No authorization required
|
|
427
|
+
|
|
428
|
+
### HTTP request headers
|
|
429
|
+
|
|
430
|
+
- **Content-Type**: application/json
|
|
431
|
+
- **Accept**: application/json
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
## register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0
|
|
435
|
+
|
|
436
|
+
> Object register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0(register_endpoint, opts)
|
|
437
|
+
|
|
438
|
+
Register Endpoint
|
|
439
|
+
|
|
440
|
+
### Examples
|
|
441
|
+
|
|
442
|
+
```ruby
|
|
443
|
+
require 'time'
|
|
444
|
+
require 'mailsafepro'
|
|
445
|
+
|
|
446
|
+
api_instance = MailSafePro::WebhooksApi.new
|
|
447
|
+
register_endpoint = MailSafePro::RegisterEndpoint.new({callback_url: 'callback_url_example'}) # RegisterEndpoint |
|
|
448
|
+
opts = {
|
|
449
|
+
x_api_key: 'x_api_key_example', # String |
|
|
450
|
+
authorization: 'authorization_example' # String |
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
begin
|
|
454
|
+
# Register Endpoint
|
|
455
|
+
result = api_instance.register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0(register_endpoint, opts)
|
|
456
|
+
p result
|
|
457
|
+
rescue MailSafePro::ApiError => e
|
|
458
|
+
puts "Error when calling WebhooksApi->register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0: #{e}"
|
|
459
|
+
end
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
#### Using the register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0_with_http_info variant
|
|
463
|
+
|
|
464
|
+
This returns an Array which contains the response data, status code and headers.
|
|
465
|
+
|
|
466
|
+
> <Array(Object, Integer, Hash)> register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0_with_http_info(register_endpoint, opts)
|
|
467
|
+
|
|
468
|
+
```ruby
|
|
469
|
+
begin
|
|
470
|
+
# Register Endpoint
|
|
471
|
+
data, status_code, headers = api_instance.register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0_with_http_info(register_endpoint, opts)
|
|
472
|
+
p status_code # => 2xx
|
|
473
|
+
p headers # => { ... }
|
|
474
|
+
p data # => Object
|
|
475
|
+
rescue MailSafePro::ApiError => e
|
|
476
|
+
puts "Error when calling WebhooksApi->register_endpoint_webhooks_v1_webhooks_endpoints_register_post_0_with_http_info: #{e}"
|
|
477
|
+
end
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
### Parameters
|
|
481
|
+
|
|
482
|
+
| Name | Type | Description | Notes |
|
|
483
|
+
| ---- | ---- | ----------- | ----- |
|
|
484
|
+
| **register_endpoint** | [**RegisterEndpoint**](RegisterEndpoint.md) | | |
|
|
485
|
+
| **x_api_key** | **String** | | [optional] |
|
|
486
|
+
| **authorization** | **String** | | [optional] |
|
|
487
|
+
|
|
488
|
+
### Return type
|
|
489
|
+
|
|
490
|
+
**Object**
|
|
491
|
+
|
|
492
|
+
### Authorization
|
|
493
|
+
|
|
494
|
+
No authorization required
|
|
495
|
+
|
|
496
|
+
### HTTP request headers
|
|
497
|
+
|
|
498
|
+
- **Content-Type**: application/json
|
|
499
|
+
- **Accept**: application/json
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
## rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post
|
|
503
|
+
|
|
504
|
+
> Object rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post(rotate_secret, opts)
|
|
505
|
+
|
|
506
|
+
Rotate Secret
|
|
507
|
+
|
|
508
|
+
### Examples
|
|
509
|
+
|
|
510
|
+
```ruby
|
|
511
|
+
require 'time'
|
|
512
|
+
require 'mailsafepro'
|
|
513
|
+
|
|
514
|
+
api_instance = MailSafePro::WebhooksApi.new
|
|
515
|
+
rotate_secret = MailSafePro::RotateSecret.new({endpoint_id: 'endpoint_id_example'}) # RotateSecret |
|
|
516
|
+
opts = {
|
|
517
|
+
x_api_key: 'x_api_key_example', # String |
|
|
518
|
+
authorization: 'authorization_example' # String |
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
begin
|
|
522
|
+
# Rotate Secret
|
|
523
|
+
result = api_instance.rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post(rotate_secret, opts)
|
|
524
|
+
p result
|
|
525
|
+
rescue MailSafePro::ApiError => e
|
|
526
|
+
puts "Error when calling WebhooksApi->rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post: #{e}"
|
|
527
|
+
end
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
#### Using the rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_with_http_info variant
|
|
531
|
+
|
|
532
|
+
This returns an Array which contains the response data, status code and headers.
|
|
533
|
+
|
|
534
|
+
> <Array(Object, Integer, Hash)> rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_with_http_info(rotate_secret, opts)
|
|
535
|
+
|
|
536
|
+
```ruby
|
|
537
|
+
begin
|
|
538
|
+
# Rotate Secret
|
|
539
|
+
data, status_code, headers = api_instance.rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_with_http_info(rotate_secret, opts)
|
|
540
|
+
p status_code # => 2xx
|
|
541
|
+
p headers # => { ... }
|
|
542
|
+
p data # => Object
|
|
543
|
+
rescue MailSafePro::ApiError => e
|
|
544
|
+
puts "Error when calling WebhooksApi->rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_with_http_info: #{e}"
|
|
545
|
+
end
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
### Parameters
|
|
549
|
+
|
|
550
|
+
| Name | Type | Description | Notes |
|
|
551
|
+
| ---- | ---- | ----------- | ----- |
|
|
552
|
+
| **rotate_secret** | [**RotateSecret**](RotateSecret.md) | | |
|
|
553
|
+
| **x_api_key** | **String** | | [optional] |
|
|
554
|
+
| **authorization** | **String** | | [optional] |
|
|
555
|
+
|
|
556
|
+
### Return type
|
|
557
|
+
|
|
558
|
+
**Object**
|
|
559
|
+
|
|
560
|
+
### Authorization
|
|
561
|
+
|
|
562
|
+
No authorization required
|
|
563
|
+
|
|
564
|
+
### HTTP request headers
|
|
565
|
+
|
|
566
|
+
- **Content-Type**: application/json
|
|
567
|
+
- **Accept**: application/json
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
## rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0
|
|
571
|
+
|
|
572
|
+
> Object rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0(rotate_secret, opts)
|
|
573
|
+
|
|
574
|
+
Rotate Secret
|
|
575
|
+
|
|
576
|
+
### Examples
|
|
577
|
+
|
|
578
|
+
```ruby
|
|
579
|
+
require 'time'
|
|
580
|
+
require 'mailsafepro'
|
|
581
|
+
|
|
582
|
+
api_instance = MailSafePro::WebhooksApi.new
|
|
583
|
+
rotate_secret = MailSafePro::RotateSecret.new({endpoint_id: 'endpoint_id_example'}) # RotateSecret |
|
|
584
|
+
opts = {
|
|
585
|
+
x_api_key: 'x_api_key_example', # String |
|
|
586
|
+
authorization: 'authorization_example' # String |
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
begin
|
|
590
|
+
# Rotate Secret
|
|
591
|
+
result = api_instance.rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0(rotate_secret, opts)
|
|
592
|
+
p result
|
|
593
|
+
rescue MailSafePro::ApiError => e
|
|
594
|
+
puts "Error when calling WebhooksApi->rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0: #{e}"
|
|
595
|
+
end
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
#### Using the rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0_with_http_info variant
|
|
599
|
+
|
|
600
|
+
This returns an Array which contains the response data, status code and headers.
|
|
601
|
+
|
|
602
|
+
> <Array(Object, Integer, Hash)> rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0_with_http_info(rotate_secret, opts)
|
|
603
|
+
|
|
604
|
+
```ruby
|
|
605
|
+
begin
|
|
606
|
+
# Rotate Secret
|
|
607
|
+
data, status_code, headers = api_instance.rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0_with_http_info(rotate_secret, opts)
|
|
608
|
+
p status_code # => 2xx
|
|
609
|
+
p headers # => { ... }
|
|
610
|
+
p data # => Object
|
|
611
|
+
rescue MailSafePro::ApiError => e
|
|
612
|
+
puts "Error when calling WebhooksApi->rotate_secret_webhooks_v1_webhooks_endpoints_rotate_post_0_with_http_info: #{e}"
|
|
613
|
+
end
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
### Parameters
|
|
617
|
+
|
|
618
|
+
| Name | Type | Description | Notes |
|
|
619
|
+
| ---- | ---- | ----------- | ----- |
|
|
620
|
+
| **rotate_secret** | [**RotateSecret**](RotateSecret.md) | | |
|
|
621
|
+
| **x_api_key** | **String** | | [optional] |
|
|
622
|
+
| **authorization** | **String** | | [optional] |
|
|
623
|
+
|
|
624
|
+
### Return type
|
|
625
|
+
|
|
626
|
+
**Object**
|
|
627
|
+
|
|
628
|
+
### Authorization
|
|
629
|
+
|
|
630
|
+
No authorization required
|
|
631
|
+
|
|
632
|
+
### HTTP request headers
|
|
633
|
+
|
|
634
|
+
- **Content-Type**: application/json
|
|
635
|
+
- **Accept**: application/json
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
## test_webhook_webhooks_management_webhooks_webhook_id_test_post
|
|
639
|
+
|
|
640
|
+
> Object test_webhook_webhooks_management_webhooks_webhook_id_test_post(webhook_id)
|
|
641
|
+
|
|
642
|
+
Test Webhook
|
|
643
|
+
|
|
644
|
+
Send test event to webhook.
|
|
645
|
+
|
|
646
|
+
### Examples
|
|
647
|
+
|
|
648
|
+
```ruby
|
|
649
|
+
require 'time'
|
|
650
|
+
require 'mailsafepro'
|
|
651
|
+
# setup authorization
|
|
652
|
+
MailSafePro.configure do |config|
|
|
653
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
654
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
api_instance = MailSafePro::WebhooksApi.new
|
|
658
|
+
webhook_id = 'webhook_id_example' # String |
|
|
659
|
+
|
|
660
|
+
begin
|
|
661
|
+
# Test Webhook
|
|
662
|
+
result = api_instance.test_webhook_webhooks_management_webhooks_webhook_id_test_post(webhook_id)
|
|
663
|
+
p result
|
|
664
|
+
rescue MailSafePro::ApiError => e
|
|
665
|
+
puts "Error when calling WebhooksApi->test_webhook_webhooks_management_webhooks_webhook_id_test_post: #{e}"
|
|
666
|
+
end
|
|
667
|
+
```
|
|
668
|
+
|
|
669
|
+
#### Using the test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info variant
|
|
670
|
+
|
|
671
|
+
This returns an Array which contains the response data, status code and headers.
|
|
672
|
+
|
|
673
|
+
> <Array(Object, Integer, Hash)> test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info(webhook_id)
|
|
674
|
+
|
|
675
|
+
```ruby
|
|
676
|
+
begin
|
|
677
|
+
# Test Webhook
|
|
678
|
+
data, status_code, headers = api_instance.test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info(webhook_id)
|
|
679
|
+
p status_code # => 2xx
|
|
680
|
+
p headers # => { ... }
|
|
681
|
+
p data # => Object
|
|
682
|
+
rescue MailSafePro::ApiError => e
|
|
683
|
+
puts "Error when calling WebhooksApi->test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info: #{e}"
|
|
684
|
+
end
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
### Parameters
|
|
688
|
+
|
|
689
|
+
| Name | Type | Description | Notes |
|
|
690
|
+
| ---- | ---- | ----------- | ----- |
|
|
691
|
+
| **webhook_id** | **String** | | |
|
|
692
|
+
|
|
693
|
+
### Return type
|
|
694
|
+
|
|
695
|
+
**Object**
|
|
696
|
+
|
|
697
|
+
### Authorization
|
|
698
|
+
|
|
699
|
+
[Bearer](../README.md#Bearer)
|
|
700
|
+
|
|
701
|
+
### HTTP request headers
|
|
702
|
+
|
|
703
|
+
- **Content-Type**: Not defined
|
|
704
|
+
- **Accept**: application/json
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
## update_webhook_webhooks_management_webhooks_webhook_id_patch
|
|
708
|
+
|
|
709
|
+
> Object update_webhook_webhooks_management_webhooks_webhook_id_patch(webhook_id, webhook_update)
|
|
710
|
+
|
|
711
|
+
Update Webhook
|
|
712
|
+
|
|
713
|
+
Update webhook configuration.
|
|
714
|
+
|
|
715
|
+
### Examples
|
|
716
|
+
|
|
717
|
+
```ruby
|
|
718
|
+
require 'time'
|
|
719
|
+
require 'mailsafepro'
|
|
720
|
+
# setup authorization
|
|
721
|
+
MailSafePro.configure do |config|
|
|
722
|
+
# Configure Bearer authorization (JWT): Bearer
|
|
723
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
724
|
+
end
|
|
725
|
+
|
|
726
|
+
api_instance = MailSafePro::WebhooksApi.new
|
|
727
|
+
webhook_id = 'webhook_id_example' # String |
|
|
728
|
+
webhook_update = MailSafePro::WebhookUpdate.new # WebhookUpdate |
|
|
729
|
+
|
|
730
|
+
begin
|
|
731
|
+
# Update Webhook
|
|
732
|
+
result = api_instance.update_webhook_webhooks_management_webhooks_webhook_id_patch(webhook_id, webhook_update)
|
|
733
|
+
p result
|
|
734
|
+
rescue MailSafePro::ApiError => e
|
|
735
|
+
puts "Error when calling WebhooksApi->update_webhook_webhooks_management_webhooks_webhook_id_patch: #{e}"
|
|
736
|
+
end
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
#### Using the update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info variant
|
|
740
|
+
|
|
741
|
+
This returns an Array which contains the response data, status code and headers.
|
|
742
|
+
|
|
743
|
+
> <Array(Object, Integer, Hash)> update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info(webhook_id, webhook_update)
|
|
744
|
+
|
|
745
|
+
```ruby
|
|
746
|
+
begin
|
|
747
|
+
# Update Webhook
|
|
748
|
+
data, status_code, headers = api_instance.update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info(webhook_id, webhook_update)
|
|
749
|
+
p status_code # => 2xx
|
|
750
|
+
p headers # => { ... }
|
|
751
|
+
p data # => Object
|
|
752
|
+
rescue MailSafePro::ApiError => e
|
|
753
|
+
puts "Error when calling WebhooksApi->update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info: #{e}"
|
|
754
|
+
end
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
### Parameters
|
|
758
|
+
|
|
759
|
+
| Name | Type | Description | Notes |
|
|
760
|
+
| ---- | ---- | ----------- | ----- |
|
|
761
|
+
| **webhook_id** | **String** | | |
|
|
762
|
+
| **webhook_update** | [**WebhookUpdate**](WebhookUpdate.md) | | |
|
|
763
|
+
|
|
764
|
+
### Return type
|
|
765
|
+
|
|
766
|
+
**Object**
|
|
767
|
+
|
|
768
|
+
### Authorization
|
|
769
|
+
|
|
770
|
+
[Bearer](../README.md#Bearer)
|
|
771
|
+
|
|
772
|
+
### HTTP request headers
|
|
773
|
+
|
|
774
|
+
- **Content-Type**: application/json
|
|
775
|
+
- **Accept**: application/json
|
|
776
|
+
|