mailslurp_client 8.2.12 → 8.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client.rb +5 -1
- data/lib/mailslurp_client/api/attachment_controller_api.rb +6 -6
- data/lib/mailslurp_client/api/domain_controller_api.rb +7 -5
- data/lib/mailslurp_client/api/email_controller_api.rb +4 -4
- data/lib/mailslurp_client/api/inbox_controller_api.rb +90 -13
- data/lib/mailslurp_client/api/mail_server_controller_api.rb +123 -0
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +2 -2
- 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/{sent_email.rb → dns_lookup_result.rb} +72 -144
- 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/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/match_options.rb +1 -1
- data/lib/mailslurp_client/models/sent_email_dto.rb +7 -15
- data/lib/mailslurp_client/models/update_inbox_options.rb +2 -2
- data/lib/mailslurp_client/models/upload_attachment_options.rb +1 -1
- data/lib/mailslurp_client/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e376f040ab4f7c4f9b8a7f2cc37d26e6e1fb7b4de17c7910fd0546b83967a31a
|
4
|
+
data.tar.gz: 9be17286f4a983f3916b22473627371b46c0189988f848477fae897402434fbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50c0382af36f9a4bb707b628e80180f4882a1b75575097862f350c02fe9d29b076f5d2cfcf3bfc88e22a967f655673f889e66d0889535653723be61f0f2aa4b2
|
7
|
+
data.tar.gz: cfac41f0383d467211632dcbc6773b401181b9e696c93d50bed0c9209117c3dc67e1e141ca0e55aef86ff2167b577ac5585b737d4cb5e38e85325e21553914a9
|
data/lib/mailslurp_client.rb
CHANGED
@@ -27,9 +27,13 @@ require 'mailslurp_client/models/create_anonymous_alias_options'
|
|
27
27
|
require 'mailslurp_client/models/create_contact_options'
|
28
28
|
require 'mailslurp_client/models/create_domain_options'
|
29
29
|
require 'mailslurp_client/models/create_group_options'
|
30
|
+
require 'mailslurp_client/models/create_inbox_dto'
|
30
31
|
require 'mailslurp_client/models/create_owned_alias_options'
|
31
32
|
require 'mailslurp_client/models/create_template_options'
|
32
33
|
require 'mailslurp_client/models/create_webhook_options'
|
34
|
+
require 'mailslurp_client/models/dns_lookup_options'
|
35
|
+
require 'mailslurp_client/models/dns_lookup_result'
|
36
|
+
require 'mailslurp_client/models/dns_lookup_results'
|
33
37
|
require 'mailslurp_client/models/describe_domain_options'
|
34
38
|
require 'mailslurp_client/models/describe_mail_server_domain_result'
|
35
39
|
require 'mailslurp_client/models/domain_dto'
|
@@ -46,6 +50,7 @@ require 'mailslurp_client/models/group_contacts_dto'
|
|
46
50
|
require 'mailslurp_client/models/group_dto'
|
47
51
|
require 'mailslurp_client/models/group_projection'
|
48
52
|
require 'mailslurp_client/models/html_validation_result'
|
53
|
+
require 'mailslurp_client/models/ip_address_result'
|
49
54
|
require 'mailslurp_client/models/inbox'
|
50
55
|
require 'mailslurp_client/models/inbox_projection'
|
51
56
|
require 'mailslurp_client/models/match_option'
|
@@ -64,7 +69,6 @@ require 'mailslurp_client/models/page_webhook_projection'
|
|
64
69
|
require 'mailslurp_client/models/pageable'
|
65
70
|
require 'mailslurp_client/models/raw_email_json'
|
66
71
|
require 'mailslurp_client/models/send_email_options'
|
67
|
-
require 'mailslurp_client/models/sent_email'
|
68
72
|
require 'mailslurp_client/models/sent_email_dto'
|
69
73
|
require 'mailslurp_client/models/sent_email_projection'
|
70
74
|
require 'mailslurp_client/models/set_inbox_favourited_options'
|
@@ -20,7 +20,7 @@ module MailSlurpClient
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
# Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.
|
23
|
-
# When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment
|
23
|
+
# Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with `SendEmailOptions` when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
|
24
24
|
# @param upload_options [UploadAttachmentOptions] uploadOptions
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
26
|
# @return [Array<String>]
|
@@ -30,7 +30,7 @@ module MailSlurpClient
|
|
30
30
|
end
|
31
31
|
|
32
32
|
# Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.
|
33
|
-
# When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment
|
33
|
+
# Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with `SendEmailOptions` when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
|
34
34
|
# @param upload_options [UploadAttachmentOptions] uploadOptions
|
35
35
|
# @param [Hash] opts the optional parameters
|
36
36
|
# @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
|
@@ -84,7 +84,7 @@ module MailSlurpClient
|
|
84
84
|
end
|
85
85
|
|
86
86
|
# Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.
|
87
|
-
# When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment
|
87
|
+
# Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with `SendEmailOptions` when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
|
88
88
|
# @param [Hash] opts the optional parameters
|
89
89
|
# @option opts [String] :string Optional contentType for file. For instance `application/pdf`
|
90
90
|
# @option opts [String] :filename Optional filename to save upload with
|
@@ -96,7 +96,7 @@ module MailSlurpClient
|
|
96
96
|
end
|
97
97
|
|
98
98
|
# Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.
|
99
|
-
# When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment
|
99
|
+
# Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with `SendEmailOptions` when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
|
100
100
|
# @param [Hash] opts the optional parameters
|
101
101
|
# @option opts [String] :string Optional contentType for file. For instance `application/pdf`
|
102
102
|
# @option opts [String] :filename Optional filename to save upload with
|
@@ -150,7 +150,7 @@ module MailSlurpClient
|
|
150
150
|
end
|
151
151
|
|
152
152
|
# Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.
|
153
|
-
# When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment
|
153
|
+
# Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with `SendEmailOptions` when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
|
154
154
|
# @param file [File] file
|
155
155
|
# @param [Hash] opts the optional parameters
|
156
156
|
# @option opts [String] :content_type Optional content type of attachment
|
@@ -163,7 +163,7 @@ module MailSlurpClient
|
|
163
163
|
end
|
164
164
|
|
165
165
|
# Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.
|
166
|
-
# When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment
|
166
|
+
# Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with `SendEmailOptions` when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.
|
167
167
|
# @param file [File] file
|
168
168
|
# @param [Hash] opts the optional parameters
|
169
169
|
# @option opts [String] :content_type Optional content type of attachment
|
@@ -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']
|
@@ -536,7 +536,7 @@ module MailSlurpClient
|
|
536
536
|
end
|
537
537
|
|
538
538
|
# Get email content regex pattern match results. Runs regex against email body and returns match groups.
|
539
|
-
# Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
|
539
|
+
# Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
|
540
540
|
# @param email_id [String] ID of email to match against
|
541
541
|
# @param content_match_options [ContentMatchOptions] contentMatchOptions
|
542
542
|
# @param [Hash] opts the optional parameters
|
@@ -547,7 +547,7 @@ module MailSlurpClient
|
|
547
547
|
end
|
548
548
|
|
549
549
|
# Get email content regex pattern match results. Runs regex against email body and returns match groups.
|
550
|
-
# Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
|
550
|
+
# Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
|
551
551
|
# @param email_id [String] ID of email to match against
|
552
552
|
# @param content_match_options [ContentMatchOptions] contentMatchOptions
|
553
553
|
# @param [Hash] opts the optional parameters
|
@@ -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
|
@@ -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] || {}
|
@@ -759,7 +836,7 @@ module MailSlurpClient
|
|
759
836
|
# @param inbox_id [String] ID of the inbox you want to send the email from
|
760
837
|
# @param [Hash] opts the optional parameters
|
761
838
|
# @option opts [SendEmailOptions] :send_email_options Options for the email
|
762
|
-
# @return [
|
839
|
+
# @return [SentEmailDto]
|
763
840
|
def send_email_and_confirm(inbox_id, opts = {})
|
764
841
|
data, _status_code, _headers = send_email_and_confirm_with_http_info(inbox_id, opts)
|
765
842
|
data
|
@@ -770,7 +847,7 @@ module MailSlurpClient
|
|
770
847
|
# @param inbox_id [String] ID of the inbox you want to send the email from
|
771
848
|
# @param [Hash] opts the optional parameters
|
772
849
|
# @option opts [SendEmailOptions] :send_email_options Options for the email
|
773
|
-
# @return [Array<(
|
850
|
+
# @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers
|
774
851
|
def send_email_and_confirm_with_http_info(inbox_id, opts = {})
|
775
852
|
if @api_client.config.debugging
|
776
853
|
@api_client.config.logger.debug 'Calling API: InboxControllerApi.send_email_and_confirm ...'
|
@@ -799,7 +876,7 @@ module MailSlurpClient
|
|
799
876
|
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'send_email_options'])
|
800
877
|
|
801
878
|
# return_type
|
802
|
-
return_type = opts[:return_type] || '
|
879
|
+
return_type = opts[:return_type] || 'SentEmailDto'
|
803
880
|
|
804
881
|
# auth_names
|
805
882
|
auth_names = opts[:auth_names] || ['API_KEY']
|
@@ -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
|