mailslurp_client 8.7.1 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1622ed62e75602880ac96b6d80b157964640c39ffd88e3ea7c4f520a2533a96f
4
- data.tar.gz: 8fe1dbc6fd7a3892bd8fe12aeaa9cb8a4299f29077da03865ed8d7938d8f0ed5
3
+ metadata.gz: ce11099c493dea6299d4d72491154197e03f202540d6df04272ba300877b3025
4
+ data.tar.gz: 85a86f10d235f6736aea7abf4e7a18da40ec31913f71dbccafe7981ead2a6f00
5
5
  SHA512:
6
- metadata.gz: 6e33934b0a5cb9be6d384a210fb0ee6b4c8317e654f694415db24eb2e3eb6fead5db5e810676921f241bac9609fefca47bd9c3d938dc354288621c831dfaa993
7
- data.tar.gz: c0f0cec1c962bfcdbc6d8f9f825079f0eaf4e937903548fa890854ffe9ebfa33e5bce4cd2eda439cb33f3dd22b4bf5c4c8f0347a8fae0ad4c998d33af03d433c
6
+ metadata.gz: 6efb77dab38cdb696343298579f1d9ab65234a69b5684cbd2209e1b4a2323920fc74c2380a1d9189f8a84cdc996b726c884acf3666b15af8763ce8c08627d814
7
+ data.tar.gz: a805e639ad6c4e2b653b72b95aeaee7220e44b1e8e4454a5641d32c6d93288aa0b9c21ba03ea8d328d33111ed694d47f0e8c1e4c150b36e19e5c798d6664b20a
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2020 MailSlurp Email API (Provided by Pettman OÜ, Estonia)
1
+ Copyright 2021 MailSlurp Email API (Provided by Pettman OÜ, Estonia)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
@@ -38,6 +38,7 @@ require 'mailslurp_client/models/dns_lookup_results'
38
38
  require 'mailslurp_client/models/describe_domain_options'
39
39
  require 'mailslurp_client/models/describe_mail_server_domain_result'
40
40
  require 'mailslurp_client/models/domain_dto'
41
+ require 'mailslurp_client/models/domain_name_record'
41
42
  require 'mailslurp_client/models/domain_preview'
42
43
  require 'mailslurp_client/models/download_attachment_dto'
43
44
  require 'mailslurp_client/models/email'
@@ -46,6 +47,8 @@ require 'mailslurp_client/models/email_content_match_result'
46
47
  require 'mailslurp_client/models/email_preview'
47
48
  require 'mailslurp_client/models/email_projection'
48
49
  require 'mailslurp_client/models/email_verification_result'
50
+ require 'mailslurp_client/models/expired_inbox_dto'
51
+ require 'mailslurp_client/models/expired_inbox_record_projection'
49
52
  require 'mailslurp_client/models/forward_email_options'
50
53
  require 'mailslurp_client/models/group_contacts_dto'
51
54
  require 'mailslurp_client/models/group_dto'
@@ -62,6 +65,7 @@ require 'mailslurp_client/models/page_alias'
62
65
  require 'mailslurp_client/models/page_contact_projection'
63
66
  require 'mailslurp_client/models/page_email_preview'
64
67
  require 'mailslurp_client/models/page_email_projection'
68
+ require 'mailslurp_client/models/page_expired_inbox_record_projection'
65
69
  require 'mailslurp_client/models/page_group_projection'
66
70
  require 'mailslurp_client/models/page_inbox_projection'
67
71
  require 'mailslurp_client/models/page_sent_email_projection'
@@ -499,7 +499,7 @@ module MailSlurpClient
499
499
  end
500
500
 
501
501
  # Send an email from an alias inbox
502
- # Send an email from an alias. Replies to the email will be forwared to the alias masked email address
502
+ # Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
503
503
  # @param alias_id [String] aliasId
504
504
  # @param [Hash] opts the optional parameters
505
505
  # @option opts [SendEmailOptions] :send_email_options Options for the email to be sent
@@ -510,7 +510,7 @@ module MailSlurpClient
510
510
  end
511
511
 
512
512
  # Send an email from an alias inbox
