mailslurp_client 15.8.1 → 15.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/attachment_controller_api.rb +4 -4
  3. data/lib/mailslurp_client/api/email_controller_api.rb +68 -3
  4. data/lib/mailslurp_client/api/form_controller_api.rb +2 -2
  5. data/lib/mailslurp_client/api/inbox_controller_api.rb +75 -0
  6. data/lib/mailslurp_client/api/missed_email_controller_api.rb +56 -0
  7. data/lib/mailslurp_client/api/phone_controller_api.rb +487 -0
  8. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +73 -0
  9. data/lib/mailslurp_client/api/sms_controller_api.rb +286 -0
  10. data/lib/mailslurp_client/api/wait_for_controller_api.rb +64 -0
  11. data/lib/mailslurp_client/api/webhook_controller_api.rb +2 -2
  12. data/lib/mailslurp_client/configuration.rb +2 -2
  13. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
  14. data/lib/mailslurp_client/models/alias_projection.rb +31 -31
  15. data/lib/mailslurp_client/models/attachment_entity.rb +10 -1
  16. data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
  17. data/lib/mailslurp_client/models/contact_projection.rb +18 -13
  18. data/lib/mailslurp_client/models/create_emergency_address_options.rb +324 -0
  19. data/lib/mailslurp_client/models/create_webhook_options.rb +3 -3
  20. data/lib/mailslurp_client/models/email_html_dto.rb +215 -0
  21. data/lib/mailslurp_client/models/email_preview.rb +5 -0
  22. data/lib/mailslurp_client/models/email_projection.rb +20 -10
  23. data/lib/mailslurp_client/models/emergency_address.rb +408 -0
  24. data/lib/mailslurp_client/models/emergency_address_dto.rb +273 -0
  25. data/lib/mailslurp_client/models/empty_response_dto.rb +206 -0
  26. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
  27. data/lib/mailslurp_client/models/inbox_preview.rb +5 -0
  28. data/lib/mailslurp_client/models/missed_email.rb +37 -1
  29. data/lib/mailslurp_client/models/organization_inbox_projection.rb +5 -0
  30. data/lib/mailslurp_client/models/page_alias.rb +19 -19
  31. data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
  32. data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
  33. data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
  34. data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
  35. data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
  36. data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
  37. data/lib/mailslurp_client/models/page_email_validation_request.rb +19 -19
  38. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
  39. data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
  40. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
  41. data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
  42. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +19 -19
  43. data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
  44. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
  45. data/lib/mailslurp_client/models/page_phone_number_projection.rb +308 -0
  46. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +344 -0
  47. data/lib/mailslurp_client/models/page_sms_projection.rb +308 -0
  48. data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
  49. data/lib/mailslurp_client/models/page_thread_projection.rb +19 -19
  50. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
  51. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
  52. data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
  53. data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
  54. data/lib/mailslurp_client/models/phone_number_dto.rb +347 -0
  55. data/lib/mailslurp_client/models/phone_number_projection.rb +302 -0
  56. data/lib/mailslurp_client/models/phone_plan_dto.rb +287 -0
  57. data/lib/mailslurp_client/models/send_with_queue_result.rb +318 -0
  58. data/lib/mailslurp_client/models/sent_email_projection.rb +32 -27
  59. data/lib/mailslurp_client/models/sms_match_option.rb +289 -0
  60. data/lib/mailslurp_client/models/sms_message.rb +318 -0
  61. data/lib/mailslurp_client/models/sms_preview.rb +267 -0
  62. data/lib/mailslurp_client/models/sms_projection.rb +282 -0
  63. data/lib/mailslurp_client/models/template_projection.rb +18 -18
  64. data/lib/mailslurp_client/models/thread_projection.rb +36 -36
  65. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
  66. data/lib/mailslurp_client/models/wait_for_sms_conditions.rb +371 -0
  67. data/lib/mailslurp_client/models/webhook_bounce_payload.rb +2 -2
  68. data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
  69. data/lib/mailslurp_client/models/webhook_dto.rb +3 -3
  70. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +2 -2
  71. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +2 -2
  72. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
  73. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +7 -2
  74. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
  75. data/lib/mailslurp_client/models/webhook_projection.rb +2 -2
  76. data/lib/mailslurp_client/models/webhook_result_dto.rb +7 -2
  77. data/lib/mailslurp_client/version.rb +1 -1
  78. data/lib/mailslurp_client.rb +19 -0
  79. metadata +21 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c57b9ba3a7c06a9bf126689e80920a1e0eae9be28a03bdea3b724cad4ab100f
