mailslurp_client 8.7.0 → 11.1.0

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: 8497a08a1851b06515595e2e5ed8fb1a8d4d2f6cf093eaf64b354182b485b114
4
- data.tar.gz: 516eb44fb260b3087a65f7eabf9c9f878e4b700c79ae7ffa7840bcc56e915c55
3
+ metadata.gz: c4cffc3d4ad26c6083619d2b55319d076433419ba6ab9191aafc722c667845b3
4
+ data.tar.gz: 262f90db6488aea3d4d8447da81bac53f44236dbc427728218ee5c91bfcb1120
5
5
  SHA512:
6
- metadata.gz: 507f9406c71b15f46c4876f4300053aff58f930a00d30c4992f369e07090fce6490a2a634b07bb81bf4cf0e8174568bfe0e76cad00934e486ad1e4785fd0760d
7
- data.tar.gz: 621193494b37352ea2da7d421f5da156551ba8e2d102418e2f41d10e8b0a8967f10b6370c9b2cb4d749e8acdd6b341ccd19a70bbe0383d8c9111875ed57d1386
6
+ metadata.gz: 625752091e51d5c99781c83b72949a817282e9a5d8f0d7445221fa4427ccf50567bfc7de87928af346623d6096d577a9104ab1c0e81ad112d64047e1ba599160
7
+ data.tar.gz: 821885d3019eaa556822ded8ecb2f5d9365e360d22a4da426961dc68d4b5572be3786a676045d37dae447a7420724f1cdfa7bd893b179e0fe711d7ecaa3a5700
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2020 MailSlurp Email API (Provided by Pettman OÜ, Estonia)
1
+ Copyright 2021 MailSlurp Email API (Provided by Pettman OÜ, Estonia)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
@@ -38,6 +38,7 @@ require 'mailslurp_client/models/dns_lookup_results'
38
38
  require 'mailslurp_client/models/describe_domain_options'
39
39
  require 'mailslurp_client/models/describe_mail_server_domain_result'
40
40
  require 'mailslurp_client/models/domain_dto'
41
+ require 'mailslurp_client/models/domain_name_record'
41
42
  require 'mailslurp_client/models/domain_preview'
42
43
  require 'mailslurp_client/models/download_attachment_dto'
43
44
  require 'mailslurp_client/models/email'
@@ -45,7 +46,10 @@ require 'mailslurp_client/models/email_analysis'
45
46
  require 'mailslurp_client/models/email_content_match_result'
46
47
  require 'mailslurp_client/models/email_preview'
47
48
  require 'mailslurp_client/models/email_projection'
49
+ require 'mailslurp_client/models/email_text_lines_result'
48
50
  require 'mailslurp_client/models/email_verification_result'
51
+ require 'mailslurp_client/models/expired_inbox_dto'
52
+ require 'mailslurp_client/models/expired_inbox_record_projection'
49
53
  require 'mailslurp_client/models/forward_email_options'
50
54
  require 'mailslurp_client/models/group_contacts_dto'
51
55
  require 'mailslurp_client/models/group_dto'
@@ -62,6 +66,7 @@ require 'mailslurp_client/models/page_alias'
62
66
  require 'mailslurp_client/models/page_contact_projection'
63
67
  require 'mailslurp_client/models/page_email_preview'
64
68
  require 'mailslurp_client/models/page_email_projection'
69
+ require 'mailslurp_client/models/page_expired_inbox_record_projection'
65
70
  require 'mailslurp_client/models/page_group_projection'
66
71
  require 'mailslurp_client/models/page_inbox_projection'
67
72
  require 'mailslurp_client/models/page_sent_email_projection'
@@ -499,7 +499,7 @@ module MailSlurpClient
499
499
  end
500
500
 
501
501
  # Send an email from an alias inbox
502
- # Send an email from an alias. Replies to the email will be forwared to the alias masked email address
502
+ # Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
503
503
  # @param alias_id [String] aliasId
