mailslurp_client 8.2.7 → 8.2.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc32874bf10e7c9c49626c99e69e421891c34df4136a201b8b902485287ec36c
4
- data.tar.gz: '086b46c10d486705f9a400be470cba8bc313623d05a666028f735f76f4882234'
3
+ metadata.gz: c1405a0dc7940571561f6756aa28d85828a718776861e9b66dca61d4784cacd0
4
+ data.tar.gz: 711a7b97beb529416856dc26fa338f3438c59cc74bce47d3110f68e0f4df87c0
5
5
  SHA512:
6
- metadata.gz: c16d687eaa9984297f262b08cec0325216bcdf56625677f55675da44b6bda7a9013237632b369fd64bfcd3fde01180b5d40029c9d3b51918578a1ef6d79b37fa
7
- data.tar.gz: b25787efbe06f5ca9f2864a8e5ab48c50066ac484cb517b863d407f356a836c37a8a259191f94ca04a5a8250d9b88dd717a0a95ffd0b7485ca104c9e98694217
6
+ metadata.gz: 5d1868b8c6c4cecc100650c06f981290dd6693897b747a25a885bd5e97949a69f85511b440ac4156ac272b7d315235170d944d7011a8b89d02fdd8a525981662
7
+ data.tar.gz: 03cd9bc97b2628958db31b1caa1885b419fccd57b09e225bdcf9605df81ae6e70228fd317642d42a0029ec314a534c264896aace4b267a1c4aab43fba7bdedd8
@@ -22,6 +22,7 @@ require 'mailslurp_client/models/basic_auth_options'
22
22
  require 'mailslurp_client/models/bulk_send_email_options'
23
23
  require 'mailslurp_client/models/contact_dto'
24
24
  require 'mailslurp_client/models/contact_projection'
25
+ require 'mailslurp_client/models/content_match_options'
25
26
  require 'mailslurp_client/models/create_anonymous_alias_options'
26
27
  require 'mailslurp_client/models/create_contact_options'
27
28
  require 'mailslurp_client/models/create_domain_options'
@@ -36,6 +37,7 @@ require 'mailslurp_client/models/domain_preview'
36
37
  require 'mailslurp_client/models/download_attachment_dto'
37
38
  require 'mailslurp_client/models/email'
38
39
  require 'mailslurp_client/models/email_analysis'
40
+ require 'mailslurp_client/models/email_content_match_result'
39
41
  require 'mailslurp_client/models/email_preview'
40
42
  require 'mailslurp_client/models/email_projection'
41
43
  require 'mailslurp_client/models/email_verification_result'
@@ -62,6 +64,7 @@ require 'mailslurp_client/models/page_webhook_projection'
62
64
  require 'mailslurp_client/models/pageable'
63
65
  require 'mailslurp_client/models/raw_email_json'
64
66
  require 'mailslurp_client/models/send_email_options'
67
+ require 'mailslurp_client/models/sent_email'
65
68
  require 'mailslurp_client/models/sent_email_dto'
66
69
  require 'mailslurp_client/models/sent_email_projection'
67
70
  require 'mailslurp_client/models/set_inbox_favourited_options'
@@ -19,8 +19,8 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Upload an attachment for sending using base64 file encoding
23
- # When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
22
+ # Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.
23
+ # When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment IDs. For legacy reasons the ID is returned in an array. Only a single ID is ever returned at one time. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
24
24
  # @param upload_options [UploadAttachmentOptions] uploadOptions
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [Array<String>]
@@ -29,8 +29,8 @@ module MailSlurpClient
29
29
  data
30
30
  end
31
31
 
32
- # Upload an attachment for sending using base64 file encoding
33
- # When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
32
+ # Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.
33
+ # When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment IDs. For legacy reasons the ID is returned in an array. Only a single ID is ever returned at one time. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
34
34
  # @param upload_options [UploadAttachmentOptions] uploadOptions
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
@@ -83,20 +83,24 @@ module MailSlurpClient
83
83
  return data, status_code, headers
