mailslurp_client 15.5.2 → 15.5.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -11
  3. data/lib/mailslurp_client/api/attachment_controller_api.rb +1 -1
  4. data/lib/mailslurp_client/api/email_controller_api.rb +68 -6
  5. data/lib/mailslurp_client/api/inbox_controller_api.rb +70 -0
  6. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +186 -0
  7. data/lib/mailslurp_client/models/alias_projection.rb +13 -13
  8. data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
  9. data/lib/mailslurp_client/models/email_preview_urls.rb +225 -0
  10. data/lib/mailslurp_client/models/page_alias.rb +19 -19
  11. data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
  12. data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
  13. data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
  14. data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
  15. data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
  16. data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
  17. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
  18. data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
  19. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
  20. data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
  21. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +19 -19
  22. data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
  23. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
  24. data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
  25. data/lib/mailslurp_client/models/page_thread_projection.rb +19 -19
  26. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
  27. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
  28. data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
  29. data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
  30. data/lib/mailslurp_client/models/template_projection.rb +15 -15
  31. data/lib/mailslurp_client/version.rb +1 -1
  32. data/lib/mailslurp_client.rb +1 -0
  33. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c9171bccfe1e83210f450ee2e34045c36cd07b714206b36f100da039158dfa2
4
- data.tar.gz: 00c12a8945b4bbc587fdb98432e619cc42211c9520b09e54f261d1068b3fba53
3
+ metadata.gz: 4b57b260a8ba87810818e4add8948d564693f4fab744639f483b068d8be0c3b1
4
+ data.tar.gz: f9ac7fb8e7b275a9fa0918340587decb6727d06a596b0585590cfe626f6fc5ac
5
5
  SHA512:
6
- metadata.gz: 45c2815742a9e44046e3d1d60fa0a6906cdc5ac64455c13a2d2d5113d600cc8fde423fcb7a55dd61c4e530fa08e62c72bf39c7a96fe88d9e8e4e9e2f3832d1e6
7
- data.tar.gz: 05a457424af810de2ed703aaeb67e2ec1bad3bbb07116e5283f84829c6724d7df26dfcfe179b39f32fcf41f8ddc16ebe4a10948bc3ecd44b65dddbaa7afdafb6
6
+ metadata.gz: 9d8de77095af8fa1cf9ee6027a5546131171b3cfa0573b73de00d4e62df8d37c1a426b24fd8ba4cf250a01b121f96c9d0a7e3420e0722df0469628b78636a46c
7
+ data.tar.gz: f082fa73ac881150ee3f08c8e18a66e1edbe6f878ceda64c9804b3ca0b19de752581a3363a0e950f7682d17aefc8d7ed70eef52a0a8c218788070788f6c01d8c
data/README.md CHANGED
@@ -6,7 +6,7 @@ MailSlurp is an email API service that lets you create real email addresses in c
6
6
 
7
7
  ## Quick links
8
8
 