504
504
  # @param [Hash] opts the optional parameters
505
505
  # @option opts [SendEmailOptions] :send_email_options Options for the email to be sent
@@ -510,7 +510,7 @@ module MailSlurpClient
510
510
  end
511
511
 
512
512
  # Send an email from an alias inbox
513
- # Send an email from an alias. Replies to the email will be forwared to the alias masked email address
513
+ # Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
514
514
  # @param alias_id [String] aliasId
515
515
  # @param [Hash] opts the optional parameters
516
516
  # @option opts [SendEmailOptions] :send_email_options Options for the email to be sent
@@ -22,6 +22,9 @@ module MailSlurpClient
22
22
  # Create new random inbox
23
23
  # Returns an Inbox with an `id` and an `emailAddress`
24
24
  # @param [Hash] opts the optional parameters
25
+ # @option opts [DateTime] :expires_at expiresAt
26
+ # @option opts [Integer] :expires_in expiresIn
27
+ # @option opts [Boolean] :use_domain_pool useDomainPool
25
28
  # @return [Inbox]
26
29
  def create_new_email_address(opts = {})
27
30
  data, _status_code, _headers = create_new_email_address_with_http_info(opts)
@@ -31,6 +34,9 @@ module MailSlurpClient
31
34
  # Create new random inbox
32
35
  # Returns an Inbox with an `id` and an `emailAddress`
33
36
  # @param [Hash] opts the optional parameters
37
+ # @option opts [DateTime] :expires_at expiresAt
38
+ # @option opts [Integer] :expires_in expiresIn
39
+ # @option opts [Boolean] :use_domain_pool useDomainPool
34
40
  # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
35
41
  def create_new_email_address_with_http_info(opts = {})
36
42
  if @api_client.config.debugging
@@ -41,6 +47,9 @@ module MailSlurpClient
41
47
 
42
48
  # query parameters
43
49
  query_params = opts[:query_params] || {}
50
+ query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
51
+ query_params[:'expiresIn'] = opts[:'expires_in'] if !opts[:'expires_in'].nil?
52
+ query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
44
53
 
45
54
  # header parameters
46
55
  header_params = opts[:header_params] || {}
@@ -78,6 +87,9 @@ module MailSlurpClient
78
87
  # Create new random inbox
79
88
  # Returns an Inbox with an `id` and an `emailAddress`
80
89
  # @param [Hash] opts the optional parameters
90
+ # @option opts [DateTime] :expires_at expiresAt
91
+ # @option opts [Integer] :expires_in expiresIn
92
+ # @option opts [Boolean] :use_domain_pool useDomainPool
81
93
  # @return [Inbox]
82
94
  def create_new_email_address1(opts = {})
83
95
  data, _status_code, _headers = create_new_email_address1_with_http_info(opts)
@@ -87,6 +99,9 @@ module MailSlurpClient
87
99
  # Create new random inbox
88
100
  # Returns an Inbox with an &#x60;id&#x60; and an &#x60;emailAddress&#x60;
89
101
  # @param [Hash] opts the optional parameters
102
+ # @option opts [DateTime] :expires_at expiresAt
103
+ # @option opts [Integer] :expires_in expiresIn
104
+ # @option opts [Boolean] :use_domain_pool useDomainPool
90
105
  # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
91
106
  def create_new_email_address1_with_http_info(opts = {})
92
107
  if @api_client.config.debugging
@@ -97,6 +112,9 @@ module MailSlurpClient
97
112
 
98
113
  # query parameters
99
114
  query_params = opts[:query_params] || {}
115
+ query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
116
+ query_params[:'expiresIn'] = opts[:'expires_in'] if !opts[:'expires_in'].nil?
117
+ query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
100
118
 
101
119
  # header parameters
102
120
  header_params = opts[:header_params] || {}