84
84
  end
85
85
 
86
- # Upload an attachment for sending using file byte stream input octet stream
87
- # When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
86
+ # Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.
87
+ # When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment IDs. For legacy reasons the ID is returned in an array. Only a single ID is ever returned at one time. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
88
88
  # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :string Optional contentType for file. For instance &#x60;application/pdf&#x60;
89
90
  # @option opts [String] :filename Optional filename to save upload with
91
+ # @option opts [String] :byte_array Byte array request body
90
92
  # @return [Array<String>]
91
93
  def upload_attachment_bytes(opts = {})
92
94
  data, _status_code, _headers = upload_attachment_bytes_with_http_info(opts)
93
95
  data
94
96
  end
95
97
 
96
- # Upload an attachment for sending using file byte stream input octet stream
97
- # When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
98
+ # Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.
99
+ # When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment IDs. For legacy reasons the ID is returned in an array. Only a single ID is ever returned at one time. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
98
100
  # @param [Hash] opts the optional parameters
101
+ # @option opts [String] :string Optional contentType for file. For instance &#x60;application/pdf&#x60;
99
102
  # @option opts [String] :filename Optional filename to save upload with
103
+ # @option opts [String] :byte_array Byte array request body
100
104
  # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
101
105
  def upload_attachment_bytes_with_http_info(opts = {})
102
106
  if @api_client.config.debugging
@@ -107,6 +111,8 @@ module MailSlurpClient
107
111
 
108
112
  # query parameters
109
113
  query_params = opts[:query_params] || {}
114
+ query_params[:'String'] = opts[:'string'] if !opts[:'string'].nil?
115
+ query_params[:'filename'] = opts[:'filename'] if !opts[:'filename'].nil?
110
116
 
111
117
  # header parameters
112
118
  header_params = opts[:header_params] || {}
@@ -119,7 +125,7 @@ module MailSlurpClient
119
125
  form_params = opts[:form_params] || {}
120
126
 
121
127
  # http body (model)
122
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'filename'])
128
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'byte_array'])
123
129
 
124
130
  # return_type
125
131
  return_type = opts[:return_type] || 'Array<String>'
@@ -143,26 +149,26 @@ module MailSlurpClient
143
149
  return data, status_code, headers
144
150
  end
145
151
 
146
- # Upload an attachment for sending using Multipart Form
147
- # When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
152
+ # Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.
153
+ # When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment IDs. For legacy reasons the ID is returned in an array. Only a single ID is ever returned at one time. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
148
154
  # @param file [File] file
149
155
  # @param [Hash] opts the optional parameters
150
- # @option opts [String] :content_type contentType
151
- # @option opts [String] :filename filename
152
- # @option opts [String] :x_filename x-filename
156
+ # @option opts [String] :content_type Optional content type of attachment
157
+ # @option opts [String] :filename Optional name of file
158
+ # @option opts [String] :x_filename Optional content type header of attachment
153
159
  # @return [Array<String>]
154
160
  def upload_multipart_form(file, opts = {})
155
161
  data, _status_code, _headers = upload_multipart_form_with_http_info(file, opts)
156
162
  data
157
163
  end
158
164
 
159
- # Upload an attachment for sending using Multipart Form
160
- # When sending emails with attachments first upload each attachment with this endpoint. Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email. This means that attachments can easily be reused.
165
+ # Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.
166
+ # When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment IDs. For legacy reasons the ID is returned in an array. Only a single ID is ever returned at one time. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
161
167
  # @param file [File] file
162
168
  # @param [Hash] opts the optional parameters
163
- # @option opts [String] :content_type contentType
164
- # @option opts [String] :filename filename
165
- # @option opts [String] :x_filename x-filename
169
+ # @option opts [String] :content_type Optional content type of attachment
170
+ # @option opts [String] :filename Optional name of file
171
+ # @option opts [String] :x_filename Optional content type header of attachment
166
172
  # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
