mailslurp_client 15.0.3 → 15.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/lib/mailslurp_client/api/alias_controller_api.rb +60 -56
  4. data/lib/mailslurp_client/api/attachment_controller_api.rb +50 -61
  5. data/lib/mailslurp_client/api/bounce_controller_api.rb +27 -19
  6. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +16 -16
  7. data/lib/mailslurp_client/api/common_actions_controller_api.rb +129 -68
  8. data/lib/mailslurp_client/api/contact_controller_api.rb +23 -23
  9. data/lib/mailslurp_client/api/domain_controller_api.rb +33 -33
  10. data/lib/mailslurp_client/api/email_controller_api.rb +145 -122
  11. data/lib/mailslurp_client/api/expired_controller_api.rb +20 -20
  12. data/lib/mailslurp_client/api/export_controller_api.rb +39 -39
  13. data/lib/mailslurp_client/api/form_controller_api.rb +17 -19
  14. data/lib/mailslurp_client/api/group_controller_api.rb +53 -53
  15. data/lib/mailslurp_client/api/inbox_controller_api.rb +198 -178
  16. data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +34 -30
  17. data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +34 -30
  18. data/lib/mailslurp_client/api/mail_server_controller_api.rb +27 -27
  19. data/lib/mailslurp_client/api/missed_email_controller_api.rb +55 -43
  20. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +158 -48
  21. data/lib/mailslurp_client/api/template_controller_api.rb +22 -22
  22. data/lib/mailslurp_client/api/tracking_controller_api.rb +17 -17
  23. data/lib/mailslurp_client/api/wait_for_controller_api.rb +129 -89
  24. data/lib/mailslurp_client/api/webhook_controller_api.rb +103 -87
  25. data/lib/mailslurp_client/api_client.rb +1 -1
  26. data/lib/mailslurp_client/api_error.rb +1 -1
  27. data/lib/mailslurp_client/configuration.rb +3 -3
  28. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +22 -22
  29. data/lib/mailslurp_client/models/alias_dto.rb +64 -49
  30. data/lib/mailslurp_client/models/alias_projection.rb +50 -50
  31. data/lib/mailslurp_client/models/attachment_entity.rb +40 -40
  32. data/lib/mailslurp_client/models/attachment_meta_data.rb +42 -22
  33. data/lib/mailslurp_client/models/attachment_projection.rb +38 -33
  34. data/lib/mailslurp_client/models/basic_auth_options.rb +1 -1
  35. data/lib/mailslurp_client/models/bounce_projection.rb +19 -19
  36. data/lib/mailslurp_client/models/bounce_recipient.rb +31 -31
  37. data/lib/mailslurp_client/models/bounced_email_dto.rb +63 -63
  38. data/lib/mailslurp_client/models/bounced_recipient_dto.rb +23 -23
  39. data/lib/mailslurp_client/models/bulk_send_email_options.rb +11 -1
  40. data/lib/mailslurp_client/models/condition_option.rb +13 -3
  41. data/lib/mailslurp_client/models/contact_dto.rb +63 -63
  42. data/lib/mailslurp_client/models/contact_projection.rb +39 -39
  43. data/lib/mailslurp_client/models/content_match_options.rb +6 -1
  44. data/lib/mailslurp_client/models/count_dto.rb +1 -1
  45. data/lib/mailslurp_client/models/create_alias_options.rb +11 -1
  46. data/lib/mailslurp_client/models/create_contact_options.rb +43 -43
  47. data/lib/mailslurp_client/models/create_domain_options.rb +22 -17
  48. data/lib/mailslurp_client/models/create_group_options.rb +1 -1
  49. data/lib/mailslurp_client/models/create_inbox_dto.rb +59 -59
  50. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +30 -15
  51. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +39 -24
  52. data/lib/mailslurp_client/models/create_template_options.rb +1 -1
  53. data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +1 -1
  54. data/lib/mailslurp_client/models/create_webhook_options.rb +24 -19
  55. data/lib/mailslurp_client/models/describe_domain_options.rb +1 -1
  56. data/lib/mailslurp_client/models/describe_mail_server_domain_result.rb +21 -21
  57. data/lib/mailslurp_client/models/dns_lookup_options.rb +30 -15
  58. data/lib/mailslurp_client/models/dns_lookup_result.rb +34 -33
  59. data/lib/mailslurp_client/models/dns_lookup_results.rb +1 -1
  60. data/lib/mailslurp_client/models/domain_dto.rb +100 -70
  61. data/lib/mailslurp_client/models/domain_name_record.rb +18 -17
  62. data/lib/mailslurp_client/models/domain_preview.rb +29 -28
  63. data/lib/mailslurp_client/models/download_attachment_dto.rb +16 -1
  64. data/lib/mailslurp_client/models/email.rb +179 -139
  65. data/lib/mailslurp_client/models/email_analysis.rb +29 -29
  66. data/lib/mailslurp_client/models/email_content_match_result.rb +19 -19
  67. data/lib/mailslurp_client/models/email_links_result.rb +19 -19
  68. data/lib/mailslurp_client/models/email_preview.rb +63 -48
  69. data/lib/mailslurp_client/models/email_projection.rb +77 -77
  70. data/lib/mailslurp_client/models/email_recipients.rb +17 -16
  71. data/lib/mailslurp_client/models/email_text_lines_result.rb +19 -19
  72. data/lib/mailslurp_client/models/email_verification_result.rb +22 -22
  73. data/lib/mailslurp_client/models/expiration_defaults.rb +17 -17
  74. data/lib/mailslurp_client/models/expired_inbox_dto.rb +19 -19
  75. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +33 -33
  76. data/lib/mailslurp_client/models/export_link.rb +1 -1
  77. data/lib/mailslurp_client/models/export_options.rb +2 -2
  78. data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +19 -19
  79. data/lib/mailslurp_client/models/forward_email_options.rb +37 -32
  80. data/lib/mailslurp_client/models/gravatar_url.rb +19 -19
  81. data/lib/mailslurp_client/models/group_contacts_dto.rb +19 -19
  82. data/lib/mailslurp_client/models/group_dto.rb +28 -28
  83. data/lib/mailslurp_client/models/group_projection.rb +29 -29
  84. data/lib/mailslurp_client/models/html_validation_result.rb +27 -12
  85. data/lib/mailslurp_client/models/{inbox.rb → inbox_dto.rb} +72 -57
  86. data/lib/mailslurp_client/models/inbox_exists_dto.rb +1 -1
  87. data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +48 -48
  88. data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +1 -1
  89. data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +19 -19
  90. data/lib/mailslurp_client/models/inbox_preview.rb +59 -39
  91. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +61 -61
  92. data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +1 -1
  93. data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +19 -14
  94. data/lib/mailslurp_client/models/inline_object.rb +221 -0
  95. data/lib/mailslurp_client/models/ip_address_result.rb +1 -1
  96. data/lib/mailslurp_client/models/json_schema_dto.rb +1 -1
  97. data/lib/mailslurp_client/models/match_option.rb +18 -3
  98. data/lib/mailslurp_client/models/match_options.rb +17 -17
  99. data/lib/mailslurp_client/models/missed_email.rb +77 -77
  100. data/lib/mailslurp_client/models/missed_email_projection.rb +25 -25
  101. data/lib/mailslurp_client/models/name_server_record.rb +16 -16
  102. data/lib/mailslurp_client/models/organization_inbox_projection.rb +70 -45
  103. data/lib/mailslurp_client/models/page_alias.rb +59 -50
  104. data/lib/mailslurp_client/models/page_attachment_entity.rb +59 -50
  105. data/lib/mailslurp_client/models/page_bounced_email.rb +59 -50
  106. data/lib/mailslurp_client/models/page_bounced_recipients.rb +59 -50
  107. data/lib/mailslurp_client/models/page_contact_projection.rb +59 -50
  108. data/lib/mailslurp_client/models/page_email_preview.rb +59 -50
  109. data/lib/mailslurp_client/models/page_email_projection.rb +59 -50
  110. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +59 -50
  111. data/lib/mailslurp_client/models/page_group_projection.rb +59 -50
  112. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +59 -50
  113. data/lib/mailslurp_client/models/page_inbox_projection.rb +59 -50
  114. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +59 -50
  115. data/lib/mailslurp_client/models/page_missed_email_projection.rb +59 -50
  116. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +59 -50
  117. data/lib/mailslurp_client/models/page_sent_email_projection.rb +86 -47
  118. data/lib/mailslurp_client/models/page_template_projection.rb +59 -50
  119. data/lib/mailslurp_client/models/page_thread_projection.rb +59 -50
  120. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +59 -50
  121. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +59 -50
  122. data/lib/mailslurp_client/models/page_webhook_projection.rb +59 -50
  123. data/lib/mailslurp_client/models/page_webhook_result.rb +59 -50
  124. data/lib/mailslurp_client/models/{pageable.rb → pageable_object.rb} +32 -32
  125. data/lib/mailslurp_client/models/raw_email_json.rb +1 -1
  126. data/lib/mailslurp_client/models/recipient.rb +19 -19
  127. data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +47 -35
  128. data/lib/mailslurp_client/models/reply_to_email_options.rb +57 -45
  129. data/lib/mailslurp_client/models/send_email_options.rb +112 -110
  130. data/lib/mailslurp_client/models/sender.rb +20 -19
  131. data/lib/mailslurp_client/models/sent_email_dto.rb +110 -95
  132. data/lib/mailslurp_client/models/sent_email_projection.rb +88 -87
  133. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +6 -1
  134. data/lib/mailslurp_client/models/simple_send_email_options.rb +30 -25
  135. data/lib/mailslurp_client/models/sort.rb +1 -1
  136. data/lib/mailslurp_client/models/template_dto.rb +33 -33
  137. data/lib/mailslurp_client/models/template_projection.rb +37 -37
  138. data/lib/mailslurp_client/models/template_variable.rb +1 -1
  139. data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +1 -1
  140. data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +1 -1
  141. data/lib/mailslurp_client/models/thread_projection.rb +71 -71
  142. data/lib/mailslurp_client/models/tracking_pixel_dto.rb +54 -54
  143. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +42 -42
  144. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +25 -25
  145. data/lib/mailslurp_client/models/unread_count.rb +1 -1
  146. data/lib/mailslurp_client/models/unseen_error_count_dto.rb +1 -1
  147. data/lib/mailslurp_client/models/update_alias_options.rb +1 -1
  148. data/lib/mailslurp_client/models/update_domain_options.rb +1 -1
  149. data/lib/mailslurp_client/models/update_group_contacts.rb +1 -1
  150. data/lib/mailslurp_client/models/update_inbox_options.rb +27 -27
  151. data/lib/mailslurp_client/models/upload_attachment_options.rb +15 -15
  152. data/lib/mailslurp_client/models/validation_dto.rb +11 -1
  153. data/lib/mailslurp_client/models/validation_message.rb +2 -1
  154. data/lib/mailslurp_client/models/verify_email_address_options.rb +1 -1
  155. data/lib/mailslurp_client/models/wait_for_conditions.rb +53 -53
  156. data/lib/mailslurp_client/models/webhook_dto.rb +105 -65
  157. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +83 -43
  158. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +85 -50
  159. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +79 -44
  160. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +98 -83
  161. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +140 -85
  162. data/lib/mailslurp_client/models/webhook_projection.rb +47 -47
  163. data/lib/mailslurp_client/models/webhook_redrive_result.rb +19 -19
  164. data/lib/mailslurp_client/models/webhook_result_dto.rb +102 -102
  165. data/lib/mailslurp_client/models/webhook_test_request.rb +28 -28
  166. data/lib/mailslurp_client/models/webhook_test_response.rb +14 -14
  167. data/lib/mailslurp_client/models/webhook_test_result.rb +19 -19
  168. data/lib/mailslurp_client/version.rb +2 -2
  169. data/lib/mailslurp_client.rb +4 -3
  170. metadata +5 -4
