mailslurp_client 5.0.0 → 7.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/README.md +127 -40
  4. data/docs/AttachmentControllerApi.md +124 -0
  5. data/docs/AttachmentMetaData.md +23 -0
  6. data/docs/BasicAuthOptions.md +10 -0
  7. data/docs/BulkActionsControllerApi.md +165 -0
  8. data/docs/BulkSendEmailOptions.md +11 -1
  9. data/docs/CommonActionsControllerApi.md +167 -0
  10. data/docs/ContactControllerApi.md +274 -0
  11. data/docs/ContactDto.md +31 -0
  12. data/docs/ContactProjection.md +27 -0
  13. data/docs/CreateContactOptions.md +31 -0
  14. data/docs/CreateDomainOptions.md +17 -0
  15. data/docs/CreateGroupOptions.md +19 -0
  16. data/docs/CreateTemplateOptions.md +19 -0
  17. data/docs/CreateWebhookOptions.md +13 -2
  18. data/docs/DomainControllerApi.md +223 -0
  19. data/docs/DomainDto.md +29 -0
  20. data/docs/DomainPreview.md +21 -0
  21. data/docs/Email.md +40 -15
  22. data/docs/EmailAnalysis.md +18 -5
  23. data/docs/EmailControllerApi.md +740 -0
  24. data/docs/EmailPreview.md +24 -6
  25. data/docs/EmailProjection.md +33 -0
  26. data/docs/ForwardEmailOptions.md +12 -0
  27. data/docs/GroupContactsDto.md +19 -0
  28. data/docs/GroupControllerApi.md +437 -0
  29. data/docs/GroupDto.md +23 -0
  30. data/docs/GroupProjection.md +23 -0
  31. data/docs/HTMLValidationResult.md +21 -0
  32. data/docs/Inbox.md +26 -4
  33. data/docs/InboxControllerApi.md +652 -0
  34. data/docs/InboxProjection.md +29 -0
  35. data/docs/JsonNode.md +59 -0
  36. data/docs/MatchOption.md +13 -2
  37. data/docs/MatchOptions.md +9 -0
  38. data/docs/PageContactProjection.md +37 -0
  39. data/docs/PageEmailPreview.md +37 -0
  40. data/docs/PageEmailProjection.md +37 -0
  41. data/docs/PageGroupProjection.md +37 -0
  42. data/docs/PageInboxProjection.md +37 -0
  43. data/docs/PageTemplateProjection.md +37 -0
  44. data/docs/PageWebhookProjection.md +37 -0
  45. data/docs/Pageable.md +27 -0
  46. data/docs/RawEmailJson.md +17 -0
  47. data/docs/SendEmailOptions.md +33 -6
  48. data/docs/SetInboxFavouritedOptions.md +17 -0
  49. data/docs/Sort.md +21 -0
  50. data/docs/TemplateControllerApi.md +274 -0
  51. data/docs/TemplateDto.md +25 -0
  52. data/docs/TemplateProjection.md +25 -0
  53. data/docs/TemplateVariable.md +19 -0
  54. data/docs/UnreadCount.md +17 -0
  55. data/docs/UpdateGroupContacts.md +17 -0
  56. data/docs/UpdateInboxOptions.md +25 -0
  57. data/docs/UploadAttachmentOptions.md +12 -1
  58. data/docs/ValidationDto.md +19 -0
  59. data/docs/ValidationMessage.md +19 -0
  60. data/docs/WaitForConditions.md +29 -0
  61. data/docs/WaitForControllerApi.md +317 -0
  62. data/docs/WebhookControllerApi.md +339 -0
  63. data/docs/WebhookDto.md +33 -0
  64. data/docs/WebhookProjection.md +27 -0
  65. data/docs/WebhookTestRequest.md +23 -0
  66. data/docs/WebhookTestResponse.md +19 -0
  67. data/docs/WebhookTestResult.md +21 -0
  68. data/git_push.sh +10 -7
  69. data/lib/mailslurp_client.rb +56 -7
  70. data/lib/mailslurp_client/api/attachment_controller_api.rb +157 -0
  71. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +203 -0
  72. data/lib/mailslurp_client/api/common_actions_controller_api.rb +201 -0
  73. data/lib/mailslurp_client/api/contact_controller_api.rb +323 -0
  74. data/lib/mailslurp_client/api/domain_controller_api.rb +264 -0
  75. data/lib/mailslurp_client/api/email_controller_api.rb +852 -0
  76. data/lib/mailslurp_client/api/group_controller_api.rb +519 -0
  77. data/lib/mailslurp_client/api/inbox_controller_api.rb +763 -0
  78. data/lib/mailslurp_client/api/template_controller_api.rb +323 -0
  79. data/lib/mailslurp_client/api/wait_for_controller_api.rb +359 -0
  80. data/lib/mailslurp_client/api/webhook_controller_api.rb +405 -0
  81. data/lib/mailslurp_client/api_client.rb +36 -39
  82. data/lib/mailslurp_client/api_error.rb +23 -4
  83. data/lib/mailslurp_client/configuration.rb +8 -11
  84. data/lib/mailslurp_client/models/attachment_meta_data.rb +253 -0
  85. data/lib/mailslurp_client/models/basic_auth_options.rb +39 -15
  86. data/lib/mailslurp_client/models/bulk_send_email_options.rb +42 -19
  87. data/lib/mailslurp_client/models/contact_dto.rb +288 -0
  88. data/lib/mailslurp_client/models/contact_projection.rb +261 -0
  89. data/lib/mailslurp_client/models/create_contact_options.rb +277 -0
  90. data/lib/mailslurp_client/models/create_domain_options.rb +208 -0
  91. data/lib/mailslurp_client/models/create_group_options.rb +220 -0
  92. data/lib/mailslurp_client/models/create_template_options.rb +225 -0
  93. data/lib/mailslurp_client/models/create_webhook_options.rb +54 -29
  94. data/lib/mailslurp_client/models/domain_dto.rb +296 -0
  95. data/lib/mailslurp_client/models/domain_preview.rb +240 -0
  96. data/lib/mailslurp_client/models/email.rb +86 -78
  97. data/lib/mailslurp_client/models/email_analysis.rb +46 -48
  98. data/lib/mailslurp_client/models/email_preview.rb +77 -41
  99. data/lib/mailslurp_client/models/email_projection.rb +306 -0
  100. data/lib/mailslurp_client/models/forward_email_options.rb +40 -17
  101. data/lib/mailslurp_client/models/group_contacts_dto.rb +227 -0
  102. data/lib/mailslurp_client/models/{webhook.rb → group_dto.rb} +60 -54
  103. data/lib/mailslurp_client/models/group_projection.rb +248 -0
  104. data/lib/mailslurp_client/models/html_validation_result.rb +243 -0
  105. data/lib/mailslurp_client/models/inbox.rb +104 -26
  106. data/lib/mailslurp_client/models/inbox_projection.rb +272 -0
  107. data/lib/mailslurp_client/models/json_node.rb +429 -0
  108. data/lib/mailslurp_client/models/match_option.rb +48 -24
  109. data/lib/mailslurp_client/models/match_options.rb +37 -14
  110. data/lib/mailslurp_client/models/page_contact_projection.rb +298 -0
  111. data/lib/mailslurp_client/models/page_email_preview.rb +298 -0
  112. data/lib/mailslurp_client/models/page_email_projection.rb +298 -0
  113. data/lib/mailslurp_client/models/page_group_projection.rb +298 -0
  114. data/lib/mailslurp_client/models/page_inbox_projection.rb +298 -0
  115. data/lib/mailslurp_client/models/page_template_projection.rb +298 -0
  116. data/lib/mailslurp_client/models/page_webhook_projection.rb +298 -0
  117. data/lib/mailslurp_client/models/pageable.rb +251 -0
  118. data/lib/mailslurp_client/models/raw_email_json.rb +211 -0
  119. data/lib/mailslurp_client/models/send_email_options.rb +141 -46
  120. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +208 -0
  121. data/lib/mailslurp_client/models/sort.rb +224 -0
  122. data/lib/mailslurp_client/models/template_dto.rb +269 -0
  123. data/lib/mailslurp_client/models/template_projection.rb +269 -0
  124. data/lib/mailslurp_client/models/template_variable.rb +259 -0
  125. data/lib/mailslurp_client/models/unread_count.rb +211 -0
  126. data/lib/mailslurp_client/models/update_group_contacts.rb +213 -0
  127. data/lib/mailslurp_client/models/update_inbox_options.rb +250 -0
  128. data/lib/mailslurp_client/models/upload_attachment_options.rb +43 -20
  129. data/lib/mailslurp_client/models/validation_dto.rb +225 -0
  130. data/lib/mailslurp_client/models/validation_message.rb +220 -0
  131. data/lib/mailslurp_client/models/wait_for_conditions.rb +315 -0
  132. data/lib/mailslurp_client/models/webhook_dto.rb +326 -0
  133. data/lib/mailslurp_client/models/webhook_projection.rb +277 -0
  134. data/lib/mailslurp_client/models/webhook_test_request.rb +284 -0
  135. data/lib/mailslurp_client/models/webhook_test_response.rb +215 -0
  136. data/lib/mailslurp_client/models/webhook_test_result.rb +235 -0
  137. data/lib/mailslurp_client/version.rb +5 -5
  138. data/mailslurp_client.gemspec +4 -10
  139. data/spec/api/attachment_controller_api_spec.rb +61 -0
  140. data/spec/api/bulk_actions_controller_api_spec.rb +68 -0
  141. data/spec/api/common_actions_controller_api_spec.rb +129 -0
  142. data/spec/api/contact_controller_api_spec.rb +91 -0
  143. data/spec/api/domain_controller_api_spec.rb +82 -0
  144. data/spec/api/email_controller_api_spec.rb +162 -0
  145. data/spec/api/group_controller_api_spec.rb +126 -0
  146. data/spec/api/inbox_controller_api_spec.rb +172 -0
  147. data/spec/api/template_controller_api_spec.rb +91 -0
  148. data/spec/api/wait_for_controller_api_spec.rb +107 -0
  149. data/spec/api/webhook_controller_api_spec.rb +107 -0
  150. data/spec/api_client_spec.rb +5 -5
  151. data/spec/configuration_spec.rb +4 -4
  152. data/spec/models/attachment_meta_data_spec.rb +59 -0
  153. data/spec/models/basic_auth_options_spec.rb +4 -4
  154. data/spec/models/bulk_send_email_options_spec.rb +4 -4
  155. data/spec/models/contact_dto_spec.rb +83 -0
  156. data/spec/models/contact_projection_spec.rb +71 -0
  157. data/spec/models/create_contact_options_spec.rb +83 -0
  158. data/spec/models/create_domain_options_spec.rb +41 -0
  159. data/spec/models/create_group_options_spec.rb +47 -0
  160. data/spec/models/create_template_options_spec.rb +47 -0
  161. data/spec/models/create_webhook_options_spec.rb +6 -6
  162. data/spec/models/domain_dto_spec.rb +77 -0
  163. data/spec/models/domain_preview_spec.rb +53 -0
  164. data/spec/models/email_analysis_spec.rb +4 -4
  165. data/spec/models/email_preview_spec.rb +41 -5
  166. data/spec/models/email_projection_spec.rb +89 -0
  167. data/spec/models/email_spec.rb +17 -5
  168. data/spec/models/forward_email_options_spec.rb +4 -4
  169. data/spec/models/group_contacts_dto_spec.rb +47 -0
  170. data/spec/models/group_dto_spec.rb +59 -0
  171. data/spec/models/group_projection_spec.rb +59 -0
  172. data/spec/models/html_validation_result_spec.rb +53 -0
  173. data/spec/models/inbox_projection_spec.rb +77 -0
  174. data/spec/models/inbox_spec.rb +35 -5
  175. data/spec/models/json_node_spec.rb +171 -0
  176. data/spec/models/match_option_spec.rb +4 -4
  177. data/spec/models/match_options_spec.rb +4 -4
  178. data/spec/models/page_contact_projection_spec.rb +101 -0
  179. data/spec/models/page_email_preview_spec.rb +101 -0
  180. data/spec/models/page_email_projection_spec.rb +101 -0
  181. data/spec/models/page_group_projection_spec.rb +101 -0
  182. data/spec/models/page_inbox_projection_spec.rb +101 -0
  183. data/spec/models/page_template_projection_spec.rb +101 -0
  184. data/spec/models/page_webhook_projection_spec.rb +101 -0
  185. data/spec/models/pageable_spec.rb +71 -0
  186. data/spec/models/raw_email_json_spec.rb +41 -0
  187. data/spec/models/send_email_options_spec.rb +45 -5
  188. data/spec/models/set_inbox_favourited_options_spec.rb +41 -0
  189. data/spec/models/sort_spec.rb +53 -0
  190. data/spec/models/template_dto_spec.rb +65 -0
  191. data/spec/models/template_projection_spec.rb +65 -0
  192. data/spec/models/template_variable_spec.rb +51 -0
  193. data/spec/models/unread_count_spec.rb +41 -0
  194. data/spec/models/update_group_contacts_spec.rb +41 -0
  195. data/spec/models/{webhook_spec.rb → update_inbox_options_spec.rb} +14 -20
  196. data/spec/models/upload_attachment_options_spec.rb +4 -4
  197. data/spec/models/validation_dto_spec.rb +47 -0
  198. data/spec/models/validation_message_spec.rb +47 -0
  199. data/spec/models/wait_for_conditions_spec.rb +85 -0
  200. data/spec/models/webhook_dto_spec.rb +93 -0
  201. data/spec/models/webhook_projection_spec.rb +71 -0
  202. data/spec/models/webhook_test_request_spec.rb +63 -0
  203. data/spec/models/webhook_test_response_spec.rb +47 -0
  204. data/spec/models/webhook_test_result_spec.rb +53 -0
  205. data/spec/spec_helper.rb +4 -4
  206. metadata +223 -149
  207. data/Gemfile.lock +0 -79
  208. data/docs/CommonOperationsApi.md +0 -499
  209. data/docs/ExtraOperationsApi.md +0 -1021
  210. data/docs/Webhook.md +0 -13
  211. data/lib/mailslurp_client/api/common_operations_api.rb +0 -502
  212. data/lib/mailslurp_client/api/extra_operations_api.rb +0 -1054
  213. data/spec/api/common_operations_api_spec.rb +0 -95
  214. data/spec/api/extra_operations_api_spec.rb +0 -231