167
173
  def upload_multipart_form_with_http_info(file, opts = {})
168
174
  if @api_client.config.debugging
@@ -75,7 +75,7 @@ module MailSlurpClient
75
75
 
76
76
  # Delete an email
77
77
  # Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
78
- # @param email_id [String] emailId
78
+ # @param email_id [String] ID of email to delete
79
79
  # @param [Hash] opts the optional parameters
80
80
  # @return [nil]
81
81
  def delete_email(email_id, opts = {})
@@ -85,7 +85,7 @@ module MailSlurpClient
85
85
 
86
86
  # Delete an email
87
87
  # Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
88
- # @param email_id [String] emailId
88
+ # @param email_id [String] ID of email to delete
89
89
  # @param [Hash] opts the optional parameters
90
90
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
91
91
  def delete_email_with_http_info(email_id, opts = {})
@@ -135,8 +135,8 @@ module MailSlurpClient
135
135
 
136
136
  # Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints.
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] attachmentId
139
- # @param email_id [String] emailId
138
+ # @param attachment_id [String] ID of attachment
139
+ # @param email_id [String] ID of email
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
142
  # @return [String]
@@ -147,8 +147,8 @@ module MailSlurpClient
147
147
 
148
148
  # Get email attachment bytes. If you have trouble with byte responses try the &#x60;downloadAttachmentBase64&#x60; response endpoints.
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] attachmentId
151
- # @param email_id [String] emailId
150
+ # @param attachment_id [String] ID of attachment
151
+ # @param email_id [String] ID of email
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
154
  # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
@@ -206,8 +206,8 @@ module MailSlurpClient
206
206
 
207
207
  # Get email attachment as base64 encoded string (alternative to binary responses)
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] attachmentId
210
- # @param email_id [String] emailId
209
+ # @param attachment_id [String] ID of attachment
210
+ # @param email_id [String] ID of email
211
211
  # @param [Hash] opts the optional parameters
212
212
  # @return [DownloadAttachmentDto]
213
213
  def download_attachment_base64(attachment_id, email_id, opts = {})
@@ -217,8 +217,8 @@ module MailSlurpClient
217
217
 
218
218
  # Get email attachment as base64 encoded string (alternative to binary responses)
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] attachmentId
221
- # @param email_id [String] emailId
220
+ # @param attachment_id [String] ID of attachment
221
+ # @param email_id [String] ID of email
222
222
  # @param [Hash] opts the optional parameters
223
223
  # @return [Array<(DownloadAttachmentDto, Integer, Hash)>] DownloadAttachmentDto data, response status code and response headers
224
224
  def download_attachment_base64_with_http_info(attachment_id, email_id, opts = {})
@@ -274,7 +274,7 @@ module MailSlurpClient
274
274
 
275
275
  # Forward email
276
276
  # Forward an existing email to new recipients.
277
- # @param email_id [String] emailId
277
+ # @param email_id [String] ID of email
278
278
  # @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
279
279
  # @param [Hash] opts the optional parameters
280
280
  # @return [nil]
@@ -285,7 +285,7 @@ module MailSlurpClient
285
285
 
286
286
  # Forward email
287
287
  # Forward an existing email to new recipients.
288
- # @param email_id [String] emailId
288
+ # @param email_id [String] ID of email
289
289
  # @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
290
290
  # @param [Hash] opts the optional parameters
291
291
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -342,8 +342,8 @@ module MailSlurpClient
342
342
 
343
343
  # Get email attachment metadata
344
344
  # Returns the metadata such as name and content-type for a given attachment and email.
345
- # @param attachment_id [String] attachmentId
346
- # @param email_id [String] emailId
345
+ # @param attachment_id [String] ID of attachment
346
+ # @param email_id [String] ID of email
347
347
  # @param [Hash] opts the optional parameters
348
348
  # @return [AttachmentMetaData]
349
349
  def get_attachment_meta_data(attachment_id, email_id, opts = {})