@@ -4,7 +4,7 @@
4
4
  #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
-
7
+ Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
10
10
 
@@ -135,37 +135,37 @@ module MailSlurpClient
135
135
 
136
136
  # Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string.
137
137
  # Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
138
- # @param attachment_id [String] ID of attachment
139
138
  # @param email_id [String] ID of email
139
+ # @param attachment_id [String] ID of attachment
140
140
  # @param [Hash] opts the optional parameters
141
141
  # @option opts [String] :api_key Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly.
142
- # @return [String]
143
- def download_attachment(attachment_id, email_id, opts = {})
144
- data, _status_code, _headers = download_attachment_with_http_info(attachment_id, email_id, opts)
142
+ # @return [Array<String>]
143
+ def download_attachment(email_id, attachment_id, opts = {})
144
+ data, _status_code, _headers = download_attachment_with_http_info(email_id, attachment_id, opts)
145
145
  data
146
146
  end
147
147
 
148
148
  # Get email attachment bytes. Returned as &#x60;octet-stream&#x60; with content type header. If you have trouble with byte responses try the &#x60;downloadAttachmentBase64&#x60; response endpoints and convert the base 64 encoded content to a file or string.
149
149
  # Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
150
- # @param attachment_id [String] ID of attachment
151
150
  # @param email_id [String] ID of email
