mailslurp_client 15.12.14 → 15.12.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/api_user_controller_api.rb +104 -0
  3. data/lib/mailslurp_client/api/bounce_controller_api.rb +79 -0
  4. data/lib/mailslurp_client/api/inbox_controller_api.rb +89 -0
  5. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +292 -0
  6. data/lib/mailslurp_client/api/webhook_controller_api.rb +3 -0
  7. data/lib/mailslurp_client/models/attachment_meta_data.rb +1 -1
  8. data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
  9. data/lib/mailslurp_client/models/bounce_projection.rb +22 -22
  10. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +13 -13
  11. data/lib/mailslurp_client/models/complaint.rb +289 -0
  12. data/lib/mailslurp_client/models/create_webhook_options.rb +3 -4
  13. data/lib/mailslurp_client/models/delivery_status_dto.rb +345 -0
  14. data/lib/mailslurp_client/models/email.rb +11 -1
  15. data/lib/mailslurp_client/models/email_preview.rb +11 -1
  16. data/lib/mailslurp_client/models/email_projection.rb +31 -22
  17. data/lib/mailslurp_client/models/inbox_preview.rb +11 -1
  18. data/lib/mailslurp_client/models/organization_inbox_projection.rb +11 -1
  19. data/lib/mailslurp_client/models/page_alias.rb +22 -22
  20. data/lib/mailslurp_client/models/page_attachment_entity.rb +22 -22
  21. data/lib/mailslurp_client/models/page_bounced_email.rb +22 -22
  22. data/lib/mailslurp_client/models/page_bounced_recipients.rb +22 -22
  23. data/lib/mailslurp_client/models/page_complaint.rb +308 -0
  24. data/lib/mailslurp_client/models/page_contact_projection.rb +22 -22
  25. data/lib/mailslurp_client/models/page_delivery_status.rb +308 -0
  26. data/lib/mailslurp_client/models/page_email_preview.rb +22 -22
  27. data/lib/mailslurp_client/models/page_email_projection.rb +22 -22
  28. data/lib/mailslurp_client/models/page_email_validation_request.rb +22 -22
  29. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +22 -22
  30. data/lib/mailslurp_client/models/page_group_projection.rb +22 -22
  31. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +22 -22
  32. data/lib/mailslurp_client/models/page_inbox_projection.rb +22 -22
  33. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +22 -22
  34. data/lib/mailslurp_client/models/page_missed_email_projection.rb +22 -22
  35. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +22 -22
  36. data/lib/mailslurp_client/models/page_phone_number_projection.rb +22 -22
  37. data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
  38. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +16 -16
  39. data/lib/mailslurp_client/models/page_sms_projection.rb +22 -22
  40. data/lib/mailslurp_client/models/page_template_projection.rb +22 -22
  41. data/lib/mailslurp_client/models/page_thread_projection.rb +22 -22
  42. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +22 -22
  43. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +22 -22
  44. data/lib/mailslurp_client/models/page_webhook_projection.rb +22 -22
  45. data/lib/mailslurp_client/models/page_webhook_result.rb +22 -22
  46. data/lib/mailslurp_client/models/sent_email_dto.rb +62 -1
  47. data/lib/mailslurp_client/models/sent_email_projection.rb +15 -15
  48. data/lib/mailslurp_client/models/sort.rb +13 -13
  49. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
  50. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +11 -1
  51. data/lib/mailslurp_client/version.rb +1 -1
  52. data/lib/mailslurp_client.rb +4 -0
  53. metadata +9 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5115bc2f8ca0c4cbfe748f3e3c7d6eae3d8aa1ab4711fab5e3eaea505364e81
4
- data.tar.gz: 5d8ee9139852ead5bfed33d4addfc9b30ec967516cd3f3522ca7dc4d8d0741c2
3
+ metadata.gz: e1dac26ff14eb4f9f64b3b514fc28d7d59db6b07c64c450992dd86916227922a
4
+ data.tar.gz: ae952361f60c99bee1dfb8f37d6d2e71b7e7621cb3ef48467b22d1ef5bc397f6
5
5
  SHA512:
6
- metadata.gz: 3a375671aad02955aa43a22aab055768224ef24573b433ac210035b4e9b6c6e240c64bd5ecd5594213b35e6660dd52169dc40fb7360562ada40a90b7ad453d95
7
- data.tar.gz: db485fe77b62ddb0d681faee23296f505ad7d9dc957b5380a12e73af8832d97ed0b8d33102e2b53bd7a4a54d26392e8d92f3f13464370c55bc41bff949515227
6
+ metadata.gz: 82dc3c0abe03f28aeebe0ee2e006fc56e2deed8b115e7501fffa770791ed1269b753da2f4552ba06056093a4cf1f92a977256b6ce124f0e5b99fbe38810a52cd
7
+ data.tar.gz: a6835141e04325e7a71ac696c4d5c988555857c72f722b741aa638418b0e4f2311f32f1b8056a9b0c7c4837be3214604fe3fe525360549a8d5e4d56569af6a64
@@ -19,6 +19,110 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [String]
24
+ def get_smtp_password(opts = {})
25
+ data, _status_code, _headers = get_smtp_password_with_http_info(opts)
26
+ data
27
+ end
28
+
29
+ # @param [Hash] opts the optional parameters
30
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
31
+ def get_smtp_password_with_http_info(opts = {})
32
+ if @api_client.config.debugging
33
+ @api_client.config.logger.debug 'Calling API: ApiUserControllerApi.get_smtp_password ...'
34
+ end
35
+ # resource path
36
+ local_var_path = '/user/smtp/password'
37
+
38
+ # query parameters
39
+ query_params = opts[:query_params] || {}
40
+
41
+ # header parameters
42
+ header_params = opts[:header_params] || {}
43
+ # HTTP header 'Accept' (if needed)
44
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
45
+
46
+ # form parameters
47
+ form_params = opts[:form_params] || {}
48
+
49
+ # http body (model)
50
+ post_body = opts[:body]
51
+
52
+ # return_type
53
+ return_type = opts[:return_type] || 'String'
54
+
55
+ # auth_names
56
+ auth_names = opts[:auth_names] || ['API_KEY']
57
+
58
+ new_options = opts.merge(
59
+ :header_params => header_params,
60
+ :query_params => query_params,
61
+ :form_params => form_params,
62
+ :body => post_body,
63
+ :auth_names => auth_names,
64
+ :return_type => return_type
65
+ )
66
+
67
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: ApiUserControllerApi#get_smtp_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
+ end
71
+ return data, status_code, headers
72
+ end
73
+
74
+ # @param [Hash] opts the optional parameters
75
+ # @return [String]
76
+ def get_smtp_username(opts = {})
77
+ data, _status_code, _headers = get_smtp_username_with_http_info(opts)
78
+ data
79
+ end
80
+
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
83
+ def get_smtp_username_with_http_info(opts = {})
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug 'Calling API: ApiUserControllerApi.get_smtp_username ...'
86
+ end
87
+ # resource path
88
+ local_var_path = '/user/smtp/username'
89
+
90
+ # query parameters
91
+ query_params = opts[:query_params] || {}
92
+
93
+ # header parameters
94
+ header_params = opts[:header_params] || {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
97
+
98
+ # form parameters
99
+ form_params = opts[:form_params] || {}
100
+
101
+ # http body (model)
102
+ post_body = opts[:body]
103
+
104
+ # return_type
105
+ return_type = opts[:return_type] || 'String'
106
+
107
+ # auth_names
108
+ auth_names = opts[:auth_names] || ['API_KEY']
109
+
110
+ new_options = opts.merge(
111
+ :header_params => header_params,
112
+ :query_params => query_params,
113
+ :form_params => form_params,
114
+ :body => post_body,
115
+ :auth_names => auth_names,
116
+ :return_type => return_type
117
+ )
118
+
119
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
120
+ if @api_client.config.debugging
121
+ @api_client.config.logger.debug "API called: ApiUserControllerApi#get_smtp_username\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
122
+ end
123
+ return data, status_code, headers
124
+ end
125
+
22
126
  # @param [Hash] opts the optional parameters
23
127
  # @return [UserInfoDto]
24
128
  def get_user_info(opts = {})
@@ -364,5 +364,84 @@ module MailSlurpClient
364
364
  end
365
365
  return data, status_code, headers
366
366
  end
367
+
368
+ # Get paginated list of complaints.
369
+ # SMTP complaints made against your account
370
+ # @param [Hash] opts the optional parameters
371
+ # @option opts [Integer] :page Optional page index (default to 0)
372
+ # @option opts [Integer] :size Optional page size (default to 20)
373
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
374
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
375
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
376
+ # @return [PageComplaint]
377
+ def get_complaints(opts = {})
378
+ data, _status_code, _headers = get_complaints_with_http_info(opts)
379
+ data
380
+ end
381
+
382
+ # Get paginated list of complaints.
383
+ # SMTP complaints made against your account
384
+ # @param [Hash] opts the optional parameters
385
+ # @option opts [Integer] :page Optional page index
386
+ # @option opts [Integer] :size Optional page size
387
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
388
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
389
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
390
+ # @return [Array<(PageComplaint, Integer, Hash)>] PageComplaint data, response status code and response headers
391
+ def get_complaints_with_http_info(opts = {})
392
+ if @api_client.config.debugging
393
+ @api_client.config.logger.debug 'Calling API: BounceControllerApi.get_complaints ...'
394
+ end
395
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
396
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling BounceControllerApi.get_complaints, must be smaller than or equal to 100.'
397
+ end
398
+
399
+ allowable_values = ["ASC", "DESC"]
400
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
401
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
402
+ end
403
+ # resource path
404
+ local_var_path = '/bounce/complaints'
405
+
406
+ # query parameters
407
+ query_params = opts[:query_params] || {}
408
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
409
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
410
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
411
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
412
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
413
+
414
+ # header parameters
415
+ header_params = opts[:header_params] || {}
416
+ # HTTP header 'Accept' (if needed)
417
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
418
+
419
+ # form parameters
420
+ form_params = opts[:form_params] || {}
421
+
422
+ # http body (model)
423
+ post_body = opts[:body]
424
+
425
+ # return_type
426
+ return_type = opts[:return_type] || 'PageComplaint'
427
+
428
+ # auth_names
429
+ auth_names = opts[:auth_names] || ['API_KEY']
430
+
431
+ new_options = opts.merge(
432
+ :header_params => header_params,
433
+ :query_params => query_params,
434
+ :form_params => form_params,
435
+ :body => post_body,
436
+ :auth_names => auth_names,
437
+ :return_type => return_type
438
+ )
439
+
440
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
441
+ if @api_client.config.debugging
442
+ @api_client.config.logger.debug "API called: BounceControllerApi#get_complaints\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
443
+ end
444
+ return data, status_code, headers
445
+ end
367
446
  end
368
447
  end
@@ -608,6 +608,8 @@ module MailSlurpClient
608
608
  # @option opts [Boolean] :team_access DEPRECATED. Optionally filter by team access.
609
609
  # @option opts [DateTime] :since Optional filter by created after given date time
610
610
  # @option opts [DateTime] :before Optional filter by created before given date time
611
+ # @option opts [String] :inbox_type Optional filter by inbox type
612
+ # @option opts [String] :domain_id Optional domain ID filter
611
613
  # @return [PageInboxProjection]
612
614
  def get_all_inboxes(opts = {})
613
615
  data, _status_code, _headers = get_all_inboxes_with_http_info(opts)
@@ -626,6 +628,8 @@ module MailSlurpClient
626
628
  # @option opts [Boolean] :team_access DEPRECATED. Optionally filter by team access.
627
629
  # @option opts [DateTime] :since Optional filter by created after given date time
628
630
  # @option opts [DateTime] :before Optional filter by created before given date time
631
+ # @option opts [String] :inbox_type Optional filter by inbox type
632
+ # @option opts [String] :domain_id Optional domain ID filter
629
633
  # @return [Array<(PageInboxProjection, Integer, Hash)>] PageInboxProjection data, response status code and response headers
630
634
  def get_all_inboxes_with_http_info(opts = {})
631
635
  if @api_client.config.debugging
@@ -635,6 +639,10 @@ module MailSlurpClient
635
639
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
636
640
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
637
641
  end
642
+ allowable_values = ["HTTP_INBOX", "SMTP_INBOX"]
643
+ if @api_client.config.client_side_validation && opts[:'inbox_type'] && !allowable_values.include?(opts[:'inbox_type'])
644
+ fail ArgumentError, "invalid value for \"inbox_type\", must be one of #{allowable_values}"
645
+ end
638
646
  # resource path
639
647
  local_var_path = '/inboxes/paginated'
640
648
 
@@ -649,6 +657,8 @@ module MailSlurpClient
649
657
  query_params[:'teamAccess'] = opts[:'team_access'] if !opts[:'team_access'].nil?
650
658
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
651
659
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
660
+ query_params[:'inboxType'] = opts[:'inbox_type'] if !opts[:'inbox_type'].nil?
661
+ query_params[:'domainId'] = opts[:'domain_id'] if !opts[:'domain_id'].nil?
652
662
 
653
663
  # header parameters
654
664
  header_params = opts[:header_params] || {}
@@ -683,6 +693,85 @@ module MailSlurpClient
683
693
  return data, status_code, headers
684
694
  end
685
695
 
696
+ # Get all email delivery statuses for an inbox
697
+ # @param inbox_id [String]
698
+ # @param [Hash] opts the optional parameters
699
+ # @option opts [Integer] :page Optional page index in delivery status list pagination (default to 0)
700
+ # @option opts [Integer] :size Optional page size in delivery status list pagination (default to 20)
701
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
702
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
703
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
704
+ # @return [PageDeliveryStatus]
705
+ def get_delivery_statuses_by_inbox_id(inbox_id, opts = {})
706
+ data, _status_code, _headers = get_delivery_statuses_by_inbox_id_with_http_info(inbox_id, opts)
707
+ data
708
+ end
709
+
710
+ # Get all email delivery statuses for an inbox
711
+ # @param inbox_id [String]
712
+ # @param [Hash] opts the optional parameters
713
+ # @option opts [Integer] :page Optional page index in delivery status list pagination
714
+ # @option opts [Integer] :size Optional page size in delivery status list pagination
715
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
716
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
717
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
718
+ # @return [Array<(PageDeliveryStatus, Integer, Hash)>] PageDeliveryStatus data, response status code and response headers
719
+ def get_delivery_statuses_by_inbox_id_with_http_info(inbox_id, opts = {})
720
+ if @api_client.config.debugging
721
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_delivery_statuses_by_inbox_id ...'
722
+ end
723
+ # verify the required parameter 'inbox_id' is set
724
+ if @api_client.config.client_side_validation && inbox_id.nil?
725
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_delivery_statuses_by_inbox_id"
726
+ end
727
+ allowable_values = ["ASC", "DESC"]
728
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
729
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
730
+ end
731
+ # resource path
732
+ local_var_path = '/inboxes/{inboxId}/delivery-status'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
733
+
734
+ # query parameters
735
+ query_params = opts[:query_params] || {}
736
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
737
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
738
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
739
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
740
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
741
+
742
+ # header parameters
743
+ header_params = opts[:header_params] || {}
744
+ # HTTP header 'Accept' (if needed)
745
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
746
+
747
+ # form parameters
748
+ form_params = opts[:form_params] || {}
749
+
750
+ # http body (model)
751
+ post_body = opts[:body]
752
+
753
+ # return_type
754
+ return_type = opts[:return_type] || 'PageDeliveryStatus'
755
+
756
+ # auth_names
757
+ auth_names = opts[:auth_names] || ['API_KEY']
758
+
759
+ new_options = opts.merge(
760
+ :header_params => header_params,
761
+ :query_params => query_params,
762
+ :form_params => form_params,
763
+ :body => post_body,
764
+ :auth_names => auth_names,
765
+ :return_type => return_type
766
+ )
767
+
768
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
769
+ if @api_client.config.debugging
770
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_delivery_statuses_by_inbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
771
+ end
772
+ return data, status_code, headers
773
+ end
774
+
686
775
  # Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead.
687
776
  # List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
688
777
  # @param inbox_id [String] Id of inbox that emails belongs to
@@ -329,6 +329,218 @@ module MailSlurpClient
329
329
  return data, status_code, headers
330
330
  end
331
331
 
332
+ # Get a sent email delivery status
333
+ # @param delivery_id [String]
334
+ # @param [Hash] opts the optional parameters
335
+ # @return [DeliveryStatusDto]
336
+ def get_sent_delivery_status(delivery_id, opts = {})
337
+ data, _status_code, _headers = get_sent_delivery_status_with_http_info(delivery_id, opts)
338
+ data
339
+ end
340
+
341
+ # Get a sent email delivery status
342
+ # @param delivery_id [String]
343
+ # @param [Hash] opts the optional parameters
344
+ # @return [Array<(DeliveryStatusDto, Integer, Hash)>] DeliveryStatusDto data, response status code and response headers
345
+ def get_sent_delivery_status_with_http_info(delivery_id, opts = {})
346
+ if @api_client.config.debugging
347
+ @api_client.config.logger.debug 'Calling API: SentEmailsControllerApi.get_sent_delivery_status ...'
348
+ end
349
+ # verify the required parameter 'delivery_id' is set
350
+ if @api_client.config.client_side_validation && delivery_id.nil?
351
+ fail ArgumentError, "Missing the required parameter 'delivery_id' when calling SentEmailsControllerApi.get_sent_delivery_status"
352
+ end
353
+ # resource path
354
+ local_var_path = '/sent/delivery-status/{deliveryId}'.sub('{' + 'deliveryId' + '}', CGI.escape(delivery_id.to_s))
355
+
356
+ # query parameters
357
+ query_params = opts[:query_params] || {}
358
+
359
+ # header parameters
360
+ header_params = opts[:header_params] || {}
361
+ # HTTP header 'Accept' (if needed)
362
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
363
+
364
+ # form parameters
365
+ form_params = opts[:form_params] || {}
366
+
367
+ # http body (model)
368
+ post_body = opts[:body]
369
+
370
+ # return_type
371
+ return_type = opts[:return_type] || 'DeliveryStatusDto'
372
+
373
+ # auth_names
374
+ auth_names = opts[:auth_names] || ['API_KEY']
375
+
376
+ new_options = opts.merge(
377
+ :header_params => header_params,
378
+ :query_params => query_params,
379
+ :form_params => form_params,
380
+ :body => post_body,
381
+ :auth_names => auth_names,
382
+ :return_type => return_type
383
+ )
384
+
385
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug "API called: SentEmailsControllerApi#get_sent_delivery_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
388
+ end
389
+ return data, status_code, headers
390
+ end
391
+
392
+ # Get all sent email delivery statuses
393
+ # @param [Hash] opts the optional parameters
394
+ # @option opts [Integer] :page Optional page index in delivery status list pagination (default to 0)
395
+ # @option opts [Integer] :size Optional page size in delivery status list pagination (default to 20)
396
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
397
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
398
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
399
+ # @return [PageDeliveryStatus]
400
+ def get_sent_delivery_statuses(opts = {})
401
+ data, _status_code, _headers = get_sent_delivery_statuses_with_http_info(opts)
402
+ data
403
+ end
404
+
405
+ # Get all sent email delivery statuses
406
+ # @param [Hash] opts the optional parameters
407
+ # @option opts [Integer] :page Optional page index in delivery status list pagination
408
+ # @option opts [Integer] :size Optional page size in delivery status list pagination
409
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
410
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
411
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
412
+ # @return [Array<(PageDeliveryStatus, Integer, Hash)>] PageDeliveryStatus data, response status code and response headers
413
+ def get_sent_delivery_statuses_with_http_info(opts = {})
414
+ if @api_client.config.debugging
415
+ @api_client.config.logger.debug 'Calling API: SentEmailsControllerApi.get_sent_delivery_statuses ...'
416
+ end
417
+ allowable_values = ["ASC", "DESC"]
418
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
419
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
420
+ end
421
+ # resource path
422
+ local_var_path = '/sent/delivery-status'
423
+
424
+ # query parameters
425
+ query_params = opts[:query_params] || {}
426
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
427
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
428
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
429
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
430
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
431
+
432
+ # header parameters
433
+ header_params = opts[:header_params] || {}
434
+ # HTTP header 'Accept' (if needed)
435
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
436
+
437
+ # form parameters
438
+ form_params = opts[:form_params] || {}
439
+
440
+ # http body (model)
441
+ post_body = opts[:body]
442
+
443
+ # return_type
444
+ return_type = opts[:return_type] || 'PageDeliveryStatus'
445
+
446
+ # auth_names
447
+ auth_names = opts[:auth_names] || ['API_KEY']
448
+
449
+ new_options = opts.merge(
450
+ :header_params => header_params,
451
+ :query_params => query_params,
452
+ :form_params => form_params,
453
+ :body => post_body,
454
+ :auth_names => auth_names,
455
+ :return_type => return_type
456
+ )
457
+
458
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
459
+ if @api_client.config.debugging
460
+ @api_client.config.logger.debug "API called: SentEmailsControllerApi#get_sent_delivery_statuses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
461
+ end
462
+ return data, status_code, headers
463
+ end
464
+
465
+ # Get all sent email delivery statuses
466
+ # @param sent_id [String]
467
+ # @param [Hash] opts the optional parameters
468
+ # @option opts [Integer] :page Optional page index in delivery status list pagination (default to 0)
469
+ # @option opts [Integer] :size Optional page size in delivery status list pagination (default to 20)
470
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
471
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
472
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
473
+ # @return [PageDeliveryStatus]
474
+ def get_sent_delivery_statuses_by_sent_id(sent_id, opts = {})
475
+ data, _status_code, _headers = get_sent_delivery_statuses_by_sent_id_with_http_info(sent_id, opts)
476
+ data
477
+ end
478
+
479
+ # Get all sent email delivery statuses
480
+ # @param sent_id [String]
481
+ # @param [Hash] opts the optional parameters
482
+ # @option opts [Integer] :page Optional page index in delivery status list pagination
483
+ # @option opts [Integer] :size Optional page size in delivery status list pagination
484
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
485
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
486
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
487
+ # @return [Array<(PageDeliveryStatus, Integer, Hash)>] PageDeliveryStatus data, response status code and response headers
488
+ def get_sent_delivery_statuses_by_sent_id_with_http_info(sent_id, opts = {})
489
+ if @api_client.config.debugging
490
+ @api_client.config.logger.debug 'Calling API: SentEmailsControllerApi.get_sent_delivery_statuses_by_sent_id ...'
491
+ end
492
+ # verify the required parameter 'sent_id' is set
493
+ if @api_client.config.client_side_validation && sent_id.nil?
494
+ fail ArgumentError, "Missing the required parameter 'sent_id' when calling SentEmailsControllerApi.get_sent_delivery_statuses_by_sent_id"
495
+ end
496
+ allowable_values = ["ASC", "DESC"]
497
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
498
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
499
+ end
500
+ # resource path
501
+ local_var_path = '/sent/{sentId}/delivery-status'.sub('{' + 'sentId' + '}', CGI.escape(sent_id.to_s))
502
+
503
+ # query parameters
504
+ query_params = opts[:query_params] || {}
505
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
506
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
507
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
508
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
509
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
510
+
511
+ # header parameters
512
+ header_params = opts[:header_params] || {}
513
+ # HTTP header 'Accept' (if needed)
514
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
515
+
516
+ # form parameters
517
+ form_params = opts[:form_params] || {}
518
+
519
+ # http body (model)
520
+ post_body = opts[:body]
521
+
522
+ # return_type
523
+ return_type = opts[:return_type] || 'PageDeliveryStatus'
524
+
525
+ # auth_names
526
+ auth_names = opts[:auth_names] || ['API_KEY']
527
+
528
+ new_options = opts.merge(
529
+ :header_params => header_params,
530
+ :query_params => query_params,
531
+ :form_params => form_params,
532
+ :body => post_body,
533
+ :auth_names => auth_names,
534
+ :return_type => return_type
535
+ )
536
+
537
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
538
+ if @api_client.config.debugging
539
+ @api_client.config.logger.debug "API called: SentEmailsControllerApi#get_sent_delivery_statuses_by_sent_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
540
+ end
541
+ return data, status_code, headers
542
+ end
543
+
332
544
  # Get sent email receipt
333
545
  # @param id [String]
334
546
  # @param [Hash] opts the optional parameters
@@ -823,5 +1035,85 @@ module MailSlurpClient
823
1035
  end
824
1036
  return data, status_code, headers
825
1037
  end
1038
+
1039
+ # Wait for delivery statuses
1040
+ # @param [Hash] opts the optional parameters
1041
+ # @option opts [String] :sent_id Optional sent email ID filter
1042
+ # @option opts [String] :inbox_id Optional inbox ID filter
1043
+ # @option opts [Integer] :timeout Optional timeout milliseconds
1044
+ # @option opts [Integer] :index Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index&#x3D;1
1045
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
1046
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
1047
+ # @return [DeliveryStatusDto]
1048
+ def wait_for_delivery_statuses(opts = {})
1049
+ data, _status_code, _headers = wait_for_delivery_statuses_with_http_info(opts)
1050
+ data
1051
+ end
1052
+
1053
+ # Wait for delivery statuses
1054
+ # @param [Hash] opts the optional parameters
1055
+ # @option opts [String] :sent_id Optional sent email ID filter
1056
+ # @option opts [String] :inbox_id Optional inbox ID filter
1057
+ # @option opts [Integer] :timeout Optional timeout milliseconds
1058
+ # @option opts [Integer] :index Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index&#x3D;1
1059
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
1060
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
1061
+ # @return [Array<(DeliveryStatusDto, Integer, Hash)>] DeliveryStatusDto data, response status code and response headers
1062
+ def wait_for_delivery_statuses_with_http_info(opts = {})
1063
+ if @api_client.config.debugging
1064
+ @api_client.config.logger.debug 'Calling API: SentEmailsControllerApi.wait_for_delivery_statuses ...'
1065
+ end
1066
+ if @api_client.config.client_side_validation && !opts[:'index'].nil? && opts[:'index'] > 2147483647
1067
+ fail ArgumentError, 'invalid value for "opts[:"index"]" when calling SentEmailsControllerApi.wait_for_delivery_statuses, must be smaller than or equal to 2147483647.'
1068
+ end
1069
+
1070
+ if @api_client.config.client_side_validation && !opts[:'index'].nil? && opts[:'index'] < 0
1071
+ fail ArgumentError, 'invalid value for "opts[:"index"]" when calling SentEmailsControllerApi.wait_for_delivery_statuses, must be greater than or equal to 0.'
1072
+ end
1073
+
1074
+ # resource path
1075
+ local_var_path = '/sent/delivery-status/wait-for'
1076
+
1077
+ # query parameters
1078
+ query_params = opts[:query_params] || {}
1079
+ query_params[:'sentId'] = opts[:'sent_id'] if !opts[:'sent_id'].nil?
1080
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
1081
+ query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
1082
+ query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
1083
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
1084
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1085
+
1086
+ # header parameters
1087
+ header_params = opts[:header_params] || {}
1088
+ # HTTP header 'Accept' (if needed)
1089
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1090
+
1091
+ # form parameters
1092
+ form_params = opts[:form_params] || {}
1093
+
1094
+ # http body (model)
1095
+ post_body = opts[:body]
1096
+
1097
+ # return_type
1098
+ return_type = opts[:return_type] || 'DeliveryStatusDto'
1099
+
1100
+ # auth_names
1101
+ auth_names = opts[:auth_names] || ['API_KEY']
1102
+
1103
+ new_options = opts.merge(
1104
+ :header_params => header_params,
1105
+ :query_params => query_params,
1106
+ :form_params => form_params,
1107
+ :body => post_body,
1108
+ :auth_names => auth_names,
1109
+ :return_type => return_type
1110
+ )
1111
+
1112
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1113
+ if @api_client.config.debugging
1114
+ @api_client.config.logger.debug "API called: SentEmailsControllerApi#wait_for_delivery_statuses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1115
+ end
1116
+ return data, status_code, headers
1117
+ end
826
1118
  end
827
1119
  end
@@ -155,6 +155,7 @@ module MailSlurpClient
155
155
 
156
156
  # Delete all webhooks
157
157
  # @param [Hash] opts the optional parameters
158
+ # @option opts [DateTime] :before before
158
159
  # @return [nil]
159
160
  def delete_all_webhooks(opts = {})
160
161
  delete_all_webhooks_with_http_info(opts)
@@ -163,6 +164,7 @@ module MailSlurpClient
163
164
 
164
165
  # Delete all webhooks
165
166
  # @param [Hash] opts the optional parameters
167
+ # @option opts [DateTime] :before before
166
168
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
167
169
  def delete_all_webhooks_with_http_info(opts = {})
168
170
  if @api_client.config.debugging
@@ -173,6 +175,7 @@ module MailSlurpClient
173
175
 
174
176
  # query parameters
175
177
  query_params = opts[:query_params] || {}
178
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
176
179
 
177
180
  # header parameters
178
181
  header_params = opts[:header_params] || {}
@@ -24,7 +24,7 @@ module MailSlurpClient
24
24
  # Size of attachment in bytes
25
25
  attr_accessor :content_length
26
26
 
27
- # ID of attachment
27
+ # ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email.
28
28
  attr_accessor :id
29
29
 
30
30
  # Attribute mapping from ruby-style variable name to JSON key.