513
- # Send an email from an alias. Replies to the email will be forwared to the alias masked email address
513
+ # Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
514
514
  # @param alias_id [String] aliasId
515
515
  # @param [Hash] opts the optional parameters
516
516
  # @option opts [SendEmailOptions] :send_email_options Options for the email to be sent
@@ -21,26 +21,33 @@ module MailSlurpClient
21
21
  end
22
22
  # Create new random inbox
23
23
  # Returns an Inbox with an `id` and an `emailAddress`
24
+ # @param use_domain_pool [Boolean] useDomainPool
24
25
  # @param [Hash] opts the optional parameters
25
26
  # @return [Inbox]
26
- def create_new_email_address(opts = {})
27
- data, _status_code, _headers = create_new_email_address_with_http_info(opts)
27
+ def create_new_email_address(use_domain_pool, opts = {})
28
+ data, _status_code, _headers = create_new_email_address_with_http_info(use_domain_pool, opts)
28
29
  data
29
30
  end
30
31
 
31
32
  # Create new random inbox
32
33
  # Returns an Inbox with an `id` and an `emailAddress`
34
+ # @param use_domain_pool [Boolean] useDomainPool
33
35
  # @param [Hash] opts the optional parameters
34
36
  # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
35
- def create_new_email_address_with_http_info(opts = {})
37
+ def create_new_email_address_with_http_info(use_domain_pool, opts = {})
36
38
  if @api_client.config.debugging
37
39
  @api_client.config.logger.debug 'Calling API: CommonActionsControllerApi.create_new_email_address ...'
38
40
  end
41
+ # verify the required parameter 'use_domain_pool' is set
42
+ if @api_client.config.client_side_validation && use_domain_pool.nil?
43
+ fail ArgumentError, "Missing the required parameter 'use_domain_pool' when calling CommonActionsControllerApi.create_new_email_address"
44
+ end
39
45
  # resource path
40
46
  local_var_path = '/createInbox'
41
47
 
42
48
  # query parameters
43
49
  query_params = opts[:query_params] || {}
50
+ query_params[:'useDomainPool'] = use_domain_pool
44
51
 
45
52
  # header parameters
46
53
  header_params = opts[:header_params] || {}
@@ -77,26 +84,33 @@ module MailSlurpClient
77
84
 
78
85
  # Create new random inbox
79
86
  # Returns an Inbox with an `id` and an `emailAddress`
87
+ # @param use_domain_pool [Boolean] useDomainPool
80
88
  # @param [Hash] opts the optional parameters
81
89
  # @return [Inbox]
82
- def create_new_email_address1(opts = {})
83
- data, _status_code, _headers = create_new_email_address1_with_http_info(opts)
90
+ def create_new_email_address1(use_domain_pool, opts = {})
91
+ data, _status_code, _headers = create_new_email_address1_with_http_info(use_domain_pool, opts)
84
92
  data
85
93
  end
86
94
 
87
95
  # Create new random inbox
88
96
  # Returns an Inbox with an &#x60;id&#x60; and an &#x60;emailAddress&#x60;
97
+ # @param use_domain_pool [Boolean] useDomainPool
89
98
  # @param [Hash] opts the optional parameters
90
99
  # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
91
- def create_new_email_address1_with_http_info(opts = {})
100
+ def create_new_email_address1_with_http_info(use_domain_pool, opts = {})
92
101
  if @api_client.config.debugging
93
102
  @api_client.config.logger.debug 'Calling API: CommonActionsControllerApi.create_new_email_address1 ...'
94
103
  end
104
+ # verify the required parameter 'use_domain_pool' is set
105
+ if @api_client.config.client_side_validation && use_domain_pool.nil?
106
+ fail ArgumentError, "Missing the required parameter 'use_domain_pool' when calling CommonActionsControllerApi.create_new_email_address1"
107
+ end
95
108
  # resource path
96
109
  local_var_path = '/newEmailAddress'
97
110
 
98
111
  # query parameters
99
112
  query_params = opts[:query_params] || {}
113
+ query_params[:'useDomainPool'] = use_domain_pool
100
114
 
101
115
  # header parameters
102
116
  header_params = opts[:header_params] || {}