151
+ # @param attachment_id [String] ID of attachment
152
152
  # @param [Hash] opts the optional parameters
153
153
  # @option opts [String] :api_key Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly.
154
- # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
155
- def download_attachment_with_http_info(attachment_id, email_id, opts = {})
154
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
155
+ def download_attachment_with_http_info(email_id, attachment_id, opts = {})
156
156
  if @api_client.config.debugging
157
157
  @api_client.config.logger.debug 'Calling API: EmailControllerApi.download_attachment ...'
158
158
  end
159
- # verify the required parameter 'attachment_id' is set
160
- if @api_client.config.client_side_validation && attachment_id.nil?
161
- fail ArgumentError, "Missing the required parameter 'attachment_id' when calling EmailControllerApi.download_attachment"
162
- end
163
159
  # verify the required parameter 'email_id' is set
164
160
  if @api_client.config.client_side_validation && email_id.nil?
165
161
  fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.download_attachment"
166
162
  end
163
+ # verify the required parameter 'attachment_id' is set
164
+ if @api_client.config.client_side_validation && attachment_id.nil?
165
+ fail ArgumentError, "Missing the required parameter 'attachment_id' when calling EmailControllerApi.download_attachment"
166
+ end
167
167
  # resource path
168
- local_var_path = '/emails/{emailId}/attachments/{attachmentId}'.sub('{' + 'attachmentId' + '}', CGI.escape(attachment_id.to_s)).sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
168
+ local_var_path = '/emails/{emailId}/attachments/{attachmentId}'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s)).sub('{' + 'attachmentId' + '}', CGI.escape(attachment_id.to_s))
169
169
 
170
170
  # query parameters
171
171
  query_params = opts[:query_params] || {}
@@ -183,7 +183,7 @@ module MailSlurpClient
183
183
  post_body = opts[:body]
184
184
 
185
185
  # return_type
186
- return_type = opts[:return_type] || 'String'
186
+ return_type = opts[:return_type] || 'Array<String>'
187
187
 
188
188
  # auth_names
189
189
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -206,35 +206,35 @@ module MailSlurpClient
206
206
 
207
207
  # Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`.
208
208
  # Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
209
- # @param attachment_id [String] ID of attachment
210
209
  # @param email_id [String] ID of email
210
+ # @param attachment_id [String] ID of attachment
211
211
  # @param [Hash] opts the optional parameters
212
212
  # @return [DownloadAttachmentDto]
213
- def download_attachment_base64(attachment_id, email_id, opts = {})
214
- data, _status_code, _headers = download_attachment_base64_with_http_info(attachment_id, email_id, opts)
213
+ def download_attachment_base64(email_id, attachment_id, opts = {})
214
+ data, _status_code, _headers = download_attachment_base64_with_http_info(email_id, attachment_id, opts)
215
215
  data
216
216
  end
217
217
 
218
218
  # Get email attachment as base64 encoded string as an alternative to binary responses. Decode the &#x60;base64FileContents&#x60; as a &#x60;utf-8&#x60; encoded string or array of bytes depending on the &#x60;contentType&#x60;.
219
219
  # Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the &#x60;downloadAttachment&#x60; method but allows some clients to get around issues with binary responses.
220
- # @param attachment_id [String] ID of attachment
221
220
  # @param email_id [String] ID of email
221
+ # @param attachment_id [String] ID of attachment
222
222
  # @param [Hash] opts the optional parameters
223
223
  # @return [Array<(DownloadAttachmentDto, Integer, Hash)>] DownloadAttachmentDto data, response status code and response headers
224
- def download_attachment_base64_with_http_info(attachment_id, email_id, opts = {})
224
+ def download_attachment_base64_with_http_info(email_id, attachment_id, opts = {})
225
225
  if @api_client.config.debugging
226
226
  @api_client.config.logger.debug 'Calling API: EmailControllerApi.download_attachment_base64 ...'
227
227
  end
228
- # verify the required parameter 'attachment_id' is set
229
- if @api_client.config.client_side_validation && attachment_id.nil?
230
- fail ArgumentError, "Missing the required parameter 'attachment_id' when calling EmailControllerApi.download_attachment_base64"
231
- end
232
228
  # verify the required parameter 'email_id' is set
233
229
  if @api_client.config.client_side_validation && email_id.nil?
234
230
  fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.download_attachment_base64"
235
231
  end
232
+ # verify the required parameter 'attachment_id' is set
233
+ if @api_client.config.client_side_validation && attachment_id.nil?
234
+ fail ArgumentError, "Missing the required parameter 'attachment_id' when calling EmailControllerApi.download_attachment_base64"
235
+ end
236
236
  # resource path
237
- local_var_path = '/emails/{emailId}/attachments/{attachmentId}/base64'.sub('{' + 'attachmentId' + '}', CGI.escape(attachment_id.to_s)).sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
237
+ local_var_path = '/emails/{emailId}/attachments/{attachmentId}/base64'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s)).sub('{' + 'attachmentId' + '}', CGI.escape(attachment_id.to_s))
238
238
 
239
239
  # query parameters
240
240
  query_params = opts[:query_params] || {}
@@ -242,7 +242,7 @@ module MailSlurpClient
242
242
  # header parameters
243
243
  header_params = opts[:header_params] || {}
244
244
  # HTTP header 'Accept' (if needed)
245
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
245
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
246
246
 
247
247
  # form parameters
248
248
  form_params = opts[:form_params] || {}
@@ -304,7 +304,7 @@ module MailSlurpClient
304
304
  # header parameters
305
305
  header_params = opts[:header_params] || {}
306
306
  # HTTP header 'Accept' (if needed)
307
- header_params['Accept'] = @api_client.select_header_accept(['text/html', 'text/plain'])
307
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'text/html'])
308
308
 
309
309
  # form parameters
310
310
  form_params = opts[:form_params] || {}
@@ -338,7 +338,7 @@ module MailSlurpClient
338
338
  # Returns the specified email body for a given email as a stream / array of bytes.
339
339
  # @param email_id [String] ID of email
340
340
  # @param [Hash] opts the optional parameters
341
- # @return [String]
341
+ # @return [Array<String>]
342
342
  def download_body_bytes(email_id, opts = {})
343
343
  data, _status_code, _headers = download_body_bytes_with_http_info(email_id, opts)
344
344
  data
@@ -348,7 +348,7 @@ module MailSlurpClient
348
348
  # Returns the specified email body for a given email as a stream / array of bytes.
349
349
  # @param email_id [String] ID of email
350
350
  # @param [Hash] opts the optional parameters
351
- # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
351
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
352
352
  def download_body_bytes_with_http_info(email_id, opts = {})
353
353
  if @api_client.config.debugging