@@ -670,6 +670,142 @@ module MailSlurpClient
670
670
  return data, status_code, headers
671
671
  end
672
672
 
673
+ # Parse and return text from an email, stripping HTML and decoding encoded characters
674
+ # Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
675
+ # @param email_id [String] ID of email to perform HTML query on
676
+ # @param html_selector [String] HTML selector to search for. Uses JQuery/JSoup/CSS style selector like &#39;.my-div&#39; to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information.
677
+ # @param [Hash] opts the optional parameters
678
+ # @return [EmailTextLinesResult]
679
+ def get_email_html_query(email_id, html_selector, opts = {})
680
+ data, _status_code, _headers = get_email_html_query_with_http_info(email_id, html_selector, opts)
681
+ data
682
+ end
683
+
684
+ # Parse and return text from an email, stripping HTML and decoding encoded characters
685
+ # Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
686
+ # @param email_id [String] ID of email to perform HTML query on
687
+ # @param html_selector [String] HTML selector to search for. Uses JQuery/JSoup/CSS style selector like &#39;.my-div&#39; to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information.
688
+ # @param [Hash] opts the optional parameters
689
+ # @return [Array<(EmailTextLinesResult, Integer, Hash)>] EmailTextLinesResult data, response status code and response headers
690
+ def get_email_html_query_with_http_info(email_id, html_selector, opts = {})
691
+ if @api_client.config.debugging
692
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email_html_query ...'
693
+ end
694
+ # verify the required parameter 'email_id' is set
695
+ if @api_client.config.client_side_validation && email_id.nil?
696
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_html_query"
697
+ end
698
+ # verify the required parameter 'html_selector' is set
699
+ if @api_client.config.client_side_validation && html_selector.nil?
700
+ fail ArgumentError, "Missing the required parameter 'html_selector' when calling EmailControllerApi.get_email_html_query"
701
+ end
702
+ # resource path
703
+ local_var_path = '/emails/{emailId}/html-query'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s)).sub('{' + 'htmlSelector' + '}', CGI.escape(html_selector.to_s))
704
+
705
+ # query parameters
706
+ query_params = opts[:query_params] || {}
707
+
708
+ # header parameters
709
+ header_params = opts[:header_params] || {}
710
+ # HTTP header 'Accept' (if needed)
711
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
712
+
713
+ # form parameters
714
+ form_params = opts[:form_params] || {}
715
+
716
+ # http body (model)
717
+ post_body = opts[:body]
718
+
719
+ # return_type
720
+ return_type = opts[:return_type] || 'EmailTextLinesResult'
721
+
722
+ # auth_names
723
+ auth_names = opts[:auth_names] || ['API_KEY']
724
+
725
+ new_options = opts.merge(
726
+ :header_params => header_params,
727
+ :query_params => query_params,
728
+ :form_params => form_params,
729
+ :body => post_body,
730
+ :auth_names => auth_names,
731
+ :return_type => return_type
732
+ )
733
+
734
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
735
+ if @api_client.config.debugging
736
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_email_html_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
737
+ end
738
+ return data, status_code, headers
739
+ end
740
+
741
+ # Parse and return text from an email, stripping HTML and decoding encoded characters
742
+ # Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
743
+ # @param decode_html_entities [Boolean] Decode HTML entities
744
+ # @param email_id [String] ID of email to fetch text for
745
+ # @param [Hash] opts the optional parameters
746
+ # @return [EmailTextLinesResult]
747
+ def get_email_text_lines(decode_html_entities, email_id, opts = {})
748
+ data, _status_code, _headers = get_email_text_lines_with_http_info(decode_html_entities, email_id, opts)
749
+ data
750
+ end
751
+
752
+ # Parse and return text from an email, stripping HTML and decoding encoded characters
753
+ # Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
754
+ # @param decode_html_entities [Boolean] Decode HTML entities
755
+ # @param email_id [String] ID of email to fetch text for
756
+ # @param [Hash] opts the optional parameters
757
+ # @return [Array<(EmailTextLinesResult, Integer, Hash)>] EmailTextLinesResult data, response status code and response headers
758
+ def get_email_text_lines_with_http_info(decode_html_entities, email_id, opts = {})
759
+ if @api_client.config.debugging
760
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_email_text_lines ...'
761
+ end
762
+ # verify the required parameter 'decode_html_entities' is set
763
+ if @api_client.config.client_side_validation && decode_html_entities.nil?
764
+ fail ArgumentError, "Missing the required parameter 'decode_html_entities' when calling EmailControllerApi.get_email_text_lines"
765
+ end
766
+ # verify the required parameter 'email_id' is set
767
+ if @api_client.config.client_side_validation && email_id.nil?
768
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_text_lines"
769
+ end
770
+ # resource path
771
+ local_var_path = '/emails/{emailId}/text'.sub('{' + 'decodeHtmlEntities' + '}', CGI.escape(decode_html_entities.to_s)).sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
772
+
773
+ # query parameters
774
+ query_params = opts[:query_params] || {}
775
+
776
+ # header parameters
777
+ header_params = opts[:header_params] || {}
778
+ # HTTP header 'Accept' (if needed)
779
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
780
+
781
+ # form parameters
782
+ form_params = opts[:form_params] || {}
783
+
784
+ # http body (model)
785
+ post_body = opts[:body]
786
+
787
+ # return_type
788
+ return_type = opts[:return_type] || 'EmailTextLinesResult'
789
+
790
+ # auth_names
791
+ auth_names = opts[:auth_names] || ['API_KEY']
792
+
793
+ new_options = opts.merge(
794
+ :header_params => header_params,
795
+ :query_params => query_params,
796
+ :form_params => form_params,
797
+ :body => post_body,
798
+ :auth_names => auth_names,
799
+ :return_type => return_type
800
+ )
801
+
802
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
803
+ if @api_client.config.debugging
804
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_email_text_lines\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
805
+ end
806
+ return data, status_code, headers
807
+ end
808
+
673
809
  # Get all emails
