Class: MailSlurpClient::DomainControllerApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DomainControllerApi

Returns a new instance of DomainControllerApi.



19
20
21
# File 'lib/mailslurp_client/api/domain_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/domain_controller_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_domain_wildcard_catch_all(id, opts = {}) ⇒ DomainDto

Add catch all wild card inbox to domain Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated

Parameters:

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

    the optional parameters

Returns:



27
28
29
30
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 27

def add_domain_wildcard_catch_all(id, opts = {})
  data, _status_code, _headers = add_domain_wildcard_catch_all_with_http_info(id, opts)
  data
end

#add_domain_wildcard_catch_all_with_http_info(id, opts = {}) ⇒ Array<(DomainDto, Integer, Hash)>

Add catch all wild card inbox to domain Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated

Parameters:

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

    the optional parameters

Returns:

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

    DomainDto data, response status code and response headers



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/domain_controller_api.rb', line 37

def add_domain_wildcard_catch_all_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainControllerApi.add_domain_wildcard_catch_all ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DomainControllerApi.add_domain_wildcard_catch_all"
  end
  # resource path
  local_var_path = '/domains/{id}/wildcard'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # 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(['*/*'])

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

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

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

  # 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: DomainControllerApi#add_domain_wildcard_catch_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_domain(create_domain_options, opts = {}) ⇒ DomainDto

Create Domain Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain.

