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,1241 @@
1
+ # MailSafePro::APIKeysApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_api_key_api_keys_post**](APIKeysApi.md#create_api_key_api_keys_post) | **POST** /api-keys | Create Api Key |
8
+ | [**create_api_key_api_keys_post_0**](APIKeysApi.md#create_api_key_api_keys_post_0) | **POST** /api-keys | Create Api Key |
9
+ | [**force_sync_api_keys_force_sync_post**](APIKeysApi.md#force_sync_api_keys_force_sync_post) | **POST** /api-keys/force-sync | Force Sync |
10
+ | [**force_sync_api_keys_force_sync_post_0**](APIKeysApi.md#force_sync_api_keys_force_sync_post_0) | **POST** /api-keys/force-sync | Force Sync |
11
+ | [**get_api_key_value_api_keys_key_hash_value_get**](APIKeysApi.md#get_api_key_value_api_keys_key_hash_value_get) | **GET** /api-keys/{key_hash}/value | Get Api Key Value |
12
+ | [**get_api_key_value_api_keys_key_hash_value_get_0**](APIKeysApi.md#get_api_key_value_api_keys_key_hash_value_get_0) | **GET** /api-keys/{key_hash}/value | Get Api Key Value |
13
+ | [**get_usage_api_keys_usage_get**](APIKeysApi.md#get_usage_api_keys_usage_get) | **GET** /api-keys/usage | Get Usage |
14
+ | [**get_usage_api_keys_usage_get_0**](APIKeysApi.md#get_usage_api_keys_usage_get_0) | **GET** /api-keys/usage | Get Usage |
15
+ | [**list_api_keys_api_keys_get**](APIKeysApi.md#list_api_keys_api_keys_get) | **GET** /api-keys | List Api Keys |
16
+ | [**list_api_keys_api_keys_get_0**](APIKeysApi.md#list_api_keys_api_keys_get_0) | **GET** /api-keys | List Api Keys |
17
+ | [**repair_user_data_endpoint_api_keys_repair_data_post**](APIKeysApi.md#repair_user_data_endpoint_api_keys_repair_data_post) | **POST** /api-keys/repair-data | Repair User Data Endpoint |
18
+ | [**repair_user_data_endpoint_api_keys_repair_data_post_0**](APIKeysApi.md#repair_user_data_endpoint_api_keys_repair_data_post_0) | **POST** /api-keys/repair-data | Repair User Data Endpoint |
19
+ | [**revoke_api_key_api_keys_key_hash_revoke_delete**](APIKeysApi.md#revoke_api_key_api_keys_key_hash_revoke_delete) | **DELETE** /api-keys/{key_hash}/revoke | Revoke Api Key |
20
+ | [**revoke_api_key_api_keys_key_hash_revoke_delete_0**](APIKeysApi.md#revoke_api_key_api_keys_key_hash_revoke_delete_0) | **DELETE** /api-keys/{key_hash}/revoke | Revoke Api Key |
21
+ | [**rotate_api_key_api_keys_key_hash_rotate_post**](APIKeysApi.md#rotate_api_key_api_keys_key_hash_rotate_post) | **POST** /api-keys/{key_hash}/rotate | Rotate Api Key |
22
+ | [**rotate_api_key_api_keys_key_hash_rotate_post_0**](APIKeysApi.md#rotate_api_key_api_keys_key_hash_rotate_post_0) | **POST** /api-keys/{key_hash}/rotate | Rotate Api Key |
23
+ | [**sync_plan_keys_api_keys_sync_plan_keys_post**](APIKeysApi.md#sync_plan_keys_api_keys_sync_plan_keys_post) | **POST** /api-keys/sync-plan-keys | Sync Plan Keys |
24
+ | [**sync_plan_keys_api_keys_sync_plan_keys_post_0**](APIKeysApi.md#sync_plan_keys_api_keys_sync_plan_keys_post_0) | **POST** /api-keys/sync-plan-keys | Sync Plan Keys |
25
+
26
+
27
+ ## create_api_key_api_keys_post
28
+
29
+ > Object create_api_key_api_keys_post(api_key_create_request)
30
+
31
+ Create Api Key
32
+
33
+ Create a new API key with atomic transaction. Generates cryptographically secure API keys with proper scoping based on user's current plan. Enforces maximum key limits.
34
+
35
+ ### Examples
36
+
37
+ ```ruby
38
+ require 'time'
39
+ require 'mailsafepro'
40
+ # setup authorization
41
+ MailSafePro.configure do |config|
42
+ # Configure Bearer authorization (JWT): Bearer
43
+ config.access_token = 'YOUR_BEARER_TOKEN'
44
+ end
45
+
46
+ api_instance = MailSafePro::APIKeysApi.new
47
+ api_key_create_request = MailSafePro::APIKeyCreateRequest.new # APIKeyCreateRequest |
48
+
49
+ begin
50
+ # Create Api Key
51
+ result = api_instance.create_api_key_api_keys_post(api_key_create_request)
52
+ p result
53
+ rescue MailSafePro::ApiError => e
54
+ puts "Error when calling APIKeysApi->create_api_key_api_keys_post: #{e}"
55
+ end
56
+ ```
57
+
58
+ #### Using the create_api_key_api_keys_post_with_http_info variant
59
+
60
+ This returns an Array which contains the response data, status code and headers.
61
+
62
+ > <Array(Object, Integer, Hash)> create_api_key_api_keys_post_with_http_info(api_key_create_request)
63
+
64
+ ```ruby
65
+ begin
66
+ # Create Api Key
67
+ data, status_code, headers = api_instance.create_api_key_api_keys_post_with_http_info(api_key_create_request)
68
+ p status_code # => 2xx
69
+ p headers # => { ... }
70
+ p data # => Object
71
+ rescue MailSafePro::ApiError => e
72
+ puts "Error when calling APIKeysApi->create_api_key_api_keys_post_with_http_info: #{e}"
73
+ end
74
+ ```
75
+
76
+ ### Parameters
77
+
78
+ | Name | Type | Description | Notes |
79
+ | ---- | ---- | ----------- | ----- |
80
+ | **api_key_create_request** | [**APIKeyCreateRequest**](APIKeyCreateRequest.md) | | |
81
+
82
+ ### Return type
83
+
84
+ **Object**
85
+
86
+ ### Authorization
87
+
88
+ [Bearer](../README.md#Bearer)
89
+
90
+ ### HTTP request headers
91
+
92
+ - **Content-Type**: application/json
93
+ - **Accept**: application/json
94
+
95
+
96
+ ## create_api_key_api_keys_post_0
97
+
98
+ > Object create_api_key_api_keys_post_0(api_key_create_request)
99
+
100
+ Create Api Key
101
+
102
+ Create a new API key with atomic transaction. Generates cryptographically secure API keys with proper scoping based on user's current plan. Enforces maximum key limits.
103
+
104
+ ### Examples
105
+
106
+ ```ruby
107
+ require 'time'
108
+ require 'mailsafepro'
109
+ # setup authorization
110
+ MailSafePro.configure do |config|
111
+ # Configure Bearer authorization (JWT): Bearer
112
+ config.access_token = 'YOUR_BEARER_TOKEN'
113
+ end
114
+
115
+ api_instance = MailSafePro::APIKeysApi.new
116
+ api_key_create_request = MailSafePro::APIKeyCreateRequest.new # APIKeyCreateRequest |
117
+
118
+ begin
119
+ # Create Api Key
120
+ result = api_instance.create_api_key_api_keys_post_0(api_key_create_request)
121
+ p result
122
+ rescue MailSafePro::ApiError => e
123
+ puts "Error when calling APIKeysApi->create_api_key_api_keys_post_0: #{e}"
124
+ end
125
+ ```
126
+
127
+ #### Using the create_api_key_api_keys_post_0_with_http_info variant
128
+
129
+ This returns an Array which contains the response data, status code and headers.
130
+
131
+ > <Array(Object, Integer, Hash)> create_api_key_api_keys_post_0_with_http_info(api_key_create_request)
132
+
133
+ ```ruby
134
+ begin
135
+ # Create Api Key
136
+ data, status_code, headers = api_instance.create_api_key_api_keys_post_0_with_http_info(api_key_create_request)
137
+ p status_code # => 2xx
138
+ p headers # => { ... }
139
+ p data # => Object
140
+ rescue MailSafePro::ApiError => e
141
+ puts "Error when calling APIKeysApi->create_api_key_api_keys_post_0_with_http_info: #{e}"
142
+ end
143
+ ```
144
+
145
+ ### Parameters
146
+
147
+ | Name | Type | Description | Notes |
148
+ | ---- | ---- | ----------- | ----- |
149
+ | **api_key_create_request** | [**APIKeyCreateRequest**](APIKeyCreateRequest.md) | | |
150
+
151
+ ### Return type
152
+
153
+ **Object**
154
+
155
+ ### Authorization
156
+
157
+ [Bearer](../README.md#Bearer)
158
+
159
+ ### HTTP request headers
160
+
161
+ - **Content-Type**: application/json
162
+ - **Accept**: application/json
163
+
164
+
165
+ ## force_sync_api_keys_force_sync_post
166
+
167
+ > Object force_sync_api_keys_force_sync_post
168
+
169
+ Force Sync
170
+
171
+ Force synchronization of user data with rate limiting. Synchronizes API keys with current plan and clears relevant caches. Limited to one sync per 5 minutes per user.
172
+
173
+ ### Examples
174
+
175
+ ```ruby
176
+ require 'time'
177
+ require 'mailsafepro'
178
+ # setup authorization
179
+ MailSafePro.configure do |config|
180
+ # Configure Bearer authorization (JWT): Bearer
181
+ config.access_token = 'YOUR_BEARER_TOKEN'
182
+ end
183
+
184
+ api_instance = MailSafePro::APIKeysApi.new
185
+
186
+ begin
187
+ # Force Sync
188
+ result = api_instance.force_sync_api_keys_force_sync_post
189
+ p result
190
+ rescue MailSafePro::ApiError => e
191
+ puts "Error when calling APIKeysApi->force_sync_api_keys_force_sync_post: #{e}"
192
+ end
193
+ ```
194
+
195
+ #### Using the force_sync_api_keys_force_sync_post_with_http_info variant
196
+
197
+ This returns an Array which contains the response data, status code and headers.
198
+
199
+ > <Array(Object, Integer, Hash)> force_sync_api_keys_force_sync_post_with_http_info
200
+
201
+ ```ruby
202
+ begin
203
+ # Force Sync
204
+ data, status_code, headers = api_instance.force_sync_api_keys_force_sync_post_with_http_info
205
+ p status_code # => 2xx
206
+ p headers # => { ... }
207
+ p data # => Object
208
+ rescue MailSafePro::ApiError => e
209
+ puts "Error when calling APIKeysApi->force_sync_api_keys_force_sync_post_with_http_info: #{e}"
210
+ end
211
+ ```
212
+
213
+ ### Parameters
214
+
215
+ This endpoint does not need any parameter.
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
+ ## force_sync_api_keys_force_sync_post_0
232
+
233
+ > Object force_sync_api_keys_force_sync_post_0
234
+
235
+ Force Sync
236
+
237
+ Force synchronization of user data with rate limiting. Synchronizes API keys with current plan and clears relevant caches. Limited to one sync per 5 minutes per user.
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::APIKeysApi.new
251
+
252
+ begin
253
+ # Force Sync
254
+ result = api_instance.force_sync_api_keys_force_sync_post_0
255
+ p result
256
+ rescue MailSafePro::ApiError => e
257
+ puts "Error when calling APIKeysApi->force_sync_api_keys_force_sync_post_0: #{e}"
258
+ end
259
+ ```
260
+
261
+ #### Using the force_sync_api_keys_force_sync_post_0_with_http_info variant
262
+
263
+ This returns an Array which contains the response data, status code and headers.
264
+
265
+ > <Array(Object, Integer, Hash)> force_sync_api_keys_force_sync_post_0_with_http_info
266
+
267
+ ```ruby
268
+ begin
269
+ # Force Sync
270
+ data, status_code, headers = api_instance.force_sync_api_keys_force_sync_post_0_with_http_info
271
+ p status_code # => 2xx
272
+ p headers # => { ... }
273
+ p data # => Object
274
+ rescue MailSafePro::ApiError => e
275
+ puts "Error when calling APIKeysApi->force_sync_api_keys_force_sync_post_0_with_http_info: #{e}"
276
+ end
277
+ ```
278
+
279
+ ### Parameters
280
+
281
+ This endpoint does not need any parameter.
282
+
283
+ ### Return type
284
+
285
+ **Object**
286
+
287
+ ### Authorization
288
+
289
+ [Bearer](../README.md#Bearer)
290
+
291
+ ### HTTP request headers
292
+
293
+ - **Content-Type**: Not defined
294
+ - **Accept**: application/json
295
+
296
+
297
+ ## get_api_key_value_api_keys_key_hash_value_get
298
+
299
+ > Object get_api_key_value_api_keys_key_hash_value_get(key_hash)
300
+
301
+ Get Api Key Value
302
+
303
+ Retrieve API key metadata (security-safe). Returns key information without exposing the actual key value. Used for key management and verification purposes.
304
+
305
+ ### Examples
306
+
307
+ ```ruby
308
+ require 'time'
309
+ require 'mailsafepro'
310
+ # setup authorization
311
+ MailSafePro.configure do |config|
312
+ # Configure Bearer authorization (JWT): Bearer
313
+ config.access_token = 'YOUR_BEARER_TOKEN'
314
+ end
315
+
316
+ api_instance = MailSafePro::APIKeysApi.new
317
+ key_hash = 'key_hash_example' # String |
318
+
319
+ begin
320
+ # Get Api Key Value
321
+ result = api_instance.get_api_key_value_api_keys_key_hash_value_get(key_hash)
322
+ p result
323
+ rescue MailSafePro::ApiError => e
324
+ puts "Error when calling APIKeysApi->get_api_key_value_api_keys_key_hash_value_get: #{e}"
325
+ end
326
+ ```
327
+
328
+ #### Using the get_api_key_value_api_keys_key_hash_value_get_with_http_info variant
329
+
330
+ This returns an Array which contains the response data, status code and headers.
331
+
332
+ > <Array(Object, Integer, Hash)> get_api_key_value_api_keys_key_hash_value_get_with_http_info(key_hash)
333
+
334
+ ```ruby
335
+ begin
336
+ # Get Api Key Value
337
+ data, status_code, headers = api_instance.get_api_key_value_api_keys_key_hash_value_get_with_http_info(key_hash)
338
+ p status_code # => 2xx
339
+ p headers # => { ... }
340
+ p data # => Object
341
+ rescue MailSafePro::ApiError => e
342
+ puts "Error when calling APIKeysApi->get_api_key_value_api_keys_key_hash_value_get_with_http_info: #{e}"
343
+ end
344
+ ```
345
+
346
+ ### Parameters
347
+
348
+ | Name | Type | Description | Notes |
349
+ | ---- | ---- | ----------- | ----- |
350
+ | **key_hash** | **String** | | |
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
+ ## get_api_key_value_api_keys_key_hash_value_get_0
367
+
368
+ > Object get_api_key_value_api_keys_key_hash_value_get_0(key_hash)
369
+
370
+ Get Api Key Value
371
+
372
+ Retrieve API key metadata (security-safe). Returns key information without exposing the actual key value. Used for key management and verification purposes.
373
+
374
+ ### Examples
375
+
376
+ ```ruby
377
+ require 'time'
378
+ require 'mailsafepro'
379
+ # setup authorization
380
+ MailSafePro.configure do |config|
381
+ # Configure Bearer authorization (JWT): Bearer
382
+ config.access_token = 'YOUR_BEARER_TOKEN'
383
+ end
384
+
385
+ api_instance = MailSafePro::APIKeysApi.new
386
+ key_hash = 'key_hash_example' # String |
387
+
388
+ begin
389
+ # Get Api Key Value
390
+ result = api_instance.get_api_key_value_api_keys_key_hash_value_get_0(key_hash)
391
+ p result
392
+ rescue MailSafePro::ApiError => e
393
+ puts "Error when calling APIKeysApi->get_api_key_value_api_keys_key_hash_value_get_0: #{e}"
394
+ end
395
+ ```
396
+
397
+ #### Using the get_api_key_value_api_keys_key_hash_value_get_0_with_http_info variant
398
+
399
+ This returns an Array which contains the response data, status code and headers.
400
+
401
+ > <Array(Object, Integer, Hash)> get_api_key_value_api_keys_key_hash_value_get_0_with_http_info(key_hash)
402
+
403
+ ```ruby
404
+ begin
405
+ # Get Api Key Value
406
+ data, status_code, headers = api_instance.get_api_key_value_api_keys_key_hash_value_get_0_with_http_info(key_hash)
407
+ p status_code # => 2xx
408
+ p headers # => { ... }
409
+ p data # => Object
410
+ rescue MailSafePro::ApiError => e
411
+ puts "Error when calling APIKeysApi->get_api_key_value_api_keys_key_hash_value_get_0_with_http_info: #{e}"
412
+ end
413
+ ```
414
+
415
+ ### Parameters
416
+
417
+ | Name | Type | Description | Notes |
418
+ | ---- | ---- | ----------- | ----- |
419
+ | **key_hash** | **String** | | |
420
+
421
+ ### Return type
422
+
423
+ **Object**
424
+
425
+ ### Authorization
426
+
427
+ [Bearer](../README.md#Bearer)
428
+
429
+ ### HTTP request headers
430
+
431
+ - **Content-Type**: Not defined
432
+ - **Accept**: application/json
433
+
434
+
435
+ ## get_usage_api_keys_usage_get
436
+
437
+ > Object get_usage_api_keys_usage_get(opts)
438
+
439
+ Get Usage
440
+
441
+ Get current API usage statistics. Returns usage count, limits, and remaining requests for today. Works with both API keys and JWT tokens.
442
+
443
+ ### Examples
444
+
445
+ ```ruby
446
+ require 'time'
447
+ require 'mailsafepro'
448
+
449
+ api_instance = MailSafePro::APIKeysApi.new
450
+ opts = {
451
+ x_api_key: 'x_api_key_example', # String |
452
+ authorization: 'authorization_example' # String |
453
+ }
454
+
455
+ begin
456
+ # Get Usage
457
+ result = api_instance.get_usage_api_keys_usage_get(opts)
458
+ p result
459
+ rescue MailSafePro::ApiError => e
460
+ puts "Error when calling APIKeysApi->get_usage_api_keys_usage_get: #{e}"
461
+ end
462
+ ```
463
+
464
+ #### Using the get_usage_api_keys_usage_get_with_http_info variant
465
+
466
+ This returns an Array which contains the response data, status code and headers.
467
+
468
+ > <Array(Object, Integer, Hash)> get_usage_api_keys_usage_get_with_http_info(opts)
469
+
470
+ ```ruby
471
+ begin
472
+ # Get Usage
473
+ data, status_code, headers = api_instance.get_usage_api_keys_usage_get_with_http_info(opts)
474
+ p status_code # => 2xx
475
+ p headers # => { ... }
476
+ p data # => Object
477
+ rescue MailSafePro::ApiError => e
478
+ puts "Error when calling APIKeysApi->get_usage_api_keys_usage_get_with_http_info: #{e}"
479
+ end
480
+ ```
481
+
482
+ ### Parameters
483
+
484
+ | Name | Type | Description | Notes |
485
+ | ---- | ---- | ----------- | ----- |
486
+ | **x_api_key** | **String** | | [optional] |
487
+ | **authorization** | **String** | | [optional] |
488
+
489
+ ### Return type
490
+
491
+ **Object**
492
+
493
+ ### Authorization
494
+
495
+ No authorization required
496
+
497
+ ### HTTP request headers
498
+
499
+ - **Content-Type**: Not defined
500
+ - **Accept**: application/json
501
+
502
+
503
+ ## get_usage_api_keys_usage_get_0
504
+
505
+ > Object get_usage_api_keys_usage_get_0(opts)
506
+
507
+ Get Usage
508
+
509
+ Get current API usage statistics. Returns usage count, limits, and remaining requests for today. Works with both API keys and JWT tokens.
510
+
511
+ ### Examples
512
+
513
+ ```ruby
514
+ require 'time'
515
+ require 'mailsafepro'
516
+
517
+ api_instance = MailSafePro::APIKeysApi.new
518
+ opts = {
519
+ x_api_key: 'x_api_key_example', # String |
520
+ authorization: 'authorization_example' # String |
521
+ }
522
+
523
+ begin
524
+ # Get Usage
525
+ result = api_instance.get_usage_api_keys_usage_get_0(opts)
526
+ p result
527
+ rescue MailSafePro::ApiError => e
528
+ puts "Error when calling APIKeysApi->get_usage_api_keys_usage_get_0: #{e}"
529
+ end
530
+ ```
531
+
532
+ #### Using the get_usage_api_keys_usage_get_0_with_http_info variant
533
+
534
+ This returns an Array which contains the response data, status code and headers.
535
+
536
+ > <Array(Object, Integer, Hash)> get_usage_api_keys_usage_get_0_with_http_info(opts)
537
+
538
+ ```ruby
539
+ begin
540
+ # Get Usage
541
+ data, status_code, headers = api_instance.get_usage_api_keys_usage_get_0_with_http_info(opts)
542
+ p status_code # => 2xx
543
+ p headers # => { ... }
544
+ p data # => Object
545
+ rescue MailSafePro::ApiError => e
546
+ puts "Error when calling APIKeysApi->get_usage_api_keys_usage_get_0_with_http_info: #{e}"
547
+ end
548
+ ```
549
+
550
+ ### Parameters
551
+
552
+ | Name | Type | Description | Notes |
553
+ | ---- | ---- | ----------- | ----- |
554
+ | **x_api_key** | **String** | | [optional] |
555
+ | **authorization** | **String** | | [optional] |
556
+
557
+ ### Return type
558
+
559
+ **Object**
560
+
561
+ ### Authorization
562
+
563
+ No authorization required
564
+
565
+ ### HTTP request headers
566
+
567
+ - **Content-Type**: Not defined
568
+ - **Accept**: application/json
569
+
570
+
571
+ ## list_api_keys_api_keys_get
572
+
573
+ > <APIKeyListResponse> list_api_keys_api_keys_get
574
+
575
+ List Api Keys
576
+
577
+ List all API keys for current user with consistent IDs. Returns comprehensive key metadata including status, scopes, and usage information. Handles corrupted key data gracefully.
578
+
579
+ ### Examples
580
+
581
+ ```ruby
582
+ require 'time'
583
+ require 'mailsafepro'
584
+ # setup authorization
585
+ MailSafePro.configure do |config|
586
+ # Configure Bearer authorization (JWT): Bearer
587
+ config.access_token = 'YOUR_BEARER_TOKEN'
588
+ end
589
+
590
+ api_instance = MailSafePro::APIKeysApi.new
591
+
592
+ begin
593
+ # List Api Keys
594
+ result = api_instance.list_api_keys_api_keys_get
595
+ p result
596
+ rescue MailSafePro::ApiError => e
597
+ puts "Error when calling APIKeysApi->list_api_keys_api_keys_get: #{e}"
598
+ end
599
+ ```
600
+
601
+ #### Using the list_api_keys_api_keys_get_with_http_info variant
602
+
603
+ This returns an Array which contains the response data, status code and headers.
604
+
605
+ > <Array(<APIKeyListResponse>, Integer, Hash)> list_api_keys_api_keys_get_with_http_info
606
+
607
+ ```ruby
608
+ begin
609
+ # List Api Keys
610
+ data, status_code, headers = api_instance.list_api_keys_api_keys_get_with_http_info
611
+ p status_code # => 2xx
612
+ p headers # => { ... }
613
+ p data # => <APIKeyListResponse>
614
+ rescue MailSafePro::ApiError => e
615
+ puts "Error when calling APIKeysApi->list_api_keys_api_keys_get_with_http_info: #{e}"
616
+ end
617
+ ```
618
+
619
+ ### Parameters
620
+
621
+ This endpoint does not need any parameter.
622
+
623
+ ### Return type
624
+
625
+ [**APIKeyListResponse**](APIKeyListResponse.md)
626
+
627
+ ### Authorization
628
+
629
+ [Bearer](../README.md#Bearer)
630
+
631
+ ### HTTP request headers
632
+
633
+ - **Content-Type**: Not defined
634
+ - **Accept**: application/json
635
+
636
+
637
+ ## list_api_keys_api_keys_get_0
638
+
639
+ > <APIKeyListResponse> list_api_keys_api_keys_get_0
640
+
641
+ List Api Keys
642
+
643
+ List all API keys for current user with consistent IDs. Returns comprehensive key metadata including status, scopes, and usage information. Handles corrupted key data gracefully.
644
+
645
+ ### Examples
646
+
647
+ ```ruby
648
+ require 'time'
649
+ require 'mailsafepro'
650
+ # setup authorization
651
+ MailSafePro.configure do |config|
652
+ # Configure Bearer authorization (JWT): Bearer
653
+ config.access_token = 'YOUR_BEARER_TOKEN'
654
+ end
655
+
656
+ api_instance = MailSafePro::APIKeysApi.new
657
+
658
+ begin
659
+ # List Api Keys
660
+ result = api_instance.list_api_keys_api_keys_get_0
661
+ p result
662
+ rescue MailSafePro::ApiError => e
663
+ puts "Error when calling APIKeysApi->list_api_keys_api_keys_get_0: #{e}"
664
+ end
665
+ ```
666
+
667
+ #### Using the list_api_keys_api_keys_get_0_with_http_info variant
668
+
669
+ This returns an Array which contains the response data, status code and headers.
670
+
671
+ > <Array(<APIKeyListResponse>, Integer, Hash)> list_api_keys_api_keys_get_0_with_http_info
672
+
673
+ ```ruby
674
+ begin
675
+ # List Api Keys
676
+ data, status_code, headers = api_instance.list_api_keys_api_keys_get_0_with_http_info
677
+ p status_code # => 2xx
678
+ p headers # => { ... }
679
+ p data # => <APIKeyListResponse>
680
+ rescue MailSafePro::ApiError => e
681
+ puts "Error when calling APIKeysApi->list_api_keys_api_keys_get_0_with_http_info: #{e}"
682
+ end
683
+ ```
684
+
685
+ ### Parameters
686
+
687
+ This endpoint does not need any parameter.
688
+
689
+ ### Return type
690
+
691
+ [**APIKeyListResponse**](APIKeyListResponse.md)
692
+
693
+ ### Authorization
694
+
695
+ [Bearer](../README.md#Bearer)
696
+
697
+ ### HTTP request headers
698
+
699
+ - **Content-Type**: Not defined
700
+ - **Accept**: application/json
701
+
702
+
703
+ ## repair_user_data_endpoint_api_keys_repair_data_post
704
+
705
+ > Hash&lt;String, String&gt; repair_user_data_endpoint_api_keys_repair_data_post
706
+
707
+ Repair User Data Endpoint
708
+
709
+ Emergency data repair endpoint - ADMINISTRATORS ONLY WARNING: Critical operation; relies on admin scope verification at runtime.
710
+
711
+ ### Examples
712
+
713
+ ```ruby
714
+ require 'time'
715
+ require 'mailsafepro'
716
+ # setup authorization
717
+ MailSafePro.configure do |config|
718
+ # Configure Bearer authorization (JWT): Bearer
719
+ config.access_token = 'YOUR_BEARER_TOKEN'
720
+ end
721
+
722
+ api_instance = MailSafePro::APIKeysApi.new
723
+
724
+ begin
725
+ # Repair User Data Endpoint
726
+ result = api_instance.repair_user_data_endpoint_api_keys_repair_data_post
727
+ p result
728
+ rescue MailSafePro::ApiError => e
729
+ puts "Error when calling APIKeysApi->repair_user_data_endpoint_api_keys_repair_data_post: #{e}"
730
+ end
731
+ ```
732
+
733
+ #### Using the repair_user_data_endpoint_api_keys_repair_data_post_with_http_info variant
734
+
735
+ This returns an Array which contains the response data, status code and headers.
736
+
737
+ > <Array(Hash&lt;String, String&gt;, Integer, Hash)> repair_user_data_endpoint_api_keys_repair_data_post_with_http_info
738
+
739
+ ```ruby
740
+ begin
741
+ # Repair User Data Endpoint
742
+ data, status_code, headers = api_instance.repair_user_data_endpoint_api_keys_repair_data_post_with_http_info
743
+ p status_code # => 2xx
744
+ p headers # => { ... }
745
+ p data # => Hash&lt;String, String&gt;
746
+ rescue MailSafePro::ApiError => e
747
+ puts "Error when calling APIKeysApi->repair_user_data_endpoint_api_keys_repair_data_post_with_http_info: #{e}"
748
+ end
749
+ ```
750
+
751
+ ### Parameters
752
+
753
+ This endpoint does not need any parameter.
754
+
755
+ ### Return type
756
+
757
+ **Hash&lt;String, String&gt;**
758
+
759
+ ### Authorization
760
+
761
+ [Bearer](../README.md#Bearer)
762
+
763
+ ### HTTP request headers
764
+
765
+ - **Content-Type**: Not defined
766
+ - **Accept**: application/json
767
+
768
+
769
+ ## repair_user_data_endpoint_api_keys_repair_data_post_0
770
+
771
+ > Hash&lt;String, String&gt; repair_user_data_endpoint_api_keys_repair_data_post_0
772
+
773
+ Repair User Data Endpoint
774
+
775
+ Emergency data repair endpoint - ADMINISTRATORS ONLY WARNING: Critical operation; relies on admin scope verification at runtime.
776
+
777
+ ### Examples
778
+
779
+ ```ruby
780
+ require 'time'
781
+ require 'mailsafepro'
782
+ # setup authorization
783
+ MailSafePro.configure do |config|
784
+ # Configure Bearer authorization (JWT): Bearer
785
+ config.access_token = 'YOUR_BEARER_TOKEN'
786
+ end
787
+
788
+ api_instance = MailSafePro::APIKeysApi.new
789
+
790
+ begin
791
+ # Repair User Data Endpoint
792
+ result = api_instance.repair_user_data_endpoint_api_keys_repair_data_post_0
793
+ p result
794
+ rescue MailSafePro::ApiError => e
795
+ puts "Error when calling APIKeysApi->repair_user_data_endpoint_api_keys_repair_data_post_0: #{e}"
796
+ end
797
+ ```
798
+
799
+ #### Using the repair_user_data_endpoint_api_keys_repair_data_post_0_with_http_info variant
800
+
801
+ This returns an Array which contains the response data, status code and headers.
802
+
803
+ > <Array(Hash&lt;String, String&gt;, Integer, Hash)> repair_user_data_endpoint_api_keys_repair_data_post_0_with_http_info
804
+
805
+ ```ruby
806
+ begin
807
+ # Repair User Data Endpoint
808
+ data, status_code, headers = api_instance.repair_user_data_endpoint_api_keys_repair_data_post_0_with_http_info
809
+ p status_code # => 2xx
810
+ p headers # => { ... }
811
+ p data # => Hash&lt;String, String&gt;
812
+ rescue MailSafePro::ApiError => e
813
+ puts "Error when calling APIKeysApi->repair_user_data_endpoint_api_keys_repair_data_post_0_with_http_info: #{e}"
814
+ end
815
+ ```
816
+
817
+ ### Parameters
818
+
819
+ This endpoint does not need any parameter.
820
+
821
+ ### Return type
822
+
823
+ **Hash&lt;String, String&gt;**
824
+
825
+ ### Authorization
826
+
827
+ [Bearer](../README.md#Bearer)
828
+
829
+ ### HTTP request headers
830
+
831
+ - **Content-Type**: Not defined
832
+ - **Accept**: application/json
833
+
834
+
835
+ ## revoke_api_key_api_keys_key_hash_revoke_delete
836
+
837
+ > Object revoke_api_key_api_keys_key_hash_revoke_delete(key_hash)
838
+
839
+ Revoke Api Key
840
+
841
+ Revoke an API key with atomic transaction. Immediately invalidates the key and removes it from active sets. Provides audit trail for security compliance.
842
+
843
+ ### Examples
844
+
845
+ ```ruby
846
+ require 'time'
847
+ require 'mailsafepro'
848
+ # setup authorization
849
+ MailSafePro.configure do |config|
850
+ # Configure Bearer authorization (JWT): Bearer
851
+ config.access_token = 'YOUR_BEARER_TOKEN'
852
+ end
853
+
854
+ api_instance = MailSafePro::APIKeysApi.new
855
+ key_hash = 'key_hash_example' # String |
856
+
857
+ begin
858
+ # Revoke Api Key
859
+ result = api_instance.revoke_api_key_api_keys_key_hash_revoke_delete(key_hash)
860
+ p result
861
+ rescue MailSafePro::ApiError => e
862
+ puts "Error when calling APIKeysApi->revoke_api_key_api_keys_key_hash_revoke_delete: #{e}"
863
+ end
864
+ ```
865
+
866
+ #### Using the revoke_api_key_api_keys_key_hash_revoke_delete_with_http_info variant
867
+
868
+ This returns an Array which contains the response data, status code and headers.
869
+
870
+ > <Array(Object, Integer, Hash)> revoke_api_key_api_keys_key_hash_revoke_delete_with_http_info(key_hash)
871
+
872
+ ```ruby
873
+ begin
874
+ # Revoke Api Key
875
+ data, status_code, headers = api_instance.revoke_api_key_api_keys_key_hash_revoke_delete_with_http_info(key_hash)
876
+ p status_code # => 2xx
877
+ p headers # => { ... }
878
+ p data # => Object
879
+ rescue MailSafePro::ApiError => e
880
+ puts "Error when calling APIKeysApi->revoke_api_key_api_keys_key_hash_revoke_delete_with_http_info: #{e}"
881
+ end
882
+ ```
883
+
884
+ ### Parameters
885
+
886
+ | Name | Type | Description | Notes |
887
+ | ---- | ---- | ----------- | ----- |
888
+ | **key_hash** | **String** | | |
889
+
890
+ ### Return type
891
+
892
+ **Object**
893
+
894
+ ### Authorization
895
+
896
+ [Bearer](../README.md#Bearer)
897
+
898
+ ### HTTP request headers
899
+
900
+ - **Content-Type**: Not defined
901
+ - **Accept**: application/json
902
+
903
+
904
+ ## revoke_api_key_api_keys_key_hash_revoke_delete_0
905
+
906
+ > Object revoke_api_key_api_keys_key_hash_revoke_delete_0(key_hash)
907
+
908
+ Revoke Api Key
909
+
910
+ Revoke an API key with atomic transaction. Immediately invalidates the key and removes it from active sets. Provides audit trail for security compliance.
911
+
912
+ ### Examples
913
+
914
+ ```ruby
915
+ require 'time'
916
+ require 'mailsafepro'
917
+ # setup authorization
918
+ MailSafePro.configure do |config|
919
+ # Configure Bearer authorization (JWT): Bearer
920
+ config.access_token = 'YOUR_BEARER_TOKEN'
921
+ end
922
+
923
+ api_instance = MailSafePro::APIKeysApi.new
924
+ key_hash = 'key_hash_example' # String |
925
+
926
+ begin
927
+ # Revoke Api Key
928
+ result = api_instance.revoke_api_key_api_keys_key_hash_revoke_delete_0(key_hash)
929
+ p result
930
+ rescue MailSafePro::ApiError => e
931
+ puts "Error when calling APIKeysApi->revoke_api_key_api_keys_key_hash_revoke_delete_0: #{e}"
932
+ end
933
+ ```
934
+
935
+ #### Using the revoke_api_key_api_keys_key_hash_revoke_delete_0_with_http_info variant
936
+
937
+ This returns an Array which contains the response data, status code and headers.
938
+
939
+ > <Array(Object, Integer, Hash)> revoke_api_key_api_keys_key_hash_revoke_delete_0_with_http_info(key_hash)
940
+
941
+ ```ruby
942
+ begin
943
+ # Revoke Api Key
944
+ data, status_code, headers = api_instance.revoke_api_key_api_keys_key_hash_revoke_delete_0_with_http_info(key_hash)
945
+ p status_code # => 2xx
946
+ p headers # => { ... }
947
+ p data # => Object
948
+ rescue MailSafePro::ApiError => e
949
+ puts "Error when calling APIKeysApi->revoke_api_key_api_keys_key_hash_revoke_delete_0_with_http_info: #{e}"
950
+ end
951
+ ```
952
+
953
+ ### Parameters
954
+
955
+ | Name | Type | Description | Notes |
956
+ | ---- | ---- | ----------- | ----- |
957
+ | **key_hash** | **String** | | |
958
+
959
+ ### Return type
960
+
961
+ **Object**
962
+
963
+ ### Authorization
964
+
965
+ [Bearer](../README.md#Bearer)
966
+
967
+ ### HTTP request headers
968
+
969
+ - **Content-Type**: Not defined
970
+ - **Accept**: application/json
971
+
972
+
973
+ ## rotate_api_key_api_keys_key_hash_rotate_post
974
+
975
+ > Object rotate_api_key_api_keys_key_hash_rotate_post(key_hash)
976
+
977
+ Rotate Api Key
978
+
979
+ Rotate API key with grace period. Generates a new key while keeping the old one active for 7 days to allow for smooth transition in client applications.
980
+
981
+ ### Examples
982
+
983
+ ```ruby
984
+ require 'time'
985
+ require 'mailsafepro'
986
+ # setup authorization
987
+ MailSafePro.configure do |config|
988
+ # Configure Bearer authorization (JWT): Bearer
989
+ config.access_token = 'YOUR_BEARER_TOKEN'
990
+ end
991
+
992
+ api_instance = MailSafePro::APIKeysApi.new
993
+ key_hash = 'key_hash_example' # String |
994
+
995
+ begin
996
+ # Rotate Api Key
997
+ result = api_instance.rotate_api_key_api_keys_key_hash_rotate_post(key_hash)
998
+ p result
999
+ rescue MailSafePro::ApiError => e
1000
+ puts "Error when calling APIKeysApi->rotate_api_key_api_keys_key_hash_rotate_post: #{e}"
1001
+ end
1002
+ ```
1003
+
1004
+ #### Using the rotate_api_key_api_keys_key_hash_rotate_post_with_http_info variant
1005
+
1006
+ This returns an Array which contains the response data, status code and headers.
1007
+
1008
+ > <Array(Object, Integer, Hash)> rotate_api_key_api_keys_key_hash_rotate_post_with_http_info(key_hash)
1009
+
1010
+ ```ruby
1011
+ begin
1012
+ # Rotate Api Key
1013
+ data, status_code, headers = api_instance.rotate_api_key_api_keys_key_hash_rotate_post_with_http_info(key_hash)
1014
+ p status_code # => 2xx
1015
+ p headers # => { ... }
1016
+ p data # => Object
1017
+ rescue MailSafePro::ApiError => e
1018
+ puts "Error when calling APIKeysApi->rotate_api_key_api_keys_key_hash_rotate_post_with_http_info: #{e}"
1019
+ end
1020
+ ```
1021
+
1022
+ ### Parameters
1023
+
1024
+ | Name | Type | Description | Notes |
1025
+ | ---- | ---- | ----------- | ----- |
1026
+ | **key_hash** | **String** | | |
1027
+
1028
+ ### Return type
1029
+
1030
+ **Object**
1031
+
1032
+ ### Authorization
1033
+
1034
+ [Bearer](../README.md#Bearer)
1035
+
1036
+ ### HTTP request headers
1037
+
1038
+ - **Content-Type**: Not defined
1039
+ - **Accept**: application/json
1040
+
1041
+
1042
+ ## rotate_api_key_api_keys_key_hash_rotate_post_0
1043
+
1044
+ > Object rotate_api_key_api_keys_key_hash_rotate_post_0(key_hash)
1045
+
1046
+ Rotate Api Key
1047
+
1048
+ Rotate API key with grace period. Generates a new key while keeping the old one active for 7 days to allow for smooth transition in client applications.
1049
+
1050
+ ### Examples
1051
+
1052
+ ```ruby
1053
+ require 'time'
1054
+ require 'mailsafepro'
1055
+ # setup authorization
1056
+ MailSafePro.configure do |config|
1057
+ # Configure Bearer authorization (JWT): Bearer
1058
+ config.access_token = 'YOUR_BEARER_TOKEN'
1059
+ end
1060
+
1061
+ api_instance = MailSafePro::APIKeysApi.new
1062
+ key_hash = 'key_hash_example' # String |
1063
+
1064
+ begin
1065
+ # Rotate Api Key
1066
+ result = api_instance.rotate_api_key_api_keys_key_hash_rotate_post_0(key_hash)
1067
+ p result
1068
+ rescue MailSafePro::ApiError => e
1069
+ puts "Error when calling APIKeysApi->rotate_api_key_api_keys_key_hash_rotate_post_0: #{e}"
1070
+ end
1071
+ ```
1072
+
1073
+ #### Using the rotate_api_key_api_keys_key_hash_rotate_post_0_with_http_info variant
1074
+
1075
+ This returns an Array which contains the response data, status code and headers.
1076
+
1077
+ > <Array(Object, Integer, Hash)> rotate_api_key_api_keys_key_hash_rotate_post_0_with_http_info(key_hash)
1078
+
1079
+ ```ruby
1080
+ begin
1081
+ # Rotate Api Key
1082
+ data, status_code, headers = api_instance.rotate_api_key_api_keys_key_hash_rotate_post_0_with_http_info(key_hash)
1083
+ p status_code # => 2xx
1084
+ p headers # => { ... }
1085
+ p data # => Object
1086
+ rescue MailSafePro::ApiError => e
1087
+ puts "Error when calling APIKeysApi->rotate_api_key_api_keys_key_hash_rotate_post_0_with_http_info: #{e}"
1088
+ end
1089
+ ```
1090
+
1091
+ ### Parameters
1092
+
1093
+ | Name | Type | Description | Notes |
1094
+ | ---- | ---- | ----------- | ----- |
1095
+ | **key_hash** | **String** | | |
1096
+
1097
+ ### Return type
1098
+
1099
+ **Object**
1100
+
1101
+ ### Authorization
1102
+
1103
+ [Bearer](../README.md#Bearer)
1104
+
1105
+ ### HTTP request headers
1106
+
1107
+ - **Content-Type**: Not defined
1108
+ - **Accept**: application/json
1109
+
1110
+
1111
+ ## sync_plan_keys_api_keys_sync_plan_keys_post
1112
+
1113
+ > Object sync_plan_keys_api_keys_sync_plan_keys_post
1114
+
1115
+ Sync Plan Keys
1116
+
1117
+ Synchronize current plan with all user API keys. Ensures all existing keys have the correct scopes and permissions based on the user's current subscription plan.
1118
+
1119
+ ### Examples
1120
+
1121
+ ```ruby
1122
+ require 'time'
1123
+ require 'mailsafepro'
1124
+ # setup authorization
1125
+ MailSafePro.configure do |config|
1126
+ # Configure Bearer authorization (JWT): Bearer
1127
+ config.access_token = 'YOUR_BEARER_TOKEN'
1128
+ end
1129
+
1130
+ api_instance = MailSafePro::APIKeysApi.new
1131
+
1132
+ begin
1133
+ # Sync Plan Keys
1134
+ result = api_instance.sync_plan_keys_api_keys_sync_plan_keys_post
1135
+ p result
1136
+ rescue MailSafePro::ApiError => e
1137
+ puts "Error when calling APIKeysApi->sync_plan_keys_api_keys_sync_plan_keys_post: #{e}"
1138
+ end
1139
+ ```
1140
+
1141
+ #### Using the sync_plan_keys_api_keys_sync_plan_keys_post_with_http_info variant
1142
+
1143
+ This returns an Array which contains the response data, status code and headers.
1144
+
1145
+ > <Array(Object, Integer, Hash)> sync_plan_keys_api_keys_sync_plan_keys_post_with_http_info
1146
+
1147
+ ```ruby
1148
+ begin
1149
+ # Sync Plan Keys
1150
+ data, status_code, headers = api_instance.sync_plan_keys_api_keys_sync_plan_keys_post_with_http_info
1151
+ p status_code # => 2xx
1152
+ p headers # => { ... }
1153
+ p data # => Object
1154
+ rescue MailSafePro::ApiError => e
1155
+ puts "Error when calling APIKeysApi->sync_plan_keys_api_keys_sync_plan_keys_post_with_http_info: #{e}"
1156
+ end
1157
+ ```
1158
+
1159
+ ### Parameters
1160
+
1161
+ This endpoint does not need any parameter.
1162
+
1163
+ ### Return type
1164
+
1165
+ **Object**
1166
+
1167
+ ### Authorization
1168
+
1169
+ [Bearer](../README.md#Bearer)
1170
+
1171
+ ### HTTP request headers
1172
+
1173
+ - **Content-Type**: Not defined
1174
+ - **Accept**: application/json
1175
+
1176
+
1177
+ ## sync_plan_keys_api_keys_sync_plan_keys_post_0
1178
+
1179
+ > Object sync_plan_keys_api_keys_sync_plan_keys_post_0
1180
+
1181
+ Sync Plan Keys
1182
+
1183
+ Synchronize current plan with all user API keys. Ensures all existing keys have the correct scopes and permissions based on the user's current subscription plan.
1184
+
1185
+ ### Examples
1186
+
1187
+ ```ruby
1188
+ require 'time'
1189
+ require 'mailsafepro'
1190
+ # setup authorization
1191
+ MailSafePro.configure do |config|
1192
+ # Configure Bearer authorization (JWT): Bearer
1193
+ config.access_token = 'YOUR_BEARER_TOKEN'
1194
+ end
1195
+
1196
+ api_instance = MailSafePro::APIKeysApi.new
1197
+
1198
+ begin
1199
+ # Sync Plan Keys
1200
+ result = api_instance.sync_plan_keys_api_keys_sync_plan_keys_post_0
1201
+ p result
1202
+ rescue MailSafePro::ApiError => e
1203
+ puts "Error when calling APIKeysApi->sync_plan_keys_api_keys_sync_plan_keys_post_0: #{e}"
1204
+ end
1205
+ ```
1206
+
1207
+ #### Using the sync_plan_keys_api_keys_sync_plan_keys_post_0_with_http_info variant
1208
+
1209
+ This returns an Array which contains the response data, status code and headers.
1210
+
1211
+ > <Array(Object, Integer, Hash)> sync_plan_keys_api_keys_sync_plan_keys_post_0_with_http_info
1212
+
1213
+ ```ruby
1214
+ begin
1215
+ # Sync Plan Keys
1216
+ data, status_code, headers = api_instance.sync_plan_keys_api_keys_sync_plan_keys_post_0_with_http_info
1217
+ p status_code # => 2xx
1218
+ p headers # => { ... }
1219
+ p data # => Object
1220
+ rescue MailSafePro::ApiError => e
1221
+ puts "Error when calling APIKeysApi->sync_plan_keys_api_keys_sync_plan_keys_post_0_with_http_info: #{e}"
1222
+ end
1223
+ ```
1224
+
1225
+ ### Parameters
1226
+
1227
+ This endpoint does not need any parameter.
1228
+
1229
+ ### Return type
1230
+
1231
+ **Object**
1232
+
1233
+ ### Authorization
1234
+
1235
+ [Bearer](../README.md#Bearer)
1236
+
1237
+ ### HTTP request headers
1238
+
1239
+ - **Content-Type**: Not defined
1240
+ - **Accept**: application/json
1241
+