674
810
  # By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
675
811
  # @param [Hash] opts the optional parameters
@@ -22,12 +22,14 @@ module MailSlurpClient
22
22
  # Create an Inbox (email address)
23
23
  # Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.
24
24
  # @param [Hash] opts the optional parameters
25
- # @option opts [String] :description Optional description for an inbox.
26
- # @option opts [String] :email_address Optional email address including domain you wish inbox to use (eg: test123@mydomain.com). Only supports domains that you have registered and verified with MailSlurp using dashboard or &#x60;createDomain&#x60; method.
27
- # @option opts [DateTime] :expires_at Optional expires at timestamp. If your plan supports this feature you can specify when an inbox should expire. If left empty inbox will exist permanently or expire when your plan dictates
28
- # @option opts [Boolean] :favourite Is inbox favourited.
29
- # @option opts [String] :name Optional name for an inbox.
30
- # @option opts [Array<String>] :tags Optional tags for an inbox. Can be used for searching and filtering inboxes.
25
+ # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
26
+ # @option opts [String] :email_address A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as &#x60;123@mailslurp.com&#x60;. If you use the &#x60;useDomainPool&#x60; option when the email address is null it will generate an email address with a more varied domain ending such as &#x60;123@mailslurp.info&#x60; or &#x60;123@mailslurp.biz&#x60;. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
27
+ # @option opts [DateTime] :expires_at Optional inbox expiration date. If null then this inbox is permanent and the emails in it won&#39;t be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSXXX.
28
+ # @option opts [Integer] :expires_in Number of milliseconds that inbox should exist for
29
+ # @option opts [Boolean] :favourite Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering
30
+ # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search
31
+ # @option opts [Array<String>] :tags Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
32
+ # @option opts [Boolean] :use_domain_pool Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default &#x60;@mailslurp.com&#x60; email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in &#x60;@mailslurp.{world,info,xyz,...}&#x60; . This means a TLD is randomly selecting from a list of &#x60;.biz&#x60;, &#x60;.info&#x60;, &#x60;.xyz&#x60; etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of &#x60;@mailslurp.com&#x60; or custom email address provided by the emailAddress field.
31
33
  # @return [Inbox]