@@ -22,12 +22,13 @@ module MailSlurpClient
22
22
  # Create an Inbox (email address)
23
23
  # Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.
24
24
  # @param [Hash] opts the optional parameters
25
- # @option opts [String] :description Optional description for an inbox.
26
- # @option opts [String] :email_address Optional email address including domain you wish inbox to use (eg: test123@mydomain.com). Only supports domains that you have registered and verified with MailSlurp using dashboard or &#x60;createDomain&#x60; method.
27
- # @option opts [DateTime] :expires_at Optional expires at timestamp. If your plan supports this feature you can specify when an inbox should expire. If left empty inbox will exist permanently or expire when your plan dictates
28
- # @option opts [Boolean] :favourite Is inbox favourited.
29
- # @option opts [String] :name Optional name for an inbox.
30
- # @option opts [Array<String>] :tags Optional tags for an inbox. Can be used for searching and filtering inboxes.
25
+ # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
26
+ # @option opts [String] :email_address A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as &#x60;123@mailslurp.com&#x60;. If you use the &#x60;useDomainPool&#x60; option when the email address is null it will generate an email address with a more varied domain ending such as &#x60;123@mailslurp.info&#x60; or &#x60;123@mailslurp.biz&#x60;. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
27
+ # @option opts [DateTime] :expires_at Optional inbox expiration date. If null then this inbox is permanent and the emails in it won&#39;t be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSXXX.
28
+ # @option opts [Boolean] :favourite Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering
29
+ # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search
30
+ # @option opts [Array<String>] :tags Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
31
+ # @option opts [Boolean] :use_domain_pool Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default &#x60;@mailslurp.com&#x60; email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in &#x60;@mailslurp.{world,info,xyz,...}&#x60; . This means a TLD is randomly selecting from a list of &#x60;.biz&#x60;, &#x60;.info&#x60;, &#x60;.xyz&#x60; etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of &#x60;@mailslurp.com&#x60; or custom email address provided by the emailAddress field.
31
32
  # @return [Inbox]
32
33
  def create_inbox(opts = {})
33
34
  data, _status_code, _headers = create_inbox_with_http_info(opts)
@@ -37,12 +38,13 @@ module MailSlurpClient
37
38
  # Create an Inbox (email address)
38
39
  # Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.
39
40
  # @param [Hash] opts the optional parameters
40
- # @option opts [String] :description Optional description for an inbox.
41
- # @option opts [String] :email_address Optional email address including domain you wish inbox to use (eg: test123@mydomain.com). Only supports domains that you have registered and verified with MailSlurp using dashboard or &#x60;createDomain&#x60; method.
42
- # @option opts [DateTime] :expires_at Optional expires at timestamp. If your plan supports this feature you can specify when an inbox should expire. If left empty inbox will exist permanently or expire when your plan dictates
43
- # @option opts [Boolean] :favourite Is inbox favourited.
44
- # @option opts [String] :name Optional name for an inbox.
45
- # @option opts [Array<String>] :tags Optional tags for an inbox. Can be used for searching and filtering inboxes.
41
+ # @option opts [String] :description Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
42
+ # @option opts [String] :email_address A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as &#x60;123@mailslurp.com&#x60;. If you use the &#x60;useDomainPool&#x60; option when the email address is null it will generate an email address with a more varied domain ending such as &#x60;123@mailslurp.info&#x60; or &#x60;123@mailslurp.biz&#x60;. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
43
+ # @option opts [DateTime] :expires_at Optional inbox expiration date. If null then this inbox is permanent and the emails in it won&#39;t be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSXXX.
44
+ # @option opts [Boolean] :favourite Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering
45
+ # @option opts [String] :name Optional name of the inbox. Displayed in the dashboard for easier search
46
+ # @option opts [Array<String>] :tags Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
47
+ # @option opts [Boolean] :use_domain_pool Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default &#x60;@mailslurp.com&#x60; email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in &#x60;@mailslurp.{world,info,xyz,...}&#x60; . This means a TLD is randomly selecting from a list of &#x60;.biz&#x60;, &#x60;.info&#x60;, &#x60;.xyz&#x60; etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of &#x60;@mailslurp.com&#x60; or custom email address provided by the emailAddress field.
46
48
  # @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