@@ -353,8 +353,8 @@ module MailSlurpClient
353
353
 
354
354
  # Get email attachment metadata
355
355
  # Returns the metadata such as name and content-type for a given attachment and email.
356
- # @param attachment_id [String] attachmentId
357
- # @param email_id [String] emailId
356
+ # @param attachment_id [String] ID of attachment
357
+ # @param email_id [String] ID of email
358
358
  # @param [Hash] opts the optional parameters
359
359
  # @return [Array<(AttachmentMetaData, Integer, Hash)>] AttachmentMetaData data, response status code and response headers
360
360
  def get_attachment_meta_data_with_http_info(attachment_id, email_id, opts = {})
@@ -410,7 +410,7 @@ module MailSlurpClient
410
410
 
411
411
  # Get all email attachment metadata
412
412
  # Returns an array of attachment metadata such as name and content-type for a given email if present.
413
- # @param email_id [String] emailId
413
+ # @param email_id [String] ID of email
414
414
  # @param [Hash] opts the optional parameters
415
415
  # @return [Array<AttachmentMetaData>]
416
416
  def get_attachments(email_id, opts = {})
@@ -420,7 +420,7 @@ module MailSlurpClient
420
420
 
421
421
  # Get all email attachment metadata
422
422
  # Returns an array of attachment metadata such as name and content-type for a given email if present.
423
- # @param email_id [String] emailId
423
+ # @param email_id [String] ID of email
424
424
  # @param [Hash] opts the optional parameters
425
425
  # @return [Array<(Array<AttachmentMetaData>, Integer, Hash)>] Array<AttachmentMetaData> data, response status code and response headers
426
426
  def get_attachments_with_http_info(email_id, opts = {})
@@ -535,6 +535,76 @@ module MailSlurpClient
535
535
  return data, status_code, headers
536
536
  end
537
537
 
538
+ # Get email content regex pattern match results. Runs regex against email body and returns match groups.
539
+ # 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.
540
+ # @param email_id [String] ID of email to match against
541
+ # @param content_match_options [ContentMatchOptions] contentMatchOptions
542
+ # @param [Hash] opts the optional parameters
543
+ # @return [EmailContentMatchResult]
544
+ def get_email_content_match(email_id, content_match_options, opts = {})
545
+ data, _status_code, _headers = get_email_content_match_with_http_info(email_id, content_match_options, opts)
546
+ data
547
+ end
548
+
549
+ # Get email content regex pattern match results. Runs regex against email body and returns match groups.
550
+ # 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.
551
+ # @param email_id [String] ID of email to match against
552
+ # @param content_match_options [ContentMatchOptions] contentMatchOptions
553
+ # @param [Hash] opts the optional parameters
554
+ # @return [Array<(EmailContentMatchResult, Integer, Hash)>] EmailContentMatchResult data, response status code and response headers
555
+ def get_email_content_match_with_http_info(email_id, content_match_options, opts = {})
556
+ if @api_client.config.debugging
557
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email_content_match ...'
558
+ end
559
+ # verify the required parameter 'email_id' is set
560
+ if @api_client.config.client_side_validation && email_id.nil?
561
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_content_match"
562
+ end
563
+ # verify the required parameter 'content_match_options' is set
564
+ if @api_client.config.client_side_validation && content_match_options.nil?
565
+ fail ArgumentError, "Missing the required parameter 'content_match_options' when calling EmailControllerApi.get_email_content_match"
566
+ end
567
+ # resource path
568
+ local_var_path = '/emails/{emailId}/contentMatch'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
569
+
570
+ # query parameters
571
+ query_params = opts[:query_params] || {}
572
+
573
+ # header parameters
574
+ header_params = opts[:header_params] || {}
575
+ # HTTP header 'Accept' (if needed)
576
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
577
+ # HTTP header 'Content-Type'
578
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
579
+
580
+ # form parameters
581
+ form_params = opts[:form_params] || {}
582
+
583
+ # http body (model)
584
+ post_body = opts[:body] || @api_client.object_to_http_body(content_match_options)
585
+
586
+ # return_type
587
+ return_type = opts[:return_type] || 'EmailContentMatchResult'
588
+
589
+ # auth_names
590
+ auth_names = opts[:auth_names] || ['API_KEY']
591
+
592
+ new_options = opts.merge(
593
+ :header_params => header_params,
594
+ :query_params => query_params,
595
+ :form_params => form_params,
596
+ :body => post_body,
597
+ :auth_names => auth_names,
598
+ :return_type => return_type
599
+ )
600
+
601
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
602
+ if @api_client.config.debugging
603
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_email_content_match\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
604
+ end
605
+ return data, status_code, headers
606
+ end
607
+
538
608
  # Get email content as HTML
