mailslurp_client 4.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +8 -0
  3. data/Gemfile.lock +79 -0
  4. data/LICENSE +22 -0
  5. data/README.md +126 -0
  6. data/Rakefile +10 -0
  7. data/docs/BasicAuthOptions.md +9 -0
  8. data/docs/BulkSendEmailOptions.md +9 -0
  9. data/docs/CommonOperationsApi.md +166 -0
  10. data/docs/CreateWebhookOptions.md +10 -0
  11. data/docs/Email.md +22 -0
  12. data/docs/EmailAnalysis.md +12 -0
  13. data/docs/EmailPreview.md +9 -0
  14. data/docs/ExtraOperationsApi.md +855 -0
  15. data/docs/Inbox.md +11 -0
  16. data/docs/SendEmailOptions.md +16 -0
  17. data/docs/Webhook.md +13 -0
  18. data/git_push.sh +55 -0
  19. data/lib/mailslurp_client.rb +50 -0
  20. data/lib/mailslurp_client/api/common_operations_api.rb +175 -0
  21. data/lib/mailslurp_client/api/extra_operations_api.rb +879 -0
  22. data/lib/mailslurp_client/api_client.rb +389 -0
  23. data/lib/mailslurp_client/api_error.rb +38 -0
  24. data/lib/mailslurp_client/configuration.rb +251 -0
  25. data/lib/mailslurp_client/models/basic_auth_options.rb +202 -0
  26. data/lib/mailslurp_client/models/bulk_send_email_options.rb +201 -0
  27. data/lib/mailslurp_client/models/create_webhook_options.rb +202 -0
  28. data/lib/mailslurp_client/models/email.rb +350 -0
  29. data/lib/mailslurp_client/models/email_analysis.rb +245 -0
  30. data/lib/mailslurp_client/models/email_preview.rb +203 -0
  31. data/lib/mailslurp_client/models/inbox.rb +212 -0
  32. data/lib/mailslurp_client/models/send_email_options.rb +275 -0
  33. data/lib/mailslurp_client/models/webhook.rb +242 -0
  34. data/lib/mailslurp_client/version.rb +15 -0
  35. data/mailslurp_client.gemspec +45 -0
  36. data/spec/api/common_operations_api_spec.rb +71 -0
  37. data/spec/api/extra_operations_api_spec.rb +231 -0
  38. data/spec/api_client_spec.rb +226 -0
  39. data/spec/configuration_spec.rb +42 -0
  40. data/spec/models/basic_auth_options_spec.rb +47 -0
  41. data/spec/models/bulk_send_email_options_spec.rb +47 -0
  42. data/spec/models/create_webhook_options_spec.rb +53 -0
  43. data/spec/models/email_analysis_spec.rb +65 -0
  44. data/spec/models/email_preview_spec.rb +47 -0
  45. data/spec/models/email_spec.rb +125 -0
  46. data/spec/models/inbox_spec.rb +59 -0
  47. data/spec/models/send_email_options_spec.rb +89 -0
  48. data/spec/models/webhook_spec.rb +71 -0
  49. data/spec/spec_helper.rb +111 -0
  50. metadata +287 -0
