mailslurp_client 11.1.1 → 11.4.23

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: f4ab99cf6e32e9b983aba0a4af539dc48d6ec35dfed539ef5c4c32c859bc8d09
4
- data.tar.gz: 22c979df15e3c0c7fae1ec784b872104d8f72cc7e83094640ecd49adcf5c03ba
3
+ metadata.gz: 1fffdc1eb8bb7536625de6abd28ade2ac7d2ca5134bb91a03f77d24910ad5e03
4
+ data.tar.gz: 604e79ae5237a804bdd251383faa739a6e90e01ea88625f7a08ee4bbe8d18ba5
5
5
  SHA512:
6
- metadata.gz: 512ea12d39289c7404a0ef94b0a34d81969c05efd2c7a1c986be0c1aeb86960dffe6f7d3edaf6db6c796fb36bd12dd70900df1b78307b77d099a58b702b8f95d
7
- data.tar.gz: 8103ac2eaae0f5281d7f625578676ce8505c3c392266ba6ca6dcb19375c4cba192200a1a0489e91fa703c65bb81c430dbecc51d373c7cc407993da75dcaf5980
6
+ metadata.gz: c646f4ed868a5ad34fc87596f970eca465be717889882ff5d414793e8e446ad440f639e0e0218a63b4e19610e4b92df6afcedea8cd41ae581e97f3b1244da0ee
7
+ data.tar.gz: 791c73ef2bea652c913fb1db34fa744750be6214862d72843a2c030c8f13dcfaa41e9fdce4568a6e82b43c3bc9f72da2aa570bb6dc02c2d678c9dd0e55ff1082
@@ -48,6 +48,7 @@ require 'mailslurp_client/models/email_preview'
48
48
  require 'mailslurp_client/models/email_projection'
49
49
  require 'mailslurp_client/models/email_text_lines_result'
50
50
  require 'mailslurp_client/models/email_verification_result'
51
+ require 'mailslurp_client/models/expiration_defaults'
51
52
  require 'mailslurp_client/models/expired_inbox_dto'
52
53
  require 'mailslurp_client/models/expired_inbox_record_projection'
53
54
  require 'mailslurp_client/models/forward_email_options'
@@ -89,6 +90,7 @@ require 'mailslurp_client/models/template_variable'
89
90
  require 'mailslurp_client/models/thread_projection'
90
91
  require 'mailslurp_client/models/unread_count'
91
92
  require 'mailslurp_client/models/update_alias_options'
93
+ require 'mailslurp_client/models/update_domain_options'
92
94
  require 'mailslurp_client/models/update_group_contacts'
93
95
  require 'mailslurp_client/models/update_inbox_options'
94
96
  require 'mailslurp_client/models/upload_attachment_options'
@@ -110,6 +112,7 @@ require 'mailslurp_client/api/common_actions_controller_api'
110
112
  require 'mailslurp_client/api/contact_controller_api'
111
113
  require 'mailslurp_client/api/domain_controller_api'
112
114
  require 'mailslurp_client/api/email_controller_api'
115
+ require 'mailslurp_client/api/expired_controller_api'
113
116
  require 'mailslurp_client/api/form_controller_api'
114
117
  require 'mailslurp_client/api/group_controller_api'
115
118
  require 'mailslurp_client/api/inbox_controller_api'
@@ -19,6 +19,68 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Add catch all wild card inbox to domain
23
+ # 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
24
+ # @param id [String] id
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [DomainDto]
27
+ def add_domain_wildcard_catch_all(id, opts = {})
28
+ data, _status_code, _headers = add_domain_wildcard_catch_all_with_http_info(id, opts)
29
+ data
30
+ end
31
+
32
+ # Add catch all wild card inbox to domain
33
+ # 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
34
+ # @param id [String] id
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(DomainDto, Integer, Hash)>] DomainDto data, response status code and response headers
37
+ def add_domain_wildcard_catch_all_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: DomainControllerApi.add_domain_wildcard_catch_all ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling DomainControllerApi.add_domain_wildcard_catch_all"
44
+ end
45
+ # resource path
46
+ local_var_path = '/domains/{id}/wildcard'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:body]
61
+
62
+ # return_type
63
+ return_type = opts[:return_type] || 'DomainDto'
64
+
65
+ # auth_names
66
+ auth_names = opts[:auth_names] || ['API_KEY']
67
+
68
+ new_options = opts.merge(
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => return_type
75
+ )
76
+
77
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: DomainControllerApi#add_domain_wildcard_catch_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+
22
84
  # Create Domain