47
49
  def create_inbox_with_http_info(opts = {})
48
50
  if @api_client.config.debugging
@@ -59,6 +61,7 @@ module MailSlurpClient
59
61
  query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
60
62
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
61
63
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :multi) if !opts[:'tags'].nil?
64
+ query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
62
65
 
63
66
  # header parameters
64
67
  header_params = opts[:header_params] || {}
@@ -212,7 +215,7 @@ module MailSlurpClient
212
215
  end
213
216
 
214
217
  # Delete inbox
215
- # Permanently delete an inbox and associated email address aswell as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
218
+ # Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
216
219
  # @param inbox_id [String] inboxId
217
220
  # @param [Hash] opts the optional parameters
218
221
  # @return [nil]
@@ -222,7 +225,7 @@ module MailSlurpClient
222
225
  end
223
226
 
224
227
  # Delete inbox
225
- # Permanently delete an inbox and associated email address aswell as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
228
+ # Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
226
229
  # @param inbox_id [String] inboxId
227
230
  # @param [Hash] opts the optional parameters
228
231
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -433,6 +436,199 @@ module MailSlurpClient
433
436
  return data, status_code, headers
434
437
  end
435
438
 
439
+ # Get an expired inbox record
440
+ # Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
441
+ # @param expired_id [String] ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)
442
+ # @param [Hash] opts the optional parameters
443
+ # @return [ExpiredInboxDto]
444
+ def get_expired_inbox_record_by_id(expired_id, opts = {})
445
+ data, _status_code, _headers = get_expired_inbox_record_by_id_with_http_info(expired_id, opts)
446
+ data
447
+ end
448
+
449
+ # Get an expired inbox record
450
+ # Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
451
+ # @param expired_id [String] ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId)
452
+ # @param [Hash] opts the optional parameters
453
+ # @return [Array<(ExpiredInboxDto, Integer, Hash)>] ExpiredInboxDto data, response status code and response headers
454
+ def get_expired_inbox_record_by_id_with_http_info(expired_id, opts = {})
455
+ if @api_client.config.debugging
456
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_expired_inbox_record_by_id ...'
457
+ end
458
+ # verify the required parameter 'expired_id' is set
459
+ if @api_client.config.client_side_validation && expired_id.nil?
460
+ fail ArgumentError, "Missing the required parameter 'expired_id' when calling InboxControllerApi.get_expired_inbox_record_by_id"
461
+ end
462
+ # resource path
463
+ local_var_path = '/inboxes/expired-records/{expiredId}'.sub('{' + 'expiredId' + '}', CGI.escape(expired_id.to_s))
464
+
465
+ # query parameters
466
+ query_params = opts[:query_params] || {}
467
+
468
+ # header parameters
469
+ header_params = opts[:header_params] || {}
470
+ # HTTP header 'Accept' (if needed)
471
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
472
+
473
+ # form parameters
474
+ form_params = opts[:form_params] || {}
475
+
476
+ # http body (model)
477
+ post_body = opts[:body]
478
+
479
+ # return_type
480
+ return_type = opts[:return_type] || 'ExpiredInboxDto'
481
+
482
+ # auth_names
483
+ auth_names = opts[:auth_names] || ['API_KEY']
484
+
485
+ new_options = opts.merge(
486
+ :header_params => header_params,
487
+ :query_params => query_params,
488
+ :form_params => form_params,
489
+ :body => post_body,
490
+ :auth_names => auth_names,
491
+ :return_type => return_type
492
+ )
493
+
494
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
495
+ if @api_client.config.debugging
496
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_expired_inbox_record_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
497
+ end
498
+ return data, status_code, headers
499
+ end
500
+
501
+ # Get expired inbox record for a previously existing inbox
502
+ # Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
503
+ # @param inbox_id [String] ID of inbox you want to retrieve (not the inbox ID)
504
+ # @param [Hash] opts the optional parameters
505
+ # @return [ExpiredInboxDto]
506
+ def get_expired_inbox_record_by_inbox_id(inbox_id, opts = {})
507
+ data, _status_code, _headers = get_expired_inbox_record_by_inbox_id_with_http_info(inbox_id, opts)
508
+ data
509
+ end
510
+
511
+ # Get expired inbox record for a previously existing inbox
512
+ # Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
513
+ # @param inbox_id [String] ID of inbox you want to retrieve (not the inbox ID)
514
+ # @param [Hash] opts the optional parameters
515
+ # @return [Array<(ExpiredInboxDto, Integer, Hash)>] ExpiredInboxDto data, response status code and response headers
516
+ def get_expired_inbox_record_by_inbox_id_with_http_info(inbox_id, opts = {})
517
+ if @api_client.config.debugging
518
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_expired_inbox_record_by_inbox_id ...'
519
+ end
520
+ # verify the required parameter 'inbox_id' is set
521
+ if @api_client.config.client_side_validation && inbox_id.nil?
522
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.get_expired_inbox_record_by_inbox_id"
523
+ end
524
+ # resource path
525
+ local_var_path = '/inboxes/{inboxId}/expired-record'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
526
+
527
+ # query parameters
528
+ query_params = opts[:query_params] || {}
529
+
530
+ # header parameters
531
+ header_params = opts[:header_params] || {}
532
+ # HTTP header 'Accept' (if needed)
533
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
534
+
535
+ # form parameters
536
+ form_params = opts[:form_params] || {}
537
+
538
+ # http body (model)
539
+ post_body = opts[:body]
540
+
541
+ # return_type
542
+ return_type = opts[:return_type] || 'ExpiredInboxDto'
543
+
544
+ # auth_names
545
+ auth_names = opts[:auth_names] || ['API_KEY']
546
+
547
+ new_options = opts.merge(
548
+ :header_params => header_params,
549
+ :query_params => query_params,
550
+ :form_params => form_params,
551
+ :body => post_body,
552
+ :auth_names => auth_names,
553
+ :return_type => return_type
554
+ )
555
+
556
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
557
+ if @api_client.config.debugging
558
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_expired_inbox_record_by_inbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
559
+ end
560
+ return data, status_code, headers
561
+ end
562
+
563
+ # List records of expired inboxes
564
+ # Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
565
+ # @param [Hash] opts the optional parameters
566
+ # @option opts [Integer] :page Optional page index in inbox sent email list pagination (default to 0)
567
+ # @option opts [Integer] :size Optional page size in inbox sent email list pagination (default to 20)
568
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
569
+ # @return [PageExpiredInboxRecordProjection]
570
+ def get_expired_inbox_records(opts = {})
571
+ data, _status_code, _headers = get_expired_inbox_records_with_http_info(opts)
572
+ data
573
+ end
574
+
575
+ # List records of expired inboxes
576
+ # Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
577
+ # @param [Hash] opts the optional parameters
578
+ # @option opts [Integer] :page Optional page index in inbox sent email list pagination
579
+ # @option opts [Integer] :size Optional page size in inbox sent email list pagination
580
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
581
+ # @return [Array<(PageExpiredInboxRecordProjection, Integer, Hash)>] PageExpiredInboxRecordProjection data, response status code and response headers
582
+ def get_expired_inbox_records_with_http_info(opts = {})
583
+ if @api_client.config.debugging
584
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.get_expired_inbox_records ...'
585
+ end
586
+ allowable_values = ["ASC", "DESC"]
587
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
588
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
589
+ end
590
+ # resource path
591
+ local_var_path = '/inboxes/expired-records'
592
+
593
+ # query parameters
594
+ query_params = opts[:query_params] || {}
595
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
596
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
597
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
598
+
599
+ # header parameters
600
+ header_params = opts[:header_params] || {}
601
+ # HTTP header 'Accept' (if needed)
602
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
603
+
604
+ # form parameters
605
+ form_params = opts[:form_params] || {}
606
+
607
+ # http body (model)
608
+ post_body = opts[:body]
609
+
610
+ # return_type
611
+ return_type = opts[:return_type] || 'PageExpiredInboxRecordProjection'
612
+
613
+ # auth_names
614
+ auth_names = opts[:auth_names] || ['API_KEY']
615
+
616
+ new_options = opts.merge(
617
+ :header_params => header_params,
618
+ :query_params => query_params,
619
+ :form_params => form_params,
620
+ :body => post_body,
621
+ :auth_names => auth_names,
622
+ :return_type => return_type
623
+ )
624
+
625
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
626
+ if @api_client.config.debugging
627
+ @api_client.config.logger.debug "API called: InboxControllerApi#get_expired_inbox_records\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
628
+ end
629
+ return data, status_code, headers
630
+ end
631
+
436
632
  # Get Inbox
