Class: MailSlurpClient::MailServerControllerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/mailslurp_client/api/mail_server_controller_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ MailServerControllerApi

Returns a new instance of MailServerControllerApi.



19
20
21
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#describe_mail_server_domain(describe_domain_options, opts = {}) ⇒ DescribeMailServerDomainResult

Get DNS Mail Server records for a domain

Parameters:

  • describe_domain_options (DescribeDomainOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



26
27
28
29
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 26

def describe_mail_server_domain(describe_domain_options, opts = {})
  data, _status_code, _headers = describe_mail_server_domain_with_http_info(describe_domain_options, opts)
  data
end

#describe_mail_server_domain_with_http_info(describe_domain_options, opts = {}) ⇒ Array<(DescribeMailServerDomainResult, Integer, Hash)>

Get DNS Mail Server records for a domain

Parameters:

  • describe_domain_options (DescribeDomainOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 35

def describe_mail_server_domain_with_http_info(describe_domain_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MailServerControllerApi.describe_mail_server_domain ...'
  end
  # verify the required parameter 'describe_domain_options' is set
  if @api_client.config.client_side_validation && describe_domain_options.nil?
    fail ArgumentError, "Missing the required parameter 'describe_domain_options' when calling MailServerControllerApi.describe_mail_server_domain"
  end
  # resource path
  local_var_path = '/mail-server/describe/domain'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(describe_domain_options) 

  # return_type
  return_type = opts[:return_type] || 'DescribeMailServerDomainResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MailServerControllerApi#describe_mail_server_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_dns_lookup(dns_lookup_options, opts = {}) ⇒ DNSLookupResults

Lookup DNS records for a domain

Parameters:

  • dns_lookup_options (DNSLookupOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



88
89
90
91
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 88

def get_dns_lookup(dns_lookup_options, opts = {})
  data, _status_code, _headers = get_dns_lookup_with_http_info(dns_lookup_options, opts)
  data
end

#get_dns_lookup_with_http_info(dns_lookup_options, opts = {}) ⇒ Array<(DNSLookupResults, Integer, Hash)>

Lookup DNS records for a domain

Parameters:

  • dns_lookup_options (DNSLookupOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DNSLookupResults, Integer, Hash)>)

    DNSLookupResults data, response status code and response headers



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 97

def get_dns_lookup_with_http_info(dns_lookup_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MailServerControllerApi.get_dns_lookup ...'
  end
  # verify the required parameter 'dns_lookup_options' is set
  if @api_client.config.client_side_validation && dns_lookup_options.nil?
    fail ArgumentError, "Missing the required parameter 'dns_lookup_options' when calling MailServerControllerApi.get_dns_lookup"
  end
  # resource path
  local_var_path = '/mail-server/describe/dns-lookup'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(dns_lookup_options) 

  # return_type
  return_type = opts[:return_type] || 'DNSLookupResults' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MailServerControllerApi#get_dns_lookup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_dns_lookups(dns_lookups_options, opts = {}) ⇒ DNSLookupResults

Lookup DNS records for multiple domains

Parameters:

  • dns_lookups_options (DNSLookupsOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



150
151
152
153
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 150

def get_dns_lookups(dns_lookups_options, opts = {})
  data, _status_code, _headers = get_dns_lookups_with_http_info(dns_lookups_options, opts)
  data
end

#get_dns_lookups_with_http_info(dns_lookups_options, opts = {}) ⇒ Array<(DNSLookupResults, Integer, Hash)>

Lookup DNS records for multiple domains

Parameters:

  • dns_lookups_options (DNSLookupsOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DNSLookupResults, Integer, Hash)>)

    DNSLookupResults data, response status code and response headers



159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 159

def get_dns_lookups_with_http_info(dns_lookups_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MailServerControllerApi.get_dns_lookups ...'
  end
  # verify the required parameter 'dns_lookups_options' is set
  if @api_client.config.client_side_validation && dns_lookups_options.nil?
    fail ArgumentError, "Missing the required parameter 'dns_lookups_options' when calling MailServerControllerApi.get_dns_lookups"
  end
  # resource path
  local_var_path = '/mail-server/describe/dns-lookups'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(dns_lookups_options) 

  # return_type
  return_type = opts[:return_type] || 'DNSLookupResults' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MailServerControllerApi#get_dns_lookups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_ip_address(name, opts = {}) ⇒ IPAddressResult

Get IP address for a domain

Parameters:

  • name (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



212
213
214
215
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 212

def get_ip_address(name, opts = {})
  data, _status_code, _headers = get_ip_address_with_http_info(name, opts)
  data
end

#get_ip_address_with_http_info(name, opts = {}) ⇒ Array<(IPAddressResult, Integer, Hash)>

Get IP address for a domain

Parameters:

  • name (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IPAddressResult, Integer, Hash)>)

    IPAddressResult data, response status code and response headers



221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 221

def get_ip_address_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MailServerControllerApi.get_ip_address ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling MailServerControllerApi.get_ip_address"
  end
  # resource path
  local_var_path = '/mail-server/describe/ip-address'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'name'] = name

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'IPAddressResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MailServerControllerApi#get_ip_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#verify_email_address(verify_email_address_options, opts = {}) ⇒ EmailVerificationResult

Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server.

Parameters:

Returns:



273
274
275
276
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 273

def verify_email_address(verify_email_address_options, opts = {})
  data, _status_code, _headers = verify_email_address_with_http_info(verify_email_address_options, opts)
  data
end

#verify_email_address_with_http_info(verify_email_address_options, opts = {}) ⇒ Array<(EmailVerificationResult, Integer, Hash)>

Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server.

Parameters:

Returns:

  • (Array<(EmailVerificationResult, Integer, Hash)>)

    EmailVerificationResult data, response status code and response headers



282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
# File 'lib/mailslurp_client/api/mail_server_controller_api.rb', line 282

def verify_email_address_with_http_info(verify_email_address_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MailServerControllerApi.verify_email_address ...'
  end
  # verify the required parameter 'verify_email_address_options' is set
  if @api_client.config.client_side_validation && verify_email_address_options.nil?
    fail ArgumentError, "Missing the required parameter 'verify_email_address_options' when calling MailServerControllerApi.verify_email_address"
  end
  # resource path
  local_var_path = '/mail-server/verify/email-address'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(verify_email_address_options) 

  # return_type
  return_type = opts[:return_type] || 'EmailVerificationResult' 

  # auth_names
  auth_names = opts[:auth_names] || ['API_KEY']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MailServerControllerApi#verify_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end