539
609
  # 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`
540
610
  # @param email_id [String] emailId
@@ -677,7 +747,7 @@ module MailSlurpClient
677
747
 
678
748
  # Get raw email string
679
749
  # Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
680
- # @param email_id [String] emailId
750
+ # @param email_id [String] ID of email
681
751
  # @param [Hash] opts the optional parameters
682
752
  # @return [String]
683
753
  def get_raw_email_contents(email_id, opts = {})
@@ -687,7 +757,7 @@ module MailSlurpClient
687
757
 
688
758
  # Get raw email string
689
759
  # Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
690
- # @param email_id [String] emailId
760
+ # @param email_id [String] ID of email
691
761
  # @param [Hash] opts the optional parameters
692
762
  # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
693
763
  def get_raw_email_contents_with_http_info(email_id, opts = {})
@@ -739,7 +809,7 @@ module MailSlurpClient
739
809
 
740
810
  # Get raw email in JSON
741
811
  # Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response
742
- # @param email_id [String] emailId
812
+ # @param email_id [String] ID of email
743
813
  # @param [Hash] opts the optional parameters
744
814
  # @return [RawEmailJson]
745
815
  def get_raw_email_json(email_id, opts = {})
@@ -749,7 +819,7 @@ module MailSlurpClient
749
819
 
750
820
  # Get raw email in JSON
751
821
  # Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response
752
- # @param email_id [String] emailId
822
+ # @param email_id [String] ID of email
753
823
  # @param [Hash] opts the optional parameters
754
824
  # @return [Array<(RawEmailJson, Integer, Hash)>] RawEmailJson data, response status code and response headers
755
825
  def get_raw_email_json_with_http_info(email_id, opts = {})
@@ -857,7 +927,7 @@ module MailSlurpClient
857
927
 
858
928
  # Validate email
859
929
  # Validate the HTML content of email if HTML is found. Considered valid if no HTML.
860
- # @param email_id [String] emailId
930
+ # @param email_id [String] ID of email
861
931
  # @param [Hash] opts the optional parameters
862
932
  # @return [ValidationDto]
863
933
  def validate_email(email_id, opts = {})
@@ -867,7 +937,7 @@ module MailSlurpClient
867
937
 
868
938
  # Validate email
869
939
  # Validate the HTML content of email if HTML is found. Considered valid if no HTML.
870
- # @param email_id [String] emailId
940
+ # @param email_id [String] ID of email
871
941
  # @param [Hash] opts the optional parameters
872
942
  # @return [Array<(ValidationDto, Integer, Hash)>] ValidationDto data, response status code and response headers
873
943
  def validate_email_with_http_info(email_id, opts = {})
@@ -691,7 +691,7 @@ module MailSlurpClient
691
691
  end
692
692
 
693
693
  # Send Email
694
- # Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails.
694
+ # Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`.
695
695
  # @param inbox_id [String] ID of the inbox you want to send the email from
696
696
  # @param [Hash] opts the optional parameters
697
697
  # @option opts [SendEmailOptions] :send_email_options Options for the email
@@ -702,7 +702,7 @@ module MailSlurpClient
702
702
  end
703
703
 
704
704
  # Send Email