data/docs/Email.md CHANGED
@@ -1,24 +1,49 @@
1
1
  # MailSlurpClient::Email
2
2
 
3
3
  ## Properties
4
+
4
5
  Name | Type | Description | Notes
5
6
  ------------ | ------------- | ------------- | -------------
6
7
  **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
- **charset** | **String** | | [optional]
12
- **created_at** | **DateTime** | |
13
- **from** | **String** | | [optional]
8
+ **attachments** | **Array<String>** | List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. | [optional]
9
+ **bcc** | **Array<String>** | List of `BCC` recipients email was addressed to | [optional]
10
+ **body** | **String** | The body of the email message | [optional]
11
+ **cc** | **Array<String>** | List of `CC` recipients email was addressed to | [optional]
12
+ **charset** | **String** | Detected character set of the email body such as UTF-8 | [optional]
13
+ **created_at** | **DateTime** | When was the email received by MailSlurp | [optional]
14
+ **from** | **String** | Who the email was sent from | [optional]
14
15
  **headers** | **Hash<String, String>** | | [optional]
15
- **html** | **BOOLEAN** | | [optional]
16
- **id** | **String** | |
17
- **inbox_id** | **String** | |
18
- **raw_url** | **String** | | [optional]
19
- **subject** | **String** | | [optional]
20
- **to** | **Array<String>** | |
21
- **updated_at** | **DateTime** | |
22
- **user_id** | **String** | |
16
+ **id** | **String** | ID of the email | [optional]
17
+ **inbox_id** | **String** | ID of the inbox that received the email | [optional]
18
+ **is_html** | **Boolean** | Was HTML sent in the email body | [optional]
19
+ **read** | **Boolean** | Has the email been viewed ever | [optional]
20
+ **subject** | **String** | The subject line of the email message | [optional]
21
+ **to** | **Array<String>** | List of `To` recipients email was addressed to | [optional]
22
+ **updated_at** | **DateTime** | When was the email last updated | [optional]
23
+ **user_id** | **String** | ID of user that email belongs | [optional]
24
+
25
+ ## Code Sample
26
+
27
+ ```ruby
28
+ require 'MailSlurpClient'
29
+
30
+ instance = MailSlurpClient::Email.new(analysis: null,
31
+ attachments: null,
32
+ bcc: null,
33
+ body: null,
34
+ cc: null,
35
+ charset: null,
36
+ created_at: null,
37
+ from: null,
38
+ headers: null,
39
+ id: null,
40
+ inbox_id: null,
41
+ is_html: null,
42
+ read: null,
43
+ subject: null,
44
+ to: null,
45
+ updated_at: null,
46
+ user_id: null)
47
+ ```
23
48
 