4
- data.tar.gz: 1290b7e2f2e09d23c22f1be518b6cad3299c473f0bb5abb6b8b455c59852a5be
3
+ metadata.gz: 8405ef6045794e6a9cc24dc15eb01813410bf4120aaec0f63b41d59c59097071
4
+ data.tar.gz: b20cef3856ade796cf813a54c318d3c1168bada7543d9eac88c0314e01e1b180
5
5
  SHA512:
6
- metadata.gz: 9a3027477ae43a11e1298f6c06c69ca79ec9858732375c06b70b283d0ae4414f83367f7471ba3751c7842ff4b44aafb9c553344d6564cd65d220087639144cb6
7
- data.tar.gz: ea9ae376f7209b22aa3c9cf54769ba16f15bda619ce2bb78e4a19f4b7b5bda04a804c8fef92114b6733327a1f323d0767eeb2cfd26aead8e1e1e0e89554d9f05
6
+ metadata.gz: d35ee5a2d41e2b48c77c42a8426dc1eaabb33259dc68cc9d51df09f324a9fa2b9ea3c787cea0804d485599c7b73f47f8d1ee3b30aa5c449412a76d1c60b3293c
7
+ data.tar.gz: c6b0deb8bc5645ee744fe674ccbe18cab4884697dc78a881d7834c7ee1cf7333d3746d4539a4504e3b83bced66f145cbef35b7af1523f164fb04dd579b5c901f
@@ -378,8 +378,8 @@ module MailSlurpClient
378
378
  # Get email attachments
379
379
  # Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents.
380
380
  # @param [Hash] opts the optional parameters
381
- # @option opts [Integer] :page Optional page index event list pagination (default to 0)
382
- # @option opts [Integer] :size Optional page size event list pagination (default to 20)
381
+ # @option opts [Integer] :page Optional page index for list pagination (default to 0)
382
+ # @option opts [Integer] :size Optional page size for list pagination (default to 20)
383
383
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
384
384
  # @option opts [String] :file_name_filter Optional file name and content type search filter
385
385
  # @option opts [DateTime] :since Filter by created at after the given timestamp
@@ -393,8 +393,8 @@ module MailSlurpClient
393
393
  # Get email attachments
394
394
  # Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents.
395
395
  # @param [Hash] opts the optional parameters
396
- # @option opts [Integer] :page Optional page index event list pagination
397
- # @option opts [Integer] :size Optional page size event list pagination
396
+ # @option opts [Integer] :page Optional page index for list pagination
397
+ # @option opts [Integer] :size Optional page size for list pagination
398
398
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
399
399
  # @option opts [String] :file_name_filter Optional file name and content type search filter
400
400
  # @option opts [DateTime] :since Filter by created at after the given timestamp
@@ -856,7 +856,7 @@ module MailSlurpClient
856
856
  end
857
857
 
858
858
  # Get email content as HTML. For displaying emails in browser context.
859
- # 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`
859
+ # 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`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method.
860
860
  # @param email_id [String]
861
861
  # @param [Hash] opts the optional parameters
862
862
  # @option opts [Boolean] :decode (default to false)
@@ -867,7 +867,7 @@ module MailSlurpClient
867
867
  end
868
868
 
869
869
  # Get email content as HTML. For displaying emails in browser context.
870
- # 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`
870
+ # 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`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method.
871
871
  # @param email_id [String]
872
872
  # @param [Hash] opts the optional parameters
873
873
  # @option opts [Boolean] :decode
@@ -890,7 +890,7 @@ module MailSlurpClient
890
890
  # header parameters
891
891
  header_params = opts[:header_params] || {}
892
892
  # HTTP header 'Accept' (if needed)
893
- header_params['Accept'] = @api_client.select_header_accept(['text/html'])
893
+ header_params['Accept'] = @api_client.select_header_accept(['text/html;charset=utf-8', 'text/html'])
894
894
 
895
895
  # form parameters
896
896
  form_params = opts[:form_params] || {}
@@ -920,6 +920,71 @@ module MailSlurpClient
920
920
  return data, status_code, headers
921
921
  end
922
922
 