354
354
  @api_client.config.logger.debug 'Calling API: EmailControllerApi.download_body_bytes ...'
@@ -375,7 +375,7 @@ module MailSlurpClient
375
375
  post_body = opts[:body]
376
376
 
377
377
  # return_type
378
- return_type = opts[:return_type] || 'String'
378
+ return_type = opts[:return_type] || 'Array<String>'
379
379
 
380
380
  # auth_names
381
381
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -399,7 +399,7 @@ module MailSlurpClient
399
399
  # Forward email to recipients
400
400
  # Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
401
401
  # @param email_id [String] ID of email
402
- # @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
402
+ # @param forward_email_options [ForwardEmailOptions]
403
403
  # @param [Hash] opts the optional parameters
404
404
  # @return [SentEmailDto]
405
405
  def forward_email(email_id, forward_email_options, opts = {})
@@ -410,7 +410,7 @@ module MailSlurpClient
410
410
  # Forward email to recipients
411
411
  # Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the &#x60;from&#x60; option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
412
412
  # @param email_id [String] ID of email
413
- # @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
413
+ # @param forward_email_options [ForwardEmailOptions]
414
414
  # @param [Hash] opts the optional parameters
415
415
  # @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers
416
416
  def forward_email_with_http_info(email_id, forward_email_options, opts = {})
@@ -434,7 +434,7 @@ module MailSlurpClient
434
434
  # header parameters
435
435
  header_params = opts[:header_params] || {}
436
436
  # HTTP header 'Accept' (if needed)
437
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
437
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
438
438
  # HTTP header 'Content-Type'
439
439
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
440
440
 
@@ -468,35 +468,35 @@ module MailSlurpClient
468
468
 
469
469
  # Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods.
470
470
  # Returns the metadata such as name and content-type for a given attachment and email.
471
- # @param attachment_id [String] ID of attachment
472
471
  # @param email_id [String] ID of email
472
+ # @param attachment_id [String] ID of attachment
473
473
  # @param [Hash] opts the optional parameters
474
474
  # @return [AttachmentMetaData]
475
- def get_attachment_meta_data(attachment_id, email_id, opts = {})
476
- data, _status_code, _headers = get_attachment_meta_data_with_http_info(attachment_id, email_id, opts)
475
+ def get_attachment_meta_data(email_id, attachment_id, opts = {})
476
+ data, _status_code, _headers = get_attachment_meta_data_with_http_info(email_id, attachment_id, opts)
477
477
  data
478
478
  end
479
479
 
480
480
  # Get email attachment metadata. This is the &#x60;contentType&#x60; and &#x60;contentLength&#x60; of an attachment. To get the individual attachments use the &#x60;downloadAttachment&#x60; methods.
481
481
  # Returns the metadata such as name and content-type for a given attachment and email.
482
- # @param attachment_id [String] ID of attachment
483
482
  # @param email_id [String] ID of email
483
+ # @param attachment_id [String] ID of attachment
484
484
  # @param [Hash] opts the optional parameters
485
485
  # @return [Array<(AttachmentMetaData, Integer, Hash)>] AttachmentMetaData data, response status code and response headers
486
- def get_attachment_meta_data_with_http_info(attachment_id, email_id, opts = {})
486
+ def get_attachment_meta_data_with_http_info(email_id, attachment_id, opts = {})
487
487
  if @api_client.config.debugging
488
488
  @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_attachment_meta_data ...'
489
489
  end
490
- # verify the required parameter 'attachment_id' is set
491
- if @api_client.config.client_side_validation && attachment_id.nil?
492
- fail ArgumentError, "Missing the required parameter 'attachment_id' when calling EmailControllerApi.get_attachment_meta_data"
493
- end
494
490
  # verify the required parameter 'email_id' is set
495
491
  if @api_client.config.client_side_validation && email_id.nil?
496
492
  fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_attachment_meta_data"
497
493
  end
494
+ # verify the required parameter 'attachment_id' is set
495
+ if @api_client.config.client_side_validation && attachment_id.nil?
496
+ fail ArgumentError, "Missing the required parameter 'attachment_id' when calling EmailControllerApi.get_attachment_meta_data"
497
+ end
498
498
  # resource path
499
- local_var_path = '/emails/{emailId}/attachments/{attachmentId}/metadata'.sub('{' + 'attachmentId' + '}', CGI.escape(attachment_id.to_s)).sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
499
+ local_var_path = '/emails/{emailId}/attachments/{attachmentId}/metadata'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s)).sub('{' + 'attachmentId' + '}', CGI.escape(attachment_id.to_s))
500
500
 
501
501
  # query parameters
502
502
  query_params = opts[:query_params] || {}
@@ -504,7 +504,7 @@ module MailSlurpClient
504
504
  # header parameters
505
505
  header_params = opts[:header_params] || {}
506
506
  # HTTP header 'Accept' (if needed)
507
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
507
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
508
508
 
509
509
  # form parameters
510
510
  form_params = opts[:form_params] || {}
@@ -539,8 +539,8 @@ module MailSlurpClient
539
539
  # @param email_id [String] ID of email
540
540
  # @param [Hash] opts the optional parameters
541
541
  # @return [Array<AttachmentMetaData>]
542
- def get_attachments1(email_id, opts = {})
543
- data, _status_code, _headers = get_attachments1_with_http_info(email_id, opts)
542
+ def get_attachments(email_id, opts = {})
543
+ data, _status_code, _headers = get_attachments_with_http_info(email_id, opts)
544
544
  data
545
545
  end
546
546
 
@@ -549,13 +549,13 @@ module MailSlurpClient
549
549
  # @param email_id [String] ID of email
550
550
  # @param [Hash] opts the optional parameters
551
551
  # @return [Array<(Array<AttachmentMetaData>, Integer, Hash)>] Array<AttachmentMetaData> data, response status code and response headers
552
- def get_attachments1_with_http_info(email_id, opts = {})
552
+ def get_attachments_with_http_info(email_id, opts = {})
553
553
  if @api_client.config.debugging
554
- @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_attachments1 ...'
554
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_attachments ...'
555
555
  end
556
556
  # verify the required parameter 'email_id' is set
557
557
  if @api_client.config.client_side_validation && email_id.nil?
558
- fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_attachments1"
558
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_attachments"
559
559
  end
560
560
  # resource path
561
561
  local_var_path = '/emails/{emailId}/attachments'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
@@ -566,7 +566,7 @@ module MailSlurpClient
566
566
  # header parameters
567
567
  header_params = opts[:header_params] || {}
568
568
  # HTTP header 'Accept' (if needed)
569
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
569
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
570
570
 
571
571
  # form parameters
572
572
  form_params = opts[:form_params] || {}
@@ -591,14 +591,14 @@ module MailSlurpClient
591
591
 