23
85
  # 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.
24
86
  # @param domain_options [CreateDomainOptions] domainOptions
@@ -262,5 +324,75 @@ module MailSlurpClient
262
324
  end
263
325
  return data, status_code, headers
264
326
  end
327
+
328
+ # Update a domain
329
+ # 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.
330
+ # @param id [String] id
331
+ # @param update_domain_dto [UpdateDomainOptions] updateDomainDto
332
+ # @param [Hash] opts the optional parameters
333
+ # @return [DomainDto]
334
+ def update_domain(id, update_domain_dto, opts = {})
335
+ data, _status_code, _headers = update_domain_with_http_info(id, update_domain_dto, opts)
336
+ data
337
+ end
338
+
339
+ # Update a domain
340
+ # 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.
341
+ # @param id [String] id
342
+ # @param update_domain_dto [UpdateDomainOptions] updateDomainDto
343
+ # @param [Hash] opts the optional parameters
344
+ # @return [Array<(DomainDto, Integer, Hash)>] DomainDto data, response status code and response headers
345
+ def update_domain_with_http_info(id, update_domain_dto, opts = {})
346
+ if @api_client.config.debugging
347
+ @api_client.config.logger.debug 'Calling API: DomainControllerApi.update_domain ...'
348
+ end
349
+ # verify the required parameter 'id' is set
350
+ if @api_client.config.client_side_validation && id.nil?
351
+ fail ArgumentError, "Missing the required parameter 'id' when calling DomainControllerApi.update_domain"
352
+ end
353
+ # verify the required parameter 'update_domain_dto' is set
354
+ if @api_client.config.client_side_validation && update_domain_dto.nil?
355
+ fail ArgumentError, "Missing the required parameter 'update_domain_dto' when calling DomainControllerApi.update_domain"
356
+ end
357
+ # resource path
358
+ local_var_path = '/domains/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
359
+
360
+ # query parameters
361
+ query_params = opts[:query_params] || {}
362
+
363
+ # header parameters
364
+ header_params = opts[:header_params] || {}
365
+ # HTTP header 'Accept' (if needed)
366
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
367
+ # HTTP header 'Content-Type'
368
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
369
+
370
+ # form parameters
371
+ form_params = opts[:form_params] || {}
372
+
373
+ # http body (model)
374
+ post_body = opts[:body] || @api_client.object_to_http_body(update_domain_dto)
375
+
376
+ # return_type
377
+ return_type = opts[:return_type] || 'DomainDto'
378
+
379
+ # auth_names
380
+ auth_names = opts[:auth_names] || ['API_KEY']
381
+
382
+ new_options = opts.merge(
383
+ :header_params => header_params,
384
+ :query_params => query_params,
385
+ :form_params => form_params,
386
+ :body => post_body,
387
+ :auth_names => auth_names,
388
+ :return_type => return_type
389
+ )
390
+
391
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
392
+ if @api_client.config.debugging
393
+ @api_client.config.logger.debug "API called: DomainControllerApi#update_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
394
+ end
395
+ return data, status_code, headers
396
+ end
265
397
  end
266
398
  end
@@ -696,7 +696,7 @@ module MailSlurpClient
696
696
  fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_html_query"
697
697
  end
698
698
  # resource path
699
- local_var_path = '/emails/{emailId}/html-query'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
699
+ local_var_path = '/emails/{emailId}/htmlQuery'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
700
700
 