923
+ # Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content
924
+ # Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON.
925
+ # @param email_id [String]
926
+ # @param [Hash] opts the optional parameters
927
+ # @option opts [Boolean] :decode (default to false)
928
+ # @return [EmailHtmlDto]
929
+ def get_email_html_json(email_id, opts = {})
930
+ data, _status_code, _headers = get_email_html_json_with_http_info(email_id, opts)
931
+ data
932
+ end
933
+
934
+ # Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content
935
+ # Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON.
936
+ # @param email_id [String]
937
+ # @param [Hash] opts the optional parameters
938
+ # @option opts [Boolean] :decode
939
+ # @return [Array<(EmailHtmlDto, Integer, Hash)>] EmailHtmlDto data, response status code and response headers
940
+ def get_email_html_json_with_http_info(email_id, opts = {})
941
+ if @api_client.config.debugging
942
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email_html_json ...'
943
+ end
944
+ # verify the required parameter 'email_id' is set
945
+ if @api_client.config.client_side_validation && email_id.nil?
946
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_html_json"
947
+ end
948
+ # resource path
949
+ local_var_path = '/emails/{emailId}/html/json'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
950
+
951
+ # query parameters
952
+ query_params = opts[:query_params] || {}
953
+ query_params[:'decode'] = opts[:'decode'] if !opts[:'decode'].nil?
954
+
955
+ # header parameters
956
+ header_params = opts[:header_params] || {}
957
+ # HTTP header 'Accept' (if needed)
958
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
959
+
960
+ # form parameters
961
+ form_params = opts[:form_params] || {}
962
+
963
+ # http body (model)
964
+ post_body = opts[:body]
965
+
966
+ # return_type
967
+ return_type = opts[:return_type] || 'EmailHtmlDto'
968
+
969
+ # auth_names
970
+ auth_names = opts[:auth_names] || ['API_KEY']
971
+
972
+ new_options = opts.merge(
973
+ :header_params => header_params,
974
+ :query_params => query_params,
975
+ :form_params => form_params,
976
+ :body => post_body,
977
+ :auth_names => auth_names,
978
+ :return_type => return_type
979
+ )
980
+
981
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
982
+ if @api_client.config.debugging
983
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_email_html_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
984
+ end
985
+ return data, status_code, headers
986
+ end
987
+
923
988
  # Parse and return text from an email, stripping HTML and decoding encoded characters
924
989
  # Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
925
990
  # @param email_id [String] ID of email to perform HTML query on
@@ -20,7 +20,7 @@ module MailSlurpClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Submit a form to be parsed and sent as an email to an address determined by the form fields
23
- # This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`.
23
+ # This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://ruby.api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://ruby.api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @option opts [String] :_to The email address that submitted form should be sent to.
26
26
  # @option opts [String] :_subject Optional subject of the email that will be sent.
@@ -36,7 +36,7 @@ module MailSlurpClient
36
36
  end
37
37
 
38
38
  # Submit a form to be parsed and sent as an email to an address determined by the form fields