592
592
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
593
593
  if @api_client.config.debugging
594
- @api_client.config.logger.debug "API called: EmailControllerApi#get_attachments1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
594
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
595
595
  end
596
596
  return data, status_code, headers
597
597
  end
598
598
 
599
599
  # Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.
600
600
  # Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
601
- # @param email_id [String] emailId
601
+ # @param email_id [String]
602
602
  # @param [Hash] opts the optional parameters
603
603
  # @option opts [Boolean] :decode Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance &#x60;&#x3D;D7&#x60;). This can be a pain for testing (default to false)
604
604
  # @return [Email]
@@ -609,7 +609,7 @@ module MailSlurpClient
609
609
 
610
610
  # Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.
611
611
  # Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
612
- # @param email_id [String] emailId
612
+ # @param email_id [String]
613
613
  # @param [Hash] opts the optional parameters
614
614
  # @option opts [Boolean] :decode Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance &#x60;&#x3D;D7&#x60;). This can be a pain for testing
615
615
  # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
@@ -631,7 +631,7 @@ module MailSlurpClient
631
631
  # header parameters
632
632
  header_params = opts[:header_params] || {}
633
633
  # HTTP header 'Accept' (if needed)
634
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
634
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
635
635
 
636
636
  # form parameters
637
637
  form_params = opts[:form_params] || {}
@@ -664,7 +664,7 @@ module MailSlurpClient
664
664
  # Get email content regex pattern match results. Runs regex against email body and returns match groups.
665
665
  # Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
666
666
  # @param email_id [String] ID of email to match against
667
- # @param content_match_options [ContentMatchOptions] contentMatchOptions
667
+ # @param content_match_options [ContentMatchOptions]
668
668
  # @param [Hash] opts the optional parameters
669
669
  # @return [EmailContentMatchResult]
670
670
  def get_email_content_match(email_id, content_match_options, opts = {})
@@ -675,7 +675,7 @@ module MailSlurpClient
675
675
  # Get email content regex pattern match results. Runs regex against email body and returns match groups.
676
676
  # Return the matches for a given Java style regex pattern. Do not include the typical &#x60;/&#x60; at start or end of regex in some languages. Given an example &#x60;your code is: 12345&#x60; the pattern to extract match looks like &#x60;code is: (\\d{6})&#x60;. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: &#x60;[&#39;code is: 123456&#39;, &#39;123456&#39;]&#x60; See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
677
677
  # @param email_id [String] ID of email to match against
678
- # @param content_match_options [ContentMatchOptions] contentMatchOptions
678
+ # @param content_match_options [ContentMatchOptions]
679
679
  # @param [Hash] opts the optional parameters
680
680
  # @return [Array<(EmailContentMatchResult, Integer, Hash)>] EmailContentMatchResult data, response status code and response headers
681
681
  def get_email_content_match_with_http_info(email_id, content_match_options, opts = {})
@@ -699,7 +699,7 @@ module MailSlurpClient
699
699
  # header parameters
700
700
  header_params = opts[:header_params] || {}
701
701
  # HTTP header 'Accept' (if needed)
702
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
702
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
703
703
  # HTTP header 'Content-Type'
704
704
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
705
705
 
@@ -755,7 +755,7 @@ module MailSlurpClient
755
755
  # header parameters
756
756
  header_params = opts[:header_params] || {}
757
757
  # HTTP header 'Accept' (if needed)
758
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
758
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
759
759
 
760
760
  # form parameters
761
761
  form_params = opts[:form_params] || {}
@@ -787,9 +787,9 @@ module MailSlurpClient
787
787
 
788
788
  # Get email content as HTML. For displaying emails in browser context.
789
789
  # 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`
790
- # @param email_id [String] emailId
790
+ # @param email_id [String]
791
791
  # @param [Hash] opts the optional parameters
792
- # @option opts [Boolean] :decode decode (default to false)
792
+ # @option opts [Boolean] :decode (default to false)
793
793
  # @return [String]
794
794
  def get_email_html(email_id, opts = {})
795
795
  data, _status_code, _headers = get_email_html_with_http_info(email_id, opts)
@@ -798,9 +798,9 @@ module MailSlurpClient
798
798
 
799
799
  # Get email content as HTML. For displaying emails in browser context.
800
800
  # 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: &#x60;?apiKey&#x3D;xxx&#x60;
801
- # @param email_id [String] emailId
801
+ # @param email_id [String]
802
802
  # @param [Hash] opts the optional parameters
803
- # @option opts [Boolean] :decode decode
803
+ # @option opts [Boolean] :decode
804
804
  # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
805
805
  def get_email_html_with_http_info(email_id, opts = {})
806
806
  if @api_client.config.debugging
@@ -853,21 +853,21 @@ module MailSlurpClient
853
853
  # Parse and return text from an email, stripping HTML and decoding encoded characters
854
854
  # Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
855
855
  # @param email_id [String] ID of email to perform HTML query on
856
+ # @param html_selector [String] HTML selector to search for. Uses JQuery/JSoup/CSS style selector like &#39;.my-div&#39; to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information.
856
857
  # @param [Hash] opts the optional parameters
857
- # @option opts [String] :html_selector HTML selector to search for. Uses JQuery/JSoup/CSS style selector like &#39;.my-div&#39; to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information.
858
858
  # @return [EmailTextLinesResult]
859
- def get_email_html_query(email_id, opts = {})
860
- data, _status_code, _headers = get_email_html_query_with_http_info(email_id, opts)
859
+ def get_email_html_query(email_id, html_selector, opts = {})
860
+ data, _status_code, _headers = get_email_html_query_with_http_info(email_id, html_selector, opts)
861
861
  data
862
862
  end
863
863
 
864
864
  # Parse and return text from an email, stripping HTML and decoding encoded characters
865
865
  # Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
866
866
  # @param email_id [String] ID of email to perform HTML query on
867
+ # @param html_selector [String] HTML selector to search for. Uses JQuery/JSoup/CSS style selector like &#39;.my-div&#39; to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information.
867
868
  # @param [Hash] opts the optional parameters
868
- # @option opts [String] :html_selector HTML selector to search for. Uses JQuery/JSoup/CSS style selector like &#39;.my-div&#39; to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information.
869
869
  # @return [Array<(EmailTextLinesResult, Integer, Hash)>] EmailTextLinesResult data, response status code and response headers
870
- def get_email_html_query_with_http_info(email_id, opts = {})
870
+ def get_email_html_query_with_http_info(email_id, html_selector, opts = {})
871
871
  if @api_client.config.debugging
872
872
  @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email_html_query ...'
873
873
  end
@@ -875,17 +875,21 @@ module MailSlurpClient
875
875
  if @api_client.config.client_side_validation && email_id.nil?