705
- # Send an email from an inbox&#39;s email address. The request body should contain the &#x60;SendEmailOptions&#x60; that include recipients, attachments, body etc. See &#x60;SendEmailOptions&#x60; for all available properties. Note the &#x60;inboxId&#x60; refers to the inbox&#39;s id not the inbox&#39;s email address. See https://www.mailslurp.com/guides/ for more information on how to send emails.
705
+ # Send an email from an inbox&#39;s email address. The request body should contain the &#x60;SendEmailOptions&#x60; that include recipients, attachments, body etc. See &#x60;SendEmailOptions&#x60; for all available properties. Note the &#x60;inboxId&#x60; refers to the inbox&#39;s id not the inbox&#39;s email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method &#x60;sendEmailAndConfirm&#x60;.
706
706
  # @param inbox_id [String] ID of the inbox you want to send the email from
707
707
  # @param [Hash] opts the optional parameters
708
708
  # @option opts [SendEmailOptions] :send_email_options Options for the email
@@ -754,6 +754,72 @@ module MailSlurpClient
754
754
  return data, status_code, headers
755
755
  end
756
756
 
757
+ # Send email and return sent confirmation
758
+ # Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with link the the sent object created for it.
759
+ # @param inbox_id [String] ID of the inbox you want to send the email from
760
+ # @param [Hash] opts the optional parameters
761
+ # @option opts [SendEmailOptions] :send_email_options Options for the email
762
+ # @return [SentEmail]
763
+ def send_email_and_confirm(inbox_id, opts = {})
764
+ data, _status_code, _headers = send_email_and_confirm_with_http_info(inbox_id, opts)
765
+ data
766
+ end
767
+
768
+ # Send email and return sent confirmation
769
+ # Sister method for standard &#x60;sendEmail&#x60; method with the benefit of returning a &#x60;SentEmail&#x60; entity confirming the successful sending of the email with link the the sent object created for it.
770
+ # @param inbox_id [String] ID of the inbox you want to send the email from
771
+ # @param [Hash] opts the optional parameters
772
+ # @option opts [SendEmailOptions] :send_email_options Options for the email
773
+ # @return [Array<(SentEmail, Integer, Hash)>] SentEmail data, response status code and response headers
774
+ def send_email_and_confirm_with_http_info(inbox_id, opts = {})
775
+ if @api_client.config.debugging
776
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.send_email_and_confirm ...'
777
+ end
778
+ # verify the required parameter 'inbox_id' is set
779
+ if @api_client.config.client_side_validation && inbox_id.nil?
780
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.send_email_and_confirm"
781
+ end
782
+ # resource path
783
+ local_var_path = '/inboxes/{inboxId}/confirm'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
784
+
785
+ # query parameters
786
+ query_params = opts[:query_params] || {}
787
+
788
+ # header parameters
789
+ header_params = opts[:header_params] || {}
790
+ # HTTP header 'Accept' (if needed)
791
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
792
+ # HTTP header 'Content-Type'
793
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
794
+
795
+ # form parameters
796
+ form_params = opts[:form_params] || {}
797
+
798
+ # http body (model)
799
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'send_email_options'])
800
+
801
+ # return_type
802
+ return_type = opts[:return_type] || 'SentEmail'
803
+
804
+ # auth_names
805
+ auth_names = opts[:auth_names] || ['API_KEY']
806
+
807
+ new_options = opts.merge(
808
+ :header_params => header_params,
809
+ :query_params => query_params,
810
+ :form_params => form_params,
811
+ :body => post_body,
812
+ :auth_names => auth_names,
813
+ :return_type => return_type
814
+ )
815
+
816
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
817
+ if @api_client.config.debugging
818
+ @api_client.config.logger.debug "API called: InboxControllerApi#send_email_and_confirm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
819
+ end
820
+ return data, status_code, headers
821
+ end
822
+
757
823
  # Set inbox favourited state
758
824
  # Set and return new favourite state for an inbox
759
825
  # @param inbox_id [String] inboxId