Parameters:

  • create_domain_options (CreateDomainOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



89
90
91
92
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 89

def create_domain(create_domain_options, opts = {})
  data, _status_code, _headers = create_domain_with_http_info(create_domain_options, opts)
  data
end

#create_domain_with_http_info(create_domain_options, opts = {}) ⇒ Array<(DomainDto, Integer, Hash)>

Create Domain Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider&#39;s DNS setup to verify the domain.

Parameters:

  • create_domain_options (CreateDomainOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    DomainDto data, response status code and response headers



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
145
146
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 99

def create_domain_with_http_info(create_domain_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainControllerApi.create_domain ...'
  end
  # verify the required parameter 'create_domain_options' is set
  if @api_client.config.client_side_validation && create_domain_options.nil?
    fail ArgumentError, "Missing the required parameter 'create_domain_options' when calling DomainControllerApi.create_domain"
  end
  # resource path
  local_var_path = '/domains'

  # 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(create_domain_options) 

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

  # 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: DomainControllerApi#create_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_domain(id, opts = {}) ⇒ Array<String>

Delete a domain Delete a domain. This will disable any existing inboxes that use this domain.

Parameters:

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

    the optional parameters

Returns:

  • (Array<String>)


153
154
155
156
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 153

def delete_domain(id, opts = {})
  data, _status_code, _headers = delete_domain_with_http_info(id, opts)
  data
end

#delete_domain_with_http_info(id, opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>

Delete a domain Delete a domain. This will disable any existing inboxes that use this domain.

Parameters:

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

    the optional parameters

Returns:

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

    Array<String> data, response status code and response headers



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
207
208
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 163

def delete_domain_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainControllerApi.delete_domain ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DomainControllerApi.delete_domain"
  end
  # resource path
  local_var_path = '/domains/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # 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(['*/*'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Array<String>' 

  # 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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DomainControllerApi#delete_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_available_domains(opts = {}) ⇒ DomainGroupsDto

Get all usable domains List all domains available for use with email address creation

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :inbox_type (String)

Returns:



215
216
217
218
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 215

def get_available_domains(opts = {})
  data, _status_code, _headers = get_available_domains_with_http_info(opts)
  data
end

#get_available_domains_with_http_info(opts = {}) ⇒ Array<(DomainGroupsDto, Integer, Hash)>

Get all usable domains List all domains available for use with email address creation

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :inbox_type (String)

Returns:

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

    DomainGroupsDto data, response status code and response headers



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
268
269
270
271
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 225

def get_available_domains_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainControllerApi.get_available_domains ...'
  end
  allowable_values = ["HTTP_INBOX", "SMTP_INBOX"]
  if @api_client.config.client_side_validation && opts[:'inbox_type'] && !allowable_values.include?(opts[:'inbox_type'])
    fail ArgumentError, "invalid value for \"inbox_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/domains/available-domains'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxType'] = opts[:'inbox_type'] if !opts[:'inbox_type'].nil?

  # 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] || 'DomainGroupsDto' 

  # 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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DomainControllerApi#get_available_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_domain(id, opts = {}) ⇒ DomainDto

Get a domain Returns domain verification status and tokens for a given domain

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :check_for_errors (Boolean)

Returns:



279
280
281
282
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 279

def get_domain(id, opts = {})
  data, _status_code, _headers = get_domain_with_http_info(id, opts)
  data
end

#get_domain_issues(opts = {}) ⇒ DomainIssuesDto

Get domain issues List domain issues for domains you have created

Parameters:

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

    the optional parameters

Returns:



342
343
344
345
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 342

def get_domain_issues(opts = {})
  data, _status_code, _headers = get_domain_issues_with_http_info(opts)
  data
end

#get_domain_issues_with_http_info(opts = {}) ⇒ Array<(DomainIssuesDto, Integer, Hash)>

Get domain issues List domain issues for domains you have created

Parameters:

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

    the optional parameters

Returns:

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

    DomainIssuesDto data, response status code and response headers



351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 351

def get_domain_issues_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainControllerApi.get_domain_issues ...'
  end
  # resource path
  local_var_path = '/domains/issues'

  # 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(['*/*'])

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

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

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

  # 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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DomainControllerApi#get_domain_issues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_domain_wildcard_catch_all_inbox(id, opts = {}) ⇒ InboxDto

Get catch all wild card inbox for domain Get the catch all inbox for a domain for missed emails

Parameters:

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

    the optional parameters

Returns:



399
400
401
402
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 399

def get_domain_wildcard_catch_all_inbox(id, opts = {})
  data, _status_code, _headers = get_domain_wildcard_catch_all_inbox_with_http_info(id, opts)
  data
end

#get_domain_wildcard_catch_all_inbox_with_http_info(id, opts = {}) ⇒ Array<(InboxDto, Integer, Hash)>

Get catch all wild card inbox for domain Get the catch all inbox for a domain for missed emails

Parameters:

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

    the optional parameters

Returns:

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

    InboxDto data, response status code and response headers



409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 409

def get_domain_wildcard_catch_all_inbox_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainControllerApi.get_domain_wildcard_catch_all_inbox ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DomainControllerApi.get_domain_wildcard_catch_all_inbox"
  end
  # resource path
  local_var_path = '/domains/{id}/wildcard'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # 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(['*/*'])

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

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

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

  # 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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DomainControllerApi#get_domain_wildcard_catch_all_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_domain_with_http_info(id, opts = {}) ⇒ Array<(DomainDto, Integer, Hash)>

Get a domain Returns domain verification status and tokens for a given domain

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :check_for_errors (Boolean)

Returns:

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

    DomainDto data, response status code and response headers



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
330
331
332
333
334
335
336
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 290

def get_domain_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainControllerApi.get_domain ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DomainControllerApi.get_domain"
  end
  # resource path
  local_var_path = '/domains/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'checkForErrors'] = opts[:'check_for_errors'] if !opts[:'check_for_errors'].nil?

  # 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] || 'DomainDto' 

  # 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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DomainControllerApi#get_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_domains(opts = {}) ⇒ Array<DomainPreview>

Get domains List all custom domains you have created

Parameters:

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

    the optional parameters

Returns:



460
461
462
463
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 460

def get_domains(opts = {})
  data, _status_code, _headers = get_domains_with_http_info(opts)
  data
end

#get_domains_with_http_info(opts = {}) ⇒ Array<(Array<DomainPreview>, Integer, Hash)>

Get domains List all custom domains you have created

Parameters:

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

    the optional parameters

Returns:

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

    Array<DomainPreview> data, response status code and response headers



469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 469

def get_domains_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainControllerApi.get_domains ...'
  end
  # resource path
  local_var_path = '/domains'

  # 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(['*/*'])

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

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

  # return_type
  return_type = opts[:return_type] || 'Array<DomainPreview>' 

  # 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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DomainControllerApi#get_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_mail_slurp_domains(opts = {}) ⇒ DomainGroupsDto

Get MailSlurp domains List all MailSlurp domains used with non-custom email addresses

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :inbox_type (String)

Returns:



517
518
519
520
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 517

def get_mail_slurp_domains(opts = {})
  data, _status_code, _headers = get_mail_slurp_domains_with_http_info(opts)
  data
end

#get_mail_slurp_domains_with_http_info(opts = {}) ⇒ Array<(DomainGroupsDto, Integer, Hash)>

Get MailSlurp domains List all MailSlurp domains used with non-custom email addresses

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :inbox_type (String)

Returns:

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

    DomainGroupsDto data, response status code and response headers



527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 527

def get_mail_slurp_domains_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainControllerApi.get_mail_slurp_domains ...'
  end
  allowable_values = ["HTTP_INBOX", "SMTP_INBOX"]
  if @api_client.config.client_side_validation && opts[:'inbox_type'] && !allowable_values.include?(opts[:'inbox_type'])
    fail ArgumentError, "invalid value for \"inbox_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/domains/mailslurp-domains'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'inboxType'] = opts[:'inbox_type'] if !opts[:'inbox_type'].nil?

  # 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] || 'DomainGroupsDto' 

  # 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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DomainControllerApi#get_mail_slurp_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_domain(id, update_domain_options, opts = {}) ⇒ DomainDto

Update a domain Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this.

Parameters:

  • id (String)
  • update_domain_options (UpdateDomainOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



581
582
583
584
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 581

def update_domain(id, update_domain_options, opts = {})
  data, _status_code, _headers = update_domain_with_http_info(id, update_domain_options, opts)
  data
end

#update_domain_with_http_info(id, update_domain_options, opts = {}) ⇒ Array<(DomainDto, Integer, Hash)>

Update a domain Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this.

Parameters:

  • id (String)
  • update_domain_options (UpdateDomainOptions)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    DomainDto data, response status code and response headers



592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
# File 'lib/mailslurp_client/api/domain_controller_api.rb', line 592

def update_domain_with_http_info(id, update_domain_options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DomainControllerApi.update_domain ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DomainControllerApi.update_domain"
  end
  # verify the required parameter 'update_domain_options' is set
  if @api_client.config.client_side_validation && update_domain_options.nil?
    fail ArgumentError, "Missing the required parameter 'update_domain_options' when calling DomainControllerApi.update_domain"
  end
  # resource path
  local_var_path = '/domains/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # 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(update_domain_options) 

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

  # 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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DomainControllerApi#update_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end