876
876
  fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_html_query"
877
877
  end
878
+ # verify the required parameter 'html_selector' is set
879
+ if @api_client.config.client_side_validation && html_selector.nil?
880
+ fail ArgumentError, "Missing the required parameter 'html_selector' when calling EmailControllerApi.get_email_html_query"
881
+ end
878
882
  # resource path
879
883
  local_var_path = '/emails/{emailId}/htmlQuery'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
880
884
 
881
885
  # query parameters
882
886
  query_params = opts[:query_params] || {}
883
- query_params[:'htmlSelector'] = opts[:'html_selector'] if !opts[:'html_selector'].nil?
887
+ query_params[:'htmlSelector'] = html_selector
884
888
 
885
889
  # header parameters
886
890
  header_params = opts[:header_params] || {}
887
891
  # HTTP header 'Accept' (if needed)
888
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
892
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
889
893
 
890
894
  # form parameters
891
895
  form_params = opts[:form_params] || {}
@@ -947,7 +951,7 @@ module MailSlurpClient
947
951
  # header parameters
948
952
  header_params = opts[:header_params] || {}
949
953
  # HTTP header 'Accept' (if needed)
950
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
954
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
951
955
 
952
956
  # form parameters
953
957
  form_params = opts[:form_params] || {}
@@ -1015,7 +1019,7 @@ module MailSlurpClient
1015
1019
  # header parameters
1016
1020
  header_params = opts[:header_params] || {}
1017
1021
  # HTTP header 'Accept' (if needed)
1018
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1022
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1019
1023
 
1020
1024
  # form parameters
1021
1025
  form_params = opts[:form_params] || {}
@@ -1048,14 +1052,14 @@ module MailSlurpClient
1048
1052
  # Get all emails in all inboxes in paginated form. Email API list all.
1049
1053
  # 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
1050
1054
  # @param [Hash] opts the optional parameters
1051
- # @option opts [DateTime] :before Optional filter emails received before given date time
1052
1055
  # @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
1053
1056
  # @option opts [Integer] :page Optional page index in email list pagination (default to 0)
1054
- # @option opts [String] :search_filter Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (default to 'false')
1055
- # @option opts [DateTime] :since Optional filter emails received after given date time
1056
1057
  # @option opts [Integer] :size Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
1057
1058
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
1058
1059
  # @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (default to false)
1060
+ # @option opts [String] :search_filter Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body
1061
+ # @option opts [DateTime] :since Optional filter emails received after given date time
1062
+ # @option opts [DateTime] :before Optional filter emails received before given date time
1059
1063
  # @return [PageEmailProjection]
1060
1064
  def get_emails_paginated(opts = {})
1061
1065
  data, _status_code, _headers = get_emails_paginated_with_http_info(opts)
@@ -1065,19 +1069,23 @@ module MailSlurpClient
1065
1069
  # Get all emails in all inboxes in paginated form. Email API list all.
1066
1070
  # 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
1067
1071
  # @param [Hash] opts the optional parameters
1068
- # @option opts [DateTime] :before Optional filter emails received before given date time
1069
1072
  # @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
1070
1073
  # @option opts [Integer] :page Optional page index in email list pagination
1071
- # @option opts [String] :search_filter Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body
1072
- # @option opts [DateTime] :since Optional filter emails received after given date time
1073
1074
  # @option opts [Integer] :size Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results
1074
1075
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
1075
1076
  # @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
1077
+ # @option opts [String] :search_filter Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body
1078
+ # @option opts [DateTime] :since Optional filter emails received after given date time
1079
+ # @option opts [DateTime] :before Optional filter emails received before given date time
1076
1080
  # @return [Array<(PageEmailProjection, Integer, Hash)>] PageEmailProjection data, response status code and response headers
1077
1081
  def get_emails_paginated_with_http_info(opts = {})
1078
1082
  if @api_client.config.debugging
1079
1083
  @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_emails_paginated ...'
1080
1084
  end
1085
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
1086
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling EmailControllerApi.get_emails_paginated, must be smaller than or equal to 100.'
1087
+ end
1088
+
1081
1089
  allowable_values = ["ASC", "DESC"]
1082
1090
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1083
1091
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
@@ -1087,19 +1095,19 @@ module MailSlurpClient
1087
1095
 
1088
1096
  # query parameters
1089
1097
  query_params = opts[:query_params] || {}
1090
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1091
1098
  query_params[:'inboxId'] = @api_client.build_collection_param(opts[:'inbox_id'], :multi) if !opts[:'inbox_id'].nil?
1092
1099
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1093
- query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
1094
- query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
1095
1100
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1096
1101
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1097
1102
  query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
1103
+ query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
1104
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
1105
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1098
1106
 
1099
1107
  # header parameters
1100
1108
  header_params = opts[:header_params] || {}
1101
1109
  # HTTP header 'Accept' (if needed)
1102
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1110
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1103
1111
 
1104
1112
  # form parameters
1105
1113
  form_params = opts[:form_params] || {}
@@ -1130,9 +1138,9 @@ module MailSlurpClient
1130
1138
  end
1131
1139
 
1132
1140
  # Get gravatar url for email address
1133
- # @param email_address [String] emailAddress
1141
+ # @param email_address [String]
1134
1142
  # @param [Hash] opts the optional parameters
1135
- # @option opts [String] :size size
1143
+ # @option opts [String] :size
1136
1144
  # @return [GravatarUrl]
1137
1145
  def get_gravatar_url_for_email_address(email_address, opts = {})
1138
1146
  data, _status_code, _headers = get_gravatar_url_for_email_address_with_http_info(email_address, opts)
@@ -1140,9 +1148,9 @@ module MailSlurpClient
1140
1148
  end
1141
1149
 
1142
1150
  # Get gravatar url for email address
1143
- # @param email_address [String] emailAddress
1151
+ # @param email_address [String]
1144
1152
  # @param [Hash] opts the optional parameters
1145
- # @option opts [String] :size size
1153
+ # @option opts [String] :size
1146
1154
  # @return [Array<(GravatarUrl, Integer, Hash)>] GravatarUrl data, response status code and response headers
1147
1155
  def get_gravatar_url_for_email_address_with_http_info(email_address, opts = {})
1148
1156
  if @api_client.config.debugging
@@ -1163,7 +1171,7 @@ module MailSlurpClient
1163
1171
  # header parameters
1164
1172
  header_params = opts[:header_params] || {}
1165
1173
  # HTTP header 'Accept' (if needed)
1166
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1174
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1167
1175
 
1168
1176
  # form parameters
1169
1177
  form_params = opts[:form_params] || {}
@@ -1222,7 +1230,7 @@ module MailSlurpClient
1222
1230
  # header parameters
