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
@@ -1,1021 +0,0 @@
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_email1**](ExtraOperationsApi.md#delete_email1) | **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
- [**forward_email**](ExtraOperationsApi.md#forward_email) | **POST** /emails/{emailId}/forward | Forward Email
17
- [**get_email**](ExtraOperationsApi.md#get_email) | **GET** /emails/{emailId} | Get Email Content
18
- [**get_emails**](ExtraOperationsApi.md#get_emails) | **GET** /inboxes/{inboxId}/emails | List Emails in an Inbox / EmailAddress
19
- [**get_inbox**](ExtraOperationsApi.md#get_inbox) | **GET** /inboxes/{inboxId} | Get Inbox / EmailAddress
20
- [**get_inboxes**](ExtraOperationsApi.md#get_inboxes) | **GET** /inboxes | List Inboxes / Email Addresses
21
- [**get_raw_email_contents**](ExtraOperationsApi.md#get_raw_email_contents) | **GET** /emails/{emailId}/raw | Get Raw Email Content
22
- [**get_webhooks**](ExtraOperationsApi.md#get_webhooks) | **GET** /inboxes/{inboxId}/webhooks | Get all WebHooks for an Inbox
23
- [**send_email**](ExtraOperationsApi.md#send_email) | **POST** /inboxes/{inboxId} | Send Email
24
- [**upload_attachment**](ExtraOperationsApi.md#upload_attachment) | **POST** /attachments | Upload an attachment for sending
25
- [**upload_multipart_form**](ExtraOperationsApi.md#upload_multipart_form) | **POST** /attachments/multipart | Upload an attachment for sending using Multipart Form
26
-
27
-
28
- # **bulk_create_inboxes**
29
- > Array<Inbox> bulk_create_inboxes(count)
30
-
31
- Bulk create Inboxes (email addresses)
32
-
33
- Enterprise Plan Required
34
-
35
- ### Example
36
- ```ruby
37
- # load the gem
38
- require 'mailslurp_client'
39
- # setup authorization
40
- MailSlurpClient.configure do |config|
41
- # Configure API key authorization: API_KEY
42
- config.api_key['x-api-key'] = 'YOUR API KEY'
43
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
44
- #config.api_key_prefix['x-api-key'] = 'Bearer'
45
- end
46
-
47
- api_instance = MailSlurpClient::ExtraOperationsApi.new
48
- count = 56 # Integer | Number of inboxes to be created in bulk
49
-
50
- begin
51
- #Bulk create Inboxes (email addresses)
52
- result = api_instance.bulk_create_inboxes(count)
53
- p result
54
- rescue MailSlurpClient::ApiError => e
55
- puts "Exception when calling ExtraOperationsApi->bulk_create_inboxes: #{e}"
56
- end
57
- ```
58
-
59
- ### Parameters
60
-
61
- Name | Type | Description | Notes
62
- ------------- | ------------- | ------------- | -------------
63
- **count** | **Integer**| Number of inboxes to be created in bulk |
64
-
65
- ### Return type
66
-
67
- [**Array<Inbox>**](Inbox.md)
68
-
69
- ### Authorization
70
-
71
- [API_KEY](../README.md#API_KEY)
72
-
73
- ### HTTP request headers
74
-
75
- - **Content-Type**: Not defined
76
- - **Accept**: application/json
77
-
78
-
79
-
80
- # **bulk_delete_inboxes**
81
- > bulk_delete_inboxes(request_body)
82
-
83
- Bulk Delete Inboxes
84
-
85
- Enterprise Plan Required
86
-
87
- ### Example
88
- ```ruby
89
- # load the gem
90
- require 'mailslurp_client'
91
- # setup authorization
92
- MailSlurpClient.configure do |config|
93
- # Configure API key authorization: API_KEY
94
- config.api_key['x-api-key'] = 'YOUR API KEY'
95
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
96
- #config.api_key_prefix['x-api-key'] = 'Bearer'
97
- end
98
-
99
- api_instance = MailSlurpClient::ExtraOperationsApi.new
100
- request_body = nil # Array<String> | ids
101
-
102
- begin
103
- #Bulk Delete Inboxes
104
- api_instance.bulk_delete_inboxes(request_body)
105
- rescue MailSlurpClient::ApiError => e
106
- puts "Exception when calling ExtraOperationsApi->bulk_delete_inboxes: #{e}"
107
- end
108
- ```
109
-
110
- ### Parameters
111
-
112
- Name | Type | Description | Notes
113
- ------------- | ------------- | ------------- | -------------
114
- **request_body** | [**Array&lt;String&gt;**](Array.md)| ids |
115
-
116
- ### Return type
117
-
118
- nil (empty response body)
119
-
120
- ### Authorization
121
-
122
- [API_KEY](../README.md#API_KEY)
123
-
124
- ### HTTP request headers
125
-
126
- - **Content-Type**: application/json
127
- - **Accept**: Not defined
128
-
129
-
130
-
131
- # **bulk_send_emails**
132
- > bulk_send_emails(bulk_send_email_options)
133
-
134
- Bulk Send Emails
135
-
136
- Enterprise Plan Required
137
-
138
- ### Example
139
- ```ruby
140
- # load the gem
141
- require 'mailslurp_client'
142
- # setup authorization
143
- MailSlurpClient.configure do |config|
144
- # Configure API key authorization: API_KEY
145
- config.api_key['x-api-key'] = 'YOUR API KEY'
146
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
147
- #config.api_key_prefix['x-api-key'] = 'Bearer'
148
- end
149
-
150
- api_instance = MailSlurpClient::ExtraOperationsApi.new
151
- bulk_send_email_options = MailSlurpClient::BulkSendEmailOptions.new # BulkSendEmailOptions | bulkSendEmailOptions
152
-
153
- begin
154
- #Bulk Send Emails
155
- api_instance.bulk_send_emails(bulk_send_email_options)
156
- rescue MailSlurpClient::ApiError => e
157
- puts "Exception when calling ExtraOperationsApi->bulk_send_emails: #{e}"
158
- end
159
- ```
160
-
161
- ### Parameters
162
-
163
- Name | Type | Description | Notes
164
- ------------- | ------------- | ------------- | -------------
165
- **bulk_send_email_options** | [**BulkSendEmailOptions**](BulkSendEmailOptions.md)| bulkSendEmailOptions |
166
-
167
- ### Return type
168
-
169
- nil (empty response body)
170
-
171
- ### Authorization
172
-
173
- [API_KEY](../README.md#API_KEY)
174
-
175
- ### HTTP request headers
176
-
177
- - **Content-Type**: application/json
178
- - **Accept**: Not defined
179
-
180
-
181
-
182
- # **create_inbox**
183
- > Inbox create_inbox
184
-
185
- Create an Inbox (email address)
186
-
187
- 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
188
-
189
- ### Example
190
- ```ruby
191
- # load the gem
192
- require 'mailslurp_client'
193
- # setup authorization
194
- MailSlurpClient.configure do |config|
195
- # Configure API key authorization: API_KEY
196
- config.api_key['x-api-key'] = 'YOUR API KEY'
197
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
198
- #config.api_key_prefix['x-api-key'] = 'Bearer'
199
- end
200
-
201
- api_instance = MailSlurpClient::ExtraOperationsApi.new
202
-
203
- begin
204
- #Create an Inbox (email address)
205
- result = api_instance.create_inbox
206
- p result
207
- rescue MailSlurpClient::ApiError => e
208
- puts "Exception when calling ExtraOperationsApi->create_inbox: #{e}"
209
- end
210
- ```
211
-
212
- ### Parameters
213
- This endpoint does not need any parameter.
214
-
215
- ### Return type
216
-
217
- [**Inbox**](Inbox.md)
218
-
219
- ### Authorization
220
-
221
- [API_KEY](../README.md#API_KEY)
222
-
223
- ### HTTP request headers
224
-
225
- - **Content-Type**: Not defined
226
- - **Accept**: application/json
227
-
228
-
229
-
230
- # **create_webhook**
231
- > Webhook create_webhook(inbox_id, create_webhook_options)
232
-
233
- Attach a WebHook URL to an inbox
234
-
235
- 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.
236
-
237
- ### Example
238
- ```ruby
239
- # load the gem
240
- require 'mailslurp_client'
241
- # setup authorization
242
- MailSlurpClient.configure do |config|
243
- # Configure API key authorization: API_KEY
244
- config.api_key['x-api-key'] = 'YOUR API KEY'
245
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
246
- #config.api_key_prefix['x-api-key'] = 'Bearer'
247
- end
248
-
249
- api_instance = MailSlurpClient::ExtraOperationsApi.new
250
- inbox_id = 'inbox_id_example' # String | inboxId
251
- create_webhook_options = MailSlurpClient::CreateWebhookOptions.new # CreateWebhookOptions | webhookOptions
252
-
253
- begin
254
- #Attach a WebHook URL to an inbox
255
- result = api_instance.create_webhook(inbox_id, create_webhook_options)
256
- p result
257
- rescue MailSlurpClient::ApiError => e
258
- puts "Exception when calling ExtraOperationsApi->create_webhook: #{e}"
259
- end
260
- ```
261
-
262
- ### Parameters
263
-
264
- Name | Type | Description | Notes
265
- ------------- | ------------- | ------------- | -------------
266
- **inbox_id** | [**String**](.md)| inboxId |
267
- **create_webhook_options** | [**CreateWebhookOptions**](CreateWebhookOptions.md)| webhookOptions |
268
-
269
- ### Return type
270
-
271
- [**Webhook**](Webhook.md)
272
-
273
- ### Authorization
274
-
275
- [API_KEY](../README.md#API_KEY)
276
-
277
- ### HTTP request headers
278
-
279
- - **Content-Type**: application/json
280
- - **Accept**: application/json
281
-
282
-
283
-
284
- # **delete_email1**
285
- > delete_email1(email_id)
286
-
287
- Delete Email
288
-
289
- Deletes an email and removes it from the inbox
290
-
291
- ### Example
292
- ```ruby
293
- # load the gem
294
- require 'mailslurp_client'
295
- # setup authorization
296
- MailSlurpClient.configure do |config|
297
- # Configure API key authorization: API_KEY
298
- config.api_key['x-api-key'] = 'YOUR API KEY'
299
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
300
- #config.api_key_prefix['x-api-key'] = 'Bearer'
301
- end
302
-
303
- api_instance = MailSlurpClient::ExtraOperationsApi.new
304
- email_id = 'email_id_example' # String | emailId
305
-
306
- begin
307
- #Delete Email
308
- api_instance.delete_email1(email_id)
309
- rescue MailSlurpClient::ApiError => e
310
- puts "Exception when calling ExtraOperationsApi->delete_email1: #{e}"
311
- end
312
- ```
313
-
314
- ### Parameters
315
-
316
- Name | Type | Description | Notes
317
- ------------- | ------------- | ------------- | -------------
318
- **email_id** | [**String**](.md)| emailId |
319
-
320
- ### Return type
321
-
322
- nil (empty response body)
323
-
324
- ### Authorization
325
-
326
- [API_KEY](../README.md#API_KEY)
327
-
328
- ### HTTP request headers
329
-
330
- - **Content-Type**: Not defined
331
- - **Accept**: Not defined
332
-
333
-
334
-
335
- # **delete_inbox**
336
- > delete_inbox(inbox_id)
337
-
338
- Delete Inbox / Email Address
339
-
340
- Permanently delete an inbox and associated email address
341
-
342
- ### Example
343
- ```ruby
344
- # load the gem
345
- require 'mailslurp_client'
346
- # setup authorization
347
- MailSlurpClient.configure do |config|
348
- # Configure API key authorization: API_KEY
349
- config.api_key['x-api-key'] = 'YOUR API KEY'
350
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
351
- #config.api_key_prefix['x-api-key'] = 'Bearer'
352
- end
353
-
354
- api_instance = MailSlurpClient::ExtraOperationsApi.new
355
- inbox_id = 'inbox_id_example' # String | inboxId
356
-
357
- begin
358
- #Delete Inbox / Email Address
359
- api_instance.delete_inbox(inbox_id)
360
- rescue MailSlurpClient::ApiError => e
361
- puts "Exception when calling ExtraOperationsApi->delete_inbox: #{e}"
362
- end
363
- ```
364
-
365
- ### Parameters
366
-
367
- Name | Type | Description | Notes
368
- ------------- | ------------- | ------------- | -------------
369
- **inbox_id** | [**String**](.md)| inboxId |
370
-
371
- ### Return type
372
-
373
- nil (empty response body)
374
-
375
- ### Authorization
376
-
377
- [API_KEY](../README.md#API_KEY)
378
-
379
- ### HTTP request headers
380
-
381
- - **Content-Type**: Not defined
382
- - **Accept**: Not defined
383
-
384
-
385
-
386
- # **delete_webhook**
387
- > delete_webhook(inbox_id, webhook_id)
388
-
389
- Delete and disable a WebHook for an Inbox
390
-
391
- ### Example
392
- ```ruby
393
- # load the gem
394
- require 'mailslurp_client'
395
- # setup authorization
396
- MailSlurpClient.configure do |config|
397
- # Configure API key authorization: API_KEY
398
- config.api_key['x-api-key'] = 'YOUR API KEY'
399
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
400
- #config.api_key_prefix['x-api-key'] = 'Bearer'
401
- end
402
-
403
- api_instance = MailSlurpClient::ExtraOperationsApi.new
404
- inbox_id = 'inbox_id_example' # String | inboxId
405
- webhook_id = 'webhook_id_example' # String | webhookId
406
-
407
- begin
408
- #Delete and disable a WebHook for an Inbox
409
- api_instance.delete_webhook(inbox_id, webhook_id)
410
- rescue MailSlurpClient::ApiError => e
411
- puts "Exception when calling ExtraOperationsApi->delete_webhook: #{e}"
412
- end
413
- ```
414
-
415
- ### Parameters
416
-
417
- Name | Type | Description | Notes
418
- ------------- | ------------- | ------------- | -------------
419
- **inbox_id** | [**String**](.md)| inboxId |
420
- **webhook_id** | [**String**](.md)| webhookId |
421
-
422
- ### Return type
423
-
424
- nil (empty response body)
425
-
426
- ### Authorization
427
-
428
- [API_KEY](../README.md#API_KEY)
429
-
430
- ### HTTP request headers
431
-
432
- - **Content-Type**: Not defined
433
- - **Accept**: Not defined
434
-
435
-
436
-
437
- # **download_attachment**
438
- > download_attachment(attachment_id, email_id)
439
-
440
- Get email attachment
441
-
442
- Returns the specified attachment for a given email as a byte stream (file download). Get the attachmentId from the email response. Requires enterprise account.
443
-
444
- ### Example
445
- ```ruby
446
- # load the gem
447
- require 'mailslurp_client'
448
- # setup authorization
449
- MailSlurpClient.configure do |config|
450
- # Configure API key authorization: API_KEY
451
- config.api_key['x-api-key'] = 'YOUR API KEY'
452
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
453
- #config.api_key_prefix['x-api-key'] = 'Bearer'
454
- end
455
-
456
- api_instance = MailSlurpClient::ExtraOperationsApi.new
457
- attachment_id = 'attachment_id_example' # String | attachmentId
458
- email_id = 'email_id_example' # String | emailId
459
-
460
- begin
461
- #Get email attachment
462
- api_instance.download_attachment(attachment_id, email_id)
463
- rescue MailSlurpClient::ApiError => e
464
- puts "Exception when calling ExtraOperationsApi->download_attachment: #{e}"
465
- end
466
- ```
467
-
468
- ### Parameters
469
-
470
- Name | Type | Description | Notes
471
- ------------- | ------------- | ------------- | -------------
472
- **attachment_id** | **String**| attachmentId |
473
- **email_id** | [**String**](.md)| emailId |
474
-
475
- ### Return type
476
-
477
- nil (empty response body)
478
-
479
- ### Authorization
480
-
481
- [API_KEY](../README.md#API_KEY)
482
-
483
- ### HTTP request headers
484
-
485
- - **Content-Type**: Not defined
486
- - **Accept**: Not defined
487
-
488
-
489
-
490
- # **forward_email**
491
- > forward_email(email_id, forward_email_options)
492
-
493
- Forward Email
494
-
495
- Forward email content to given recipients
496
-
497
- ### Example
498
- ```ruby
499
- # load the gem
500
- require 'mailslurp_client'
501
- # setup authorization
502
- MailSlurpClient.configure do |config|
503
- # Configure API key authorization: API_KEY
504
- config.api_key['x-api-key'] = 'YOUR API KEY'
505
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
506
- #config.api_key_prefix['x-api-key'] = 'Bearer'
507
- end
508
-
509
- api_instance = MailSlurpClient::ExtraOperationsApi.new
510
- email_id = 'email_id_example' # String | emailId
511
- forward_email_options = MailSlurpClient::ForwardEmailOptions.new # ForwardEmailOptions | forwardEmailOptions
512
-
513
- begin
514
- #Forward Email
515
- api_instance.forward_email(email_id, forward_email_options)
516
- rescue MailSlurpClient::ApiError => e
517
- puts "Exception when calling ExtraOperationsApi->forward_email: #{e}"
518
- end
519
- ```
520
-
521
- ### Parameters
522
-
523
- Name | Type | Description | Notes
524
- ------------- | ------------- | ------------- | -------------
525
- **email_id** | [**String**](.md)| emailId |
526
- **forward_email_options** | [**ForwardEmailOptions**](ForwardEmailOptions.md)| forwardEmailOptions |
527
-
528
- ### Return type
529
-
530
- nil (empty response body)
531
-
532
- ### Authorization
533
-
534
- [API_KEY](../README.md#API_KEY)
535
-
536
- ### HTTP request headers
537
-
538
- - **Content-Type**: application/json
539
- - **Accept**: Not defined
540
-
541
-
542
-
543
- # **get_email**
544
- > Email get_email(email_id)
545
-
546
- Get Email Content
547
-
548
- Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawMessage endpoint
549
-
550
- ### Example
551
- ```ruby
552
- # load the gem
553
- require 'mailslurp_client'
554
- # setup authorization
555
- MailSlurpClient.configure do |config|
556
- # Configure API key authorization: API_KEY
557
- config.api_key['x-api-key'] = 'YOUR API KEY'
558
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
559
- #config.api_key_prefix['x-api-key'] = 'Bearer'
560
- end
561
-
562
- api_instance = MailSlurpClient::ExtraOperationsApi.new
563
- email_id = 'email_id_example' # String | emailId
564
-
565
- begin
566
- #Get Email Content
567
- result = api_instance.get_email(email_id)
568
- p result
569
- rescue MailSlurpClient::ApiError => e
570
- puts "Exception when calling ExtraOperationsApi->get_email: #{e}"
571
- end
572
- ```
573
-
574
- ### Parameters
575
-
576
- Name | Type | Description | Notes
577
- ------------- | ------------- | ------------- | -------------
578
- **email_id** | [**String**](.md)| emailId |
579
-
580
- ### Return type
581
-
582
- [**Email**](Email.md)
583
-
584
- ### Authorization
585
-
586
- [API_KEY](../README.md#API_KEY)
587
-
588
- ### HTTP request headers
589
-
590
- - **Content-Type**: Not defined
591
- - **Accept**: application/json
592
-
593
-
594
-
595
- # **get_emails**
596
- > Array&lt;EmailPreview&gt; get_emails(inbox_id, opts)
597
-
598
- List Emails in an Inbox / EmailAddress
599
-
600
- 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
601
-
602
- ### Example
603
- ```ruby
604
- # load the gem
605
- require 'mailslurp_client'
606
- # setup authorization
607
- MailSlurpClient.configure do |config|
608
- # Configure API key authorization: API_KEY
609
- config.api_key['x-api-key'] = 'YOUR API KEY'
610
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
611
- #config.api_key_prefix['x-api-key'] = 'Bearer'
612
- end
613
-
614
- api_instance = MailSlurpClient::ExtraOperationsApi.new
615
- inbox_id = 'inbox_id_example' # String | Id of inbox that emails belongs to
616
- opts = {
617
- limit: 56, # Integer | Limit the result set, ordered by descending received date time
618
- min_count: 56, # Integer | Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
619
- retry_timeout: 56, # Integer | Maximum milliseconds to spend retrying inbox database until minCount emails are returned
620
- since: DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | Exclude emails received before this ISO 8601 date time
621
- }
622
-
623
- begin
624
- #List Emails in an Inbox / EmailAddress
625
- result = api_instance.get_emails(inbox_id, opts)
626
- p result
627
- rescue MailSlurpClient::ApiError => e
628
- puts "Exception when calling ExtraOperationsApi->get_emails: #{e}"
629
- end
630
- ```
631
-
632
- ### Parameters
633
-
634
- Name | Type | Description | Notes
635
- ------------- | ------------- | ------------- | -------------
636
- **inbox_id** | [**String**](.md)| Id of inbox that emails belongs to |
637
- **limit** | **Integer**| Limit the result set, ordered by descending received date time | [optional]
638
- **min_count** | **Integer**| Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. | [optional]
639
- **retry_timeout** | **Integer**| Maximum milliseconds to spend retrying inbox database until minCount emails are returned | [optional]
640
- **since** | **DateTime**| Exclude emails received before this ISO 8601 date time | [optional]
641
-
642
- ### Return type
643
-
644
- [**Array&lt;EmailPreview&gt;**](EmailPreview.md)
645
-
646
- ### Authorization
647
-
648
- [API_KEY](../README.md#API_KEY)
649
-
650
- ### HTTP request headers
651
-
652
- - **Content-Type**: Not defined
653
- - **Accept**: application/json
654
-
655
-
656
-
657
- # **get_inbox**
658
- > Inbox get_inbox(inbox_id)
659
-
660
- Get Inbox / EmailAddress
661
-
662
- Returns an inbox's properties, including its email address and ID.
663
-
664
- ### Example
665
- ```ruby
666
- # load the gem
667
- require 'mailslurp_client'
668
- # setup authorization
669
- MailSlurpClient.configure do |config|
670
- # Configure API key authorization: API_KEY
671
- config.api_key['x-api-key'] = 'YOUR API KEY'
672
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
673
- #config.api_key_prefix['x-api-key'] = 'Bearer'
674
- end
675
-
676
- api_instance = MailSlurpClient::ExtraOperationsApi.new
677
- inbox_id = 'inbox_id_example' # String | inboxId
678
-
679
- begin
680
- #Get Inbox / EmailAddress
681
- result = api_instance.get_inbox(inbox_id)
682
- p result
683
- rescue MailSlurpClient::ApiError => e
684
- puts "Exception when calling ExtraOperationsApi->get_inbox: #{e}"
685
- end
686
- ```
687
-
688
- ### Parameters
689
-
690
- Name | Type | Description | Notes
691
- ------------- | ------------- | ------------- | -------------
692
- **inbox_id** | [**String**](.md)| inboxId |
693
-
694
- ### Return type
695
-
696
- [**Inbox**](Inbox.md)
697
-
698
- ### Authorization
699
-
700
- [API_KEY](../README.md#API_KEY)
701
-
702
- ### HTTP request headers
703
-
704
- - **Content-Type**: Not defined
705
- - **Accept**: application/json
706
-
707
-
708
-
709
- # **get_inboxes**
710
- > Array&lt;Inbox&gt; get_inboxes
711
-
712
- List Inboxes / Email Addresses
713
-
714
- List the inboxes you have created
715
-
716
- ### Example
717
- ```ruby
718
- # load the gem
719
- require 'mailslurp_client'
720
- # setup authorization
721
- MailSlurpClient.configure do |config|
722
- # Configure API key authorization: API_KEY
723
- config.api_key['x-api-key'] = 'YOUR API KEY'
724
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
725
- #config.api_key_prefix['x-api-key'] = 'Bearer'
726
- end
727
-
728
- api_instance = MailSlurpClient::ExtraOperationsApi.new
729
-
730
- begin
731
- #List Inboxes / Email Addresses
732
- result = api_instance.get_inboxes
733
- p result
734
- rescue MailSlurpClient::ApiError => e
735
- puts "Exception when calling ExtraOperationsApi->get_inboxes: #{e}"
736
- end
737
- ```
738
-
739
- ### Parameters
740
- This endpoint does not need any parameter.
741
-
742
- ### Return type
743
-
744
- [**Array&lt;Inbox&gt;**](Inbox.md)
745
-
746
- ### Authorization
747
-
748
- [API_KEY](../README.md#API_KEY)
749
-
750
- ### HTTP request headers
751
-
752
- - **Content-Type**: Not defined
753
- - **Accept**: application/json
754
-
755
-
756
-
757
- # **get_raw_email_contents**
758
- > String get_raw_email_contents(email_id)
759
-
760
- Get Raw Email Content
761
-
762
- Returns a raw, unparsed and unprocessed email
763
-
764
- ### Example
765
- ```ruby
766
- # load the gem
767
- require 'mailslurp_client'
768
- # setup authorization
769
- MailSlurpClient.configure do |config|
770
- # Configure API key authorization: API_KEY
771
- config.api_key['x-api-key'] = 'YOUR API KEY'
772
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
773
- #config.api_key_prefix['x-api-key'] = 'Bearer'
774
- end
775
-
776
- api_instance = MailSlurpClient::ExtraOperationsApi.new
777
- email_id = 'email_id_example' # String | emailId
778
-
779
- begin
780
- #Get Raw Email Content
781
- result = api_instance.get_raw_email_contents(email_id)
782
- p result
783
- rescue MailSlurpClient::ApiError => e
784
- puts "Exception when calling ExtraOperationsApi->get_raw_email_contents: #{e}"
785
- end
786
- ```
787
-
788
- ### Parameters
789
-
790
- Name | Type | Description | Notes
791
- ------------- | ------------- | ------------- | -------------
792
- **email_id** | [**String**](.md)| emailId |
793
-
794
- ### Return type
795
-
796
- **String**
797
-
798
- ### Authorization
799
-
800
- [API_KEY](../README.md#API_KEY)
801
-
802
- ### HTTP request headers
803
-
804
- - **Content-Type**: Not defined
805
- - **Accept**: application/json
806
-
807
-
808
-
809
- # **get_webhooks**
810
- > Array&lt;Webhook&gt; get_webhooks(inbox_id)
811
-
812
- Get all WebHooks for an Inbox
813
-
814
- ### Example
815
- ```ruby
816
- # load the gem
817
- require 'mailslurp_client'
818
- # setup authorization
819
- MailSlurpClient.configure do |config|
820
- # Configure API key authorization: API_KEY
821
- config.api_key['x-api-key'] = 'YOUR API KEY'
822
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
823
- #config.api_key_prefix['x-api-key'] = 'Bearer'
824
- end
825
-
826
- api_instance = MailSlurpClient::ExtraOperationsApi.new
827
- inbox_id = 'inbox_id_example' # String | inboxId
828
-
829
- begin
830
- #Get all WebHooks for an Inbox
831
- result = api_instance.get_webhooks(inbox_id)
832
- p result
833
- rescue MailSlurpClient::ApiError => e
834
- puts "Exception when calling ExtraOperationsApi->get_webhooks: #{e}"
835
- end
836
- ```
837
-
838
- ### Parameters
839
-
840
- Name | Type | Description | Notes
841
- ------------- | ------------- | ------------- | -------------
842
- **inbox_id** | [**String**](.md)| inboxId |
843
-
844
- ### Return type
845
-
846
- [**Array&lt;Webhook&gt;**](Webhook.md)
847
-
848
- ### Authorization
849
-
850
- [API_KEY](../README.md#API_KEY)
851
-
852
- ### HTTP request headers
853
-
854
- - **Content-Type**: Not defined
855
- - **Accept**: application/json
856
-
857
-
858
-
859
- # **send_email**
860
- > send_email(inbox_id, send_email_options)
861
-
862
- Send Email
863
-
864
- 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
865
-
866
- ### Example
867
- ```ruby
868
- # load the gem
869
- require 'mailslurp_client'
870
- # setup authorization
871
- MailSlurpClient.configure do |config|
872
- # Configure API key authorization: API_KEY
873
- config.api_key['x-api-key'] = 'YOUR API KEY'
874
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
875
- #config.api_key_prefix['x-api-key'] = 'Bearer'
876
- end
877
-
878
- api_instance = MailSlurpClient::ExtraOperationsApi.new
879
- inbox_id = 'inbox_id_example' # String | inboxId
880
- send_email_options = MailSlurpClient::SendEmailOptions.new # SendEmailOptions | sendEmailOptions
881
-
882
- begin
883
- #Send Email
884
- api_instance.send_email(inbox_id, send_email_options)
885
- rescue MailSlurpClient::ApiError => e
886
- puts "Exception when calling ExtraOperationsApi->send_email: #{e}"
887
- end
888
- ```
889
-
890
- ### Parameters
891
-
892
- Name | Type | Description | Notes
893
- ------------- | ------------- | ------------- | -------------
894
- **inbox_id** | [**String**](.md)| inboxId |
895
- **send_email_options** | [**SendEmailOptions**](SendEmailOptions.md)| sendEmailOptions |
896
-
897
- ### Return type
898
-
899
- nil (empty response body)
900
-
901
- ### Authorization
902
-
903
- [API_KEY](../README.md#API_KEY)
904
-
905
- ### HTTP request headers
906
-
907
- - **Content-Type**: application/json
908
- - **Accept**: Not defined
909
-
910
-
911
-
912
- # **upload_attachment**
913
- > Array&lt;String&gt; upload_attachment(upload_attachment_options)
914
-
915
- Upload an attachment for sending
916
-
917
- When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
918
-
919
- ### Example
920
- ```ruby
921
- # load the gem
922
- require 'mailslurp_client'
923
- # setup authorization
924
- MailSlurpClient.configure do |config|
925
- # Configure API key authorization: API_KEY
926
- config.api_key['x-api-key'] = 'YOUR API KEY'
927
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
928
- #config.api_key_prefix['x-api-key'] = 'Bearer'
929
- end
930
-
931
- api_instance = MailSlurpClient::ExtraOperationsApi.new
932
- upload_attachment_options = MailSlurpClient::UploadAttachmentOptions.new # UploadAttachmentOptions | uploadOptions
933
-
934
- begin
935
- #Upload an attachment for sending
936
- result = api_instance.upload_attachment(upload_attachment_options)
937
- p result
938
- rescue MailSlurpClient::ApiError => e
939
- puts "Exception when calling ExtraOperationsApi->upload_attachment: #{e}"
940
- end
941
- ```
942
-
943
- ### Parameters
944
-
945
- Name | Type | Description | Notes
946
- ------------- | ------------- | ------------- | -------------
947
- **upload_attachment_options** | [**UploadAttachmentOptions**](UploadAttachmentOptions.md)| uploadOptions |
948
-
949
- ### Return type
950
-
951
- **Array&lt;String&gt;**
952
-
953
- ### Authorization
954
-
955
- [API_KEY](../README.md#API_KEY)
956
-
957
- ### HTTP request headers
958
-
959
- - **Content-Type**: application/json
960
- - **Accept**: application/json
961
-
962
-
963
-
964
- # **upload_multipart_form**
965
- > Array&lt;String&gt; upload_multipart_form(file, opts)
966
-
967
- Upload an attachment for sending using Multipart Form
968
-
969
- When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
970
-
971
- ### Example
972
- ```ruby
973
- # load the gem
974
- require 'mailslurp_client'
975
- # setup authorization
976
- MailSlurpClient.configure do |config|
977
- # Configure API key authorization: API_KEY
978
- config.api_key['x-api-key'] = 'YOUR API KEY'
979
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
980
- #config.api_key_prefix['x-api-key'] = 'Bearer'
981
- end
982
-
983
- api_instance = MailSlurpClient::ExtraOperationsApi.new
984
- file = File.new('/path/to/file') # File | file
985
- opts = {
986
- content_type: 'content_type_example', # String | contentType
987
- filename: 'filename_example' # String | filename
988
- }
989
-
990
- begin
991
- #Upload an attachment for sending using Multipart Form
992
- result = api_instance.upload_multipart_form(file, opts)
993
- p result
994
- rescue MailSlurpClient::ApiError => e
995
- puts "Exception when calling ExtraOperationsApi->upload_multipart_form: #{e}"
996
- end
997
- ```
998
-
999
- ### Parameters
1000
-
1001
- Name | Type | Description | Notes
1002
- ------------- | ------------- | ------------- | -------------
1003
- **file** | **File**| file |
1004
- **content_type** | **String**| contentType | [optional]
1005
- **filename** | **String**| filename | [optional]
1006
-
1007
- ### Return type
1008
-
1009
- **Array&lt;String&gt;**
1010
-
1011
- ### Authorization
1012
-
1013
- [API_KEY](../README.md#API_KEY)
1014
-
1015
- ### HTTP request headers
1016
-
1017
- - **Content-Type**: multipart/form-data
1018
- - **Accept**: application/json
1019
-
1020
-
1021
-