32
34
  def create_inbox(opts = {})
33
35
  data, _status_code, _headers = create_inbox_with_http_info(opts)
@@ -37,12 +39,14 @@ module MailSlurpClient
37
39
  # Create an Inbox (email address)
38
40
  # Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.
39
41
  # @param [Hash] opts the optional parameters
40
- # @option opts [String] :description Optional description for an inbox.
41
- # @option opts [String] :email_address Optional email address including domain you wish inbox to use (eg: test123@mydomain.com). Only supports domains that you have registered and verified with MailSlurp using dashboard or &#x60;createDomain&#x60; method.
42
- # @option opts [DateTime] :expires_at Optional expires at timestamp. If your plan supports this feature you can specify when an inbox should expire. If left empty inbox will exist permanently or expire when your plan dictates
43
- # @option opts [Boolean] :favourite Is inbox favourited.
44
- # @option opts [String] :name Optional name for an inbox.
45
- # @option opts [Array<String>] :tags Optional tags for an inbox. Can be used for searching and filtering inboxes.
42
+ # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
43
+ # @option opts [String] :email_address A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as &#x60;123@mailslurp.com&#x60;. If you use the &#x60;useDomainPool&#x60; option when the email address is null it will generate an email address with a more varied domain ending such as &#x60;123@mailslurp.info&#x60; or &#x60;123@mailslurp.biz&#x60;. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
44
+ # @option opts [DateTime] :expires_at Optional inbox expiration date. If null then this inbox is permanent and the emails in it won&#39;t be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSXXX.
45
+ # @option opts [Integer] :expires_in Number of milliseconds that inbox should exist for
46
+ # @option opts [Boolean] :favourite Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering
47
+ # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search
48
+ # @option opts [Array<String>] :tags Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
49
+ # @option opts [Boolean] :use_domain_pool Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default &#x60;@mailslurp.com&#x60; email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in &#x60;@mailslurp.{world,info,xyz,...}&#x60; . This means a TLD is randomly selecting from a list of &#x60;.biz&#x60;, &#x60;.info&#x60;, &#x60;.xyz&#x60; etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of &#x60;@mailslurp.com&#x60; or custom email address provided by the emailAddress field.
46
50
  # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
47
51
  def create_inbox_with_http_info(opts = {})
48
52
  if @api_client.config.debugging
@@ -56,9 +60,11 @@ module MailSlurpClient
56
60
  query_params[:'description'] = opts[:'description'] if !opts[:'description'].nil?
57
61
  query_params[:'emailAddress'] = opts[:'email_address'] if !opts[:'email_address'].nil?
58
62
  query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
63
+ query_params[:'expiresIn'] = opts[:'expires_in'] if !opts[:'expires_in'].nil?
59
64
  query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
60
65
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
61
66
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :multi) if !opts[:'tags'].nil?
67
+ query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
62
68
 
63
69
  # header parameters
64
70
  header_params = opts[:header_params] || {}
@@ -212,7 +218,7 @@ module MailSlurpClient
212
218
  end
213
219
 
214
220
  # Delete inbox
215
- # Permanently delete an inbox and associated email address aswell as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
221
+ # Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
216
222
  # @param inbox_id [String] inboxId
217
223
  # @param [Hash] opts the optional parameters
218
224
  # @return [nil]
@@ -222,7 +228,7 @@ module MailSlurpClient
222
228
  end
223
229
 
224
230
  # Delete inbox
225
- # Permanently delete an inbox and associated email address aswell as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
231
+ # Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
226
232
  # @param inbox_id [String] inboxId