701
701
  # query parameters
702
702
  query_params = opts[:query_params] || {}
@@ -728,7 +728,7 @@ module MailSlurpClient
728
728
  :return_type => return_type
729
729
  )
730
730
 
731
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
731
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
732
732
  if @api_client.config.debugging
733
733
  @api_client.config.logger.debug "API called: EmailControllerApi#get_email_html_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
734
734
  end
@@ -740,6 +740,7 @@ module MailSlurpClient
740
740
  # @param email_id [String] ID of email to fetch text for
741
741
  # @param [Hash] opts the optional parameters
742
742
  # @option opts [Boolean] :decode_html_entities Decode HTML entities
743
+ # @option opts [String] :line_separator Line separator character
743
744
  # @return [EmailTextLinesResult]
744
745
  def get_email_text_lines(email_id, opts = {})
745
746
  data, _status_code, _headers = get_email_text_lines_with_http_info(email_id, opts)
@@ -751,6 +752,7 @@ module MailSlurpClient
751
752
  # @param email_id [String] ID of email to fetch text for
752
753
  # @param [Hash] opts the optional parameters
753
754
  # @option opts [Boolean] :decode_html_entities Decode HTML entities
755
+ # @option opts [String] :line_separator Line separator character
754
756
  # @return [Array<(EmailTextLinesResult, Integer, Hash)>] EmailTextLinesResult data, response status code and response headers
755
757
  def get_email_text_lines_with_http_info(email_id, opts = {})
756
758
  if @api_client.config.debugging
@@ -761,11 +763,12 @@ module MailSlurpClient
761
763
  fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.get_email_text_lines"
762
764
  end
763
765
  # resource path
764
- local_var_path = '/emails/{emailId}/text'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
766
+ local_var_path = '/emails/{emailId}/textLines'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
765
767
 
766
768
  # query parameters
767
769
  query_params = opts[:query_params] || {}
768
770
  query_params[:'decodeHtmlEntities'] = opts[:'decode_html_entities'] if !opts[:'decode_html_entities'].nil?
771
+ query_params[:'lineSeparator'] = opts[:'line_separator'] if !opts[:'line_separator'].nil?
769
772
 
770
773
  # header parameters
771
774
  header_params = opts[:header_params] || {}
@@ -793,7 +796,7 @@ module MailSlurpClient
793
796
  :return_type => return_type
794
797
  )
795
798
 
796
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
799
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
797
800
  if @api_client.config.debugging
798
801
  @api_client.config.logger.debug "API called: EmailControllerApi#get_email_text_lines\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
799
802
  end
@@ -875,6 +878,124 @@ module MailSlurpClient
875
878
  return data, status_code, headers
876
879
  end
877
880
 