39
- # This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a &#x60;_to&#x60; email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding &#x60;name&#x60; attributes or as URL query parameters such as &#x60;?_to&#x3D;test@example.com&#x60; The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts &#x60;application/x-www-form-urlencoded&#x60;, and &#x60;multipart/form-data&#x60; content-types. #### HTML Example &#x60;&#x60;&#x60;html &lt;form action&#x3D;\&quot;https://api.mailslurp.com/forms\&quot; method&#x3D;\&quot;post\&quot; &gt; &lt;input name&#x3D;\&quot;_to\&quot; type&#x3D;\&quot;hidden\&quot; value&#x3D;\&quot;test@example.com\&quot;/&gt; &lt;textarea name&#x3D;\&quot;feedback\&quot;&gt;&lt;/textarea&gt; &lt;button type&#x3D;\&quot;submit\&quot;&gt;Submit&lt;/button&gt; &lt;/form&gt; &#x60;&#x60;&#x60; #### URL Example &#x60;&#x60;&#x60;html &lt;form action&#x3D;\&quot;https://api.mailslurp.com/forms?_to&#x3D;test@example.com\&quot; method&#x3D;\&quot;post\&quot; &gt; &lt;textarea name&#x3D;\&quot;feedback\&quot;&gt;&lt;/textarea&gt; &lt;button type&#x3D;\&quot;submit\&quot;&gt;Submit&lt;/button&gt; &lt;/form&gt; &#x60;&#x60;&#x60; The email address is specified by a &#x60;_to&#x60; field OR is extracted from an email alias specified by a &#x60;_toAlias&#x60; field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the &#x60;enctype&#x60; attribute, for instance: &#x60;&lt;form enctype&#x3D;\&quot;multipart/form-data\&quot;&gt;&#x60;.
39
+ # This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a &#x60;_to&#x60; email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding &#x60;name&#x60; attributes or as URL query parameters such as &#x60;?_to&#x3D;test@example.com&#x60; The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts &#x60;application/x-www-form-urlencoded&#x60;, and &#x60;multipart/form-data&#x60; content-types. #### HTML Example &#x60;&#x60;&#x60;html &lt;form action&#x3D;\&quot;https://ruby.api.mailslurp.com/forms\&quot; method&#x3D;\&quot;post\&quot; &gt; &lt;input name&#x3D;\&quot;_to\&quot; type&#x3D;\&quot;hidden\&quot; value&#x3D;\&quot;test@example.com\&quot;/&gt; &lt;textarea name&#x3D;\&quot;feedback\&quot;&gt;&lt;/textarea&gt; &lt;button type&#x3D;\&quot;submit\&quot;&gt;Submit&lt;/button&gt; &lt;/form&gt; &#x60;&#x60;&#x60; #### URL Example &#x60;&#x60;&#x60;html &lt;form action&#x3D;\&quot;https://ruby.api.mailslurp.com/forms?_to&#x3D;test@example.com\&quot; method&#x3D;\&quot;post\&quot; &gt; &lt;textarea name&#x3D;\&quot;feedback\&quot;&gt;&lt;/textarea&gt; &lt;button type&#x3D;\&quot;submit\&quot;&gt;Submit&lt;/button&gt; &lt;/form&gt; &#x60;&#x60;&#x60; The email address is specified by a &#x60;_to&#x60; field OR is extracted from an email alias specified by a &#x60;_toAlias&#x60; field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the &#x60;enctype&#x60; attribute, for instance: &#x60;&lt;form enctype&#x3D;\&quot;multipart/form-data\&quot;&gt;&#x60;.
40
40
  # @param [Hash] opts the optional parameters
41
41
  # @option opts [String] :_to The email address that submitted form should be sent to.
42
42
  # @option opts [String] :_subject Optional subject of the email that will be sent.
@@ -1887,6 +1887,81 @@ module MailSlurpClient
1887
1887
  return data, status_code, headers
1888
1888
  end
1889
1889
 
1890
+ # Send email with queue
1891
+ # Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue.
1892
+ # @param inbox_id [String] ID of the inbox you want to send the email from
1893
+ # @param validate_before_enqueue [Boolean] Validate before adding to queue
1894
+ # @param send_email_options [SendEmailOptions]
1895
+ # @param [Hash] opts the optional parameters
1896
+ # @return [nil]
1897
+ def send_email_with_queue(inbox_id, validate_before_enqueue, send_email_options, opts = {})
1898
+ send_email_with_queue_with_http_info(inbox_id, validate_before_enqueue, send_email_options, opts)
1899
+ nil
1900
+ end
1901
+
1902
+ # Send email with queue
1903
+ # Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue.
1904
+ # @param inbox_id [String] ID of the inbox you want to send the email from
1905
+ # @param validate_before_enqueue [Boolean] Validate before adding to queue
1906
+ # @param send_email_options [SendEmailOptions]
1907
+ # @param [Hash] opts the optional parameters
1908
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1909
+ def send_email_with_queue_with_http_info(inbox_id, validate_before_enqueue, send_email_options, opts = {})
1910
+ if @api_client.config.debugging
1911
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.send_email_with_queue ...'
1912
+ end
1913
+ # verify the required parameter 'inbox_id' is set
1914
+ if @api_client.config.client_side_validation && inbox_id.nil?
1915
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.send_email_with_queue"
1916
+ end
1917
+ # verify the required parameter 'validate_before_enqueue' is set
1918
+ if @api_client.config.client_side_validation && validate_before_enqueue.nil?
1919
+ fail ArgumentError, "Missing the required parameter 'validate_before_enqueue' when calling InboxControllerApi.send_email_with_queue"
1920
+ end
1921
+ # verify the required parameter 'send_email_options' is set
1922
+ if @api_client.config.client_side_validation && send_email_options.nil?
1923
+ fail ArgumentError, "Missing the required parameter 'send_email_options' when calling InboxControllerApi.send_email_with_queue"
1924
+ end
1925
+ # resource path
1926
+ local_var_path = '/inboxes/{inboxId}/with-queue'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
1927
+
1928
+ # query parameters
1929
+ query_params = opts[:query_params] || {}
1930
+ query_params[:'validateBeforeEnqueue'] = validate_before_enqueue
1931
+
1932
+ # header parameters
1933
+ header_params = opts[:header_params] || {}
1934
+ # HTTP header 'Content-Type'
1935
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1936
+
1937
+ # form parameters
1938
+ form_params = opts[:form_params] || {}
1939
+
1940
+ # http body (model)
1941
+ post_body = opts[:body] || @api_client.object_to_http_body(send_email_options)
1942
+
1943
+ # return_type
1944
+ return_type = opts[:return_type]
1945
+
1946
+ # auth_names
1947
+ auth_names = opts[:auth_names] || ['API_KEY']
1948
+
1949
+ new_options = opts.merge(
1950
+ :header_params => header_params,
1951
+ :query_params => query_params,
1952
+ :form_params => form_params,
1953
+ :body => post_body,
1954
+ :auth_names => auth_names,
1955
+ :return_type => return_type
1956
+ )
1957
+
1958
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1959
+ if @api_client.config.debugging
1960
+ @api_client.config.logger.debug "API called: InboxControllerApi#send_email_with_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1961
+ end
1962
+ return data, status_code, headers
1963
+ end
1964
+
1890
1965
  # Send email using an SMTP mail envelope and message body and return sent confirmation