437
633
  # Returns an inbox's properties, including its email address and ID.
438
634
  # @param inbox_id [String] inboxId
@@ -13,17 +13,18 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
+ # Options for creating an inbox. An inbox has a real email address that can send and receive emails. Inboxes can be permanent or expire at a given time. They can use a custom email address (by verifying your own domain) or a randomly assigned email ending in either `mailslurp.com` or if `useDomainPool` is enabled then ending in a similar domains such as `mailslurp.xyz` (selected at random).
16
17
  class CreateInboxDto
17
- # Optional description of an inbox for labelling purposes
18
+ # Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
18
19
  attr_accessor :description
19
20
 
20
- # Optionally specify an email address you want the inbox to have. When left blank an email address will be randomly assigned to the inbox usually ending in `@mailslurp.com`. Custom email addresses must include your own custom domain that you have configured in MailSlurp. So if your domain is `mysite.com` you can created any email address ending in `@mysite.com`. All email addresses are transformed to lowercase!
21
+ # A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
21
22
  attr_accessor :email_address
22
23
 
23
- # When, if ever, will the inbox expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. Timestamp passed as string.
24
+ # Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX.
24
25
  attr_accessor :expires_at
25
26
 
26
- # Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access
27
+ # Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering
27
28
  attr_accessor :favourite