881
+ # Get latest email
882
+ # Get the newest email in all inboxes or in a passed set of inbox IDs
883
+ # @param [Hash] opts the optional parameters
884
+ # @option opts [Array<String>] :inbox_ids Optional set of inboxes to filter by. Only get the latest email from these inbox IDs
885
+ # @return [Email]
886
+ def get_latest_email(opts = {})
887
+ data, _status_code, _headers = get_latest_email_with_http_info(opts)
888
+ data
889
+ end
890
+
891
+ # Get latest email
892
+ # Get the newest email in all inboxes or in a passed set of inbox IDs
893
+ # @param [Hash] opts the optional parameters
894
+ # @option opts [Array<String>] :inbox_ids Optional set of inboxes to filter by. Only get the latest email from these inbox IDs
895
+ # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
896
+ def get_latest_email_with_http_info(opts = {})
897
+ if @api_client.config.debugging
898
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_latest_email ...'
899
+ end
900
+ # resource path
901
+ local_var_path = '/emails/latest'
902
+
903
+ # query parameters
904
+ query_params = opts[:query_params] || {}
905
+ query_params[:'inboxIds'] = @api_client.build_collection_param(opts[:'inbox_ids'], :multi) if !opts[:'inbox_ids'].nil?
906
+
907
+ # header parameters
908
+ header_params = opts[:header_params] || {}
909
+ # HTTP header 'Accept' (if needed)
910
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
911
+
912
+ # form parameters
913
+ form_params = opts[:form_params] || {}
914
+
915
+ # http body (model)
916
+ post_body = opts[:body]
917
+
918
+ # return_type
919
+ return_type = opts[:return_type] || 'Email'
920
+
921
+ # auth_names
922
+ auth_names = opts[:auth_names] || ['API_KEY']
923
+
924
+ new_options = opts.merge(
925
+ :header_params => header_params,
926
+ :query_params => query_params,
927
+ :form_params => form_params,
928
+ :body => post_body,
929
+ :auth_names => auth_names,
930
+ :return_type => return_type
931
+ )
932
+
933
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
934
+ if @api_client.config.debugging
935
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_latest_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
936
+ end
937
+ return data, status_code, headers
938
+ end
939
+
940
+ # Get latest email
941
+ # Get the newest email in all inboxes or in a passed set of inbox IDs
942
+ # @param [Hash] opts the optional parameters
943
+ # @option opts [String] :inbox_id ID of the inbox you want to get the latest email from
944
+ # @return [Email]
945
+ def get_latest_email_in_inbox(opts = {})
946
+ data, _status_code, _headers = get_latest_email_in_inbox_with_http_info(opts)
947
+ data
948
+ end
949
+
950
+ # Get latest email
951
+ # Get the newest email in all inboxes or in a passed set of inbox IDs
952
+ # @param [Hash] opts the optional parameters
953
+ # @option opts [String] :inbox_id ID of the inbox you want to get the latest email from
954
+ # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
955
+ def get_latest_email_in_inbox_with_http_info(opts = {})
956
+ if @api_client.config.debugging
957
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.get_latest_email_in_inbox ...'
958
+ end
959
+ # resource path
960
+ local_var_path = '/emails/latestIn'
961
+
962
+ # query parameters
963
+ query_params = opts[:query_params] || {}
964
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
965
+
966
+ # header parameters
967
+ header_params = opts[:header_params] || {}
968
+ # HTTP header 'Accept' (if needed)
969
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
970
+
971
+ # form parameters
972
+ form_params = opts[:form_params] || {}
973
+
974
+ # http body (model)
975
+ post_body = opts[:body]
976
+
977
+ # return_type
978
+ return_type = opts[:return_type] || 'Email'
979
+
980
+ # auth_names
981
+ auth_names = opts[:auth_names] || ['API_KEY']
982
+
983
+ new_options = opts.merge(
984
+ :header_params => header_params,
985
+ :query_params => query_params,
986
+ :form_params => form_params,
987
+ :body => post_body,
988
+ :auth_names => auth_names,
989
+ :return_type => return_type
990
+ )
991
+
992
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
993
+ if @api_client.config.debugging
994
+ @api_client.config.logger.debug "API called: EmailControllerApi#get_latest_email_in_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
995
+ end
996
+ return data, status_code, headers
997
+ end
998
+
878
999
  # Get raw email string
879
1000
  # Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
880
1001
  # @param email_id [String] ID of email