1891
1966
  # Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.
1892
1967
  # @param inbox_id [String] ID of the inbox you want to send the email from
@@ -180,6 +180,7 @@ module MailSlurpClient
180
180
  end
181
181
 
182
182
  # Get MissedEmail
183
+ # List emails that were missed due to plan limits.
183
184
  # @param missed_email_id [String]
184
185
  # @param [Hash] opts the optional parameters
185
186
  # @return [MissedEmail]
@@ -189,6 +190,7 @@ module MailSlurpClient
189
190
  end
190
191
 
191
192
  # Get MissedEmail
193
+ # List emails that were missed due to plan limits.
192
194
  # @param missed_email_id [String]
193
195
  # @param [Hash] opts the optional parameters
194
196
  # @return [Array<(MissedEmail, Integer, Hash)>] MissedEmail data, response status code and response headers
@@ -239,6 +241,60 @@ module MailSlurpClient
239
241
  return data, status_code, headers
240
242
  end
241
243
 
244
+ # Restore missed emails
245
+ # If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method.
246
+ # @param [Hash] opts the optional parameters
247
+ # @return [nil]
248
+ def restore_missed_emails(opts = {})
249
+ restore_missed_emails_with_http_info(opts)
250
+ nil
251
+ end
252
+
253
+ # Restore missed emails
254
+ # If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method.
255
+ # @param [Hash] opts the optional parameters
256
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
257
+ def restore_missed_emails_with_http_info(opts = {})
258
+ if @api_client.config.debugging
259
+ @api_client.config.logger.debug 'Calling API: MissedEmailControllerApi.restore_missed_emails ...'
260
+ end
261
+ # resource path
262
+ local_var_path = '/missed-emails/restore'
263
+
264
+ # query parameters
265
+ query_params = opts[:query_params] || {}
266
+
267
+ # header parameters
268
+ header_params = opts[:header_params] || {}
269
+
270
+ # form parameters
271
+ form_params = opts[:form_params] || {}
272
+
273
+ # http body (model)
274
+ post_body = opts[:body]
275
+
276
+ # return_type
277
+ return_type = opts[:return_type]
278
+
279
+ # auth_names
280
+ auth_names = opts[:auth_names] || ['API_KEY']
281
+
282
+ new_options = opts.merge(
283
+ :header_params => header_params,
284
+ :query_params => query_params,
285
+ :form_params => form_params,
286
+ :body => post_body,
287
+ :auth_names => auth_names,
288
+ :return_type => return_type
289
+ )
290
+
291
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug "API called: MissedEmailControllerApi#restore_missed_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
294
+ end
295
+ return data, status_code, headers
296
+ end
297
+
242
298
  # Wait for Nth missed email
243
299
  # Wait for 0 based index missed email
244
300
  # @param index [Integer] Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index&#x3D;1