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,500 @@
1
+ # MailSafePro::WebhooksManagementApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_webhook_webhooks_management_webhooks_post**](WebhooksManagementApi.md#create_webhook_webhooks_management_webhooks_post) | **POST** /webhooks-management/webhooks/ | Create Webhook |
8
+ | [**delete_webhook_webhooks_management_webhooks_webhook_id_delete**](WebhooksManagementApi.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**](WebhooksManagementApi.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**](WebhooksManagementApi.md#get_webhook_webhooks_management_webhooks_webhook_id_get) | **GET** /webhooks-management/webhooks/{webhook_id} | Get Webhook |
11
+ | [**list_webhooks_webhooks_management_webhooks_get**](WebhooksManagementApi.md#list_webhooks_webhooks_management_webhooks_get) | **GET** /webhooks-management/webhooks/ | List Webhooks |
12
+ | [**test_webhook_webhooks_management_webhooks_webhook_id_test_post**](WebhooksManagementApi.md#test_webhook_webhooks_management_webhooks_webhook_id_test_post) | **POST** /webhooks-management/webhooks/{webhook_id}/test | Test Webhook |
13
+ | [**update_webhook_webhooks_management_webhooks_webhook_id_patch**](WebhooksManagementApi.md#update_webhook_webhooks_management_webhooks_webhook_id_patch) | **PATCH** /webhooks-management/webhooks/{webhook_id} | Update Webhook |
14
+
15
+
16
+ ## create_webhook_webhooks_management_webhooks_post
17
+
18
+ > Object create_webhook_webhooks_management_webhooks_post(webhook_create)
19
+
20
+ Create Webhook
21
+
22
+ 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%)
23
+
24
+ ### Examples
25
+
26
+ ```ruby
27
+ require 'time'
28
+ require 'mailsafepro'
29
+ # setup authorization
30
+ MailSafePro.configure do |config|
31
+ # Configure Bearer authorization (JWT): Bearer
32
+ config.access_token = 'YOUR_BEARER_TOKEN'
33
+ end
34
+
35
+ api_instance = MailSafePro::WebhooksManagementApi.new
36
+ webhook_create = MailSafePro::WebhookCreate.new({url: 'url_example'}) # WebhookCreate |
37
+
38
+ begin
39
+ # Create Webhook
40
+ result = api_instance.create_webhook_webhooks_management_webhooks_post(webhook_create)
41
+ p result
42
+ rescue MailSafePro::ApiError => e
43
+ puts "Error when calling WebhooksManagementApi->create_webhook_webhooks_management_webhooks_post: #{e}"
44
+ end
45
+ ```
46
+
47
+ #### Using the create_webhook_webhooks_management_webhooks_post_with_http_info variant
48
+
49
+ This returns an Array which contains the response data, status code and headers.
50
+
51
+ > <Array(Object, Integer, Hash)> create_webhook_webhooks_management_webhooks_post_with_http_info(webhook_create)
52
+
53
+ ```ruby
54
+ begin
55
+ # Create Webhook
56
+ data, status_code, headers = api_instance.create_webhook_webhooks_management_webhooks_post_with_http_info(webhook_create)
57
+ p status_code # => 2xx
58
+ p headers # => { ... }
59
+ p data # => Object
60
+ rescue MailSafePro::ApiError => e
61
+ puts "Error when calling WebhooksManagementApi->create_webhook_webhooks_management_webhooks_post_with_http_info: #{e}"
62
+ end
63
+ ```
64
+
65
+ ### Parameters
66
+
67
+ | Name | Type | Description | Notes |
68
+ | ---- | ---- | ----------- | ----- |
69
+ | **webhook_create** | [**WebhookCreate**](WebhookCreate.md) | | |
70
+
71
+ ### Return type
72
+
73
+ **Object**
74
+
75
+ ### Authorization
76
+
77
+ [Bearer](../README.md#Bearer)
78
+
79
+ ### HTTP request headers
80
+
81
+ - **Content-Type**: application/json
82
+ - **Accept**: application/json
83
+
84
+
85
+ ## delete_webhook_webhooks_management_webhooks_webhook_id_delete
86
+
87
+ > Object delete_webhook_webhooks_management_webhooks_webhook_id_delete(webhook_id)
88
+
89
+ Delete Webhook
90
+
91
+ Delete webhook.
92
+
93
+ ### Examples
94
+
95
+ ```ruby
96
+ require 'time'
97
+ require 'mailsafepro'
98
+ # setup authorization
99
+ MailSafePro.configure do |config|
100
+ # Configure Bearer authorization (JWT): Bearer
101
+ config.access_token = 'YOUR_BEARER_TOKEN'
102
+ end
103
+
104
+ api_instance = MailSafePro::WebhooksManagementApi.new
105
+ webhook_id = 'webhook_id_example' # String |
106
+
107
+ begin
108
+ # Delete Webhook
109
+ result = api_instance.delete_webhook_webhooks_management_webhooks_webhook_id_delete(webhook_id)
110
+ p result
111
+ rescue MailSafePro::ApiError => e
112
+ puts "Error when calling WebhooksManagementApi->delete_webhook_webhooks_management_webhooks_webhook_id_delete: #{e}"
113
+ end
114
+ ```
115
+
116
+ #### Using the delete_webhook_webhooks_management_webhooks_webhook_id_delete_with_http_info variant
117
+
118
+ This returns an Array which contains the response data, status code and headers.
119
+
120
+ > <Array(Object, Integer, Hash)> delete_webhook_webhooks_management_webhooks_webhook_id_delete_with_http_info(webhook_id)
121
+
122
+ ```ruby
123
+ begin
124
+ # Delete Webhook
125
+ data, status_code, headers = api_instance.delete_webhook_webhooks_management_webhooks_webhook_id_delete_with_http_info(webhook_id)
126
+ p status_code # => 2xx
127
+ p headers # => { ... }
128
+ p data # => Object
129
+ rescue MailSafePro::ApiError => e
130
+ puts "Error when calling WebhooksManagementApi->delete_webhook_webhooks_management_webhooks_webhook_id_delete_with_http_info: #{e}"
131
+ end
132
+ ```
133
+
134
+ ### Parameters
135
+
136
+ | Name | Type | Description | Notes |
137
+ | ---- | ---- | ----------- | ----- |
138
+ | **webhook_id** | **String** | | |
139
+
140
+ ### Return type
141
+
142
+ **Object**
143
+
144
+ ### Authorization
145
+
146
+ [Bearer](../README.md#Bearer)
147
+
148
+ ### HTTP request headers
149
+
150
+ - **Content-Type**: Not defined
151
+ - **Accept**: application/json
152
+
153
+
154
+ ## get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get
155
+
156
+ > Object get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get(webhook_id, opts)
157
+
158
+ Get Deliveries
159
+
160
+ Get delivery history for webhook.
161
+
162
+ ### Examples
163
+
164
+ ```ruby
165
+ require 'time'
166
+ require 'mailsafepro'
167
+ # setup authorization
168
+ MailSafePro.configure do |config|
169
+ # Configure Bearer authorization (JWT): Bearer
170
+ config.access_token = 'YOUR_BEARER_TOKEN'
171
+ end
172
+
173
+ api_instance = MailSafePro::WebhooksManagementApi.new
174
+ webhook_id = 'webhook_id_example' # String |
175
+ opts = {
176
+ limit: 56 # Integer |
177
+ }
178
+
179
+ begin
180
+ # Get Deliveries
181
+ result = api_instance.get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get(webhook_id, opts)
182
+ p result
183
+ rescue MailSafePro::ApiError => e
184
+ puts "Error when calling WebhooksManagementApi->get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get: #{e}"
185
+ end
186
+ ```
187
+
188
+ #### Using the get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get_with_http_info variant
189
+
190
+ This returns an Array which contains the response data, status code and headers.
191
+
192
+ > <Array(Object, Integer, Hash)> get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get_with_http_info(webhook_id, opts)
193
+
194
+ ```ruby
195
+ begin
196
+ # Get Deliveries
197
+ data, status_code, headers = api_instance.get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get_with_http_info(webhook_id, opts)
198
+ p status_code # => 2xx
199
+ p headers # => { ... }
200
+ p data # => Object
201
+ rescue MailSafePro::ApiError => e
202
+ puts "Error when calling WebhooksManagementApi->get_deliveries_webhooks_management_webhooks_webhook_id_deliveries_get_with_http_info: #{e}"
203
+ end
204
+ ```
205
+
206
+ ### Parameters
207
+
208
+ | Name | Type | Description | Notes |
209
+ | ---- | ---- | ----------- | ----- |
210
+ | **webhook_id** | **String** | | |
211
+ | **limit** | **Integer** | | [optional][default to 100] |
212
+
213
+ ### Return type
214
+
215
+ **Object**
216
+
217
+ ### Authorization
218
+
219
+ [Bearer](../README.md#Bearer)
220
+
221
+ ### HTTP request headers
222
+
223
+ - **Content-Type**: Not defined
224
+ - **Accept**: application/json
225
+
226
+
227
+ ## get_webhook_webhooks_management_webhooks_webhook_id_get
228
+
229
+ > Object get_webhook_webhooks_management_webhooks_webhook_id_get(webhook_id)
230
+
231
+ Get Webhook
232
+
233
+ Get webhook details.
234
+
235
+ ### Examples
236
+
237
+ ```ruby
238
+ require 'time'
239
+ require 'mailsafepro'
240
+ # setup authorization
241
+ MailSafePro.configure do |config|
242
+ # Configure Bearer authorization (JWT): Bearer
243
+ config.access_token = 'YOUR_BEARER_TOKEN'
244
+ end
245
+
246
+ api_instance = MailSafePro::WebhooksManagementApi.new
247
+ webhook_id = 'webhook_id_example' # String |
248
+
249
+ begin
250
+ # Get Webhook
251
+ result = api_instance.get_webhook_webhooks_management_webhooks_webhook_id_get(webhook_id)
252
+ p result
253
+ rescue MailSafePro::ApiError => e
254
+ puts "Error when calling WebhooksManagementApi->get_webhook_webhooks_management_webhooks_webhook_id_get: #{e}"
255
+ end
256
+ ```
257
+
258
+ #### Using the get_webhook_webhooks_management_webhooks_webhook_id_get_with_http_info variant
259
+
260
+ This returns an Array which contains the response data, status code and headers.
261
+
262
+ > <Array(Object, Integer, Hash)> get_webhook_webhooks_management_webhooks_webhook_id_get_with_http_info(webhook_id)
263
+
264
+ ```ruby
265
+ begin
266
+ # Get Webhook
267
+ data, status_code, headers = api_instance.get_webhook_webhooks_management_webhooks_webhook_id_get_with_http_info(webhook_id)
268
+ p status_code # => 2xx
269
+ p headers # => { ... }
270
+ p data # => Object
271
+ rescue MailSafePro::ApiError => e
272
+ puts "Error when calling WebhooksManagementApi->get_webhook_webhooks_management_webhooks_webhook_id_get_with_http_info: #{e}"
273
+ end
274
+ ```
275
+
276
+ ### Parameters
277
+
278
+ | Name | Type | Description | Notes |
279
+ | ---- | ---- | ----------- | ----- |
280
+ | **webhook_id** | **String** | | |
281
+
282
+ ### Return type
283
+
284
+ **Object**
285
+
286
+ ### Authorization
287
+
288
+ [Bearer](../README.md#Bearer)
289
+
290
+ ### HTTP request headers
291
+
292
+ - **Content-Type**: Not defined
293
+ - **Accept**: application/json
294
+
295
+
296
+ ## list_webhooks_webhooks_management_webhooks_get
297
+
298
+ > Object list_webhooks_webhooks_management_webhooks_get
299
+
300
+ List Webhooks
301
+
302
+ List all webhooks for authenticated user.
303
+
304
+ ### Examples
305
+
306
+ ```ruby
307
+ require 'time'
308
+ require 'mailsafepro'
309
+ # setup authorization
310
+ MailSafePro.configure do |config|
311
+ # Configure Bearer authorization (JWT): Bearer
312
+ config.access_token = 'YOUR_BEARER_TOKEN'
313
+ end
314
+
315
+ api_instance = MailSafePro::WebhooksManagementApi.new
316
+
317
+ begin
318
+ # List Webhooks
319
+ result = api_instance.list_webhooks_webhooks_management_webhooks_get
320
+ p result
321
+ rescue MailSafePro::ApiError => e
322
+ puts "Error when calling WebhooksManagementApi->list_webhooks_webhooks_management_webhooks_get: #{e}"
323
+ end
324
+ ```
325
+
326
+ #### Using the list_webhooks_webhooks_management_webhooks_get_with_http_info variant
327
+
328
+ This returns an Array which contains the response data, status code and headers.
329
+
330
+ > <Array(Object, Integer, Hash)> list_webhooks_webhooks_management_webhooks_get_with_http_info
331
+
332
+ ```ruby
333
+ begin
334
+ # List Webhooks
335
+ data, status_code, headers = api_instance.list_webhooks_webhooks_management_webhooks_get_with_http_info
336
+ p status_code # => 2xx
337
+ p headers # => { ... }
338
+ p data # => Object
339
+ rescue MailSafePro::ApiError => e
340
+ puts "Error when calling WebhooksManagementApi->list_webhooks_webhooks_management_webhooks_get_with_http_info: #{e}"
341
+ end
342
+ ```
343
+
344
+ ### Parameters
345
+
346
+ This endpoint does not need any parameter.
347
+
348
+ ### Return type
349
+
350
+ **Object**
351
+
352
+ ### Authorization
353
+
354
+ [Bearer](../README.md#Bearer)
355
+
356
+ ### HTTP request headers
357
+
358
+ - **Content-Type**: Not defined
359
+ - **Accept**: application/json
360
+
361
+
362
+ ## test_webhook_webhooks_management_webhooks_webhook_id_test_post
363
+
364
+ > Object test_webhook_webhooks_management_webhooks_webhook_id_test_post(webhook_id)
365
+
366
+ Test Webhook
367
+
368
+ Send test event to webhook.
369
+
370
+ ### Examples
371
+
372
+ ```ruby
373
+ require 'time'
374
+ require 'mailsafepro'
375
+ # setup authorization
376
+ MailSafePro.configure do |config|
377
+ # Configure Bearer authorization (JWT): Bearer
378
+ config.access_token = 'YOUR_BEARER_TOKEN'
379
+ end
380
+
381
+ api_instance = MailSafePro::WebhooksManagementApi.new
382
+ webhook_id = 'webhook_id_example' # String |
383
+
384
+ begin
385
+ # Test Webhook
386
+ result = api_instance.test_webhook_webhooks_management_webhooks_webhook_id_test_post(webhook_id)
387
+ p result
388
+ rescue MailSafePro::ApiError => e
389
+ puts "Error when calling WebhooksManagementApi->test_webhook_webhooks_management_webhooks_webhook_id_test_post: #{e}"
390
+ end
391
+ ```
392
+
393
+ #### Using the test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info variant
394
+
395
+ This returns an Array which contains the response data, status code and headers.
396
+
397
+ > <Array(Object, Integer, Hash)> test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info(webhook_id)
398
+
399
+ ```ruby
400
+ begin
401
+ # Test Webhook
402
+ data, status_code, headers = api_instance.test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info(webhook_id)
403
+ p status_code # => 2xx
404
+ p headers # => { ... }
405
+ p data # => Object
406
+ rescue MailSafePro::ApiError => e
407
+ puts "Error when calling WebhooksManagementApi->test_webhook_webhooks_management_webhooks_webhook_id_test_post_with_http_info: #{e}"
408
+ end
409
+ ```
410
+
411
+ ### Parameters
412
+
413
+ | Name | Type | Description | Notes |
414
+ | ---- | ---- | ----------- | ----- |
415
+ | **webhook_id** | **String** | | |
416
+
417
+ ### Return type
418
+
419
+ **Object**
420
+
421
+ ### Authorization
422
+
423
+ [Bearer](../README.md#Bearer)
424
+
425
+ ### HTTP request headers
426
+
427
+ - **Content-Type**: Not defined
428
+ - **Accept**: application/json
429
+
430
+
431
+ ## update_webhook_webhooks_management_webhooks_webhook_id_patch
432
+
433
+ > Object update_webhook_webhooks_management_webhooks_webhook_id_patch(webhook_id, webhook_update)
434
+
435
+ Update Webhook
436
+
437
+ Update webhook configuration.
438
+
439
+ ### Examples
440
+
441
+ ```ruby
442
+ require 'time'
443
+ require 'mailsafepro'
444
+ # setup authorization
445
+ MailSafePro.configure do |config|
446
+ # Configure Bearer authorization (JWT): Bearer
447
+ config.access_token = 'YOUR_BEARER_TOKEN'
448
+ end
449
+
450
+ api_instance = MailSafePro::WebhooksManagementApi.new
451
+ webhook_id = 'webhook_id_example' # String |
452
+ webhook_update = MailSafePro::WebhookUpdate.new # WebhookUpdate |
453
+
454
+ begin
455
+ # Update Webhook
456
+ result = api_instance.update_webhook_webhooks_management_webhooks_webhook_id_patch(webhook_id, webhook_update)
457
+ p result
458
+ rescue MailSafePro::ApiError => e
459
+ puts "Error when calling WebhooksManagementApi->update_webhook_webhooks_management_webhooks_webhook_id_patch: #{e}"
460
+ end
461
+ ```
462
+
463
+ #### Using the update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info variant
464
+
465
+ This returns an Array which contains the response data, status code and headers.
466
+
467
+ > <Array(Object, Integer, Hash)> update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info(webhook_id, webhook_update)
468
+
469
+ ```ruby
470
+ begin
471
+ # Update Webhook
472
+ data, status_code, headers = api_instance.update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info(webhook_id, webhook_update)
473
+ p status_code # => 2xx
474
+ p headers # => { ... }
475
+ p data # => Object
476
+ rescue MailSafePro::ApiError => e
477
+ puts "Error when calling WebhooksManagementApi->update_webhook_webhooks_management_webhooks_webhook_id_patch_with_http_info: #{e}"
478
+ end
479
+ ```
480
+
481
+ ### Parameters
482
+
483
+ | Name | Type | Description | Notes |
484
+ | ---- | ---- | ----------- | ----- |
485
+ | **webhook_id** | **String** | | |
486
+ | **webhook_update** | [**WebhookUpdate**](WebhookUpdate.md) | | |
487
+
488
+ ### Return type
489
+
490
+ **Object**
491
+
492
+ ### Authorization
493
+
494
+ [Bearer](../README.md#Bearer)
495
+
496
+ ### HTTP request headers
497
+
498
+ - **Content-Type**: application/json
499
+ - **Accept**: application/json
500
+
data/git_push.sh ADDED
@@ -0,0 +1,57 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="mailsafepro"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="mailsafepro-ruby"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=$(git remote)
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'