@@ -0,0 +1,10 @@
1
+ # MailSlurpClient::CreateWebhookOptions
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **basic_auth** | [**BasicAuthOptions**](BasicAuthOptions.md) | | [optional]
7
+ **url** | **String** | Public URL (including protocol) that MailSlurp can post WebhookNotificationObjects to when an email is received | [optional]
8
+ **name** | **String** | | [optional]
9
+
10
+
data/docs/Email.md ADDED
@@ -0,0 +1,22 @@
1
+ # MailSlurpClient::Email
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **analysis** | [**EmailAnalysis**](EmailAnalysis.md) | | [optional]
7
+ **attachments** | **Array<String>** | | [optional]
8
+ **bcc** | **Array<String>** | | [optional]
9
+ **body** | **String** | | [optional]
10
+ **cc** | **Array<String>** | | [optional]
11
+ **created_at** | **DateTime** | |
12
+ **from** | **String** | | [optional]
13
+ **headers** | **Hash<String, String>** | | [optional]
14
+ **id** | **String** | |
15
+ **inbox_id** | **String** | |
16
+ **raw_url** | **String** | | [optional]
17
+ **subject** | **String** | | [optional]
18
+ **to** | **Array<String>** | |
19
+ **updated_at** | **DateTime** | |
20
+ **user_id** | **String** | |
21
+
22
+
@@ -0,0 +1,12 @@
1
+ # MailSlurpClient::EmailAnalysis
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **dkim_verdict** | **String** | |
7
+ **dmarc_verdict** | **String** | |
8
+ **spam_verdict** | **String** | |
9
+ **spf_verdict** | **String** | |
10
+ **virus_verdict** | **String** | |
11
+
12
+
@@ -0,0 +1,9 @@
1
+ # MailSlurpClient::EmailPreview
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **created** | **DateTime** | |
7
+ **id** | **String** | |
8
+
9
+
@@ -0,0 +1,855 @@
1
+ # MailSlurpClient::ExtraOperationsApi
2
+
3
+ All URIs are relative to *https://api.mailslurp.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**bulk_create_inboxes**](ExtraOperationsApi.md#bulk_create_inboxes) | **POST** /bulk/inboxes | Bulk create Inboxes (email addresses)
8
+ [**bulk_delete_inboxes**](ExtraOperationsApi.md#bulk_delete_inboxes) | **DELETE** /bulk/inboxes | Bulk Delete Inboxes
9
+ [**bulk_send_emails**](ExtraOperationsApi.md#bulk_send_emails) | **POST** /bulk/send | Bulk Send Emails
10
+ [**create_inbox**](ExtraOperationsApi.md#create_inbox) | **POST** /inboxes | Create an Inbox (email address)
11
+ [**create_webhook**](ExtraOperationsApi.md#create_webhook) | **POST** /inboxes/{inboxId}/webhooks | Attach a WebHook URL to an inbox
12
+ [**delete_email**](ExtraOperationsApi.md#delete_email) | **DELETE** /emails/{emailId} | Delete Email
13
+ [**delete_inbox**](ExtraOperationsApi.md#delete_inbox) | **DELETE** /inboxes/{inboxId} | Delete Inbox / Email Address
14
+ [**delete_webhook**](ExtraOperationsApi.md#delete_webhook) | **DELETE** /inboxes/{inboxId}/webhooks/{webhookId} | Delete and disable a WebHook for an Inbox
15
+ [**download_attachment**](ExtraOperationsApi.md#download_attachment) | **GET** /emails/{emailId}/attachments/{attachmentId} | Get email attachment
16
+ [**get_email**](ExtraOperationsApi.md#get_email) | **GET** /emails/{emailId} | Get Email Content
17
+ [**get_emails**](ExtraOperationsApi.md#get_emails) | **GET** /inboxes/{inboxId}/emails | List Emails in an Inbox / EmailAddress
18
+ [**get_inbox**](ExtraOperationsApi.md#get_inbox) | **GET** /inboxes/{inboxId} | Get Inbox / EmailAddress
19
+ [**get_inboxes**](ExtraOperationsApi.md#get_inboxes) | **GET** /inboxes | List Inboxes / Email Addresses
20
+ [**get_raw_email_contents**](ExtraOperationsApi.md#get_raw_email_contents) | **GET** /emails/{emailId}/raw | Get Raw Email Content
21
+ [**get_webhooks**](ExtraOperationsApi.md#get_webhooks) | **GET** /inboxes/{inboxId}/webhooks | Get all WebHooks for an Inbox
22
+ [**send_email**](ExtraOperationsApi.md#send_email) | **POST** /inboxes/{inboxId} | Send Email
23
+
24
+
25
+ # **bulk_create_inboxes**
26
+ > Array<Inbox> bulk_create_inboxes(count)
27
+
28
+ Bulk create Inboxes (email addresses)
29
+
30
+ Enterprise Plan Required
31
+
32
+ ### Example
33
+ ```ruby
34
+ # load the gem
35
+ require 'mailslurp_client'
36
+ # setup authorization
37
+ MailSlurpClient.configure do |config|
38
+ # Configure API key authorization: API_KEY
39
+ config.api_key['x-api-key'] = 'YOUR API KEY'
40
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
41
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
42
+ end
43
+
44
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
45
+ count = 56 # Integer | Number of inboxes to be created in bulk
46
+
47
+ begin
48
+ #Bulk create Inboxes (email addresses)
49
+ result = api_instance.bulk_create_inboxes(count)
50
+ p result
51
+ rescue MailSlurpClient::ApiError => e
52
+ puts "Exception when calling ExtraOperationsApi->bulk_create_inboxes: #{e}"
53
+ end
54
+ ```
55
+
56
+ ### Parameters
57
+
58
+ Name | Type | Description | Notes
59
+ ------------- | ------------- | ------------- | -------------
60
+ **count** | **Integer**| Number of inboxes to be created in bulk |
61
+
62
+ ### Return type
63
+
64
+ [**Array<Inbox>**](Inbox.md)
65
+
66
+ ### Authorization
67
+
68
+ [API_KEY](../README.md#API_KEY)
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: Not defined
73
+ - **Accept**: application/json
74
+
75
+
76
+
77
+ # **bulk_delete_inboxes**
78
+ > bulk_delete_inboxes(request_body)
79
+
80
+ Bulk Delete Inboxes
81
+
82
+ Enterprise Plan Required
83
+
84
+ ### Example
85
+ ```ruby
86
+ # load the gem
87
+ require 'mailslurp_client'
88
+ # setup authorization
89
+ MailSlurpClient.configure do |config|
90
+ # Configure API key authorization: API_KEY
91
+ config.api_key['x-api-key'] = 'YOUR API KEY'
92
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
93
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
94
+ end
95
+
96
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
97
+ request_body = nil # Array<String> | ids
98
+
99
+ begin
100
+ #Bulk Delete Inboxes
101
+ api_instance.bulk_delete_inboxes(request_body)
102
+ rescue MailSlurpClient::ApiError => e
103
+ puts "Exception when calling ExtraOperationsApi->bulk_delete_inboxes: #{e}"
104
+ end
105
+ ```
106
+
107
+ ### Parameters
108
+
109
+ Name | Type | Description | Notes
110
+ ------------- | ------------- | ------------- | -------------
111
+ **request_body** | [**Array&lt;String&gt;**](Array.md)| ids |
112
+
113
+ ### Return type
114
+
115
+ nil (empty response body)
116
+
117
+ ### Authorization
118
+
119
+ [API_KEY](../README.md#API_KEY)
120
+
121
+ ### HTTP request headers
122
+
123
+ - **Content-Type**: application/json
124
+ - **Accept**: Not defined
125
+
126
+
127
+
128
+ # **bulk_send_emails**
129
+ > bulk_send_emails(bulk_send_email_options)
130
+
131
+ Bulk Send Emails
132
+
133
+ Enterprise Plan Required
134
+
135
+ ### Example
136
+ ```ruby
137
+ # load the gem
138
+ require 'mailslurp_client'
139
+ # setup authorization
140
+ MailSlurpClient.configure do |config|
141
+ # Configure API key authorization: API_KEY
142
+ config.api_key['x-api-key'] = 'YOUR API KEY'
143
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
144
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
145
+ end
146
+
147
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
148
+ bulk_send_email_options = MailSlurpClient::BulkSendEmailOptions.new # BulkSendEmailOptions | bulkSendEmailOptions
149
+
150
+ begin
151
+ #Bulk Send Emails
152
+ api_instance.bulk_send_emails(bulk_send_email_options)
153
+ rescue MailSlurpClient::ApiError => e
154
+ puts "Exception when calling ExtraOperationsApi->bulk_send_emails: #{e}"
155
+ end
156
+ ```
157
+
158
+ ### Parameters
159
+
160
+ Name | Type | Description | Notes
161
+ ------------- | ------------- | ------------- | -------------
162
+ **bulk_send_email_options** | [**BulkSendEmailOptions**](BulkSendEmailOptions.md)| bulkSendEmailOptions |
163
+
164
+ ### Return type
165
+
166
+ nil (empty response body)
167
+
168
+ ### Authorization
169
+
170
+ [API_KEY](../README.md#API_KEY)
171
+
172
+ ### HTTP request headers
173
+
174
+ - **Content-Type**: application/json
175
+ - **Accept**: Not defined
176
+
177
+
178
+
179
+ # **create_inbox**
180
+ > Inbox create_inbox
181
+
182
+ Create an Inbox (email address)
183
+
184
+ Create a new inbox and ephemeral email address to send and receive from. This is a necessary step before sending or receiving emails. The response contains the inbox's ID and its associated email address. It is recommended that you create a new inbox during each test method so that it is unique and empty
185
+
186
+ ### Example
187
+ ```ruby
188
+ # load the gem
189
+ require 'mailslurp_client'
190
+ # setup authorization
191
+ MailSlurpClient.configure do |config|
192
+ # Configure API key authorization: API_KEY
193
+ config.api_key['x-api-key'] = 'YOUR API KEY'
194
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
195
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
196
+ end
197
+
198
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
199
+
200
+ begin
201
+ #Create an Inbox (email address)
202
+ result = api_instance.create_inbox
203
+ p result
204
+ rescue MailSlurpClient::ApiError => e
205
+ puts "Exception when calling ExtraOperationsApi->create_inbox: #{e}"
206
+ end
207
+ ```
208
+
209
+ ### Parameters
210
+ This endpoint does not need any parameter.
211
+
212
+ ### Return type
213
+
214
+ [**Inbox**](Inbox.md)
215
+
216
+ ### Authorization
217
+
218
+ [API_KEY](../README.md#API_KEY)
219
+
220
+ ### HTTP request headers
221
+
222
+ - **Content-Type**: Not defined
223
+ - **Accept**: application/json
224
+
225
+
226
+
227
+ # **create_webhook**
228
+ > Webhook create_webhook(inbox_id, create_webhook_options)
229
+
230
+ Attach a WebHook URL to an inbox
231
+
232
+ Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
233
+
234
+ ### Example
235
+ ```ruby
236
+ # load the gem
237
+ require 'mailslurp_client'
238
+ # setup authorization
239
+ MailSlurpClient.configure do |config|
240
+ # Configure API key authorization: API_KEY
241
+ config.api_key['x-api-key'] = 'YOUR API KEY'
242
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
243
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
244
+ end
245
+
246
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
247
+ inbox_id = 'inbox_id_example' # String | inboxId
248
+ create_webhook_options = MailSlurpClient::CreateWebhookOptions.new # CreateWebhookOptions | options
249
+
250
+ begin
251
+ #Attach a WebHook URL to an inbox
252
+ result = api_instance.create_webhook(inbox_id, create_webhook_options)
253
+ p result
254
+ rescue MailSlurpClient::ApiError => e
255
+ puts "Exception when calling ExtraOperationsApi->create_webhook: #{e}"
256
+ end
257
+ ```
258
+
259
+ ### Parameters
260
+
261
+ Name | Type | Description | Notes
262
+ ------------- | ------------- | ------------- | -------------
263
+ **inbox_id** | [**String**](.md)| inboxId |
264
+ **create_webhook_options** | [**CreateWebhookOptions**](CreateWebhookOptions.md)| options |
265
+
266
+ ### Return type
267
+
268
+ [**Webhook**](Webhook.md)
269
+
270
+ ### Authorization
271
+
272
+ [API_KEY](../README.md#API_KEY)
273
+
274
+ ### HTTP request headers
275
+
276
+ - **Content-Type**: application/json
277
+ - **Accept**: application/json
278
+
279
+
280
+
281
+ # **delete_email**
282
+ > delete_email(email_id)
283
+
284
+ Delete Email
285
+
286
+ Deletes an email and removes it from the inbox
287
+
288
+ ### Example
289
+ ```ruby
290
+ # load the gem
291
+ require 'mailslurp_client'
292
+ # setup authorization
293
+ MailSlurpClient.configure do |config|
294
+ # Configure API key authorization: API_KEY
295
+ config.api_key['x-api-key'] = 'YOUR API KEY'
296
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
297
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
298
+ end
299
+
300
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
301
+ email_id = 'email_id_example' # String | emailId
302
+
303
+ begin
304
+ #Delete Email
305
+ api_instance.delete_email(email_id)
306
+ rescue MailSlurpClient::ApiError => e
307
+ puts "Exception when calling ExtraOperationsApi->delete_email: #{e}"
308
+ end
309
+ ```
310
+
311
+ ### Parameters
312
+
313
+ Name | Type | Description | Notes
314
+ ------------- | ------------- | ------------- | -------------
315
+ **email_id** | [**String**](.md)| emailId |
316
+
317
+ ### Return type
318
+
319
+ nil (empty response body)
320
+
321
+ ### Authorization
322
+
323
+ [API_KEY](../README.md#API_KEY)
324
+
325
+ ### HTTP request headers
326
+
327
+ - **Content-Type**: Not defined
328
+ - **Accept**: Not defined
329
+
330
+
331
+
332
+ # **delete_inbox**
333
+ > delete_inbox(inbox_id)
334
+
335
+ Delete Inbox / Email Address
336
+
337
+ Permanently delete an inbox and associated email address
338
+
339
+ ### Example
340
+ ```ruby
341
+ # load the gem
342
+ require 'mailslurp_client'
343
+ # setup authorization
344
+ MailSlurpClient.configure do |config|
345
+ # Configure API key authorization: API_KEY
346
+ config.api_key['x-api-key'] = 'YOUR API KEY'
347
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
348
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
349
+ end
350
+
351
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
352
+ inbox_id = 'inbox_id_example' # String | inboxId
353
+
354
+ begin
355
+ #Delete Inbox / Email Address
356
+ api_instance.delete_inbox(inbox_id)
357
+ rescue MailSlurpClient::ApiError => e
358
+ puts "Exception when calling ExtraOperationsApi->delete_inbox: #{e}"
359
+ end
360
+ ```
361
+
362
+ ### Parameters
363
+
364
+ Name | Type | Description | Notes
365
+ ------------- | ------------- | ------------- | -------------
366
+ **inbox_id** | [**String**](.md)| inboxId |
367
+
368
+ ### Return type
369
+
370
+ nil (empty response body)
371
+
372
+ ### Authorization
373
+
374
+ [API_KEY](../README.md#API_KEY)
375
+
376
+ ### HTTP request headers
377
+
378
+ - **Content-Type**: Not defined
379
+ - **Accept**: Not defined
380
+
381
+
382
+
383
+ # **delete_webhook**
384
+ > delete_webhook(inbox_id, webhook_id)
385
+
386
+ Delete and disable a WebHook for an Inbox
387
+
388
+ ### Example
389
+ ```ruby
390
+ # load the gem
391
+ require 'mailslurp_client'
392
+ # setup authorization
393
+ MailSlurpClient.configure do |config|
394
+ # Configure API key authorization: API_KEY
395
+ config.api_key['x-api-key'] = 'YOUR API KEY'
396
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
397
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
398
+ end
399
+
400
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
401
+ inbox_id = 'inbox_id_example' # String | inboxId
402
+ webhook_id = 'webhook_id_example' # String | webhookId
403
+
404
+ begin
405
+ #Delete and disable a WebHook for an Inbox
406
+ api_instance.delete_webhook(inbox_id, webhook_id)
407
+ rescue MailSlurpClient::ApiError => e
408
+ puts "Exception when calling ExtraOperationsApi->delete_webhook: #{e}"
409
+ end
410
+ ```
411
+
412
+ ### Parameters
413
+
414
+ Name | Type | Description | Notes
415
+ ------------- | ------------- | ------------- | -------------
416
+ **inbox_id** | [**String**](.md)| inboxId |
417
+ **webhook_id** | [**String**](.md)| webhookId |
418
+
419
+ ### Return type
420
+
421
+ nil (empty response body)
422
+
423
+ ### Authorization
424
+
425
+ [API_KEY](../README.md#API_KEY)
426
+
427
+ ### HTTP request headers
428
+
429
+ - **Content-Type**: Not defined
430
+ - **Accept**: Not defined
431
+
432
+
433
+
434
+ # **download_attachment**
435
+ > download_attachment(attachment_id, email_id)
436
+
437
+ Get email attachment
438
+
439
+ Returns the specified attachment for a given email as a byte stream (file download). Get the attachmentId from the email response. Requires enterprise account.
440
+
441
+ ### Example
442
+ ```ruby
443
+ # load the gem
444
+ require 'mailslurp_client'
445
+ # setup authorization
446
+ MailSlurpClient.configure do |config|
447
+ # Configure API key authorization: API_KEY
448
+ config.api_key['x-api-key'] = 'YOUR API KEY'
449
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
450
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
451
+ end
452
+
453
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
454
+ attachment_id = 'attachment_id_example' # String | attachmentId
455
+ email_id = 'email_id_example' # String | emailId
456
+
457
+ begin
458
+ #Get email attachment
459
+ api_instance.download_attachment(attachment_id, email_id)
460
+ rescue MailSlurpClient::ApiError => e
461
+ puts "Exception when calling ExtraOperationsApi->download_attachment: #{e}"
462
+ end
463
+ ```
464
+
465
+ ### Parameters
466
+
467
+ Name | Type | Description | Notes
468
+ ------------- | ------------- | ------------- | -------------
469
+ **attachment_id** | **String**| attachmentId |
470
+ **email_id** | [**String**](.md)| emailId |
471
+
472
+ ### Return type
473
+
474
+ nil (empty response body)
475
+
476
+ ### Authorization
477
+
478
+ [API_KEY](../README.md#API_KEY)
479
+
480
+ ### HTTP request headers
481
+
482
+ - **Content-Type**: Not defined
483
+ - **Accept**: Not defined
484
+
485
+
486
+
487
+ # **get_email**
488
+ > Email get_email(email_id)
489
+
490
+ Get Email Content
491
+
492
+ Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawMessage endpoint
493
+
494
+ ### Example
495
+ ```ruby
496
+ # load the gem
497
+ require 'mailslurp_client'
498
+ # setup authorization
499
+ MailSlurpClient.configure do |config|
500
+ # Configure API key authorization: API_KEY
501
+ config.api_key['x-api-key'] = 'YOUR API KEY'
502
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
503
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
504
+ end
505
+
506
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
507
+ email_id = 'email_id_example' # String | emailId
508
+
509
+ begin
510
+ #Get Email Content
511
+ result = api_instance.get_email(email_id)
512
+ p result
513
+ rescue MailSlurpClient::ApiError => e
514
+ puts "Exception when calling ExtraOperationsApi->get_email: #{e}"
515
+ end
516
+ ```
517
+
518
+ ### Parameters
519
+
520
+ Name | Type | Description | Notes
521
+ ------------- | ------------- | ------------- | -------------
522
+ **email_id** | [**String**](.md)| emailId |
523
+
524
+ ### Return type
525
+
526
+ [**Email**](Email.md)
527
+
528
+ ### Authorization
529
+
530
+ [API_KEY](../README.md#API_KEY)
531
+
532
+ ### HTTP request headers
533
+
534
+ - **Content-Type**: Not defined
535
+ - **Accept**: application/json
536
+
537
+
538
+
539
+ # **get_emails**
540
+ > Array&lt;EmailPreview&gt; get_emails(inbox_id, opts)
541
+
542
+ List Emails in an Inbox / EmailAddress
543
+
544
+ List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
545
+
546
+ ### Example
547
+ ```ruby
548
+ # load the gem
549
+ require 'mailslurp_client'
550
+ # setup authorization
551
+ MailSlurpClient.configure do |config|
552
+ # Configure API key authorization: API_KEY
553
+ config.api_key['x-api-key'] = 'YOUR API KEY'
554
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
555
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
556
+ end
557
+
558
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
559
+ inbox_id = 'inbox_id_example' # String | Id of inbox that emails belongs to
560
+ opts = {
561
+ limit: 56, # Integer | Limit the result set, ordered by descending received date time
562
+ min_count: 56, # Integer | Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
563
+ retry_timeout: 56, # Integer | Maximum milliseconds to spend retrying inbox database until minCount emails are returned
564
+ since: DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | Exclude emails received before this ISO 8601 date time
565
+ }
566
+
567
+ begin
568
+ #List Emails in an Inbox / EmailAddress
569
+ result = api_instance.get_emails(inbox_id, opts)
570
+ p result
571
+ rescue MailSlurpClient::ApiError => e
572
+ puts "Exception when calling ExtraOperationsApi->get_emails: #{e}"
573
+ end
574
+ ```
575
+
576
+ ### Parameters
577
+
578
+ Name | Type | Description | Notes
579
+ ------------- | ------------- | ------------- | -------------
580
+ **inbox_id** | [**String**](.md)| Id of inbox that emails belongs to |
581
+ **limit** | **Integer**| Limit the result set, ordered by descending received date time | [optional]
582
+ **min_count** | **Integer**| Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. | [optional]
583
+ **retry_timeout** | **Integer**| Maximum milliseconds to spend retrying inbox database until minCount emails are returned | [optional]
584
+ **since** | **DateTime**| Exclude emails received before this ISO 8601 date time | [optional]
585
+
586
+ ### Return type
587
+
588
+ [**Array&lt;EmailPreview&gt;**](EmailPreview.md)
589
+
590
+ ### Authorization
591
+
592
+ [API_KEY](../README.md#API_KEY)
593
+
594
+ ### HTTP request headers
595
+
596
+ - **Content-Type**: Not defined
597
+ - **Accept**: application/json
598
+
599
+
600
+
601
+ # **get_inbox**
602
+ > Inbox get_inbox(inbox_id)
603
+
604
+ Get Inbox / EmailAddress
605
+
606
+ Returns an inbox's properties, including its email address and ID.
607
+
608
+ ### Example
609
+ ```ruby
610
+ # load the gem
611
+ require 'mailslurp_client'
612
+ # setup authorization
613
+ MailSlurpClient.configure do |config|
614
+ # Configure API key authorization: API_KEY
615
+ config.api_key['x-api-key'] = 'YOUR API KEY'
616
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
617
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
618
+ end
619
+
620
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
621
+ inbox_id = 'inbox_id_example' # String | inboxId
622
+
623
+ begin
624
+ #Get Inbox / EmailAddress
625
+ result = api_instance.get_inbox(inbox_id)
626
+ p result
627
+ rescue MailSlurpClient::ApiError => e
628
+ puts "Exception when calling ExtraOperationsApi->get_inbox: #{e}"
629
+ end
630
+ ```
631
+
632
+ ### Parameters
633
+
634
+ Name | Type | Description | Notes
635
+ ------------- | ------------- | ------------- | -------------
636
+ **inbox_id** | [**String**](.md)| inboxId |
637
+
638
+ ### Return type
639
+
640
+ [**Inbox**](Inbox.md)
641
+
642
+ ### Authorization
643
+
644
+ [API_KEY](../README.md#API_KEY)
645
+
646
+ ### HTTP request headers
647
+
648
+ - **Content-Type**: Not defined
649
+ - **Accept**: application/json
650
+
651
+
652
+
653
+ # **get_inboxes**
654
+ > Array&lt;Inbox&gt; get_inboxes
655
+
656
+ List Inboxes / Email Addresses
657
+
658
+ List the inboxes you have created
659
+
660
+ ### Example
661
+ ```ruby
662
+ # load the gem
663
+ require 'mailslurp_client'
664
+ # setup authorization
665
+ MailSlurpClient.configure do |config|
666
+ # Configure API key authorization: API_KEY
667
+ config.api_key['x-api-key'] = 'YOUR API KEY'
668
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
669
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
670
+ end
671
+
672
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
673
+
674
+ begin
675
+ #List Inboxes / Email Addresses
676
+ result = api_instance.get_inboxes
677
+ p result
678
+ rescue MailSlurpClient::ApiError => e
679
+ puts "Exception when calling ExtraOperationsApi->get_inboxes: #{e}"
680
+ end
681
+ ```
682
+
683
+ ### Parameters
684
+ This endpoint does not need any parameter.
685
+
686
+ ### Return type
687
+
688
+ [**Array&lt;Inbox&gt;**](Inbox.md)
689
+
690
+ ### Authorization
691
+
692
+ [API_KEY](../README.md#API_KEY)
693
+
694
+ ### HTTP request headers
695
+
696
+ - **Content-Type**: Not defined
697
+ - **Accept**: application/json
698
+
699
+
700
+
701
+ # **get_raw_email_contents**
702
+ > String get_raw_email_contents(email_id)
703
+
704
+ Get Raw Email Content
705
+
706
+ Returns a raw, unparsed and unprocessed email
707
+
708
+ ### Example
709
+ ```ruby
710
+ # load the gem
711
+ require 'mailslurp_client'
712
+ # setup authorization
713
+ MailSlurpClient.configure do |config|
714
+ # Configure API key authorization: API_KEY
715
+ config.api_key['x-api-key'] = 'YOUR API KEY'
716
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
717
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
718
+ end
719
+
720
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
721
+ email_id = 'email_id_example' # String | emailId
722
+
723
+ begin
724
+ #Get Raw Email Content
725
+ result = api_instance.get_raw_email_contents(email_id)
726
+ p result
727
+ rescue MailSlurpClient::ApiError => e
728
+ puts "Exception when calling ExtraOperationsApi->get_raw_email_contents: #{e}"
729
+ end
730
+ ```
731
+
732
+ ### Parameters
733
+
734
+ Name | Type | Description | Notes
735
+ ------------- | ------------- | ------------- | -------------
736
+ **email_id** | [**String**](.md)| emailId |
737
+
738
+ ### Return type
739
+
740
+ **String**
741
+
742
+ ### Authorization
743
+
744
+ [API_KEY](../README.md#API_KEY)
745
+
746
+ ### HTTP request headers
747
+
748
+ - **Content-Type**: Not defined
749
+ - **Accept**: application/json
750
+
751
+
752
+
753
+ # **get_webhooks**
754
+ > Array&lt;Webhook&gt; get_webhooks(inbox_id)
755
+
756
+ Get all WebHooks for an Inbox
757
+
758
+ ### Example
759
+ ```ruby
760
+ # load the gem
761
+ require 'mailslurp_client'
762
+ # setup authorization
763
+ MailSlurpClient.configure do |config|
764
+ # Configure API key authorization: API_KEY
765
+ config.api_key['x-api-key'] = 'YOUR API KEY'
766
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
767
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
768
+ end
769
+
770
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
771
+ inbox_id = 'inbox_id_example' # String | inboxId
772
+
773
+ begin
774
+ #Get all WebHooks for an Inbox
775
+ result = api_instance.get_webhooks(inbox_id)
776
+ p result
777
+ rescue MailSlurpClient::ApiError => e
778
+ puts "Exception when calling ExtraOperationsApi->get_webhooks: #{e}"
779
+ end
780
+ ```
781
+
782
+ ### Parameters
783
+
784
+ Name | Type | Description | Notes
785
+ ------------- | ------------- | ------------- | -------------
786
+ **inbox_id** | [**String**](.md)| inboxId |
787
+
788
+ ### Return type
789
+
790
+ [**Array&lt;Webhook&gt;**](Webhook.md)
791
+
792
+ ### Authorization
793
+
794
+ [API_KEY](../README.md#API_KEY)
795
+
796
+ ### HTTP request headers
797
+
798
+ - **Content-Type**: Not defined
799
+ - **Accept**: application/json
800
+
801
+
802
+
803
+ # **send_email**
804
+ > send_email(inbox_id, send_email_options)
805
+
806
+ Send Email
807
+
808
+ Send an email from the inbox's email address. Specify the email recipients and contents in the request body. See the `SendEmailOptions` for more information. Note the `inboxId` refers to the inbox's id NOT its email address
809
+
810
+ ### Example
811
+ ```ruby
812
+ # load the gem
813
+ require 'mailslurp_client'
814
+ # setup authorization
815
+ MailSlurpClient.configure do |config|
816
+ # Configure API key authorization: API_KEY
817
+ config.api_key['x-api-key'] = 'YOUR API KEY'
818
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
819
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
820
+ end
821
+
822
+ api_instance = MailSlurpClient::ExtraOperationsApi.new
823
+ inbox_id = 'inbox_id_example' # String | inboxId
824
+ send_email_options = MailSlurpClient::SendEmailOptions.new # SendEmailOptions | sendEmailOptions
825
+
826
+ begin
827
+ #Send Email
828
+ api_instance.send_email(inbox_id, send_email_options)
829
+ rescue MailSlurpClient::ApiError => e
830
+ puts "Exception when calling ExtraOperationsApi->send_email: #{e}"
831
+ end
832
+ ```
833
+
834
+ ### Parameters
835
+
836
+ Name | Type | Description | Notes
837
+ ------------- | ------------- | ------------- | -------------
838
+ **inbox_id** | [**String**](.md)| inboxId |
839
+ **send_email_options** | [**SendEmailOptions**](SendEmailOptions.md)| sendEmailOptions |
840
+
841
+ ### Return type
842
+
843
+ nil (empty response body)
844
+
845
+ ### Authorization
846
+
847
+ [API_KEY](../README.md#API_KEY)
848
+
849
+ ### HTTP request headers
850
+
851
+ - **Content-Type**: application/json
852
+ - **Accept**: Not defined
853
+
854
+
855
+