9
- - [Method Documentation](https://www.mailslurp.com/docs/ruby/docs/)
9
+ - [Method Documentation](https://docs.mailslurp.com/ruby/docs/)
10
10
  - [Gem Package](https://rubygems.org/gems/mailslurp_client)
11
11
  - [Github Source](https://github.com/mailslurp/mailslurp-client-ruby)
12
12
  - [SMTP access details](https://www.mailslurp.com/guides/smtp-imap/)
@@ -14,9 +14,9 @@ MailSlurp is an email API service that lets you create real email addresses in c
14
14
 
15
15
  ### Common controllers
16
16
 
17
- - [Email controller](https://www.mailslurp.com/docs/ruby/docs/EmailControllerApi/) send and receive emails
18
- - [Inbox controller](https://www.mailslurp.com/docs/ruby/docs/InboxControllerApi/) create and manage email addresses
19
- - [WaitFor controller](https://www.mailslurp.com/docs/ruby/docs/WaitForControllerApi/) wait for expected emails to arrive
17
+ - [Email controller](https://docs.mailslurp.com/ruby/docs/EmailControllerApi/) send and receive emails
18
+ - [Inbox controller](https://docs.mailslurp.com/ruby/docs/InboxControllerApi/) create and manage email addresses
19
+ - [WaitFor controller](https://docs.mailslurp.com/ruby/docs/WaitForControllerApi/) wait for expected emails to arrive
20
20
 
21
21
 
22
22
  ### Example tutorials
@@ -27,7 +27,7 @@ This section describes how to get up and running with the Ruby client.
27
27
 
28
28
  See the [examples page](https://www.mailslurp.com/examples/) for more examples and use with common frameworks such as Rails and RSpec.
29
29
 
30
- See the method documentation for a [list of all functions](https://www.mailslurp.com/docs/ruby/docs/)
30
+ See the method documentation for a [list of all functions](https://docs.mailslurp.com/ruby/docs/)
31
31
 
32
32
  ### Create API Key
33
33
 
@@ -82,7 +82,7 @@ Here are some common uses:
82
82
 
83
83
  ### Create inboxes
84
84
 
85
- To use MailSlurp you need to create inboxes. These are email accounts that have an ID and a real email address. See methods on the [inbox controller](https://www.mailslurp.com/docs/ruby/docs/InboxControllerApi/) for more information.
85
+ To use MailSlurp you need to create inboxes. These are email accounts that have an ID and a real email address. See methods on the [inbox controller](https://docs.mailslurp.com/ruby/docs/InboxControllerApi/) for more information.
86
86
 
87
87
  ```ruby
88
88
  inbox_controller = MailSlurpClient::InboxControllerApi.new
@@ -177,7 +177,7 @@ end
177
177
 
178
178
  ### List inboxes
179
179
 
180
- Inboxes you create can be listed in a paginated way using the [InboxController](https://www.mailslurp.com/docs/ruby/docs/InboxControllerApi/)).
180
+ Inboxes you create can be listed in a paginated way using the [InboxController](https://docs.mailslurp.com/ruby/docs/InboxControllerApi/)).
181
181
 
182
182
  ```ruby
183
183
  it 'can list inboxes' do
@@ -198,7 +198,7 @@ end
198
198
  ### Send emails
199
199
 
200
200
  You can send HTML emails easily with the inbox controller. First create an inbox then use its ID with the `send_email` method.
201
- To send attachments see the [Method Documentation](https://www.mailslurp.com/docs/ruby/docs/).
201
+ To send attachments see the [Method Documentation](https://docs.mailslurp.com/ruby/docs/).
202
202
 
203
203
  ```ruby
204
204
  # create an inbox
@@ -240,7 +240,7 @@ inbox_controller.send_email(inbox_1.id, opts)
240
240
 
241
241
  ### Receive emails
242
242
 
243
- To read already existing emails use the [Email Controller](https://www.mailslurp.com/docs/ruby/docs/EmailControllerApi/). To wait for expected emails to arrive use the [WaitFor Controller](https://www.mailslurp.com/docs/ruby/docs/WaitForControllerApi/).
243
+ To read already existing emails use the [Email Controller](https://docs.mailslurp.com/ruby/docs/EmailControllerApi/). To wait for expected emails to arrive use the [WaitFor Controller](https://docs.mailslurp.com/ruby/docs/WaitForControllerApi/).
244
244
  You can use MailSlurp to wait for at least 1 unread email in an inbox and return it.
245
245
  If a timeout is exceeded it will throw an error instead:
246
246
 
@@ -274,7 +274,7 @@ code, * = match.captures
274
274
 
275
275
  ### Attachments
276
276
 
277
- You can send attachments by first uploading files with the [AttachmentControllerApi](https://www.mailslurp.com/docs/ruby/docs/AttachmentControllerApi/) then using the returned attachment IDs in the send email method.
277
+ You can send attachments by first uploading files with the [AttachmentControllerApi](https://docs.mailslurp.com/ruby/docs/AttachmentControllerApi/) then using the returned attachment IDs in the send email method.
278
278
 
279
279
  MailSlurp endpoints use base64 string encoding for upload and download files. To encode or decode strings in Ruby make sure you use the **strict** variables that avoid added newlines.
280
280
 
@@ -420,4 +420,4 @@ end
420
420
 
421
421
  ## SDK Documentation
422
422
 
423
- See the [examples page](https://www.mailslurp.com/examples/) or the full [Method Documentation](https://www.mailslurp.com/docs/ruby/docs/) on Github.
423
+ See the [examples page](https://www.mailslurp.com/examples/) or the full [Method Documentation](https://docs.mailslurp.com/ruby/docs/) on Github.
@@ -545,7 +545,6 @@ module MailSlurpClient
545
545
 
546
546
  # query parameters
547
547
  query_params = opts[:query_params] || {}
548
- query_params[:'contentType'] = opts[:'content_type'] if !opts[:'content_type'].nil?
549
548
  query_params[:'filename'] = opts[:'filename'] if !opts[:'filename'].nil?
550
549
 
551
550
  # header parameters
@@ -554,6 +553,7 @@ module MailSlurpClient
554
553
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
555
554
  # HTTP header 'Content-Type'
556
555
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])
556
+ header_params[:'contentType'] = opts[:'content_type'] if !opts[:'content_type'].nil?
557
557
 
558
558
  # form parameters
559
559
  form_params = opts[:form_params] || {}
@@ -1051,6 +1051,68 @@ module MailSlurpClient
1051
1051
  return data, status_code, headers
1052
1052
  end
1053
1053
 
1054
+ # Get email URLs for viewing in browser or downloading
1055
+ # Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser.
1056
+ # @param email_id [String]
1057
+ # @param [Hash] opts the optional parameters
1058
+ # @return [EmailPreviewUrls]
1059
+ def get_email_preview_ur_ls(email_id, opts = {})
1060
+ data, _status_code, _headers = get_email_preview_ur_ls_with_http_info(email_id, opts)
1061
+ data
1062
+ end
1063
+
1064
+ # Get email URLs for viewing in browser or downloading
1065
+ # Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser.
1066
+ # @param email_id [String]
1067
+ # @param [Hash] opts the optional parameters
1068
+ # @return [Array<(EmailPreviewUrls, Integer, Hash)>] EmailPreviewUrls data, response status code and response headers
1069
+ def get_email_preview_ur_ls_with_http_info(email_id, opts = {})
1070
+ if @api_client.config.debugging
1071
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email_preview_ur_ls ...'
1072
+ end
1073
+ # verify the required parameter 'email_id' is set
1074
+ if @api_client.config.client_side_validation && email_id.nil?
1075
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_preview_ur_ls"
1076
+ end
1077
+ # resource path
1078
+ local_var_path = '/emails/{emailId}/urls'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
1079
+
1080
+ # query parameters
1081
+ query_params = opts[:query_params] || {}
1082
+
1083
+ # header parameters
1084
+ header_params = opts[:header_params] || {}
1085
+ # HTTP header 'Accept' (if needed)
1086
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1087
+
1088
+ # form parameters
1089
+ form_params = opts[:form_params] || {}
1090
+
1091
+ # http body (model)
1092
+ post_body = opts[:body]
1093
+
1094
+ # return_type
1095
+ return_type = opts[:return_type] || 'EmailPreviewUrls'
1096
+
1097
+ # auth_names
1098
+ auth_names = opts[:auth_names] || ['API_KEY']
1099
+
1100
+ new_options = opts.merge(
1101
+ :header_params => header_params,
1102
+ :query_params => query_params,
1103
+ :form_params => form_params,
1104
+ :body => post_body,
1105
+ :auth_names => auth_names,
1106
+ :return_type => return_type
1107
+ )
1108
+
1109
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1110
+ if @api_client.config.debugging
1111
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_email_preview_ur_ls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1112
+ end
1113
+ return data, status_code, headers
1114
+ end
1115
+
1054
1116
  # Parse and return text from an email, stripping HTML and decoding encoded characters
1055
1117
  # Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
1056
1118
  # @param email_id [String] ID of email to fetch text for
@@ -1335,8 +1397,8 @@ module MailSlurpClient
1335
1397
  # @param inbox_id [String] ID of the inbox you want to get the latest email from
1336
1398
  # @param [Hash] opts the optional parameters
1337
1399
  # @return [Email]
1338
- def get_latest_email_in_inbox(inbox_id, opts = {})
1339
- data, _status_code, _headers = get_latest_email_in_inbox_with_http_info(inbox_id, opts)
1400
+ def get_latest_email_in_inbox1(inbox_id, opts = {})
1401
+ data, _status_code, _headers = get_latest_email_in_inbox1_with_http_info(inbox_id, opts)
1340
1402
  data
1341
1403
  end
1342
1404
 
@@ -1345,13 +1407,13 @@ module MailSlurpClient
1345
1407
  # @param inbox_id [String] ID of the inbox you want to get the latest email from
1346
1408
  # @param [Hash] opts the optional parameters
1347
1409
  # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
1348
- def get_latest_email_in_inbox_with_http_info(inbox_id, opts = {})
1410
+ def get_latest_email_in_inbox1_with_http_info(inbox_id, opts = {})
1349
1411
  if @api_client.config.debugging
1350
- @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_latest_email_in_inbox ...'
1412
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_latest_email_in_inbox1 ...'
1351
1413
  end
1352
1414
  # verify the required parameter 'inbox_id' is set
1353
1415
  if @api_client.config.client_side_validation && inbox_id.nil?
1354
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling EmailControllerApi.get_latest_email_in_inbox"
1416
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling EmailControllerApi.get_latest_email_in_inbox1"
1355
1417
  end
1356
1418
  # resource path
1357
1419
  local_var_path = '/emails/latestIn'
@@ -1388,7 +1450,7 @@ module MailSlurpClient
1388
1450
 
1389
1451
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1390
1452
  if @api_client.config.debugging
1391
- @api_client.config.logger.debug "API called: EmailControllerApi#get_latest_email_in_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1453
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_latest_email_in_inbox1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1392
1454
  end
1393
1455
  return data, status_code, headers
1394
1456
  end
@@ -1370,6 +1370,76 @@ module MailSlurpClient
1370
1370
  return data, status_code, headers
1371
1371
  end
1372
1372
 
1373
+ # Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet.
1374
+ # Get the newest email in an inbox or wait for one to arrive
1375
+ # @param inbox_id [String] ID of the inbox you want to get the latest email from
1376
+ # @param timeout_millis [Integer] Timeout milliseconds to wait for latest email
1377
+ # @param [Hash] opts the optional parameters
1378
+ # @return [Email]
1379
+ def get_latest_email_in_inbox(inbox_id, timeout_millis, opts = {})
1380
+ data, _status_code, _headers = get_latest_email_in_inbox_with_http_info(inbox_id, timeout_millis, opts)
1381
+ data
1382
+ end
1383
+
1384
+ # Get latest email in an inbox. Use &#x60;WaitForController&#x60; to get emails that may not have arrived yet.
1385
+ # Get the newest email in an inbox or wait for one to arrive
1386
+ # @param inbox_id [String] ID of the inbox you want to get the latest email from
1387
+ # @param timeout_millis [Integer] Timeout milliseconds to wait for latest email
1388
+ # @param [Hash] opts the optional parameters
1389
+ # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
1390
+ def get_latest_email_in_inbox_with_http_info(inbox_id, timeout_millis, opts = {})
1391
+ if @api_client.config.debugging
1392
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_latest_email_in_inbox ...'
1393
+ end
1394
+ # verify the required parameter 'inbox_id' is set
1395
+ if @api_client.config.client_side_validation && inbox_id.nil?
1396
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_latest_email_in_inbox"
1397
+ end
1398
+ # verify the required parameter 'timeout_millis' is set
1399
+ if @api_client.config.client_side_validation && timeout_millis.nil?
1400
+ fail ArgumentError, "Missing the required parameter 'timeout_millis' when calling InboxControllerApi.get_latest_email_in_inbox"
1401
+ end
1402
+ # resource path
1403
+ local_var_path = '/inboxes/getLatestEmail'
1404
+
1405
+ # query parameters
1406
+ query_params = opts[:query_params] || {}
1407
+ query_params[:'inboxId'] = inbox_id
1408
+ query_params[:'timeoutMillis'] = timeout_millis
1409
+
1410
+ # header parameters
1411
+ header_params = opts[:header_params] || {}
1412
+ # HTTP header 'Accept' (if needed)
1413
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1414
+
1415
+ # form parameters
1416
+ form_params = opts[:form_params] || {}
1417
+
1418
+ # http body (model)
1419
+ post_body = opts[:body]
1420
+
1421
+ # return_type
1422
+ return_type = opts[:return_type] || 'Email'
1423
+
1424
+ # auth_names
1425
+ auth_names = opts[:auth_names] || ['API_KEY']
1426
+
1427
+ new_options = opts.merge(
1428
+ :header_params => header_params,
1429
+ :query_params => query_params,
1430
+ :form_params => form_params,
1431
+ :body => post_body,
1432
+ :auth_names => auth_names,
1433
+ :return_type => return_type
1434
+ )
1435
+
1436
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1437
+ if @api_client.config.debugging
1438
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_latest_email_in_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1439
+ end
1440
+ return data, status_code, headers
1441
+ end
1442
+
1373
1443
  # List Organization Inboxes Paginated
1374
1444
  # List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time).
1375
1445
  # @param [Hash] opts the optional parameters
@@ -205,6 +205,130 @@ module MailSlurpClient
205
205
  return data, status_code, headers
206
206
  end
207
207
 
208
+ # Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
209
+ # Returns a raw, unparsed, and unprocessed sent 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 getRawSentEmailJson endpoint
210
+ # @param email_id [String] ID of email
211
+ # @param [Hash] opts the optional parameters
212
+ # @return [String]
213
+ def get_raw_sent_email_contents(email_id, opts = {})
214
+ data, _status_code, _headers = get_raw_sent_email_contents_with_http_info(email_id, opts)
215
+ data
216
+ end
217
+
218
+ # Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
219
+ # Returns a raw, unparsed, and unprocessed sent 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 getRawSentEmailJson endpoint
220
+ # @param email_id [String] ID of email
221
+ # @param [Hash] opts the optional parameters
222
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
223
+ def get_raw_sent_email_contents_with_http_info(email_id, opts = {})
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug 'Calling API: SentEmailsControllerApi.get_raw_sent_email_contents ...'
226
+ end
227
+ # verify the required parameter 'email_id' is set
228
+ if @api_client.config.client_side_validation && email_id.nil?
229
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling SentEmailsControllerApi.get_raw_sent_email_contents"
230
+ end
231
+ # resource path
232
+ local_var_path = '/sent/{emailId}/raw'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
233
+
234
+ # query parameters
235
+ query_params = opts[:query_params] || {}
236
+
237
+ # header parameters
238
+ header_params = opts[:header_params] || {}
239
+ # HTTP header 'Accept' (if needed)
240
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
241
+
242
+ # form parameters
243
+ form_params = opts[:form_params] || {}
244
+
245
+ # http body (model)
246
+ post_body = opts[:body]
247
+
248
+ # return_type
249
+ return_type = opts[:return_type] || 'String'
250
+
251
+ # auth_names
252
+ auth_names = opts[:auth_names] || ['API_KEY']
253
+
254
+ new_options = opts.merge(
255
+ :header_params => header_params,
256
+ :query_params => query_params,
257
+ :form_params => form_params,
258
+ :body => post_body,
259
+ :auth_names => auth_names,
260
+ :return_type => return_type
261
+ )
262
+
263
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
264
+ if @api_client.config.debugging
265
+ @api_client.config.logger.debug "API called: SentEmailsControllerApi#get_raw_sent_email_contents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
266
+ end
267
+ return data, status_code, headers
268
+ end
269
+
270
+ # Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
271
+ # Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response
272
+ # @param email_id [String] ID of email
273
+ # @param [Hash] opts the optional parameters
274
+ # @return [RawEmailJson]
275
+ def get_raw_sent_email_json(email_id, opts = {})
276
+ data, _status_code, _headers = get_raw_sent_email_json_with_http_info(email_id, opts)
277
+ data
278
+ end
279
+
280
+ # Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
281
+ # Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response
282
+ # @param email_id [String] ID of email
283
+ # @param [Hash] opts the optional parameters
284
+ # @return [Array<(RawEmailJson, Integer, Hash)>] RawEmailJson data, response status code and response headers
285
+ def get_raw_sent_email_json_with_http_info(email_id, opts = {})
286
+ if @api_client.config.debugging
287
+ @api_client.config.logger.debug 'Calling API: SentEmailsControllerApi.get_raw_sent_email_json ...'
288
+ end
289
+ # verify the required parameter 'email_id' is set
290
+ if @api_client.config.client_side_validation && email_id.nil?
291
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling SentEmailsControllerApi.get_raw_sent_email_json"
292
+ end
293
+ # resource path
294
+ local_var_path = '/sent/{emailId}/raw/json'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
295
+
296
+ # query parameters
297
+ query_params = opts[:query_params] || {}
298
+
299
+ # header parameters
300
+ header_params = opts[:header_params] || {}
301
+ # HTTP header 'Accept' (if needed)
302
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
303
+
304
+ # form parameters
305
+ form_params = opts[:form_params] || {}
306
+
307
+ # http body (model)
308
+ post_body = opts[:body]
309
+
310
+ # return_type
311
+ return_type = opts[:return_type] || 'RawEmailJson'
312
+
313
+ # auth_names
314
+ auth_names = opts[:auth_names] || ['API_KEY']
315
+
316
+ new_options = opts.merge(
317
+ :header_params => header_params,
318
+ :query_params => query_params,
319
+ :form_params => form_params,
320
+ :body => post_body,
321
+ :auth_names => auth_names,
322
+ :return_type => return_type
323
+ )
324
+
325
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
326
+ if @api_client.config.debugging
327
+ @api_client.config.logger.debug "API called: SentEmailsControllerApi#get_raw_sent_email_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
328
+ end
329
+ return data, status_code, headers
330
+ end
331
+
208
332
  # Get sent email receipt
209
333
  # @param id [String]
210
334
  # @param [Hash] opts the optional parameters
@@ -325,6 +449,68 @@ module MailSlurpClient
325
449
  return data, status_code, headers
326
450
  end
327
451
 
452
+ # Get sent email URL for viewing in browser or downloading
453
+ # Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser.
454
+ # @param id [String]
455
+ # @param [Hash] opts the optional parameters
456
+ # @return [EmailPreviewUrls]
457
+ def get_sent_email_preview_ur_ls(id, opts = {})
458
+ data, _status_code, _headers = get_sent_email_preview_ur_ls_with_http_info(id, opts)
459
+ data
460
+ end
461
+
462
+ # Get sent email URL for viewing in browser or downloading
463
+ # Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser.
464
+ # @param id [String]
465
+ # @param [Hash] opts the optional parameters
466
+ # @return [Array<(EmailPreviewUrls, Integer, Hash)>] EmailPreviewUrls data, response status code and response headers
467
+ def get_sent_email_preview_ur_ls_with_http_info(id, opts = {})
468
+ if @api_client.config.debugging
469
+ @api_client.config.logger.debug 'Calling API: SentEmailsControllerApi.get_sent_email_preview_ur_ls ...'
470
+ end
471
+ # verify the required parameter 'id' is set
472
+ if @api_client.config.client_side_validation && id.nil?
473
+ fail ArgumentError, "Missing the required parameter 'id' when calling SentEmailsControllerApi.get_sent_email_preview_ur_ls"
474
+ end
475
+ # resource path
476
+ local_var_path = '/sent/{id}/urls'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
477
+
478
+ # query parameters
479
+ query_params = opts[:query_params] || {}
480
+
481
+ # header parameters
482
+ header_params = opts[:header_params] || {}
483
+ # HTTP header 'Accept' (if needed)
484
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
485
+
486
+ # form parameters
487
+ form_params = opts[:form_params] || {}
488
+
489
+ # http body (model)
490
+ post_body = opts[:body]
491
+
492
+ # return_type
493
+ return_type = opts[:return_type] || 'EmailPreviewUrls'
494
+
495
+ # auth_names
496
+ auth_names = opts[:auth_names] || ['API_KEY']
497
+
498
+ new_options = opts.merge(
499
+ :header_params => header_params,
500
+ :query_params => query_params,
501
+ :form_params => form_params,
502
+ :body => post_body,
503
+ :auth_names => auth_names,
504
+ :return_type => return_type
505
+ )
506
+
507
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
508
+ if @api_client.config.debugging
509
+ @api_client.config.logger.debug "API called: SentEmailsControllerApi#get_sent_email_preview_ur_ls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
510
+ end
511
+ return data, status_code, headers
512
+ end
513
+
328
514
  # Get all tracking pixels for a sent email in paginated form
329
515
  # @param id [String]
330
516
  # @param [Hash] opts the optional parameters
@@ -27,10 +27,10 @@ module MailSlurpClient
27
27
 
28
28
  attr_accessor :created_at
29
29
 
30
- attr_accessor :updated_at
31
-
32
30
  attr_accessor :use_threads
33
31
 
32
+ attr_accessor :updated_at
33
+
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
35
35
  def self.attribute_map
36
36
  {
@@ -40,8 +40,8 @@ module MailSlurpClient
40
40
  :'email_address' => :'emailAddress',
41
41
  :'inbox_id' => :'inboxId',
42
42
  :'created_at' => :'createdAt',
43
- :'updated_at' => :'updatedAt',
44
- :'use_threads' => :'useThreads'
43
+ :'use_threads' => :'useThreads',
44
+ :'updated_at' => :'updatedAt'
45
45
  }
46
46
  end
47
47
 
@@ -54,8 +54,8 @@ module MailSlurpClient
54
54
  :'email_address' => :'String',
55
55
  :'inbox_id' => :'String',
56
56
  :'created_at' => :'DateTime',
57
- :'updated_at' => :'DateTime',
58
- :'use_threads' => :'Boolean'
57
+ :'use_threads' => :'Boolean',
58
+ :'updated_at' => :'DateTime'
59
59
  }
60
60
  end
61
61
 
@@ -104,13 +104,13 @@ module MailSlurpClient
104
104
  self.created_at = attributes[:'created_at']
105
105
  end
106
106
 
107
- if attributes.key?(:'updated_at')
108
- self.updated_at = attributes[:'updated_at']
109
- end
110
-
111
107
  if attributes.key?(:'use_threads')
112
108
  self.use_threads = attributes[:'use_threads']
113
109
  end
110
+
111
+ if attributes.key?(:'updated_at')
112
+ self.updated_at = attributes[:'updated_at']
113
+ end
114
114
  end
115
115
 
116
116
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -167,8 +167,8 @@ module MailSlurpClient
167
167
  email_address == o.email_address &&
168
168
  inbox_id == o.inbox_id &&
169
169
  created_at == o.created_at &&
170
- updated_at == o.updated_at &&
171
- use_threads == o.use_threads
170
+ use_threads == o.use_threads &&
171
+ updated_at == o.updated_at
172
172
  end
173
173
 
174
174
  # @see the `==` method
@@ -180,7 +180,7 @@ module MailSlurpClient
180
180
  # Calculates hash code according to all attributes.
181
181
  # @return [Integer] Hash code
182
182
  def hash
183
- [name, id, user_id, email_address, inbox_id, created_at, updated_at, use_threads].hash
183
+ [name, id, user_id, email_address, inbox_id, created_at, use_threads, updated_at].hash
184
184
  end
185
185
 
186
186
  # Builds the object from hash
@@ -19,9 +19,6 @@ module MailSlurpClient
19
19
  # Content length of attachment in bytes
20
20
  attr_accessor :content_length
21
21
 
22
- # Content type of attachment.
23
- attr_accessor :content_type
24
-
25
22
  attr_accessor :user_id
26
23
 
27
24
  # Attachment ID
@@ -31,16 +28,19 @@ module MailSlurpClient
31
28
 
32
29
  attr_accessor :updated_at
33
30
 
31
+ # Content type of attachment.
32
+ attr_accessor :content_type
33
+
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
35
35
  def self.attribute_map
36
36
  {
37
37
  :'name' => :'name',
38
38
  :'content_length' => :'contentLength',
39
- :'content_type' => :'contentType',
40
39
  :'user_id' => :'userId',
41
40
  :'attachment_id' => :'attachmentId',
42
41
  :'created_at' => :'createdAt',
43
- :'updated_at' => :'updatedAt'
42
+ :'updated_at' => :'updatedAt',
43
+ :'content_type' => :'contentType'
44
44
  }
45
45
  end
46
46
 
@@ -49,11 +49,11 @@ module MailSlurpClient
49
49
  {
50
50
  :'name' => :'String',
51
51
  :'content_length' => :'Integer',
52
- :'content_type' => :'String',
53
52
  :'user_id' => :'String',
54
53
  :'attachment_id' => :'String',
55
54
  :'created_at' => :'DateTime',
56
- :'updated_at' => :'DateTime'
55
+ :'updated_at' => :'DateTime',
56
+ :'content_type' => :'String'
57
57
  }
58
58
  end
59
59
 
@@ -86,10 +86,6 @@ module MailSlurpClient
86
86
  self.content_length = attributes[:'content_length']
87
87
  end
88
88
 
89
- if attributes.key?(:'content_type')
90
- self.content_type = attributes[:'content_type']
91
- end
92
-
93
89
  if attributes.key?(:'user_id')
94
90
  self.user_id = attributes[:'user_id']
95
91
  end
@@ -105,6 +101,10 @@ module MailSlurpClient
105
101
  if attributes.key?(:'updated_at')
106
102
  self.updated_at = attributes[:'updated_at']
107
103
  end
104
+
105
+ if attributes.key?(:'content_type')
106
+ self.content_type = attributes[:'content_type']
107
+ end
108
108
  end
109
109
 
110
110
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -147,11 +147,11 @@ module MailSlurpClient
147
147
  self.class == o.class &&
148
148
  name == o.name &&
149
149
  content_length == o.content_length &&
150
- content_type == o.content_type &&
151
150
  user_id == o.user_id &&
152
151
  attachment_id == o.attachment_id &&
153
152
  created_at == o.created_at &&
154
- updated_at == o.updated_at
153
+ updated_at == o.updated_at &&
154
+ content_type == o.content_type
155
155
  end
156
156
 
157
157
  # @see the `==` method
@@ -163,7 +163,7 @@ module MailSlurpClient
163
163
  # Calculates hash code according to all attributes.
164
164
  # @return [Integer] Hash code
165
165
  def hash
166
- [name, content_length, content_type, user_id, attachment_id, created_at, updated_at].hash
166
+ [name, content_length, user_id, attachment_id, created_at, updated_at, content_type].hash
167
167
  end
168
168
 
169
169
  # Builds the object from hash