28
29
 
29
30
  # Optional name of the inbox. Displayed in the dashboard for easier search
@@ -32,6 +33,9 @@ module MailSlurpClient
32
33
  # Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
33
34
  attr_accessor :tags
34
35
 
36
+ # Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field.
37
+ attr_accessor :use_domain_pool
38
+
35
39
  # Attribute mapping from ruby-style variable name to JSON key.
36
40
  def self.attribute_map
37
41
  {
@@ -40,7 +44,8 @@ module MailSlurpClient
40
44
  :'expires_at' => :'expiresAt',
41
45
  :'favourite' => :'favourite',
42
46
  :'name' => :'name',
43
- :'tags' => :'tags'
47
+ :'tags' => :'tags',
48
+ :'use_domain_pool' => :'useDomainPool'
44
49
  }
45
50
  end
46
51
 
@@ -52,7 +57,8 @@ module MailSlurpClient
52
57
  :'expires_at' => :'DateTime',
53
58
  :'favourite' => :'Boolean',
54
59
  :'name' => :'String',
55
- :'tags' => :'Array<String>'
60
+ :'tags' => :'Array<String>',
61
+ :'use_domain_pool' => :'Boolean'
56
62
  }
57
63
  end
58
64
 
@@ -102,6 +108,10 @@ module MailSlurpClient
102
108
  self.tags = value
103
109
  end
104
110
  end
111
+
112
+ if attributes.key?(:'use_domain_pool')
113
+ self.use_domain_pool = attributes[:'use_domain_pool']
114
+ end
105
115
  end
106
116
 
107
117
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -127,7 +137,8 @@ module MailSlurpClient
127
137
  expires_at == o.expires_at &&
128
138
  favourite == o.favourite &&
129
139
  name == o.name &&
130
- tags == o.tags
140
+ tags == o.tags &&
141
+ use_domain_pool == o.use_domain_pool
131
142
  end
132
143
 
133
144
  # @see the `==` method
@@ -139,7 +150,7 @@ module MailSlurpClient
139
150
  # Calculates hash code according to all attributes.
140
151
  # @return [Integer] Hash code
141
152
  def hash
142
- [description, email_address, expires_at, favourite, name, tags].hash
153
+ [description, email_address, expires_at, favourite, name, tags, use_domain_pool].hash
143
154
  end
144
155
 
145
156
  # Builds the object from hash