mailslurp_client 8.2.14 → 8.3.1
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 +5 -0
- data/lib/mailslurp_client/api/domain_controller_api.rb +7 -5
- data/lib/mailslurp_client/api/email_controller_api.rb +2 -2
- 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/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/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/update_inbox_options.rb +2 -2
- data/lib/mailslurp_client/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73a7a6bce5d2930743647f53b1b93e19ea81179b32de56b6bd3c7a0d4ca84e62
|
4
|
+
data.tar.gz: 6f02b97e47c2f56c52e9c0eb68351c5a24b7b646b56dd0cdd7ac4efd4bf82801
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 819cfdb8b68c76a89130bef694eaabd2db78e98d1205f7258fb1bee9f1696ca751bcc2a9c50099779a24110997f27f559b2632b1bc0a6292416b4f6fafdad65b
|
7
|
+
data.tar.gz: d878ffa757ae2fd463ac0b5a59db2ae7433abf85925186d21ba780b0cd73c23b648759b3a010f08dfe630a999bddf2a503a7f08deba97ed2a46f26246e7136fc
|
data/README.md
CHANGED
@@ -41,7 +41,7 @@ gem install mailslurp_client
|
|
41
41
|
Or in your `Gemfile`:
|
42
42
|
|
43
43
|
```ruby
|
44
|
-
gem 'mailslurp_client', '~> 8.
|
44
|
+
gem 'mailslurp_client', '~> 8.3', '>= 8.3.0'
|
45
45
|
```
|
46
46
|
|
47
47
|
And then run bundler install:
|
@@ -90,6 +90,35 @@ it 'can create email addresses' do
|
|
90
90
|
end
|
91
91
|
```
|
92
92
|
|
93
|
+
#### More options
|
94
|
+
The `create_inbox` method has some limitations in the Ruby client. To create inboxes with more options use the alternative
|
95
|
+
`create_inbox_with_options` method. (This uses a request body instead of query parameters.)
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
it 'can an inbox with tags' do
|
99
|
+
inbox_controller = MailSlurpClient::InboxControllerApi.new
|
100
|
+
# create an inbox with tags
|
101
|
+
inbox = inbox_controller.create_inbox_with_options({
|
102
|
+
tags: ['t1','t2'],
|
103
|
+
description: "test with tags",
|
104
|
+
name: "test name"
|
105
|
+
})
|
106
|
+
|
107
|
+
# has tags
|
108
|
+
expect(inbox.id).to be_truthy
|
109
|
+
expect(inbox.description).to be_truthy
|
110
|
+
expect(inbox.name).to be_truthy
|
111
|
+
expect(inbox.tags).to include('t1')
|
112
|
+
expect(inbox.tags).to include('t2')
|
113
|
+
|
114
|
+
# can update tags
|
115
|
+
inbox_updated = inbox_controller.update_inbox(inbox.id, {
|
116
|
+
tags: ['newtag']
|
117
|
+
})
|
118
|
+
expect(inbox_updated.tags).to eq(['newtag'])
|
119
|
+
end
|
120
|
+
```
|
121
|
+
|
93
122
|
### List inboxes
|
94
123
|
|
95
124
|
Inboxes you create can be listed in a paginated way.
|
@@ -234,7 +263,7 @@ email = wait_controller.wait_for_latest_email(wait_opts)
|
|
234
263
|
# find the attachments on the email object
|
235
264
|
expect(email.attachments.size).to be(1)
|
236
265
|
|
237
|
-
# download the attachment
|
266
|
+
# download the attachment as base64 (easier than byte arrays for ruby client)
|
238
267
|
email_controller = MailSlurpClient::EmailControllerApi.new
|
239
268
|
downloaded_attachment = email_controller.download_attachment_base64(email.attachments[0], email.id)
|
240
269
|
|
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'
|
@@ -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
|
@@ -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
|