24
49
 
@@ -1,12 +1,25 @@
1
1
  # MailSlurpClient::EmailAnalysis
2
2
 
3
3
  ## Properties
4
+
4
5
  Name | Type | Description | Notes
5
6
  ------------ | ------------- | ------------- | -------------
6
- **dkim_verdict** | **String** | |
7
- **dmarc_verdict** | **String** | |
8
- **spam_verdict** | **String** | |
9
- **spf_verdict** | **String** | |
10
- **virus_verdict** | **String** | |
7
+ **dkim_verdict** | **String** | | [optional]
8
+ **dmarc_verdict** | **String** | | [optional]
9
+ **spam_verdict** | **String** | | [optional]
10
+ **spf_verdict** | **String** | | [optional]
11
+ **virus_verdict** | **String** | | [optional]
12
+
13
+ ## Code Sample
14
+
15
+ ```ruby
16
+ require 'MailSlurpClient'
17
+
18
+ instance = MailSlurpClient::EmailAnalysis.new(dkim_verdict: null,
19
+ dmarc_verdict: null,
20
+ spam_verdict: null,
21
+ spf_verdict: null,
22
+ virus_verdict: null)
23
+ ```
11
24
 
12
25
 
@@ -0,0 +1,740 @@
1
+ # MailSlurpClient::EmailControllerApi
2
+
3
+ All URIs are relative to *https://api.mailslurp.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**delete_all_emails**](EmailControllerApi.md#delete_all_emails) | **DELETE** /emails | Delete all emails
8
+ [**delete_email**](EmailControllerApi.md#delete_email) | **DELETE** /emails/{emailId} | Delete an email
9
+ [**download_attachment**](EmailControllerApi.md#download_attachment) | **GET** /emails/{emailId}/attachments/{attachmentId} | Get email attachment bytes
10
+ [**forward_email**](EmailControllerApi.md#forward_email) | **POST** /emails/{emailId}/forward | Forward email
11
+ [**get_attachment_meta_data**](EmailControllerApi.md#get_attachment_meta_data) | **GET** /emails/{emailId}/attachments/{attachmentId}/metadata | Get email attachment metadata
12
+ [**get_attachments**](EmailControllerApi.md#get_attachments) | **GET** /emails/{emailId}/attachments | Get all email attachment metadata
13
+ [**get_email**](EmailControllerApi.md#get_email) | **GET** /emails/{emailId} | Get email content
14
+ [**get_email_html**](EmailControllerApi.md#get_email_html) | **GET** /emails/{emailId}/html | Get email content as HTML
15
+ [**get_emails_paginated**](EmailControllerApi.md#get_emails_paginated) | **GET** /emails | Get all emails
16
+ [**get_raw_email_contents**](EmailControllerApi.md#get_raw_email_contents) | **GET** /emails/{emailId}/raw | Get raw email string
17
+ [**get_raw_email_json**](EmailControllerApi.md#get_raw_email_json) | **GET** /emails/{emailId}/raw/json | Get raw email in JSON
18
+ [**get_unread_email_count**](EmailControllerApi.md#get_unread_email_count) | **GET** /emails/unreadCount | Get unread email count
19
+ [**validate_email**](EmailControllerApi.md#validate_email) | **POST** /emails/{emailId}/validate | Validate email
20
+
21
+
22
+
23
+ ## delete_all_emails
24
+
25
+ > delete_all_emails
26
+
27
+ Delete all emails
28
+
29
+ Deletes all emails in your account. Be careful as emails cannot be recovered
30
+
31
+ ### Example
32
+
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::EmailControllerApi.new
45
+
46
+ begin
47
+ #Delete all emails
48
+ api_instance.delete_all_emails
49
+ rescue MailSlurpClient::ApiError => e
50
+ puts "Exception when calling EmailControllerApi->delete_all_emails: #{e}"
51
+ end
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+ This endpoint does not need any parameter.
57
+
58
+ ### Return type
59
+
60
+ nil (empty response body)
61
+
62
+ ### Authorization
63
+
64
+ [API_KEY](../README.md#API_KEY)
65
+
66
+ ### HTTP request headers
67
+
68
+ - **Content-Type**: Not defined
69
+ - **Accept**: Not defined
70
+
71
+
72
+ ## delete_email
73
+
74
+ > delete_email(email_id)
75
+
76
+ Delete an email
77
+
78
+ Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
79
+
80
+ ### Example
81
+
82
+ ```ruby
83
+ # load the gem
84
+ require 'mailslurp_client'
85
+ # setup authorization
86
+ MailSlurpClient.configure do |config|
87
+ # Configure API key authorization: API_KEY
88
+ config.api_key['x-api-key'] = 'YOUR API KEY'
89
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
90
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
91
+ end
92
+
93
+ api_instance = MailSlurpClient::EmailControllerApi.new
94
+ email_id = 'email_id_example' # String | emailId
95
+
96
+ begin
97
+ #Delete an email
98
+ api_instance.delete_email(email_id)
99
+ rescue MailSlurpClient::ApiError => e
100
+ puts "Exception when calling EmailControllerApi->delete_email: #{e}"
101
+ end
102
+ ```
103
+
104
+ ### Parameters
105
+
106
+
107
+ Name | Type | Description | Notes
108
+ ------------- | ------------- | ------------- | -------------
109
+ **email_id** | [**String**](.md)| emailId |
110
+
111
+ ### Return type
112
+
113
+ nil (empty response body)
114
+
115
+ ### Authorization
116
+
117
+ [API_KEY](../README.md#API_KEY)
118
+
119
+ ### HTTP request headers
120
+
121
+ - **Content-Type**: Not defined
122
+ - **Accept**: Not defined
123
+
124
+
125
+ ## download_attachment
126
+
127
+ > String download_attachment(attachment_id, email_id, opts)
128
+
129
+ Get email attachment bytes
130
+
131
+ Returns the specified attachment for a given email as a byte stream (file download). You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
132
+
133
+ ### Example
134
+
135
+ ```ruby
136
+ # load the gem
137
+ require 'mailslurp_client'
138
+ # setup authorization
139
+ MailSlurpClient.configure do |config|
140
+ # Configure API key authorization: API_KEY
141
+ config.api_key['x-api-key'] = 'YOUR API KEY'
142
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
143
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
144
+ end
145
+
146
+ api_instance = MailSlurpClient::EmailControllerApi.new
147
+ attachment_id = 'attachment_id_example' # String | attachmentId
148
+ email_id = 'email_id_example' # String | emailId
149
+ opts = {
150
+ api_key: 'api_key_example' # String | Can pass apiKey in url for this request if you wish to download the file in a browser
151
+ }
152
+
153
+ begin
154
+ #Get email attachment bytes
155
+ result = api_instance.download_attachment(attachment_id, email_id, opts)
156
+ p result
157
+ rescue MailSlurpClient::ApiError => e
158
+ puts "Exception when calling EmailControllerApi->download_attachment: #{e}"
159
+ end
160
+ ```
161
+
162
+ ### Parameters
163
+
164
+
165
+ Name | Type | Description | Notes
166
+ ------------- | ------------- | ------------- | -------------
167
+ **attachment_id** | **String**| attachmentId |
168
+ **email_id** | [**String**](.md)| emailId |
169
+ **api_key** | **String**| Can pass apiKey in url for this request if you wish to download the file in a browser | [optional]
170
+
171
+ ### Return type
172
+
173
+ **String**
174
+
175
+ ### Authorization
176
+
177
+ [API_KEY](../README.md#API_KEY)
178
+
179
+ ### HTTP request headers
180
+
181
+ - **Content-Type**: Not defined
182
+ - **Accept**: application/octet-stream
183
+
184
+
185
+ ## forward_email
186
+
187
+ > forward_email(email_id, forward_email_options)
188
+
189
+ Forward email
190
+
191
+ Forward an existing email to new recipients.
192
+
193
+ ### Example
194
+
195
+ ```ruby
196
+ # load the gem
197
+ require 'mailslurp_client'
198
+ # setup authorization
199
+ MailSlurpClient.configure do |config|
200
+ # Configure API key authorization: API_KEY
201
+ config.api_key['x-api-key'] = 'YOUR API KEY'
202
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
203
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
204
+ end
205
+
206
+ api_instance = MailSlurpClient::EmailControllerApi.new
207
+ email_id = 'email_id_example' # String | emailId
208
+ forward_email_options = MailSlurpClient::ForwardEmailOptions.new # ForwardEmailOptions | forwardEmailOptions
209
+
210
+ begin
211
+ #Forward email
212
+ api_instance.forward_email(email_id, forward_email_options)
213
+ rescue MailSlurpClient::ApiError => e
214
+ puts "Exception when calling EmailControllerApi->forward_email: #{e}"
215
+ end
216
+ ```
217
+
218
+ ### Parameters
219
+
220
+
221
+ Name | Type | Description | Notes
222
+ ------------- | ------------- | ------------- | -------------
223
+ **email_id** | [**String**](.md)| emailId |
224
+ **forward_email_options** | [**ForwardEmailOptions**](ForwardEmailOptions.md)| forwardEmailOptions |
225
+
226
+ ### Return type
227
+
228
+ nil (empty response body)
229
+
230
+ ### Authorization
231
+
232
+ [API_KEY](../README.md#API_KEY)
233
+
234
+ ### HTTP request headers
235
+
236
+ - **Content-Type**: application/json
237
+ - **Accept**: Not defined
238
+
239
+
240
+ ## get_attachment_meta_data
241
+
242
+ > AttachmentMetaData get_attachment_meta_data(attachment_id, email_id)
243
+
244
+ Get email attachment metadata
245
+
246
+ Returns the metadata such as name and content-type for a given attachment and email.
247
+
248
+ ### Example
249
+
250
+ ```ruby
251
+ # load the gem
252
+ require 'mailslurp_client'
253
+ # setup authorization
254
+ MailSlurpClient.configure do |config|
255
+ # Configure API key authorization: API_KEY
256
+ config.api_key['x-api-key'] = 'YOUR API KEY'
257
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
258
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
259
+ end
260
+
261
+ api_instance = MailSlurpClient::EmailControllerApi.new
262
+ attachment_id = 'attachment_id_example' # String | attachmentId
263
+ email_id = 'email_id_example' # String | emailId
264
+
265
+ begin
266
+ #Get email attachment metadata
267
+ result = api_instance.get_attachment_meta_data(attachment_id, email_id)
268
+ p result
269
+ rescue MailSlurpClient::ApiError => e
270
+ puts "Exception when calling EmailControllerApi->get_attachment_meta_data: #{e}"
271
+ end
272
+ ```
273
+
274
+ ### Parameters
275
+
276
+
277
+ Name | Type | Description | Notes
278
+ ------------- | ------------- | ------------- | -------------
279
+ **attachment_id** | **String**| attachmentId |
280
+ **email_id** | [**String**](.md)| emailId |
281
+
282
+ ### Return type
283
+
284
+ [**AttachmentMetaData**](AttachmentMetaData.md)
285
+
286
+ ### Authorization
287
+
288
+ [API_KEY](../README.md#API_KEY)
289
+
290
+ ### HTTP request headers
291
+
292
+ - **Content-Type**: Not defined
293
+ - **Accept**: application/json
294
+
295
+
296
+ ## get_attachments
297
+
298
+ > Array<AttachmentMetaData> get_attachments(email_id)
299
+
300
+ Get all email attachment metadata
301
+
302
+ Returns an array of attachment metadata such as name and content-type for a given email if present.
303
+
304
+ ### Example
305
+
306
+ ```ruby
307
+ # load the gem
308
+ require 'mailslurp_client'
309
+ # setup authorization
310
+ MailSlurpClient.configure do |config|
311
+ # Configure API key authorization: API_KEY
312
+ config.api_key['x-api-key'] = 'YOUR API KEY'
313
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
314
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
315
+ end
316
+
317
+ api_instance = MailSlurpClient::EmailControllerApi.new
318
+ email_id = 'email_id_example' # String | emailId
319
+
320
+ begin
321
+ #Get all email attachment metadata
322
+ result = api_instance.get_attachments(email_id)
323
+ p result
324
+ rescue MailSlurpClient::ApiError => e
325
+ puts "Exception when calling EmailControllerApi->get_attachments: #{e}"
326
+ end
327
+ ```
328
+
329
+ ### Parameters
330
+
331
+
332
+ Name | Type | Description | Notes
333
+ ------------- | ------------- | ------------- | -------------
334
+ **email_id** | [**String**](.md)| emailId |
335
+
336
+ ### Return type
337
+
338
+ [**Array<AttachmentMetaData>**](AttachmentMetaData.md)
339
+
340
+ ### Authorization
341
+
342
+ [API_KEY](../README.md#API_KEY)
343
+
344
+ ### HTTP request headers
345
+
346
+ - **Content-Type**: Not defined
347
+ - **Accept**: application/json
348
+
349
+
350
+ ## get_email
351
+
352
+ > Email get_email(email_id, opts)
353
+
354
+ Get email content
355
+
356
+ Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
357
+
358
+ ### Example
359
+
360
+ ```ruby
361
+ # load the gem
362
+ require 'mailslurp_client'
363
+ # setup authorization
364
+ MailSlurpClient.configure do |config|
365
+ # Configure API key authorization: API_KEY
366
+ config.api_key['x-api-key'] = 'YOUR API KEY'
367
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
368
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
369
+ end
370
+
371
+ api_instance = MailSlurpClient::EmailControllerApi.new
372
+ email_id = 'email_id_example' # String | emailId
373
+ opts = {
374
+ decode: false # Boolean | Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing
375
+ }
376
+
377
+ begin
378
+ #Get email content
379
+ result = api_instance.get_email(email_id, opts)
380
+ p result
381
+ rescue MailSlurpClient::ApiError => e
382
+ puts "Exception when calling EmailControllerApi->get_email: #{e}"
383
+ end
384
+ ```
385
+
386
+ ### Parameters
387
+
388
+
389
+ Name | Type | Description | Notes
390
+ ------------- | ------------- | ------------- | -------------
391
+ **email_id** | [**String**](.md)| emailId |
392
+ **decode** | **Boolean**| Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing | [optional] [default to false]
393
+
394
+ ### Return type
395
+
396
+ [**Email**](Email.md)
397
+
398
+ ### Authorization
399
+
400
+ [API_KEY](../README.md#API_KEY)
401
+
402
+ ### HTTP request headers
403
+
404
+ - **Content-Type**: Not defined
405
+ - **Accept**: application/json
406
+
407
+
408
+ ## get_email_html
409
+
410
+ > String get_email_html(email_id, opts)
411
+
412
+ Get email content as HTML
413
+
414
+ Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`
415
+
416
+ ### Example
417
+
418
+ ```ruby
419
+ # load the gem
420
+ require 'mailslurp_client'
421
+ # setup authorization
422
+ MailSlurpClient.configure do |config|
423
+ # Configure API key authorization: API_KEY
424
+ config.api_key['x-api-key'] = 'YOUR API KEY'
425
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
426
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
427
+ end
428
+
429
+ api_instance = MailSlurpClient::EmailControllerApi.new
430
+ email_id = 'email_id_example' # String | emailId
431
+ opts = {
432
+ decode: false # Boolean | decode
433
+ }
434
+
435
+ begin
436
+ #Get email content as HTML
437
+ result = api_instance.get_email_html(email_id, opts)
438
+ p result
439
+ rescue MailSlurpClient::ApiError => e
440
+ puts "Exception when calling EmailControllerApi->get_email_html: #{e}"
441
+ end
442
+ ```
443
+
444
+ ### Parameters
445
+
446
+
447
+ Name | Type | Description | Notes
448
+ ------------- | ------------- | ------------- | -------------
449
+ **email_id** | [**String**](.md)| emailId |
450
+ **decode** | **Boolean**| decode | [optional] [default to false]
451
+
452
+ ### Return type
453
+
454
+ **String**
455
+
456
+ ### Authorization
457
+
458
+ [API_KEY](../README.md#API_KEY)
459
+
460
+ ### HTTP request headers
461
+
462
+ - **Content-Type**: Not defined
463
+ - **Accept**: text/html
464
+
465
+
466
+ ## get_emails_paginated
467
+
468
+ > PageEmailProjection get_emails_paginated(opts)
469
+
470
+ Get all emails
471
+
472
+ By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
473
+
474
+ ### Example
475
+
476
+ ```ruby
477
+ # load the gem
478
+ require 'mailslurp_client'
479
+ # setup authorization
480
+ MailSlurpClient.configure do |config|
481
+ # Configure API key authorization: API_KEY
482
+ config.api_key['x-api-key'] = 'YOUR API KEY'
483
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
484
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
485
+ end
486
+
487
+ api_instance = MailSlurpClient::EmailControllerApi.new
488
+ opts = {
489
+ inbox_id: ['inbox_id_example'], # Array<String> | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
490
+ page: 0, # Integer | Optional page index in email list pagination
491
+ size: 20, # Integer | Optional page size in email list pagination
492
+ sort: 'ASC', # String | Optional createdAt sort direction ASC or DESC
493
+ unread_only: false # Boolean | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
494
+ }
495
+
496
+ begin
497
+ #Get all emails
498
+ result = api_instance.get_emails_paginated(opts)
499
+ p result
500
+ rescue MailSlurpClient::ApiError => e
501
+ puts "Exception when calling EmailControllerApi->get_emails_paginated: #{e}"
502
+ end
503
+ ```
504
+
505
+ ### Parameters
506
+
507
+
508
+ Name | Type | Description | Notes
509
+ ------------- | ------------- | ------------- | -------------
510
+ **inbox_id** | [**Array&lt;String&gt;**](String.md)| Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. | [optional]
511
+ **page** | **Integer**| Optional page index in email list pagination | [optional] [default to 0]
512
+ **size** | **Integer**| Optional page size in email list pagination | [optional] [default to 20]
513
+ **sort** | **String**| Optional createdAt sort direction ASC or DESC | [optional] [default to &#39;ASC&#39;]
514
+ **unread_only** | **Boolean**| Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly | [optional] [default to false]
515
+
516
+ ### Return type
517
+
518
+ [**PageEmailProjection**](PageEmailProjection.md)
519
+
520
+ ### Authorization
521
+
522
+ [API_KEY](../README.md#API_KEY)
523
+
524
+ ### HTTP request headers
525
+
526
+ - **Content-Type**: Not defined
527
+ - **Accept**: application/json
528
+
529
+
530
+ ## get_raw_email_contents
531
+
532
+ > String get_raw_email_contents(email_id)
533
+
534
+ Get raw email string
535
+
536
+ Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
537
+
538
+ ### Example
539
+
540
+ ```ruby
541
+ # load the gem
542
+ require 'mailslurp_client'
543
+ # setup authorization
544
+ MailSlurpClient.configure do |config|
545
+ # Configure API key authorization: API_KEY
546
+ config.api_key['x-api-key'] = 'YOUR API KEY'
547
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
548
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
549
+ end
550
+
551
+ api_instance = MailSlurpClient::EmailControllerApi.new
552
+ email_id = 'email_id_example' # String | emailId
553
+
554
+ begin
555
+ #Get raw email string
556
+ result = api_instance.get_raw_email_contents(email_id)
557
+ p result
558
+ rescue MailSlurpClient::ApiError => e
559
+ puts "Exception when calling EmailControllerApi->get_raw_email_contents: #{e}"
560
+ end
561
+ ```
562
+
563
+ ### Parameters
564
+
565
+
566
+ Name | Type | Description | Notes
567
+ ------------- | ------------- | ------------- | -------------
568
+ **email_id** | [**String**](.md)| emailId |
569
+
570
+ ### Return type
571
+
572
+ **String**
573
+
574
+ ### Authorization
575
+
576
+ [API_KEY](../README.md#API_KEY)
577
+
578
+ ### HTTP request headers
579
+
580
+ - **Content-Type**: Not defined
581
+ - **Accept**: text/plain
582
+
583
+
584
+ ## get_raw_email_json
585
+
586
+ > RawEmailJson get_raw_email_json(email_id)
587
+
588
+ Get raw email in JSON
589
+
590
+ Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response
591
+
592
+ ### Example
593
+
594
+ ```ruby
595
+ # load the gem
596
+ require 'mailslurp_client'
597
+ # setup authorization
598
+ MailSlurpClient.configure do |config|
599
+ # Configure API key authorization: API_KEY
600
+ config.api_key['x-api-key'] = 'YOUR API KEY'
601
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
602
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
603
+ end
604
+
605
+ api_instance = MailSlurpClient::EmailControllerApi.new
606
+ email_id = 'email_id_example' # String | emailId
607
+
608
+ begin
609
+ #Get raw email in JSON
610
+ result = api_instance.get_raw_email_json(email_id)
611
+ p result
612
+ rescue MailSlurpClient::ApiError => e
613
+ puts "Exception when calling EmailControllerApi->get_raw_email_json: #{e}"
614
+ end
615
+ ```
616
+
617
+ ### Parameters
618
+
619
+
620
+ Name | Type | Description | Notes
621
+ ------------- | ------------- | ------------- | -------------
622
+ **email_id** | [**String**](.md)| emailId |
623
+
624
+ ### Return type
625
+
626
+ [**RawEmailJson**](RawEmailJson.md)
627
+
628
+ ### Authorization
629
+
630
+ [API_KEY](../README.md#API_KEY)
631
+
632
+ ### HTTP request headers
633
+
634
+ - **Content-Type**: Not defined
635
+ - **Accept**: application/json
636
+
637
+
638
+ ## get_unread_email_count
639
+
640
+ > UnreadCount get_unread_email_count
641
+
642
+ Get unread email count
643
+
644
+ Get number of emails unread
645
+
646
+ ### Example
647
+
648
+ ```ruby
649
+ # load the gem
650
+ require 'mailslurp_client'
651
+ # setup authorization
652
+ MailSlurpClient.configure do |config|
653
+ # Configure API key authorization: API_KEY
654
+ config.api_key['x-api-key'] = 'YOUR API KEY'
655
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
656
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
657
+ end
658
+
659
+ api_instance = MailSlurpClient::EmailControllerApi.new
660
+
661
+ begin
662
+ #Get unread email count
663
+ result = api_instance.get_unread_email_count
664
+ p result
665
+ rescue MailSlurpClient::ApiError => e
666
+ puts "Exception when calling EmailControllerApi->get_unread_email_count: #{e}"
667
+ end
668
+ ```
669
+
670
+ ### Parameters
671
+
672
+ This endpoint does not need any parameter.
673
+
674
+ ### Return type
675
+
676
+ [**UnreadCount**](UnreadCount.md)
677
+
678
+ ### Authorization
679
+
680
+ [API_KEY](../README.md#API_KEY)
681
+
682
+ ### HTTP request headers
683
+
684
+ - **Content-Type**: Not defined
685
+ - **Accept**: application/json
686
+
687
+
688
+ ## validate_email
689
+
690
+ > ValidationDto validate_email(email_id)
691
+
692
+ Validate email
693
+
694
+ Validate the HTML content of email if HTML is found. Considered valid if no HTML.
695
+
696
+ ### Example
697
+
698
+ ```ruby
699
+ # load the gem
700
+ require 'mailslurp_client'
701
+ # setup authorization
702
+ MailSlurpClient.configure do |config|
703
+ # Configure API key authorization: API_KEY
704
+ config.api_key['x-api-key'] = 'YOUR API KEY'
705
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
706
+ #config.api_key_prefix['x-api-key'] = 'Bearer'
707
+ end
708
+
709
+ api_instance = MailSlurpClient::EmailControllerApi.new
710
+ email_id = 'email_id_example' # String | emailId
711
+
712
+ begin
713
+ #Validate email
714
+ result = api_instance.validate_email(email_id)
715
+ p result
716
+ rescue MailSlurpClient::ApiError => e
717
+ puts "Exception when calling EmailControllerApi->validate_email: #{e}"
718
+ end
719
+ ```
720
+
721
+ ### Parameters
722
+
723
+
724
+ Name | Type | Description | Notes
725
+ ------------- | ------------- | ------------- | -------------
726
+ **email_id** | [**String**](.md)| emailId |
727
+
728
+ ### Return type
729
+
730
+ [**ValidationDto**](ValidationDto.md)
731
+
732
+ ### Authorization
733
+
734
+ [API_KEY](../README.md#API_KEY)
735
+
736
+ ### HTTP request headers
737
+
738
+ - **Content-Type**: Not defined
739
+ - **Accept**: application/json
740
+