@@ -0,0 +1,271 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module MailSlurpClient
16
+ class ExpiredControllerApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get default expiration settings
23
+ # Return default times used for inbox expiration
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [ExpirationDefaults]
26
+ def get_expiration_defaults(opts = {})
27
+ data, _status_code, _headers = get_expiration_defaults_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Get default expiration settings
32
+ # Return default times used for inbox expiration
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(ExpirationDefaults, Integer, Hash)>] ExpirationDefaults data, response status code and response headers
35
+ def get_expiration_defaults_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: ExpiredControllerApi.get_expiration_defaults ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/expired/defaults'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:body]
55
+
56
+ # return_type
57
+ return_type = opts[:return_type] || 'ExpirationDefaults'
58
+
59
+ # auth_names
60
+ auth_names = opts[:auth_names] || ['API_KEY']
61
+
62
+ new_options = opts.merge(
63
+ :header_params => header_params,
64
+ :query_params => query_params,
65
+ :form_params => form_params,
66
+ :body => post_body,
67
+ :auth_names => auth_names,
68
+ :return_type => return_type
69
+ )
70
+
71
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: ExpiredControllerApi#get_expiration_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+
78
+ # Get expired inbox record for a previously existing inbox
79
+ # 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
80
+ # @param inbox_id [String] ID of inbox you want to retrieve (not the inbox ID)
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [ExpiredInboxDto]
83
+ def get_expired_inbox_by_inbox_id(inbox_id, opts = {})
84
+ data, _status_code, _headers = get_expired_inbox_by_inbox_id_with_http_info(inbox_id, opts)
85
+ data
86
+ end
87
+
88
+ # Get expired inbox record for a previously existing inbox
89
+ # 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
90
+ # @param inbox_id [String] ID of inbox you want to retrieve (not the inbox ID)
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Array<(ExpiredInboxDto, Integer, Hash)>] ExpiredInboxDto data, response status code and response headers
93
+ def get_expired_inbox_by_inbox_id_with_http_info(inbox_id, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug 'Calling API: ExpiredControllerApi.get_expired_inbox_by_inbox_id ...'
96
+ end
97
+ # verify the required parameter 'inbox_id' is set
98
+ if @api_client.config.client_side_validation && inbox_id.nil?
99
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling ExpiredControllerApi.get_expired_inbox_by_inbox_id"
100
+ end
101
+ # resource path
102
+ local_var_path = '/expired/inbox/{inboxId}'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
103
+
104
+ # query parameters
105
+ query_params = opts[:query_params] || {}
106
+
107
+ # header parameters
108
+ header_params = opts[:header_params] || {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
111
+
112
+ # form parameters
113
+ form_params = opts[:form_params] || {}
114
+
115
+ # http body (model)
116
+ post_body = opts[:body]
117
+
118
+ # return_type
119
+ return_type = opts[:return_type] || 'ExpiredInboxDto'
120
+
121
+ # auth_names
122
+ auth_names = opts[:auth_names] || ['API_KEY']
123
+
124
+ new_options = opts.merge(
125
+ :header_params => header_params,
126
+ :query_params => query_params,
127
+ :form_params => form_params,
128
+ :body => post_body,
129
+ :auth_names => auth_names,
130
+ :return_type => return_type
131
+ )
132
+
133
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
134
+ if @api_client.config.debugging
135
+ @api_client.config.logger.debug "API called: ExpiredControllerApi#get_expired_inbox_by_inbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
136
+ end
137
+ return data, status_code, headers
138
+ end
139
+
140
+ # Get an expired inbox record
141
+ # 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
142
+ # @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)
143
+ # @param [Hash] opts the optional parameters
144
+ # @return [ExpiredInboxDto]
145
+ def get_expired_inbox_record(expired_id, opts = {})
146
+ data, _status_code, _headers = get_expired_inbox_record_with_http_info(expired_id, opts)
147
+ data
148
+ end
149
+
150
+ # Get an expired inbox record
151
+ # 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
152
+ # @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)
153
+ # @param [Hash] opts the optional parameters
154
+ # @return [Array<(ExpiredInboxDto, Integer, Hash)>] ExpiredInboxDto data, response status code and response headers
155
+ def get_expired_inbox_record_with_http_info(expired_id, opts = {})
156
+ if @api_client.config.debugging
157
+ @api_client.config.logger.debug 'Calling API: ExpiredControllerApi.get_expired_inbox_record ...'
158
+ end
159
+ # verify the required parameter 'expired_id' is set
160
+ if @api_client.config.client_side_validation && expired_id.nil?
161
+ fail ArgumentError, "Missing the required parameter 'expired_id' when calling ExpiredControllerApi.get_expired_inbox_record"
162
+ end
163
+ # resource path
164
+ local_var_path = '/expired/{expiredId}'.sub('{' + 'expiredId' + '}', CGI.escape(expired_id.to_s))
165
+
166
+ # query parameters
167
+ query_params = opts[:query_params] || {}
168
+
169
+ # header parameters
170
+ header_params = opts[:header_params] || {}
171
+ # HTTP header 'Accept' (if needed)
172
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
173
+
174
+ # form parameters
175
+ form_params = opts[:form_params] || {}
176
+
177
+ # http body (model)
178
+ post_body = opts[:body]
179
+
180
+ # return_type
181
+ return_type = opts[:return_type] || 'ExpiredInboxDto'
182
+
183
+ # auth_names
184
+ auth_names = opts[:auth_names] || ['API_KEY']
185
+
186
+ new_options = opts.merge(
187
+ :header_params => header_params,
188
+ :query_params => query_params,
189
+ :form_params => form_params,
190
+ :body => post_body,
191
+ :auth_names => auth_names,
192
+ :return_type => return_type
193
+ )
194
+
195
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
196
+ if @api_client.config.debugging
197
+ @api_client.config.logger.debug "API called: ExpiredControllerApi#get_expired_inbox_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
+ end
199
+ return data, status_code, headers
200
+ end
201
+
202
+ # List records of expired inboxes
203
+ # 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
204
+ # @param [Hash] opts the optional parameters
205
+ # @option opts [Integer] :page Optional page index in inbox sent email list pagination (default to 0)
206
+ # @option opts [Integer] :size Optional page size in inbox sent email list pagination (default to 20)
207
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
208
+ # @return [PageExpiredInboxRecordProjection]
209
+ def get_expired_inboxes(opts = {})
210
+ data, _status_code, _headers = get_expired_inboxes_with_http_info(opts)
211
+ data
212
+ end
213
+
214
+ # List records of expired inboxes
215
+ # 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
216
+ # @param [Hash] opts the optional parameters
217
+ # @option opts [Integer] :page Optional page index in inbox sent email list pagination
218
+ # @option opts [Integer] :size Optional page size in inbox sent email list pagination
219
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
220
+ # @return [Array<(PageExpiredInboxRecordProjection, Integer, Hash)>] PageExpiredInboxRecordProjection data, response status code and response headers
221
+ def get_expired_inboxes_with_http_info(opts = {})
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug 'Calling API: ExpiredControllerApi.get_expired_inboxes ...'
224
+ end
225
+ allowable_values = ["ASC", "DESC"]
226
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
227
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
228
+ end
229
+ # resource path
230
+ local_var_path = '/expired'
231
+
232
+ # query parameters
233
+ query_params = opts[:query_params] || {}
234
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
235
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
236
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
237
+
238
+ # header parameters
239
+ header_params = opts[:header_params] || {}
240
+ # HTTP header 'Accept' (if needed)
241
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
242
+
243
+ # form parameters
244
+ form_params = opts[:form_params] || {}
245
+
246
+ # http body (model)
247
+ post_body = opts[:body]
248
+
249
+ # return_type
250
+ return_type = opts[:return_type] || 'PageExpiredInboxRecordProjection'
251
+
252
+ # auth_names
253
+ auth_names = opts[:auth_names] || ['API_KEY']
254
+
255
+ new_options = opts.merge(
256
+ :header_params => header_params,
257
+ :query_params => query_params,
258
+ :form_params => form_params,
259
+ :body => post_body,
260
+ :auth_names => auth_names,
261
+ :return_type => return_type
262
+ )
263
+
264
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
265
+ if @api_client.config.debugging
266
+ @api_client.config.logger.debug "API called: ExpiredControllerApi#get_expired_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
267
+ end
268
+ return data, status_code, headers
269
+ end
270
+ end
271
+ end