1223
1231
  header_params = opts[:header_params] || {}
1224
1232
  # HTTP header 'Accept' (if needed)
1225
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1233
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1226
1234
 
1227
1235
  # form parameters
1228
1236
  form_params = opts[:form_params] || {}
@@ -1254,34 +1262,38 @@ module MailSlurpClient
1254
1262
 
1255
1263
  # Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet.
1256
1264
  # Get the newest email in all inboxes or in a passed set of inbox IDs
1265
+ # @param inbox_id [String] ID of the inbox you want to get the latest email from
1257
1266
  # @param [Hash] opts the optional parameters
1258
- # @option opts [String] :inbox_id ID of the inbox you want to get the latest email from
1259
1267
  # @return [Email]
1260
- def get_latest_email_in_inbox(opts = {})
1261
- data, _status_code, _headers = get_latest_email_in_inbox_with_http_info(opts)
1268
+ def get_latest_email_in_inbox(inbox_id, opts = {})
1269
+ data, _status_code, _headers = get_latest_email_in_inbox_with_http_info(inbox_id, opts)
1262
1270
  data
1263
1271
  end
1264
1272
 
1265
1273
  # Get latest email in an inbox. Use &#x60;WaitForController&#x60; to get emails that may not have arrived yet.
1266
1274
  # Get the newest email in all inboxes or in a passed set of inbox IDs
1275
+ # @param inbox_id [String] ID of the inbox you want to get the latest email from
1267
1276
  # @param [Hash] opts the optional parameters
1268
- # @option opts [String] :inbox_id ID of the inbox you want to get the latest email from
1269
1277
  # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
1270
- def get_latest_email_in_inbox_with_http_info(opts = {})
1278
+ def get_latest_email_in_inbox_with_http_info(inbox_id, opts = {})
1271
1279
  if @api_client.config.debugging
1272
1280
  @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_latest_email_in_inbox ...'
1273
1281
  end
1282
+ # verify the required parameter 'inbox_id' is set
1283
+ if @api_client.config.client_side_validation && inbox_id.nil?
1284
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling EmailControllerApi.get_latest_email_in_inbox"
1285
+ end
1274
1286
  # resource path
1275
1287
  local_var_path = '/emails/latestIn'
1276
1288
 
1277
1289
  # query parameters
1278
1290
  query_params = opts[:query_params] || {}
1279
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
1291
+ query_params[:'inboxId'] = inbox_id
1280
1292
 
1281
1293
  # header parameters
1282
1294
  header_params = opts[:header_params] || {}
1283
1295
  # HTTP header 'Accept' (if needed)
1284
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1296
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1285
1297
 
1286
1298
  # form parameters
1287
1299
  form_params = opts[:form_params] || {}
@@ -1314,14 +1326,14 @@ module MailSlurpClient
1314
1326
  # Get all organization emails. List team or shared test email accounts
1315
1327
  # By default returns all emails across all team 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
1316
1328
  # @param [Hash] opts the optional parameters
1317
- # @option opts [DateTime] :before Optional filter emails received before given date time
1318
1329
  # @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
1319
1330
  # @option opts [Integer] :page Optional page index in email list pagination (default to 0)
1320
- # @option opts [String] :search_filter Optional search filter search filter for emails.
1321
- # @option opts [DateTime] :since Optional filter emails received after given date time
1322
1331
  # @option opts [Integer] :size Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
1323
1332
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
1324
1333
  # @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (default to false)
1334
+ # @option opts [String] :search_filter Optional search filter search filter for emails.
1335
+ # @option opts [DateTime] :since Optional filter emails received after given date time
1336
+ # @option opts [DateTime] :before Optional filter emails received before given date time
1325
1337
  # @return [PageEmailProjection]
1326
1338
  def get_organization_emails_paginated(opts = {})
1327
1339
  data, _status_code, _headers = get_organization_emails_paginated_with_http_info(opts)
@@ -1331,19 +1343,23 @@ module MailSlurpClient
1331
1343
  # Get all organization emails. List team or shared test email accounts
1332
1344
  # By default returns all emails across all team 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
1333
1345
  # @param [Hash] opts the optional parameters
1334
- # @option opts [DateTime] :before Optional filter emails received before given date time
1335
1346
  # @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
1336
1347
  # @option opts [Integer] :page Optional page index in email list pagination
1337
- # @option opts [String] :search_filter Optional search filter search filter for emails.
1338
- # @option opts [DateTime] :since Optional filter emails received after given date time
1339
1348
  # @option opts [Integer] :size Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results
1340
1349
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
1341
1350
  # @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
1351
+ # @option opts [String] :search_filter Optional search filter search filter for emails.
1352
+ # @option opts [DateTime] :since Optional filter emails received after given date time
1353
+ # @option opts [DateTime] :before Optional filter emails received before given date time
1342
1354
  # @return [Array<(PageEmailProjection, Integer, Hash)>] PageEmailProjection data, response status code and response headers
1343
1355
  def get_organization_emails_paginated_with_http_info(opts = {})
1344
1356
  if @api_client.config.debugging
1345
1357
  @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_organization_emails_paginated ...'
1346
1358
  end
1359
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
1360
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling EmailControllerApi.get_organization_emails_paginated, must be smaller than or equal to 100.'
1361
+ end
1362
+
1347
1363
  allowable_values = ["ASC", "DESC"]
1348
1364
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1349
1365
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
@@ -1353,19 +1369,19 @@ module MailSlurpClient
1353
1369
 
1354
1370
  # query parameters
1355
1371
  query_params = opts[:query_params] || {}
1356
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1357
1372
  query_params[:'inboxId'] = @api_client.build_collection_param(opts[:'inbox_id'], :multi) if !opts[:'inbox_id'].nil?
1358
1373
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1359
- query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
1360
- query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
1361
1374
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1362
1375
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1363
1376
  query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
1377
+ query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
1378
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
1379
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1364
1380
 
1365
1381
  # header parameters
1366
1382
  header_params = opts[:header_params] || {}
1367
1383
  # HTTP header 'Accept' (if needed)
1368
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1384
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1369
1385
 
1370
1386
  # form parameters
1371
1387
  form_params = opts[:form_params] || {}
@@ -1489,7 +1505,7 @@ module MailSlurpClient
1489
1505
  # header parameters
1490
1506
  header_params = opts[:header_params] || {}
1491
1507
  # HTTP header 'Accept' (if needed)
1492
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1508
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1493
1509
 
1494
1510
  # form parameters
1495
1511
  form_params = opts[:form_params] || {}
@@ -1545,7 +1561,7 @@ module MailSlurpClient
1545
1561
  # header parameters
