mailslurp_client 8.2.15 → 8.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -2
- data/lib/mailslurp_client.rb +11 -2
- data/lib/mailslurp_client/api/alias_controller_api.rb +94 -80
- data/lib/mailslurp_client/api/domain_controller_api.rb +7 -5
- data/lib/mailslurp_client/api/email_controller_api.rb +72 -2
- data/lib/mailslurp_client/api/form_controller_api.rb +4 -7
- data/lib/mailslurp_client/api/inbox_controller_api.rb +87 -10
- data/lib/mailslurp_client/api/mail_server_controller_api.rb +123 -0
- data/lib/mailslurp_client/models/alias_dto.rb +276 -0
- data/lib/mailslurp_client/models/alias_projection.rb +276 -0
- data/lib/mailslurp_client/models/alias_verification_result.rb +234 -0
- data/lib/mailslurp_client/models/{create_owned_alias_options.rb → create_alias_options.rb} +13 -13
- data/lib/mailslurp_client/models/create_inbox_dto.rb +259 -0
- data/lib/mailslurp_client/models/dns_lookup_options.rb +252 -0
- data/lib/mailslurp_client/models/dns_lookup_result.rb +288 -0
- data/lib/mailslurp_client/models/dns_lookup_results.rb +214 -0
- data/lib/mailslurp_client/models/domain_dto.rb +16 -16
- data/lib/mailslurp_client/models/email.rb +11 -1
- data/lib/mailslurp_client/models/html_validation_result.rb +3 -15
- data/lib/mailslurp_client/models/inbox.rb +5 -5
- data/lib/mailslurp_client/models/ip_address_result.rb +226 -0
- data/lib/mailslurp_client/models/model_alias.rb +36 -22
- data/lib/mailslurp_client/models/page_alias.rb +1 -1
- data/lib/mailslurp_client/models/reply_to_email_options.rb +313 -0
- data/lib/mailslurp_client/models/{create_anonymous_alias_options.rb → update_alias_options.rb} +12 -12
- data/lib/mailslurp_client/models/update_inbox_options.rb +2 -2
- data/lib/mailslurp_client/version.rb +1 -1
- metadata +13 -4
@@ -87,17 +87,17 @@ module MailSlurpClient
|
|
87
87
|
# Delete a domain. This will disable any existing inboxes that use this domain.
|
88
88
|
# @param id [String] id
|
89
89
|
# @param [Hash] opts the optional parameters
|
90
|
-
# @return [
|
90
|
+
# @return [Array<String>]
|
91
91
|
def delete_domain(id, opts = {})
|
92
|
-
delete_domain_with_http_info(id, opts)
|
93
|
-
|
92
|
+
data, _status_code, _headers = delete_domain_with_http_info(id, opts)
|
93
|
+
data
|
94
94
|
end
|
95
95
|
|
96
96
|
# Delete a domain
|
97
97
|
# Delete a domain. This will disable any existing inboxes that use this domain.
|
98
98
|
# @param id [String] id
|
99
99
|
# @param [Hash] opts the optional parameters
|
100
|
-
# @return [Array<(
|
100
|
+
# @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
|
101
101
|
def delete_domain_with_http_info(id, opts = {})
|
102
102
|
if @api_client.config.debugging
|
103
103
|
@api_client.config.logger.debug 'Calling API: DomainControllerApi.delete_domain ...'
|
@@ -114,6 +114,8 @@ module MailSlurpClient
|
|
114
114
|
|
115
115
|
# header parameters
|
116
116
|
header_params = opts[:header_params] || {}
|
117
|
+
# HTTP header 'Accept' (if needed)
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
117
119
|
|
118
120
|
# form parameters
|
119
121
|
form_params = opts[:form_params] || {}
|
@@ -122,7 +124,7 @@ module MailSlurpClient
|
|
122
124
|
post_body = opts[:body]
|
123
125
|
|
124
126
|
# return_type
|
125
|
-
return_type = opts[:return_type]
|
127
|
+
return_type = opts[:return_type] || 'Array<String>'
|
126
128
|
|
127
129
|
# auth_names
|
128
130
|
auth_names = opts[:auth_names] || ['API_KEY']
|
@@ -675,7 +675,7 @@ module MailSlurpClient
|
|
675
675
|
# @param [Hash] opts the optional parameters
|
676
676
|
# @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
|
677
677
|
# @option opts [Integer] :page Optional page index in email list pagination (default to 0)
|
678
|
-
# @option opts [Integer] :size Optional page size in email list pagination (default to 20)
|
678
|
+
# @option opts [Integer] :size Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
|
679
679
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
680
680
|
# @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (default to false)
|
681
681
|
# @return [PageEmailProjection]
|
@@ -689,7 +689,7 @@ module MailSlurpClient
|
|
689
689
|
# @param [Hash] opts the optional parameters
|
690
690
|
# @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
|
691
691
|
# @option opts [Integer] :page Optional page index in email list pagination
|
692
|
-
# @option opts [Integer] :size Optional page size in email list pagination
|
692
|
+
# @option opts [Integer] :size Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results
|
693
693
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
694
694
|
# @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
|
695
695
|
# @return [Array<(PageEmailProjection, Integer, Hash)>] PageEmailProjection data, response status code and response headers
|
@@ -925,6 +925,76 @@ module MailSlurpClient
|
|
925
925
|
return data, status_code, headers
|
926
926
|
end
|
927
927
|
|
928
|
+
# Reply to an email
|
929
|
+
# Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
|
930
|
+
# @param email_id [String] emailId
|
931
|
+
# @param reply_to_email_options [ReplyToEmailOptions] replyToEmailOptions
|
932
|
+
# @param [Hash] opts the optional parameters
|
933
|
+
# @return [SentEmailDto]
|
934
|
+
def reply_to_email(email_id, reply_to_email_options, opts = {})
|
935
|
+
data, _status_code, _headers = reply_to_email_with_http_info(email_id, reply_to_email_options, opts)
|
936
|
+
data
|
937
|
+
end
|
938
|
+
|
939
|
+
# Reply to an email
|
940
|
+
# Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
|
941
|
+
# @param email_id [String] emailId
|
942
|
+
# @param reply_to_email_options [ReplyToEmailOptions] replyToEmailOptions
|
943
|
+
# @param [Hash] opts the optional parameters
|
944
|
+
# @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers
|
945
|
+
def reply_to_email_with_http_info(email_id, reply_to_email_options, opts = {})
|
946
|
+
if @api_client.config.debugging
|
947
|
+
@api_client.config.logger.debug 'Calling API: EmailControllerApi.reply_to_email ...'
|
948
|
+
end
|
949
|
+
# verify the required parameter 'email_id' is set
|
950
|
+
if @api_client.config.client_side_validation && email_id.nil?
|
951
|
+
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.reply_to_email"
|
952
|
+
end
|
953
|
+
# verify the required parameter 'reply_to_email_options' is set
|
954
|
+
if @api_client.config.client_side_validation && reply_to_email_options.nil?
|
955
|
+
fail ArgumentError, "Missing the required parameter 'reply_to_email_options' when calling EmailControllerApi.reply_to_email"
|
956
|
+
end
|
957
|
+
# resource path
|
958
|
+
local_var_path = '/emails/{emailId}'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
959
|
+
|
960
|
+
# query parameters
|
961
|
+
query_params = opts[:query_params] || {}
|
962
|
+
|
963
|
+
# header parameters
|
964
|
+
header_params = opts[:header_params] || {}
|
965
|
+
# HTTP header 'Accept' (if needed)
|
966
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
967
|
+
# HTTP header 'Content-Type'
|
968
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
969
|
+
|
970
|
+
# form parameters
|
971
|
+
form_params = opts[:form_params] || {}
|
972
|
+
|
973
|
+
# http body (model)
|
974
|
+
post_body = opts[:body] || @api_client.object_to_http_body(reply_to_email_options)
|
975
|
+
|
976
|
+
# return_type
|
977
|
+
return_type = opts[:return_type] || 'SentEmailDto'
|
978
|
+
|
979
|
+
# auth_names
|
980
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
981
|
+
|
982
|
+
new_options = opts.merge(
|
983
|
+
:header_params => header_params,
|
984
|
+
:query_params => query_params,
|
985
|
+
:form_params => form_params,
|
986
|
+
:body => post_body,
|
987
|
+
:auth_names => auth_names,
|
988
|
+
:return_type => return_type
|
989
|
+
)
|
990
|
+
|
991
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
992
|
+
if @api_client.config.debugging
|
993
|
+
@api_client.config.logger.debug "API called: EmailControllerApi#reply_to_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
994
|
+
end
|
995
|
+
return data, status_code, headers
|
996
|
+
end
|
997
|
+
|
928
998
|
# Validate email
|
929
999
|
# Validate the HTML content of email if HTML is found. Considered valid if no HTML.
|
930
1000
|
# @param email_id [String] ID of email
|
@@ -20,15 +20,14 @@ module MailSlurpClient
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Submit a form to be parsed and sent as an email to an address determined by the form fields
|
23
|
-
# This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address
|
23
|
+
# This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`.
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
25
|
# @option opts [String] :_email_address Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later.
|
26
26
|
# @option opts [String] :_redirect_to Optional URL to redirect form submitter to after submission. If not present user will see a success message.
|
27
27
|
# @option opts [String] :_spam_check Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored.
|
28
28
|
# @option opts [String] :_subject Optional subject of the email that will be sent.
|
29
29
|
# @option opts [String] :_success_message Optional success message to display if no _redirectTo present.
|
30
|
-
# @option opts [String] :_to The email address that submitted form should be sent to.
|
31
|
-
# @option opts [String] :_to_alias ID of an email alias to that form should be sent to. Aliases must be created before submission and can be used to hide an email address and reduce spam.
|
30
|
+
# @option opts [String] :_to The email address that submitted form should be sent to.
|
32
31
|
# @option opts [String] :other_parameters All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent.
|
33
32
|
# @return [String]
|
34
33
|
def submit_form(opts = {})
|
@@ -37,15 +36,14 @@ module MailSlurpClient
|
|
37
36
|
end
|
38
37
|
|
39
38
|
# Submit a form to be parsed and sent as an email to an address determined by the form fields
|
40
|
-
# This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address
|
39
|
+
# This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`.
|
41
40
|
# @param [Hash] opts the optional parameters
|
42
41
|
# @option opts [String] :_email_address Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later.
|
43
42
|
# @option opts [String] :_redirect_to Optional URL to redirect form submitter to after submission. If not present user will see a success message.
|
44
43
|
# @option opts [String] :_spam_check Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored.
|
45
44
|
# @option opts [String] :_subject Optional subject of the email that will be sent.
|
46
45
|
# @option opts [String] :_success_message Optional success message to display if no _redirectTo present.
|
47
|
-
# @option opts [String] :_to The email address that submitted form should be sent to.
|
48
|
-
# @option opts [String] :_to_alias ID of an email alias to that form should be sent to. Aliases must be created before submission and can be used to hide an email address and reduce spam.
|
46
|
+
# @option opts [String] :_to The email address that submitted form should be sent to.
|
49
47
|
# @option opts [String] :other_parameters All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent.
|
50
48
|
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
51
49
|
def submit_form_with_http_info(opts = {})
|
@@ -73,7 +71,6 @@ module MailSlurpClient
|
|
73
71
|
form_params['_subject'] = opts[:'_subject'] if !opts[:'_subject'].nil?
|
74
72
|
form_params['_successMessage'] = opts[:'_success_message'] if !opts[:'_success_message'].nil?
|
75
73
|
form_params['_to'] = opts[:'_to'] if !opts[:'_to'].nil?
|
76
|
-
form_params['_toAlias'] = opts[:'_to_alias'] if !opts[:'_to_alias'].nil?
|
77
74
|
form_params['otherParameters'] = opts[:'other_parameters'] if !opts[:'other_parameters'].nil?
|
78
75
|
|
79
76
|
# http body (model)
|
@@ -93,6 +93,70 @@ module MailSlurpClient
|
|
93
93
|
return data, status_code, headers
|
94
94
|
end
|
95
95
|
|
96
|
+
# Create an inbox with additional options
|
97
|
+
# Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.
|
98
|
+
# @param create_inbox_dto [CreateInboxDto] createInboxDto
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [Inbox]
|
101
|
+
def create_inbox_with_options(create_inbox_dto, opts = {})
|
102
|
+
data, _status_code, _headers = create_inbox_with_options_with_http_info(create_inbox_dto, opts)
|
103
|
+
data
|
104
|
+
end
|
105
|
+
|
106
|
+
# Create an inbox with additional options
|
107
|
+
# Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.
|
108
|
+
# @param create_inbox_dto [CreateInboxDto] createInboxDto
|
109
|
+
# @param [Hash] opts the optional parameters
|
110
|
+
# @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
|
111
|
+
def create_inbox_with_options_with_http_info(create_inbox_dto, opts = {})
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug 'Calling API: InboxControllerApi.create_inbox_with_options ...'
|
114
|
+
end
|
115
|
+
# verify the required parameter 'create_inbox_dto' is set
|
116
|
+
if @api_client.config.client_side_validation && create_inbox_dto.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'create_inbox_dto' when calling InboxControllerApi.create_inbox_with_options"
|
118
|
+
end
|
119
|
+
# resource path
|
120
|
+
local_var_path = '/inboxes/withOptions'
|
121
|
+
|
122
|
+
# query parameters
|
123
|
+
query_params = opts[:query_params] || {}
|
124
|
+
|
125
|
+
# header parameters
|
126
|
+
header_params = opts[:header_params] || {}
|
127
|
+
# HTTP header 'Accept' (if needed)
|
128
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
129
|
+
# HTTP header 'Content-Type'
|
130
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
131
|
+
|
132
|
+
# form parameters
|
133
|
+
form_params = opts[:form_params] || {}
|
134
|
+
|
135
|
+
# http body (model)
|
136
|
+
post_body = opts[:body] || @api_client.object_to_http_body(create_inbox_dto)
|
137
|
+
|
138
|
+
# return_type
|
139
|
+
return_type = opts[:return_type] || 'Inbox'
|
140
|
+
|
141
|
+
# auth_names
|
142
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
143
|
+
|
144
|
+
new_options = opts.merge(
|
145
|
+
:header_params => header_params,
|
146
|
+
:query_params => query_params,
|
147
|
+
:form_params => form_params,
|
148
|
+
:body => post_body,
|
149
|
+
:auth_names => auth_names,
|
150
|
+
:return_type => return_type
|
151
|
+
)
|
152
|
+
|
153
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
154
|
+
if @api_client.config.debugging
|
155
|
+
@api_client.config.logger.debug "API called: InboxControllerApi#create_inbox_with_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
156
|
+
end
|
157
|
+
return data, status_code, headers
|
158
|
+
end
|
159
|
+
|
96
160
|
# Delete all inboxes
|
97
161
|
# Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have.
|
98
162
|
# @param [Hash] opts the optional parameters
|
@@ -207,8 +271,8 @@ module MailSlurpClient
|
|
207
271
|
return data, status_code, headers
|
208
272
|
end
|
209
273
|
|
210
|
-
# List Inboxes Paginated
|
211
|
-
# List inboxes in paginated form.
|
274
|
+
# List All Inboxes Paginated
|
275
|
+
# List inboxes in paginated form. 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). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
|
212
276
|
# @param [Hash] opts the optional parameters
|
213
277
|
# @option opts [Boolean] :favourite Optionally filter results for favourites only (default to false)
|
214
278
|
# @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
|
@@ -222,8 +286,8 @@ module MailSlurpClient
|
|
222
286
|
data
|
223
287
|
end
|
224
288
|
|
225
|
-
# List Inboxes Paginated
|
226
|
-
# List inboxes in paginated form.
|
289
|
+
# List All Inboxes Paginated
|
290
|
+
# List inboxes in paginated form. 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). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
|
227
291
|
# @param [Hash] opts the optional parameters
|
228
292
|
# @option opts [Boolean] :favourite Optionally filter results for favourites only
|
229
293
|
# @option opts [Integer] :page Optional page index in inbox list pagination
|
@@ -285,14 +349,15 @@ module MailSlurpClient
|
|
285
349
|
return data, status_code, headers
|
286
350
|
end
|
287
351
|
|
288
|
-
# Get emails in an Inbox
|
352
|
+
# 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.
|
289
353
|
# 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
|
290
354
|
# @param inbox_id [String] Id of inbox that emails belongs to
|
291
355
|
# @param [Hash] opts the optional parameters
|
292
|
-
# @option opts [Integer] :limit Limit the result set, ordered by received date time sort direction
|
356
|
+
# @option opts [Integer] :limit Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller
|
293
357
|
# @option opts [Integer] :min_count Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
|
294
358
|
# @option opts [Integer] :retry_timeout Maximum milliseconds to spend retrying inbox database until minCount emails are returned
|
295
359
|
# @option opts [DateTime] :since Exclude emails received before this ISO 8601 date time
|
360
|
+
# @option opts [Integer] :size Alias for limit. Assessed first before assessing any passed limit.
|
296
361
|
# @option opts [String] :sort Sort the results by received date and direction ASC or DESC
|
297
362
|
# @return [Array<EmailPreview>]
|
298
363
|
def get_emails(inbox_id, opts = {})
|
@@ -300,14 +365,15 @@ module MailSlurpClient
|
|
300
365
|
data
|
301
366
|
end
|
302
367
|
|
303
|
-
# Get emails in an Inbox
|
368
|
+
# 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.
|
304
369
|
# 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
|
305
370
|
# @param inbox_id [String] Id of inbox that emails belongs to
|
306
371
|
# @param [Hash] opts the optional parameters
|
307
|
-
# @option opts [Integer] :limit Limit the result set, ordered by received date time sort direction
|
372
|
+
# @option opts [Integer] :limit Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller
|
308
373
|
# @option opts [Integer] :min_count Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached.
|
309
374
|
# @option opts [Integer] :retry_timeout Maximum milliseconds to spend retrying inbox database until minCount emails are returned
|
310
375
|
# @option opts [DateTime] :since Exclude emails received before this ISO 8601 date time
|
376
|
+
# @option opts [Integer] :size Alias for limit. Assessed first before assessing any passed limit.
|
311
377
|
# @option opts [String] :sort Sort the results by received date and direction ASC or DESC
|
312
378
|
# @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
|
313
379
|
def get_emails_with_http_info(inbox_id, opts = {})
|
@@ -331,6 +397,7 @@ module MailSlurpClient
|
|
331
397
|
query_params[:'minCount'] = opts[:'min_count'] if !opts[:'min_count'].nil?
|
332
398
|
query_params[:'retryTimeout'] = opts[:'retry_timeout'] if !opts[:'retry_timeout'].nil?
|
333
399
|
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
400
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
334
401
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
335
402
|
|
336
403
|
# header parameters
|
@@ -635,8 +702,10 @@ module MailSlurpClient
|
|
635
702
|
end
|
636
703
|
|
637
704
|
# List Inboxes / Email Addresses
|
638
|
-
# List the inboxes you have created
|
705
|
+
# List the inboxes you have created. Note use of the more advanced `getAllEmails` is recommended. You can provide a limit and sort parameter.
|
639
706
|
# @param [Hash] opts the optional parameters
|
707
|
+
# @option opts [Integer] :size Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (default to 100)
|
708
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
640
709
|
# @return [Array<Inbox>]
|
641
710
|
def get_inboxes(opts = {})
|
642
711
|
data, _status_code, _headers = get_inboxes_with_http_info(opts)
|
@@ -644,18 +713,26 @@ module MailSlurpClient
|
|
644
713
|
end
|
645
714
|
|
646
715
|
# List Inboxes / Email Addresses
|
647
|
-
# List the inboxes you have created
|
716
|
+
# List the inboxes you have created. Note use of the more advanced `getAllEmails` is recommended. You can provide a limit and sort parameter.
|
648
717
|
# @param [Hash] opts the optional parameters
|
718
|
+
# @option opts [Integer] :size Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries.
|
719
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
649
720
|
# @return [Array<(Array<Inbox>, Integer, Hash)>] Array<Inbox> data, response status code and response headers
|
650
721
|
def get_inboxes_with_http_info(opts = {})
|
651
722
|
if @api_client.config.debugging
|
652
723
|
@api_client.config.logger.debug 'Calling API: InboxControllerApi.get_inboxes ...'
|
653
724
|
end
|
725
|
+
allowable_values = ["ASC", "DESC"]
|
726
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
727
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
728
|
+
end
|
654
729
|
# resource path
|
655
730
|
local_var_path = '/inboxes'
|
656
731
|
|
657
732
|
# query parameters
|
658
733
|
query_params = opts[:query_params] || {}
|
734
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
735
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
659
736
|
|
660
737
|
# header parameters
|
661
738
|
header_params = opts[:header_params] || {}
|
@@ -81,6 +81,129 @@ module MailSlurpClient
|
|
81
81
|
return data, status_code, headers
|
82
82
|
end
|
83
83
|
|
84
|
+
# Lookup DNS records for a domain
|
85
|
+
# @param dns_lookup_options [DNSLookupOptions] dnsLookupOptions
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @return [DNSLookupResults]
|
88
|
+
def get_dns_lookup(dns_lookup_options, opts = {})
|
89
|
+
data, _status_code, _headers = get_dns_lookup_with_http_info(dns_lookup_options, opts)
|
90
|
+
data
|
91
|
+
end
|
92
|
+
|
93
|
+
# Lookup DNS records for a domain
|
94
|
+
# @param dns_lookup_options [DNSLookupOptions] dnsLookupOptions
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [Array<(DNSLookupResults, Integer, Hash)>] DNSLookupResults data, response status code and response headers
|
97
|
+
def get_dns_lookup_with_http_info(dns_lookup_options, opts = {})
|
98
|
+
if @api_client.config.debugging
|
99
|
+
@api_client.config.logger.debug 'Calling API: MailServerControllerApi.get_dns_lookup ...'
|
100
|
+
end
|
101
|
+
# verify the required parameter 'dns_lookup_options' is set
|
102
|
+
if @api_client.config.client_side_validation && dns_lookup_options.nil?
|
103
|
+
fail ArgumentError, "Missing the required parameter 'dns_lookup_options' when calling MailServerControllerApi.get_dns_lookup"
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/mail-server/describe/dns-lookup'
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = opts[:query_params] || {}
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = opts[:header_params] || {}
|
113
|
+
# HTTP header 'Accept' (if needed)
|
114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
115
|
+
# HTTP header 'Content-Type'
|
116
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = opts[:form_params] || {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = opts[:body] || @api_client.object_to_http_body(dns_lookup_options)
|
123
|
+
|
124
|
+
# return_type
|
125
|
+
return_type = opts[:return_type] || 'DNSLookupResults'
|
126
|
+
|
127
|
+
# auth_names
|
128
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
129
|
+
|
130
|
+
new_options = opts.merge(
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: MailServerControllerApi#get_dns_lookup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
146
|
+
# Get IP address for a domain
|
147
|
+
# @param name [String] name
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @return [IPAddressResult]
|
150
|
+
def get_ip_address(name, opts = {})
|
151
|
+
data, _status_code, _headers = get_ip_address_with_http_info(name, opts)
|
152
|
+
data
|
153
|
+
end
|
154
|
+
|
155
|
+
# Get IP address for a domain
|
156
|
+
# @param name [String] name
|
157
|
+
# @param [Hash] opts the optional parameters
|
158
|
+
# @return [Array<(IPAddressResult, Integer, Hash)>] IPAddressResult data, response status code and response headers
|
159
|
+
def get_ip_address_with_http_info(name, opts = {})
|
160
|
+
if @api_client.config.debugging
|
161
|
+
@api_client.config.logger.debug 'Calling API: MailServerControllerApi.get_ip_address ...'
|
162
|
+
end
|
163
|
+
# verify the required parameter 'name' is set
|
164
|
+
if @api_client.config.client_side_validation && name.nil?
|
165
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling MailServerControllerApi.get_ip_address"
|
166
|
+
end
|
167
|
+
# resource path
|
168
|
+
local_var_path = '/mail-server/describe/ip-address'
|
169
|
+
|
170
|
+
# query parameters
|
171
|
+
query_params = opts[:query_params] || {}
|
172
|
+
query_params[:'name'] = name
|
173
|
+
|
174
|
+
# header parameters
|
175
|
+
header_params = opts[:header_params] || {}
|
176
|
+
# HTTP header 'Accept' (if needed)
|
177
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
178
|
+
|
179
|
+
# form parameters
|
180
|
+
form_params = opts[:form_params] || {}
|
181
|
+
|
182
|
+
# http body (model)
|
183
|
+
post_body = opts[:body]
|
184
|
+
|
185
|
+
# return_type
|
186
|
+
return_type = opts[:return_type] || 'IPAddressResult'
|
187
|
+
|
188
|
+
# auth_names
|
189
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
190
|
+
|
191
|
+
new_options = opts.merge(
|
192
|
+
:header_params => header_params,
|
193
|
+
:query_params => query_params,
|
194
|
+
:form_params => form_params,
|
195
|
+
:body => post_body,
|
196
|
+
:auth_names => auth_names,
|
197
|
+
:return_type => return_type
|
198
|
+
)
|
199
|
+
|
200
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
201
|
+
if @api_client.config.debugging
|
202
|
+
@api_client.config.logger.debug "API called: MailServerControllerApi#get_ip_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
203
|
+
end
|
204
|
+
return data, status_code, headers
|
205
|
+
end
|
206
|
+
|
84
207
|
# Verify the existence of an email address at a given mail server.
|
85
208
|
# @param verify_options [VerifyEmailAddressOptions] verifyOptions
|
86
209
|
# @param [Hash] opts the optional parameters
|