227
233
  # @param [Hash] opts the optional parameters
228
234
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -433,6 +439,199 @@ module MailSlurpClient
433
439
  return data, status_code, headers
434
440
  end
435
441
 
442
+ # Get an expired inbox record
443
+ # Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
444
+ # @param expired_id [String] ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)
445
+ # @param [Hash] opts the optional parameters
446
+ # @return [ExpiredInboxDto]
447
+ def get_expired_inbox_record_by_id(expired_id, opts = {})
448
+ data, _status_code, _headers = get_expired_inbox_record_by_id_with_http_info(expired_id, opts)
449
+ data
450
+ end
451
+
452
+ # Get an expired inbox record
453
+ # Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
454
+ # @param expired_id [String] ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)
455
+ # @param [Hash] opts the optional parameters
456
+ # @return [Array<(ExpiredInboxDto, Integer, Hash)>] ExpiredInboxDto data, response status code and response headers
457
+ def get_expired_inbox_record_by_id_with_http_info(expired_id, opts = {})
458
+ if @api_client.config.debugging
459
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_expired_inbox_record_by_id ...'
460
+ end
461
+ # verify the required parameter 'expired_id' is set
462
+ if @api_client.config.client_side_validation && expired_id.nil?
463
+ fail ArgumentError, "Missing the required parameter 'expired_id' when calling InboxControllerApi.get_expired_inbox_record_by_id"
464
+ end
465
+ # resource path
466
+ local_var_path = '/inboxes/expired-records/{expiredId}'.sub('{' + 'expiredId' + '}', CGI.escape(expired_id.to_s))
467
+
468
+ # query parameters
469
+ query_params = opts[:query_params] || {}
470
+
471
+ # header parameters
472
+ header_params = opts[:header_params] || {}
473
+ # HTTP header 'Accept' (if needed)
474
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
475
+
476
+ # form parameters
477
+ form_params = opts[:form_params] || {}
478
+
479
+ # http body (model)
480
+ post_body = opts[:body]
481
+
482
+ # return_type
483
+ return_type = opts[:return_type] || 'ExpiredInboxDto'
484
+
485
+ # auth_names
486
+ auth_names = opts[:auth_names] || ['API_KEY']
487
+
488
+ new_options = opts.merge(
489
+ :header_params => header_params,
490
+ :query_params => query_params,
491
+ :form_params => form_params,
492
+ :body => post_body,
493
+ :auth_names => auth_names,
494
+ :return_type => return_type
495
+ )
496
+
497
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
498
+ if @api_client.config.debugging
499
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_expired_inbox_record_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
500
+ end
501
+ return data, status_code, headers
502
+ end
503
+
504
+ # Get expired inbox record for a previously existing inbox
505
+ # Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
506
+ # @param inbox_id [String] ID of inbox you want to retrieve (not the inbox ID)
507
+ # @param [Hash] opts the optional parameters
508
+ # @return [ExpiredInboxDto]
509
+ def get_expired_inbox_record_by_inbox_id(inbox_id, opts = {})
510
+ data, _status_code, _headers = get_expired_inbox_record_by_inbox_id_with_http_info(inbox_id, opts)
511
+ data
512
+ end
513
+
514
+ # Get expired inbox record for a previously existing inbox
515
+ # Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
516
+ # @param inbox_id [String] ID of inbox you want to retrieve (not the inbox ID)
517
+ # @param [Hash] opts the optional parameters
518
+ # @return [Array<(ExpiredInboxDto, Integer, Hash)>] ExpiredInboxDto data, response status code and response headers
519
+ def get_expired_inbox_record_by_inbox_id_with_http_info(inbox_id, opts = {})
520
+ if @api_client.config.debugging
521
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_expired_inbox_record_by_inbox_id ...'
522
+ end
523
+ # verify the required parameter 'inbox_id' is set
524
+ if @api_client.config.client_side_validation && inbox_id.nil?
525
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_expired_inbox_record_by_inbox_id"
526
+ end
527
+ # resource path
528
+ local_var_path = '/inboxes/{inboxId}/expired-record'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
529
+
530
+ # query parameters
531
+ query_params = opts[:query_params] || {}
532
+
533
+ # header parameters
534
+ header_params = opts[:header_params] || {}
535
+ # HTTP header 'Accept' (if needed)
536
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
537
+
538
+ # form parameters
539
+ form_params = opts[:form_params] || {}
540
+
541
+ # http body (model)
542
+ post_body = opts[:body]
543
+
544
+ # return_type
545
+ return_type = opts[:return_type] || 'ExpiredInboxDto'
546
+
547
+ # auth_names
548
+ auth_names = opts[:auth_names] || ['API_KEY']
549
+
550
+ new_options = opts.merge(
551
+ :header_params => header_params,
552
+ :query_params => query_params,
553
+ :form_params => form_params,
554
+ :body => post_body,
555
+ :auth_names => auth_names,
556
+ :return_type => return_type
557
+ )
558
+
559
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
560
+ if @api_client.config.debugging
561
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_expired_inbox_record_by_inbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
562
+ end
563
+ return data, status_code, headers
564
+ end
565
+
566
+ # List records of expired inboxes
567
+ # Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
568
+ # @param [Hash] opts the optional parameters
569
+ # @option opts [Integer] :page Optional page index in inbox sent email list pagination (default to 0)
570
+ # @option opts [Integer] :size Optional page size in inbox sent email list pagination (default to 20)
571
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
572
+ # @return [PageExpiredInboxRecordProjection]
573
+ def get_expired_inbox_records(opts = {})
574
+ data, _status_code, _headers = get_expired_inbox_records_with_http_info(opts)
575
+ data
576
+ end
577
+
578
+ # List records of expired inboxes
579
+ # Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
580
+ # @param [Hash] opts the optional parameters
581
+ # @option opts [Integer] :page Optional page index in inbox sent email list pagination
582
+ # @option opts [Integer] :size Optional page size in inbox sent email list pagination
583
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
584
+ # @return [Array<(PageExpiredInboxRecordProjection, Integer, Hash)>] PageExpiredInboxRecordProjection data, response status code and response headers
585
+ def get_expired_inbox_records_with_http_info(opts = {})
586
+ if @api_client.config.debugging
587
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_expired_inbox_records ...'
588
+ end
589
+ allowable_values = ["ASC", "DESC"]
590
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
591
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
592
+ end
593
+ # resource path
594
+ local_var_path = '/inboxes/expired-records'
595
+
596
+ # query parameters
597
+ query_params = opts[:query_params] || {}
598
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
599
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
600
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
601
+
602
+ # header parameters
603
+ header_params = opts[:header_params] || {}
604
+ # HTTP header 'Accept' (if needed)
605
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
606
+
607
+ # form parameters
608
+ form_params = opts[:form_params] || {}
609
+
610
+ # http body (model)
611
+ post_body = opts[:body]
612
+
613
+ # return_type
614
+ return_type = opts[:return_type] || 'PageExpiredInboxRecordProjection'
615
+
616
+ # auth_names
617
+ auth_names = opts[:auth_names] || ['API_KEY']
618
+
619
+ new_options = opts.merge(
620
+ :header_params => header_params,
621
+ :query_params => query_params,
622
+ :form_params => form_params,
623
+ :body => post_body,
624
+ :auth_names => auth_names,
625
+ :return_type => return_type
626
+ )
627
+
628
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
629
+ if @api_client.config.debugging
630
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_expired_inbox_records\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
631
+ end
632
+ return data, status_code, headers
633
+ end
634
+
436
635
  # Get Inbox
437
636
  # Returns an inbox's properties, including its email address and ID.
438
637
  # @param inbox_id [String] inboxId