1546
1562
  header_params = opts[:header_params] || {}
1547
1563
  # HTTP header 'Accept' (if needed)
1548
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1564
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1549
1565
 
1550
1566
  # form parameters
1551
1567
  form_params = opts[:form_params] || {}
@@ -1577,7 +1593,7 @@ module MailSlurpClient
1577
1593
 
1578
1594
  # Mark an email as read on unread
1579
1595
  # Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
1580
- # @param email_id [String] emailId
1596
+ # @param email_id [String]
1581
1597
  # @param [Hash] opts the optional parameters
1582
1598
  # @option opts [Boolean] :read What value to assign to email read property. Default true. (default to true)
1583
1599
  # @return [EmailPreview]
@@ -1588,7 +1604,7 @@ module MailSlurpClient
1588
1604
 
1589
1605
  # Mark an email as read on unread
1590
1606
  # Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
1591
- # @param email_id [String] emailId
1607
+ # @param email_id [String]
1592
1608
  # @param [Hash] opts the optional parameters
1593
1609
  # @option opts [Boolean] :read What value to assign to email read property. Default true.
1594
1610
  # @return [Array<(EmailPreview, Integer, Hash)>] EmailPreview data, response status code and response headers
@@ -1610,7 +1626,7 @@ module MailSlurpClient
1610
1626
  # header parameters
1611
1627
  header_params = opts[:header_params] || {}
1612
1628
  # HTTP header 'Accept' (if needed)
1613
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1629
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1614
1630
 
1615
1631
  # form parameters
1616
1632
  form_params = opts[:form_params] || {}
@@ -1643,7 +1659,7 @@ module MailSlurpClient
1643
1659
  # Reply to an email
1644
1660
  # Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
1645
1661
  # @param email_id [String] ID of the email that should be replied to
1646
- # @param reply_to_email_options [ReplyToEmailOptions] replyToEmailOptions
1662
+ # @param reply_to_email_options [ReplyToEmailOptions]
1647
1663
  # @param [Hash] opts the optional parameters
1648
1664
  # @return [SentEmailDto]
1649
1665
  def reply_to_email(email_id, reply_to_email_options, opts = {})
@@ -1654,7 +1670,7 @@ module MailSlurpClient
1654
1670
  # Reply to an email
1655
1671
  # Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails &#x60;to&#x60;, &#x60;cc&#x60;, and &#x60;bcc&#x60;.
1656
1672
  # @param email_id [String] ID of the email that should be replied to
1657
- # @param reply_to_email_options [ReplyToEmailOptions] replyToEmailOptions
1673
+ # @param reply_to_email_options [ReplyToEmailOptions]
1658
1674
  # @param [Hash] opts the optional parameters
1659
1675
  # @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers
1660
1676
  def reply_to_email_with_http_info(email_id, reply_to_email_options, opts = {})
@@ -1678,7 +1694,7 @@ module MailSlurpClient
1678
1694
  # header parameters
1679
1695
  header_params = opts[:header_params] || {}
1680
1696
  # HTTP header 'Accept' (if needed)
1681
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1697
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1682
1698
  # HTTP header 'Content-Type'
1683
1699
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1684
1700
 
@@ -1712,33 +1728,40 @@ module MailSlurpClient
1712
1728
 
1713
1729
  # Send email
1714
1730
  # Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
1731
+ # @param inbox_id [String] ID of the inbox you want to send the email from
1732
+ # @param send_email_options [SendEmailOptions]
1715
1733
  # @param [Hash] opts the optional parameters
1716
- # @option opts [String] :inbox_id ID of the inbox you want to send the email from
1717
1734
  # @option opts [Boolean] :use_domain_pool Use domain pool. Optionally create inbox to send from using the mailslurp domain pool.
1718
- # @option opts [SendEmailOptions] :send_email_options Options for the email
1719
1735
  # @return [nil]
1720
- def send_email_source_optional(opts = {})
1721
- send_email_source_optional_with_http_info(opts)
1736
+ def send_email_source_optional(inbox_id, send_email_options, opts = {})
1737
+ send_email_source_optional_with_http_info(inbox_id, send_email_options, opts)
1722
1738
  nil
1723
1739
  end
1724
1740
 
1725
1741
  # Send email
1726
1742
  # Alias for &#x60;InboxController.sendEmail&#x60; method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
1743
+ # @param inbox_id [String] ID of the inbox you want to send the email from
1744
+ # @param send_email_options [SendEmailOptions]
1727
1745
  # @param [Hash] opts the optional parameters
1728
- # @option opts [String] :inbox_id ID of the inbox you want to send the email from
1729
1746
  # @option opts [Boolean] :use_domain_pool Use domain pool. Optionally create inbox to send from using the mailslurp domain pool.
1730
- # @option opts [SendEmailOptions] :send_email_options Options for the email
1731
1747
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1732
- def send_email_source_optional_with_http_info(opts = {})
1748
+ def send_email_source_optional_with_http_info(inbox_id, send_email_options, opts = {})
1733
1749
  if @api_client.config.debugging
1734
1750
  @api_client.config.logger.debug 'Calling API: EmailControllerApi.send_email_source_optional ...'
1735
1751
  end
1752
+ # verify the required parameter 'inbox_id' is set
1753
+ if @api_client.config.client_side_validation && inbox_id.nil?
1754
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling EmailControllerApi.send_email_source_optional"
1755
+ end
1756
+ # verify the required parameter 'send_email_options' is set
1757
+ if @api_client.config.client_side_validation && send_email_options.nil?
1758
+ fail ArgumentError, "Missing the required parameter 'send_email_options' when calling EmailControllerApi.send_email_source_optional"
1759
+ end
1736
1760
  # resource path
1737
- local_var_path = '/emails'
1761
+ local_var_path = '/emails'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
1738
1762
 
1739
1763
  # query parameters
1740
1764
  query_params = opts[:query_params] || {}
1741
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
1742
1765
  query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
1743
1766
 
1744
1767
  # header parameters
@@ -1750,7 +1773,7 @@ module MailSlurpClient
1750
1773
  form_params = opts[:form_params] || {}
1751
1774
 
1752
1775
  # http body (model)
1753
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'send_email_options'])
1776
+ post_body = opts[:body] || @api_client.object_to_http_body(send_email_options)
1754
1777
 
1755
1778
  # return_type
1756
1779
  return_type = opts[:return_type]
@@ -1806,7 +1829,7 @@ module MailSlurpClient
1806
1829
  # header parameters
1807
1830
  header_params = opts[:header_params] || {}
1808
1831
  # HTTP header 'Accept' (if needed)
1809
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1832
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1810
1833
 
1811
1834
  # form parameters
1812
1835
  form_params = opts[:form_params] || {}