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,1171 @@
1
+ # MailSafePro::AuthenticationApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**auth_health_check_auth_health_auth_get**](AuthenticationApi.md#auth_health_check_auth_health_auth_get) | **GET** /auth/health/auth | Auth Health Check |
8
+ | [**auth_health_check_auth_health_auth_get_0**](AuthenticationApi.md#auth_health_check_auth_health_auth_get_0) | **GET** /auth/health/auth | Auth Health Check |
9
+ | [**auth_health_check_auth_health_auth_head**](AuthenticationApi.md#auth_health_check_auth_health_auth_head) | **HEAD** /auth/health/auth | Auth Health Check |
10
+ | [**auth_health_check_auth_health_auth_head_0**](AuthenticationApi.md#auth_health_check_auth_health_auth_head_0) | **HEAD** /auth/health/auth | Auth Health Check |
11
+ | [**delete_account_auth_delete_delete**](AuthenticationApi.md#delete_account_auth_delete_delete) | **DELETE** /auth/delete | Delete Account |
12
+ | [**delete_account_auth_delete_delete_0**](AuthenticationApi.md#delete_account_auth_delete_delete_0) | **DELETE** /auth/delete | Delete Account |
13
+ | [**get_current_user_auth_me_get**](AuthenticationApi.md#get_current_user_auth_me_get) | **GET** /auth/me | Get Current User |
14
+ | [**get_current_user_auth_me_get_0**](AuthenticationApi.md#get_current_user_auth_me_get_0) | **GET** /auth/me | Get Current User |
15
+ | [**login_web_user_auth_login_post**](AuthenticationApi.md#login_web_user_auth_login_post) | **POST** /auth/login | Login Web User |
16
+ | [**login_web_user_auth_login_post_0**](AuthenticationApi.md#login_web_user_auth_login_post_0) | **POST** /auth/login | Login Web User |
17
+ | [**logout_auth_logout_post**](AuthenticationApi.md#logout_auth_logout_post) | **POST** /auth/logout | Logout |
18
+ | [**logout_auth_logout_post_0**](AuthenticationApi.md#logout_auth_logout_post_0) | **POST** /auth/logout | Logout |
19
+ | [**refresh_token_auth_refresh_post**](AuthenticationApi.md#refresh_token_auth_refresh_post) | **POST** /auth/refresh | Refresh Token |
20
+ | [**refresh_token_auth_refresh_post_0**](AuthenticationApi.md#refresh_token_auth_refresh_post_0) | **POST** /auth/refresh | Refresh Token |
21
+ | [**register_web_user_auth_register_post**](AuthenticationApi.md#register_web_user_auth_register_post) | **POST** /auth/register | Register Web User |
22
+ | [**register_web_user_auth_register_post_0**](AuthenticationApi.md#register_web_user_auth_register_post_0) | **POST** /auth/register | Register Web User |
23
+ | [**rotate_api_key_auth_rotate_key_post**](AuthenticationApi.md#rotate_api_key_auth_rotate_key_post) | **POST** /auth/rotate-key | Rotate Api Key |
24
+ | [**rotate_api_key_auth_rotate_key_post_0**](AuthenticationApi.md#rotate_api_key_auth_rotate_key_post_0) | **POST** /auth/rotate-key | Rotate Api Key |
25
+
26
+
27
+ ## auth_health_check_auth_health_auth_get
28
+
29
+ > Object auth_health_check_auth_health_auth_get
30
+
31
+ Auth Health Check
32
+
33
+ Health check para autenticación: Redis, JWT y hashing.
34
+
35
+ ### Examples
36
+
37
+ ```ruby
38
+ require 'time'
39
+ require 'mailsafepro'
40
+
41
+ api_instance = MailSafePro::AuthenticationApi.new
42
+
43
+ begin
44
+ # Auth Health Check
45
+ result = api_instance.auth_health_check_auth_health_auth_get
46
+ p result
47
+ rescue MailSafePro::ApiError => e
48
+ puts "Error when calling AuthenticationApi->auth_health_check_auth_health_auth_get: #{e}"
49
+ end
50
+ ```
51
+
52
+ #### Using the auth_health_check_auth_health_auth_get_with_http_info variant
53
+
54
+ This returns an Array which contains the response data, status code and headers.
55
+
56
+ > <Array(Object, Integer, Hash)> auth_health_check_auth_health_auth_get_with_http_info
57
+
58
+ ```ruby
59
+ begin
60
+ # Auth Health Check
61
+ data, status_code, headers = api_instance.auth_health_check_auth_health_auth_get_with_http_info
62
+ p status_code # => 2xx
63
+ p headers # => { ... }
64
+ p data # => Object
65
+ rescue MailSafePro::ApiError => e
66
+ puts "Error when calling AuthenticationApi->auth_health_check_auth_health_auth_get_with_http_info: #{e}"
67
+ end
68
+ ```
69
+
70
+ ### Parameters
71
+
72
+ This endpoint does not need any parameter.
73
+
74
+ ### Return type
75
+
76
+ **Object**
77
+
78
+ ### Authorization
79
+
80
+ No authorization required
81
+
82
+ ### HTTP request headers
83
+
84
+ - **Content-Type**: Not defined
85
+ - **Accept**: application/json
86
+
87
+
88
+ ## auth_health_check_auth_health_auth_get_0
89
+
90
+ > Object auth_health_check_auth_health_auth_get_0
91
+
92
+ Auth Health Check
93
+
94
+ Health check para autenticación: Redis, JWT y hashing.
95
+
96
+ ### Examples
97
+
98
+ ```ruby
99
+ require 'time'
100
+ require 'mailsafepro'
101
+
102
+ api_instance = MailSafePro::AuthenticationApi.new
103
+
104
+ begin
105
+ # Auth Health Check
106
+ result = api_instance.auth_health_check_auth_health_auth_get_0
107
+ p result
108
+ rescue MailSafePro::ApiError => e
109
+ puts "Error when calling AuthenticationApi->auth_health_check_auth_health_auth_get_0: #{e}"
110
+ end
111
+ ```
112
+
113
+ #### Using the auth_health_check_auth_health_auth_get_0_with_http_info variant
114
+
115
+ This returns an Array which contains the response data, status code and headers.
116
+
117
+ > <Array(Object, Integer, Hash)> auth_health_check_auth_health_auth_get_0_with_http_info
118
+
119
+ ```ruby
120
+ begin
121
+ # Auth Health Check
122
+ data, status_code, headers = api_instance.auth_health_check_auth_health_auth_get_0_with_http_info
123
+ p status_code # => 2xx
124
+ p headers # => { ... }
125
+ p data # => Object
126
+ rescue MailSafePro::ApiError => e
127
+ puts "Error when calling AuthenticationApi->auth_health_check_auth_health_auth_get_0_with_http_info: #{e}"
128
+ end
129
+ ```
130
+
131
+ ### Parameters
132
+
133
+ This endpoint does not need any parameter.
134
+
135
+ ### Return type
136
+
137
+ **Object**
138
+
139
+ ### Authorization
140
+
141
+ No authorization required
142
+
143
+ ### HTTP request headers
144
+
145
+ - **Content-Type**: Not defined
146
+ - **Accept**: application/json
147
+
148
+
149
+ ## auth_health_check_auth_health_auth_head
150
+
151
+ > Object auth_health_check_auth_health_auth_head
152
+
153
+ Auth Health Check
154
+
155
+ Health check para autenticación: Redis, JWT y hashing.
156
+
157
+ ### Examples
158
+
159
+ ```ruby
160
+ require 'time'
161
+ require 'mailsafepro'
162
+
163
+ api_instance = MailSafePro::AuthenticationApi.new
164
+
165
+ begin
166
+ # Auth Health Check
167
+ result = api_instance.auth_health_check_auth_health_auth_head
168
+ p result
169
+ rescue MailSafePro::ApiError => e
170
+ puts "Error when calling AuthenticationApi->auth_health_check_auth_health_auth_head: #{e}"
171
+ end
172
+ ```
173
+
174
+ #### Using the auth_health_check_auth_health_auth_head_with_http_info variant
175
+
176
+ This returns an Array which contains the response data, status code and headers.
177
+
178
+ > <Array(Object, Integer, Hash)> auth_health_check_auth_health_auth_head_with_http_info
179
+
180
+ ```ruby
181
+ begin
182
+ # Auth Health Check
183
+ data, status_code, headers = api_instance.auth_health_check_auth_health_auth_head_with_http_info
184
+ p status_code # => 2xx
185
+ p headers # => { ... }
186
+ p data # => Object
187
+ rescue MailSafePro::ApiError => e
188
+ puts "Error when calling AuthenticationApi->auth_health_check_auth_health_auth_head_with_http_info: #{e}"
189
+ end
190
+ ```
191
+
192
+ ### Parameters
193
+
194
+ This endpoint does not need any parameter.
195
+
196
+ ### Return type
197
+
198
+ **Object**
199
+
200
+ ### Authorization
201
+
202
+ No authorization required
203
+
204
+ ### HTTP request headers
205
+
206
+ - **Content-Type**: Not defined
207
+ - **Accept**: application/json
208
+
209
+
210
+ ## auth_health_check_auth_health_auth_head_0
211
+
212
+ > Object auth_health_check_auth_health_auth_head_0
213
+
214
+ Auth Health Check
215
+
216
+ Health check para autenticación: Redis, JWT y hashing.
217
+
218
+ ### Examples
219
+
220
+ ```ruby
221
+ require 'time'
222
+ require 'mailsafepro'
223
+
224
+ api_instance = MailSafePro::AuthenticationApi.new
225
+
226
+ begin
227
+ # Auth Health Check
228
+ result = api_instance.auth_health_check_auth_health_auth_head_0
229
+ p result
230
+ rescue MailSafePro::ApiError => e
231
+ puts "Error when calling AuthenticationApi->auth_health_check_auth_health_auth_head_0: #{e}"
232
+ end
233
+ ```
234
+
235
+ #### Using the auth_health_check_auth_health_auth_head_0_with_http_info variant
236
+
237
+ This returns an Array which contains the response data, status code and headers.
238
+
239
+ > <Array(Object, Integer, Hash)> auth_health_check_auth_health_auth_head_0_with_http_info
240
+
241
+ ```ruby
242
+ begin
243
+ # Auth Health Check
244
+ data, status_code, headers = api_instance.auth_health_check_auth_health_auth_head_0_with_http_info
245
+ p status_code # => 2xx
246
+ p headers # => { ... }
247
+ p data # => Object
248
+ rescue MailSafePro::ApiError => e
249
+ puts "Error when calling AuthenticationApi->auth_health_check_auth_health_auth_head_0_with_http_info: #{e}"
250
+ end
251
+ ```
252
+
253
+ ### Parameters
254
+
255
+ This endpoint does not need any parameter.
256
+
257
+ ### Return type
258
+
259
+ **Object**
260
+
261
+ ### Authorization
262
+
263
+ No authorization required
264
+
265
+ ### HTTP request headers
266
+
267
+ - **Content-Type**: Not defined
268
+ - **Accept**: application/json
269
+
270
+
271
+ ## delete_account_auth_delete_delete
272
+
273
+ > Object delete_account_auth_delete_delete
274
+
275
+ Delete Account
276
+
277
+ Elimina la cuenta del usuario autenticado y todos sus datos relacionados. ⚠️ ADVERTENCIA: Esta operación es IRREVERSIBLE. Elimina: - Datos del usuario - Todas las API keys - Usage/quota - Suscripciones - Rate limits - Tokens relacionados Security: - Solo el usuario puede eliminarse a sí mismo (o admin) - Requiere autenticación válida - Registra la acción en logs para auditoría - Rate limited para prevenir abuse
278
+
279
+ ### Examples
280
+
281
+ ```ruby
282
+ require 'time'
283
+ require 'mailsafepro'
284
+ # setup authorization
285
+ MailSafePro.configure do |config|
286
+ # Configure Bearer authorization (JWT): Bearer
287
+ config.access_token = 'YOUR_BEARER_TOKEN'
288
+ end
289
+
290
+ api_instance = MailSafePro::AuthenticationApi.new
291
+
292
+ begin
293
+ # Delete Account
294
+ result = api_instance.delete_account_auth_delete_delete
295
+ p result
296
+ rescue MailSafePro::ApiError => e
297
+ puts "Error when calling AuthenticationApi->delete_account_auth_delete_delete: #{e}"
298
+ end
299
+ ```
300
+
301
+ #### Using the delete_account_auth_delete_delete_with_http_info variant
302
+
303
+ This returns an Array which contains the response data, status code and headers.
304
+
305
+ > <Array(Object, Integer, Hash)> delete_account_auth_delete_delete_with_http_info
306
+
307
+ ```ruby
308
+ begin
309
+ # Delete Account
310
+ data, status_code, headers = api_instance.delete_account_auth_delete_delete_with_http_info
311
+ p status_code # => 2xx
312
+ p headers # => { ... }
313
+ p data # => Object
314
+ rescue MailSafePro::ApiError => e
315
+ puts "Error when calling AuthenticationApi->delete_account_auth_delete_delete_with_http_info: #{e}"
316
+ end
317
+ ```
318
+
319
+ ### Parameters
320
+
321
+ This endpoint does not need any parameter.
322
+
323
+ ### Return type
324
+
325
+ **Object**
326
+
327
+ ### Authorization
328
+
329
+ [Bearer](../README.md#Bearer)
330
+
331
+ ### HTTP request headers
332
+
333
+ - **Content-Type**: Not defined
334
+ - **Accept**: application/json
335
+
336
+
337
+ ## delete_account_auth_delete_delete_0
338
+
339
+ > Object delete_account_auth_delete_delete_0
340
+
341
+ Delete Account
342
+
343
+ Elimina la cuenta del usuario autenticado y todos sus datos relacionados. ⚠️ ADVERTENCIA: Esta operación es IRREVERSIBLE. Elimina: - Datos del usuario - Todas las API keys - Usage/quota - Suscripciones - Rate limits - Tokens relacionados Security: - Solo el usuario puede eliminarse a sí mismo (o admin) - Requiere autenticación válida - Registra la acción en logs para auditoría - Rate limited para prevenir abuse
344
+
345
+ ### Examples
346
+
347
+ ```ruby
348
+ require 'time'
349
+ require 'mailsafepro'
350
+ # setup authorization
351
+ MailSafePro.configure do |config|
352
+ # Configure Bearer authorization (JWT): Bearer
353
+ config.access_token = 'YOUR_BEARER_TOKEN'
354
+ end
355
+
356
+ api_instance = MailSafePro::AuthenticationApi.new
357
+
358
+ begin
359
+ # Delete Account
360
+ result = api_instance.delete_account_auth_delete_delete_0
361
+ p result
362
+ rescue MailSafePro::ApiError => e
363
+ puts "Error when calling AuthenticationApi->delete_account_auth_delete_delete_0: #{e}"
364
+ end
365
+ ```
366
+
367
+ #### Using the delete_account_auth_delete_delete_0_with_http_info variant
368
+
369
+ This returns an Array which contains the response data, status code and headers.
370
+
371
+ > <Array(Object, Integer, Hash)> delete_account_auth_delete_delete_0_with_http_info
372
+
373
+ ```ruby
374
+ begin
375
+ # Delete Account
376
+ data, status_code, headers = api_instance.delete_account_auth_delete_delete_0_with_http_info
377
+ p status_code # => 2xx
378
+ p headers # => { ... }
379
+ p data # => Object
380
+ rescue MailSafePro::ApiError => e
381
+ puts "Error when calling AuthenticationApi->delete_account_auth_delete_delete_0_with_http_info: #{e}"
382
+ end
383
+ ```
384
+
385
+ ### Parameters
386
+
387
+ This endpoint does not need any parameter.
388
+
389
+ ### Return type
390
+
391
+ **Object**
392
+
393
+ ### Authorization
394
+
395
+ [Bearer](../README.md#Bearer)
396
+
397
+ ### HTTP request headers
398
+
399
+ - **Content-Type**: Not defined
400
+ - **Accept**: application/json
401
+
402
+
403
+ ## get_current_user_auth_me_get
404
+
405
+ > Object get_current_user_auth_me_get
406
+
407
+ Get Current User
408
+
409
+ Devuelve información básica del usuario actual.
410
+
411
+ ### Examples
412
+
413
+ ```ruby
414
+ require 'time'
415
+ require 'mailsafepro'
416
+ # setup authorization
417
+ MailSafePro.configure do |config|
418
+ # Configure Bearer authorization (JWT): Bearer
419
+ config.access_token = 'YOUR_BEARER_TOKEN'
420
+ end
421
+
422
+ api_instance = MailSafePro::AuthenticationApi.new
423
+
424
+ begin
425
+ # Get Current User
426
+ result = api_instance.get_current_user_auth_me_get
427
+ p result
428
+ rescue MailSafePro::ApiError => e
429
+ puts "Error when calling AuthenticationApi->get_current_user_auth_me_get: #{e}"
430
+ end
431
+ ```
432
+
433
+ #### Using the get_current_user_auth_me_get_with_http_info variant
434
+
435
+ This returns an Array which contains the response data, status code and headers.
436
+
437
+ > <Array(Object, Integer, Hash)> get_current_user_auth_me_get_with_http_info
438
+
439
+ ```ruby
440
+ begin
441
+ # Get Current User
442
+ data, status_code, headers = api_instance.get_current_user_auth_me_get_with_http_info
443
+ p status_code # => 2xx
444
+ p headers # => { ... }
445
+ p data # => Object
446
+ rescue MailSafePro::ApiError => e
447
+ puts "Error when calling AuthenticationApi->get_current_user_auth_me_get_with_http_info: #{e}"
448
+ end
449
+ ```
450
+
451
+ ### Parameters
452
+
453
+ This endpoint does not need any parameter.
454
+
455
+ ### Return type
456
+
457
+ **Object**
458
+
459
+ ### Authorization
460
+
461
+ [Bearer](../README.md#Bearer)
462
+
463
+ ### HTTP request headers
464
+
465
+ - **Content-Type**: Not defined
466
+ - **Accept**: application/json
467
+
468
+
469
+ ## get_current_user_auth_me_get_0
470
+
471
+ > Object get_current_user_auth_me_get_0
472
+
473
+ Get Current User
474
+
475
+ Devuelve información básica del usuario actual.
476
+
477
+ ### Examples
478
+
479
+ ```ruby
480
+ require 'time'
481
+ require 'mailsafepro'
482
+ # setup authorization
483
+ MailSafePro.configure do |config|
484
+ # Configure Bearer authorization (JWT): Bearer
485
+ config.access_token = 'YOUR_BEARER_TOKEN'
486
+ end
487
+
488
+ api_instance = MailSafePro::AuthenticationApi.new
489
+
490
+ begin
491
+ # Get Current User
492
+ result = api_instance.get_current_user_auth_me_get_0
493
+ p result
494
+ rescue MailSafePro::ApiError => e
495
+ puts "Error when calling AuthenticationApi->get_current_user_auth_me_get_0: #{e}"
496
+ end
497
+ ```
498
+
499
+ #### Using the get_current_user_auth_me_get_0_with_http_info variant
500
+
501
+ This returns an Array which contains the response data, status code and headers.
502
+
503
+ > <Array(Object, Integer, Hash)> get_current_user_auth_me_get_0_with_http_info
504
+
505
+ ```ruby
506
+ begin
507
+ # Get Current User
508
+ data, status_code, headers = api_instance.get_current_user_auth_me_get_0_with_http_info
509
+ p status_code # => 2xx
510
+ p headers # => { ... }
511
+ p data # => Object
512
+ rescue MailSafePro::ApiError => e
513
+ puts "Error when calling AuthenticationApi->get_current_user_auth_me_get_0_with_http_info: #{e}"
514
+ end
515
+ ```
516
+
517
+ ### Parameters
518
+
519
+ This endpoint does not need any parameter.
520
+
521
+ ### Return type
522
+
523
+ **Object**
524
+
525
+ ### Authorization
526
+
527
+ [Bearer](../README.md#Bearer)
528
+
529
+ ### HTTP request headers
530
+
531
+ - **Content-Type**: Not defined
532
+ - **Accept**: application/json
533
+
534
+
535
+ ## login_web_user_auth_login_post
536
+
537
+ > Object login_web_user_auth_login_post(user_login)
538
+
539
+ Login Web User
540
+
541
+ Login de usuario para panel web. Security features: - Rate limiting por email + IP - Timing attack protection - Generic error messages - PII masking en logs
542
+
543
+ ### Examples
544
+
545
+ ```ruby
546
+ require 'time'
547
+ require 'mailsafepro'
548
+
549
+ api_instance = MailSafePro::AuthenticationApi.new
550
+ user_login = MailSafePro::UserLogin.new({email: 'email_example', password: 'password_example'}) # UserLogin |
551
+
552
+ begin
553
+ # Login Web User
554
+ result = api_instance.login_web_user_auth_login_post(user_login)
555
+ p result
556
+ rescue MailSafePro::ApiError => e
557
+ puts "Error when calling AuthenticationApi->login_web_user_auth_login_post: #{e}"
558
+ end
559
+ ```
560
+
561
+ #### Using the login_web_user_auth_login_post_with_http_info variant
562
+
563
+ This returns an Array which contains the response data, status code and headers.
564
+
565
+ > <Array(Object, Integer, Hash)> login_web_user_auth_login_post_with_http_info(user_login)
566
+
567
+ ```ruby
568
+ begin
569
+ # Login Web User
570
+ data, status_code, headers = api_instance.login_web_user_auth_login_post_with_http_info(user_login)
571
+ p status_code # => 2xx
572
+ p headers # => { ... }
573
+ p data # => Object
574
+ rescue MailSafePro::ApiError => e
575
+ puts "Error when calling AuthenticationApi->login_web_user_auth_login_post_with_http_info: #{e}"
576
+ end
577
+ ```
578
+
579
+ ### Parameters
580
+
581
+ | Name | Type | Description | Notes |
582
+ | ---- | ---- | ----------- | ----- |
583
+ | **user_login** | [**UserLogin**](UserLogin.md) | | |
584
+
585
+ ### Return type
586
+
587
+ **Object**
588
+
589
+ ### Authorization
590
+
591
+ No authorization required
592
+
593
+ ### HTTP request headers
594
+
595
+ - **Content-Type**: application/json
596
+ - **Accept**: application/json
597
+
598
+
599
+ ## login_web_user_auth_login_post_0
600
+
601
+ > Object login_web_user_auth_login_post_0(user_login)
602
+
603
+ Login Web User
604
+
605
+ Login de usuario para panel web. Security features: - Rate limiting por email + IP - Timing attack protection - Generic error messages - PII masking en logs
606
+
607
+ ### Examples
608
+
609
+ ```ruby
610
+ require 'time'
611
+ require 'mailsafepro'
612
+
613
+ api_instance = MailSafePro::AuthenticationApi.new
614
+ user_login = MailSafePro::UserLogin.new({email: 'email_example', password: 'password_example'}) # UserLogin |
615
+
616
+ begin
617
+ # Login Web User
618
+ result = api_instance.login_web_user_auth_login_post_0(user_login)
619
+ p result
620
+ rescue MailSafePro::ApiError => e
621
+ puts "Error when calling AuthenticationApi->login_web_user_auth_login_post_0: #{e}"
622
+ end
623
+ ```
624
+
625
+ #### Using the login_web_user_auth_login_post_0_with_http_info variant
626
+
627
+ This returns an Array which contains the response data, status code and headers.
628
+
629
+ > <Array(Object, Integer, Hash)> login_web_user_auth_login_post_0_with_http_info(user_login)
630
+
631
+ ```ruby
632
+ begin
633
+ # Login Web User
634
+ data, status_code, headers = api_instance.login_web_user_auth_login_post_0_with_http_info(user_login)
635
+ p status_code # => 2xx
636
+ p headers # => { ... }
637
+ p data # => Object
638
+ rescue MailSafePro::ApiError => e
639
+ puts "Error when calling AuthenticationApi->login_web_user_auth_login_post_0_with_http_info: #{e}"
640
+ end
641
+ ```
642
+
643
+ ### Parameters
644
+
645
+ | Name | Type | Description | Notes |
646
+ | ---- | ---- | ----------- | ----- |
647
+ | **user_login** | [**UserLogin**](UserLogin.md) | | |
648
+
649
+ ### Return type
650
+
651
+ **Object**
652
+
653
+ ### Authorization
654
+
655
+ No authorization required
656
+
657
+ ### HTTP request headers
658
+
659
+ - **Content-Type**: application/json
660
+ - **Accept**: application/json
661
+
662
+
663
+ ## logout_auth_logout_post
664
+
665
+ > Object logout_auth_logout_post
666
+
667
+ Logout
668
+
669
+ Logout idempotente: - Si el access token es válido, lo añade a la blacklist. - Si el access token está expirado, responde 200 indicando que ya estaba expirado. - Solo devuelve 401 si el token es completamente inválido (firma/claims corruptos). - Intenta revocar el refresh token si se proporciona.
670
+
671
+ ### Examples
672
+
673
+ ```ruby
674
+ require 'time'
675
+ require 'mailsafepro'
676
+
677
+ api_instance = MailSafePro::AuthenticationApi.new
678
+
679
+ begin
680
+ # Logout
681
+ result = api_instance.logout_auth_logout_post
682
+ p result
683
+ rescue MailSafePro::ApiError => e
684
+ puts "Error when calling AuthenticationApi->logout_auth_logout_post: #{e}"
685
+ end
686
+ ```
687
+
688
+ #### Using the logout_auth_logout_post_with_http_info variant
689
+
690
+ This returns an Array which contains the response data, status code and headers.
691
+
692
+ > <Array(Object, Integer, Hash)> logout_auth_logout_post_with_http_info
693
+
694
+ ```ruby
695
+ begin
696
+ # Logout
697
+ data, status_code, headers = api_instance.logout_auth_logout_post_with_http_info
698
+ p status_code # => 2xx
699
+ p headers # => { ... }
700
+ p data # => Object
701
+ rescue MailSafePro::ApiError => e
702
+ puts "Error when calling AuthenticationApi->logout_auth_logout_post_with_http_info: #{e}"
703
+ end
704
+ ```
705
+
706
+ ### Parameters
707
+
708
+ This endpoint does not need any parameter.
709
+
710
+ ### Return type
711
+
712
+ **Object**
713
+
714
+ ### Authorization
715
+
716
+ No authorization required
717
+
718
+ ### HTTP request headers
719
+
720
+ - **Content-Type**: Not defined
721
+ - **Accept**: application/json
722
+
723
+
724
+ ## logout_auth_logout_post_0
725
+
726
+ > Object logout_auth_logout_post_0
727
+
728
+ Logout
729
+
730
+ Logout idempotente: - Si el access token es válido, lo añade a la blacklist. - Si el access token está expirado, responde 200 indicando que ya estaba expirado. - Solo devuelve 401 si el token es completamente inválido (firma/claims corruptos). - Intenta revocar el refresh token si se proporciona.
731
+
732
+ ### Examples
733
+
734
+ ```ruby
735
+ require 'time'
736
+ require 'mailsafepro'
737
+
738
+ api_instance = MailSafePro::AuthenticationApi.new
739
+
740
+ begin
741
+ # Logout
742
+ result = api_instance.logout_auth_logout_post_0
743
+ p result
744
+ rescue MailSafePro::ApiError => e
745
+ puts "Error when calling AuthenticationApi->logout_auth_logout_post_0: #{e}"
746
+ end
747
+ ```
748
+
749
+ #### Using the logout_auth_logout_post_0_with_http_info variant
750
+
751
+ This returns an Array which contains the response data, status code and headers.
752
+
753
+ > <Array(Object, Integer, Hash)> logout_auth_logout_post_0_with_http_info
754
+
755
+ ```ruby
756
+ begin
757
+ # Logout
758
+ data, status_code, headers = api_instance.logout_auth_logout_post_0_with_http_info
759
+ p status_code # => 2xx
760
+ p headers # => { ... }
761
+ p data # => Object
762
+ rescue MailSafePro::ApiError => e
763
+ puts "Error when calling AuthenticationApi->logout_auth_logout_post_0_with_http_info: #{e}"
764
+ end
765
+ ```
766
+
767
+ ### Parameters
768
+
769
+ This endpoint does not need any parameter.
770
+
771
+ ### Return type
772
+
773
+ **Object**
774
+
775
+ ### Authorization
776
+
777
+ No authorization required
778
+
779
+ ### HTTP request headers
780
+
781
+ - **Content-Type**: Not defined
782
+ - **Accept**: application/json
783
+
784
+
785
+ ## refresh_token_auth_refresh_post
786
+
787
+ > Object refresh_token_auth_refresh_post
788
+
789
+ Refresh Token
790
+
791
+ Crea un nuevo par de tokens a partir de un refresh token válido y no revocado.
792
+
793
+ ### Examples
794
+
795
+ ```ruby
796
+ require 'time'
797
+ require 'mailsafepro'
798
+
799
+ api_instance = MailSafePro::AuthenticationApi.new
800
+
801
+ begin
802
+ # Refresh Token
803
+ result = api_instance.refresh_token_auth_refresh_post
804
+ p result
805
+ rescue MailSafePro::ApiError => e
806
+ puts "Error when calling AuthenticationApi->refresh_token_auth_refresh_post: #{e}"
807
+ end
808
+ ```
809
+
810
+ #### Using the refresh_token_auth_refresh_post_with_http_info variant
811
+
812
+ This returns an Array which contains the response data, status code and headers.
813
+
814
+ > <Array(Object, Integer, Hash)> refresh_token_auth_refresh_post_with_http_info
815
+
816
+ ```ruby
817
+ begin
818
+ # Refresh Token
819
+ data, status_code, headers = api_instance.refresh_token_auth_refresh_post_with_http_info
820
+ p status_code # => 2xx
821
+ p headers # => { ... }
822
+ p data # => Object
823
+ rescue MailSafePro::ApiError => e
824
+ puts "Error when calling AuthenticationApi->refresh_token_auth_refresh_post_with_http_info: #{e}"
825
+ end
826
+ ```
827
+
828
+ ### Parameters
829
+
830
+ This endpoint does not need any parameter.
831
+
832
+ ### Return type
833
+
834
+ **Object**
835
+
836
+ ### Authorization
837
+
838
+ No authorization required
839
+
840
+ ### HTTP request headers
841
+
842
+ - **Content-Type**: Not defined
843
+ - **Accept**: application/json
844
+
845
+
846
+ ## refresh_token_auth_refresh_post_0
847
+
848
+ > Object refresh_token_auth_refresh_post_0
849
+
850
+ Refresh Token
851
+
852
+ Crea un nuevo par de tokens a partir de un refresh token válido y no revocado.
853
+
854
+ ### Examples
855
+
856
+ ```ruby
857
+ require 'time'
858
+ require 'mailsafepro'
859
+
860
+ api_instance = MailSafePro::AuthenticationApi.new
861
+
862
+ begin
863
+ # Refresh Token
864
+ result = api_instance.refresh_token_auth_refresh_post_0
865
+ p result
866
+ rescue MailSafePro::ApiError => e
867
+ puts "Error when calling AuthenticationApi->refresh_token_auth_refresh_post_0: #{e}"
868
+ end
869
+ ```
870
+
871
+ #### Using the refresh_token_auth_refresh_post_0_with_http_info variant
872
+
873
+ This returns an Array which contains the response data, status code and headers.
874
+
875
+ > <Array(Object, Integer, Hash)> refresh_token_auth_refresh_post_0_with_http_info
876
+
877
+ ```ruby
878
+ begin
879
+ # Refresh Token
880
+ data, status_code, headers = api_instance.refresh_token_auth_refresh_post_0_with_http_info
881
+ p status_code # => 2xx
882
+ p headers # => { ... }
883
+ p data # => Object
884
+ rescue MailSafePro::ApiError => e
885
+ puts "Error when calling AuthenticationApi->refresh_token_auth_refresh_post_0_with_http_info: #{e}"
886
+ end
887
+ ```
888
+
889
+ ### Parameters
890
+
891
+ This endpoint does not need any parameter.
892
+
893
+ ### Return type
894
+
895
+ **Object**
896
+
897
+ ### Authorization
898
+
899
+ No authorization required
900
+
901
+ ### HTTP request headers
902
+
903
+ - **Content-Type**: Not defined
904
+ - **Accept**: application/json
905
+
906
+
907
+ ## register_web_user_auth_register_post
908
+
909
+ > Object register_web_user_auth_register_post(user_register)
910
+
911
+ Register Web User
912
+
913
+ Registro de usuario para panel web: crea usuario, API key y tokens.
914
+
915
+ ### Examples
916
+
917
+ ```ruby
918
+ require 'time'
919
+ require 'mailsafepro'
920
+
921
+ api_instance = MailSafePro::AuthenticationApi.new
922
+ user_register = MailSafePro::UserRegister.new({email: 'email_example', password: 'password_example'}) # UserRegister |
923
+
924
+ begin
925
+ # Register Web User
926
+ result = api_instance.register_web_user_auth_register_post(user_register)
927
+ p result
928
+ rescue MailSafePro::ApiError => e
929
+ puts "Error when calling AuthenticationApi->register_web_user_auth_register_post: #{e}"
930
+ end
931
+ ```
932
+
933
+ #### Using the register_web_user_auth_register_post_with_http_info variant
934
+
935
+ This returns an Array which contains the response data, status code and headers.
936
+
937
+ > <Array(Object, Integer, Hash)> register_web_user_auth_register_post_with_http_info(user_register)
938
+
939
+ ```ruby
940
+ begin
941
+ # Register Web User
942
+ data, status_code, headers = api_instance.register_web_user_auth_register_post_with_http_info(user_register)
943
+ p status_code # => 2xx
944
+ p headers # => { ... }
945
+ p data # => Object
946
+ rescue MailSafePro::ApiError => e
947
+ puts "Error when calling AuthenticationApi->register_web_user_auth_register_post_with_http_info: #{e}"
948
+ end
949
+ ```
950
+
951
+ ### Parameters
952
+
953
+ | Name | Type | Description | Notes |
954
+ | ---- | ---- | ----------- | ----- |
955
+ | **user_register** | [**UserRegister**](UserRegister.md) | | |
956
+
957
+ ### Return type
958
+
959
+ **Object**
960
+
961
+ ### Authorization
962
+
963
+ No authorization required
964
+
965
+ ### HTTP request headers
966
+
967
+ - **Content-Type**: application/json
968
+ - **Accept**: application/json
969
+
970
+
971
+ ## register_web_user_auth_register_post_0
972
+
973
+ > Object register_web_user_auth_register_post_0(user_register)
974
+
975
+ Register Web User
976
+
977
+ Registro de usuario para panel web: crea usuario, API key y tokens.
978
+
979
+ ### Examples
980
+
981
+ ```ruby
982
+ require 'time'
983
+ require 'mailsafepro'
984
+
985
+ api_instance = MailSafePro::AuthenticationApi.new
986
+ user_register = MailSafePro::UserRegister.new({email: 'email_example', password: 'password_example'}) # UserRegister |
987
+
988
+ begin
989
+ # Register Web User
990
+ result = api_instance.register_web_user_auth_register_post_0(user_register)
991
+ p result
992
+ rescue MailSafePro::ApiError => e
993
+ puts "Error when calling AuthenticationApi->register_web_user_auth_register_post_0: #{e}"
994
+ end
995
+ ```
996
+
997
+ #### Using the register_web_user_auth_register_post_0_with_http_info variant
998
+
999
+ This returns an Array which contains the response data, status code and headers.
1000
+
1001
+ > <Array(Object, Integer, Hash)> register_web_user_auth_register_post_0_with_http_info(user_register)
1002
+
1003
+ ```ruby
1004
+ begin
1005
+ # Register Web User
1006
+ data, status_code, headers = api_instance.register_web_user_auth_register_post_0_with_http_info(user_register)
1007
+ p status_code # => 2xx
1008
+ p headers # => { ... }
1009
+ p data # => Object
1010
+ rescue MailSafePro::ApiError => e
1011
+ puts "Error when calling AuthenticationApi->register_web_user_auth_register_post_0_with_http_info: #{e}"
1012
+ end
1013
+ ```
1014
+
1015
+ ### Parameters
1016
+
1017
+ | Name | Type | Description | Notes |
1018
+ | ---- | ---- | ----------- | ----- |
1019
+ | **user_register** | [**UserRegister**](UserRegister.md) | | |
1020
+
1021
+ ### Return type
1022
+
1023
+ **Object**
1024
+
1025
+ ### Authorization
1026
+
1027
+ No authorization required
1028
+
1029
+ ### HTTP request headers
1030
+
1031
+ - **Content-Type**: application/json
1032
+ - **Accept**: application/json
1033
+
1034
+
1035
+ ## rotate_api_key_auth_rotate_key_post
1036
+
1037
+ > Object rotate_api_key_auth_rotate_key_post(key_rotation_request)
1038
+
1039
+ Rotate Api Key
1040
+
1041
+ Rotación de API keys con período de gracia; acceso restringido a admin.
1042
+
1043
+ ### Examples
1044
+
1045
+ ```ruby
1046
+ require 'time'
1047
+ require 'mailsafepro'
1048
+ # setup authorization
1049
+ MailSafePro.configure do |config|
1050
+ # Configure Bearer authorization (JWT): Bearer
1051
+ config.access_token = 'YOUR_BEARER_TOKEN'
1052
+ end
1053
+
1054
+ api_instance = MailSafePro::AuthenticationApi.new
1055
+ key_rotation_request = MailSafePro::KeyRotationRequest.new({old_key: 'old_key_example', new_key: 'new_key_example'}) # KeyRotationRequest |
1056
+
1057
+ begin
1058
+ # Rotate Api Key
1059
+ result = api_instance.rotate_api_key_auth_rotate_key_post(key_rotation_request)
1060
+ p result
1061
+ rescue MailSafePro::ApiError => e
1062
+ puts "Error when calling AuthenticationApi->rotate_api_key_auth_rotate_key_post: #{e}"
1063
+ end
1064
+ ```
1065
+
1066
+ #### Using the rotate_api_key_auth_rotate_key_post_with_http_info variant
1067
+
1068
+ This returns an Array which contains the response data, status code and headers.
1069
+
1070
+ > <Array(Object, Integer, Hash)> rotate_api_key_auth_rotate_key_post_with_http_info(key_rotation_request)
1071
+
1072
+ ```ruby
1073
+ begin
1074
+ # Rotate Api Key
1075
+ data, status_code, headers = api_instance.rotate_api_key_auth_rotate_key_post_with_http_info(key_rotation_request)
1076
+ p status_code # => 2xx
1077
+ p headers # => { ... }
1078
+ p data # => Object
1079
+ rescue MailSafePro::ApiError => e
1080
+ puts "Error when calling AuthenticationApi->rotate_api_key_auth_rotate_key_post_with_http_info: #{e}"
1081
+ end
1082
+ ```
1083
+
1084
+ ### Parameters
1085
+
1086
+ | Name | Type | Description | Notes |
1087
+ | ---- | ---- | ----------- | ----- |
1088
+ | **key_rotation_request** | [**KeyRotationRequest**](KeyRotationRequest.md) | | |
1089
+
1090
+ ### Return type
1091
+
1092
+ **Object**
1093
+
1094
+ ### Authorization
1095
+
1096
+ [Bearer](../README.md#Bearer)
1097
+
1098
+ ### HTTP request headers
1099
+
1100
+ - **Content-Type**: application/json
1101
+ - **Accept**: application/json
1102
+
1103
+
1104
+ ## rotate_api_key_auth_rotate_key_post_0
1105
+
1106
+ > Object rotate_api_key_auth_rotate_key_post_0(key_rotation_request)
1107
+
1108
+ Rotate Api Key
1109
+
1110
+ Rotación de API keys con período de gracia; acceso restringido a admin.
1111
+
1112
+ ### Examples
1113
+
1114
+ ```ruby
1115
+ require 'time'
1116
+ require 'mailsafepro'
1117
+ # setup authorization
1118
+ MailSafePro.configure do |config|
1119
+ # Configure Bearer authorization (JWT): Bearer
1120
+ config.access_token = 'YOUR_BEARER_TOKEN'
1121
+ end
1122
+
1123
+ api_instance = MailSafePro::AuthenticationApi.new
1124
+ key_rotation_request = MailSafePro::KeyRotationRequest.new({old_key: 'old_key_example', new_key: 'new_key_example'}) # KeyRotationRequest |
1125
+
1126
+ begin
1127
+ # Rotate Api Key
1128
+ result = api_instance.rotate_api_key_auth_rotate_key_post_0(key_rotation_request)
1129
+ p result
1130
+ rescue MailSafePro::ApiError => e
1131
+ puts "Error when calling AuthenticationApi->rotate_api_key_auth_rotate_key_post_0: #{e}"
1132
+ end
1133
+ ```
1134
+
1135
+ #### Using the rotate_api_key_auth_rotate_key_post_0_with_http_info variant
1136
+
1137
+ This returns an Array which contains the response data, status code and headers.
1138
+
1139
+ > <Array(Object, Integer, Hash)> rotate_api_key_auth_rotate_key_post_0_with_http_info(key_rotation_request)
1140
+
1141
+ ```ruby
1142
+ begin
1143
+ # Rotate Api Key
1144
+ data, status_code, headers = api_instance.rotate_api_key_auth_rotate_key_post_0_with_http_info(key_rotation_request)
1145
+ p status_code # => 2xx
1146
+ p headers # => { ... }
1147
+ p data # => Object
1148
+ rescue MailSafePro::ApiError => e
1149
+ puts "Error when calling AuthenticationApi->rotate_api_key_auth_rotate_key_post_0_with_http_info: #{e}"
1150
+ end
1151
+ ```
1152
+
1153
+ ### Parameters
1154
+
1155
+ | Name | Type | Description | Notes |
1156
+ | ---- | ---- | ----------- | ----- |
1157
+ | **key_rotation_request** | [**KeyRotationRequest**](KeyRotationRequest.md) | | |
1158
+
1159
+ ### Return type
1160
+
1161
+ **Object**
1162
+
1163
+ ### Authorization
1164
+
1165
+ [Bearer](../README.md#Bearer)
1166
+
1167
+ ### HTTP request headers
1168
+
1169
+ - **Content-Type**: application/json
1170
+ - **Accept**: application/json
1171
+