mailslurp_client 8.2.16 → 8.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -2
  3. data/lib/mailslurp_client.rb +10 -2
  4. data/lib/mailslurp_client/api/alias_controller_api.rb +34 -96
  5. data/lib/mailslurp_client/api/domain_controller_api.rb +7 -5
  6. data/lib/mailslurp_client/api/email_controller_api.rb +72 -2
  7. data/lib/mailslurp_client/api/form_controller_api.rb +4 -7
  8. data/lib/mailslurp_client/api/inbox_controller_api.rb +87 -10
  9. data/lib/mailslurp_client/api/mail_server_controller_api.rb +123 -0
  10. data/lib/mailslurp_client/models/alias_dto.rb +276 -0
  11. data/lib/mailslurp_client/models/alias_projection.rb +276 -0
  12. data/lib/mailslurp_client/models/{create_owned_alias_options.rb → create_alias_options.rb} +13 -13
  13. data/lib/mailslurp_client/models/create_inbox_dto.rb +259 -0
  14. data/lib/mailslurp_client/models/dns_lookup_options.rb +252 -0
  15. data/lib/mailslurp_client/models/dns_lookup_result.rb +288 -0
  16. data/lib/mailslurp_client/models/dns_lookup_results.rb +214 -0
  17. data/lib/mailslurp_client/models/domain_dto.rb +16 -16
  18. data/lib/mailslurp_client/models/email.rb +11 -1
  19. data/lib/mailslurp_client/models/html_validation_result.rb +3 -15
  20. data/lib/mailslurp_client/models/inbox.rb +5 -5
  21. data/lib/mailslurp_client/models/ip_address_result.rb +226 -0
  22. data/lib/mailslurp_client/models/model_alias.rb +36 -22
  23. data/lib/mailslurp_client/models/page_alias.rb +1 -1
  24. data/lib/mailslurp_client/models/reply_to_email_options.rb +313 -0
  25. data/lib/mailslurp_client/models/{create_anonymous_alias_options.rb → update_alias_options.rb} +12 -12
  26. data/lib/mailslurp_client/models/update_inbox_options.rb +2 -2
  27. data/lib/mailslurp_client/version.rb +1 -1
  28. metadata +12 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c260595fb22734fe08c4bc9dde162a503cfdf5453db89b406da327d7ea742b3c
4
- data.tar.gz: 278762360ddbfce4bd7aba024dadbc30c22a9a5cf6f371a34289b42d1cd5c443
3
+ metadata.gz: 4cb78fa34deefcfbacb0fc0869299b8cbbaed2841bd53cd23b249dc073ef2414
4
+ data.tar.gz: b340f56704df070bcf97748a33ddcebb452684e11c745b4b2c289f4e77889d97
5
5
  SHA512:
6
- metadata.gz: 3282107ccdd4d938bc19e7c86d18c1114d3e1e725afbce084329f66730f8c8b9568a6fd9240c0c0b19ea516465478e4265e22f92b6f90488b36d3d3b761e08a7
7
- data.tar.gz: d99dcf7ad1e8fc78bf1894e1dc76c867c63e6b48de715ff6f54d188d357aa6802a810ea840f12f7f0b407261c034301a9c5cb4a96a5bc2f76c7d283aca7ab3a0
6
+ metadata.gz: d4dd7529896f34076a28e421329676eceafe74e95841c66f2765483a4dad82762345e9c534886398a1a0e69232f62688f44a3028ae85fd69386084957252eeff
7
+ data.tar.gz: eb80474a178e52920d3419bc761dce06c585247e36f2a5ad9e8860cd40680015f995b3805c917417cf970f7a0c17e9f18293468eec5ce644772d6946e986c4d3
data/README.md CHANGED
@@ -41,7 +41,7 @@ gem install mailslurp_client
41
41
  Or in your `Gemfile`:
42
42
 
43
43
  ```ruby
44
- gem 'mailslurp_client', '~> 8.2', '>= 8.2.2'
44
+ gem 'mailslurp_client', '~> 8.3', '>= 8.3.0'
45
45
  ```
46
46
 
47
47
  And then run bundler install:
@@ -90,6 +90,35 @@ it 'can create email addresses' do
90
90
  end
91
91
  ```
92
92
 
93
+ #### More options
94
+ The `create_inbox` method has some limitations in the Ruby client. To create inboxes with more options use the alternative
95
+ `create_inbox_with_options` method. (This uses a request body instead of query parameters.)
96
+
97
+ ```ruby
98
+ it 'can an inbox with tags' do
99
+ inbox_controller = MailSlurpClient::InboxControllerApi.new
100
+ # create an inbox with tags
101
+ inbox = inbox_controller.create_inbox_with_options({
102
+ tags: ['t1','t2'],
103
+ description: "test with tags",
104
+ name: "test name"
105
+ })
106
+
107
+ # has tags
108
+ expect(inbox.id).to be_truthy
109
+ expect(inbox.description).to be_truthy
110
+ expect(inbox.name).to be_truthy
111
+ expect(inbox.tags).to include('t1')
112
+ expect(inbox.tags).to include('t2')
113
+
114
+ # can update tags
115
+ inbox_updated = inbox_controller.update_inbox(inbox.id, {
116
+ tags: ['newtag']
117
+ })
118
+ expect(inbox_updated.tags).to eq(['newtag'])
119
+ end
120
+ ```
121
+
93
122
  ### List inboxes
94
123
 
95
124
  Inboxes you create can be listed in a paginated way.
@@ -234,7 +263,7 @@ email = wait_controller.wait_for_latest_email(wait_opts)
234
263
  # find the attachments on the email object
235
264
  expect(email.attachments.size).to be(1)
236
265
 
237
- # download the attachment
266
+ # download the attachment as base64 (easier than byte arrays for ruby client)
238
267
  email_controller = MailSlurpClient::EmailControllerApi.new
239
268
  downloaded_attachment = email_controller.download_attachment_base64(email.attachments[0], email.id)
240
269
 
@@ -17,19 +17,24 @@ require 'mailslurp_client/version'
17
17
  require 'mailslurp_client/configuration'
18
18
 
19
19
  # Models
20
+ require 'mailslurp_client/models/alias_dto'
21
+ require 'mailslurp_client/models/alias_projection'
20
22
  require 'mailslurp_client/models/attachment_meta_data'
21
23
  require 'mailslurp_client/models/basic_auth_options'
22
24
  require 'mailslurp_client/models/bulk_send_email_options'
23
25
  require 'mailslurp_client/models/contact_dto'
24
26
  require 'mailslurp_client/models/contact_projection'
25
27
  require 'mailslurp_client/models/content_match_options'
26
- require 'mailslurp_client/models/create_anonymous_alias_options'
28
+ require 'mailslurp_client/models/create_alias_options'
27
29
  require 'mailslurp_client/models/create_contact_options'
28
30
  require 'mailslurp_client/models/create_domain_options'
29
31
  require 'mailslurp_client/models/create_group_options'
30
- require 'mailslurp_client/models/create_owned_alias_options'
32
+ require 'mailslurp_client/models/create_inbox_dto'
31
33
  require 'mailslurp_client/models/create_template_options'
32
34
  require 'mailslurp_client/models/create_webhook_options'
35
+ require 'mailslurp_client/models/dns_lookup_options'
36
+ require 'mailslurp_client/models/dns_lookup_result'
37
+ require 'mailslurp_client/models/dns_lookup_results'
33
38
  require 'mailslurp_client/models/describe_domain_options'
34
39
  require 'mailslurp_client/models/describe_mail_server_domain_result'
35
40
  require 'mailslurp_client/models/domain_dto'
@@ -46,6 +51,7 @@ require 'mailslurp_client/models/group_contacts_dto'
46
51
  require 'mailslurp_client/models/group_dto'
47
52
  require 'mailslurp_client/models/group_projection'
48
53
  require 'mailslurp_client/models/html_validation_result'
54
+ require 'mailslurp_client/models/ip_address_result'
49
55
  require 'mailslurp_client/models/inbox'
50
56
  require 'mailslurp_client/models/inbox_projection'
51
57
  require 'mailslurp_client/models/match_option'
@@ -63,6 +69,7 @@ require 'mailslurp_client/models/page_template_projection'
63
69
  require 'mailslurp_client/models/page_webhook_projection'
64
70
  require 'mailslurp_client/models/pageable'
65
71
  require 'mailslurp_client/models/raw_email_json'
72
+ require 'mailslurp_client/models/reply_to_email_options'
66
73
  require 'mailslurp_client/models/send_email_options'
67
74
  require 'mailslurp_client/models/sent_email_dto'
68
75
  require 'mailslurp_client/models/sent_email_projection'
@@ -73,6 +80,7 @@ require 'mailslurp_client/models/template_dto'
73
80
  require 'mailslurp_client/models/template_projection'
74
81
  require 'mailslurp_client/models/template_variable'
75
82
  require 'mailslurp_client/models/unread_count'
83
+ require 'mailslurp_client/models/update_alias_options'
76
84
  require 'mailslurp_client/models/update_group_contacts'
77
85
  require 'mailslurp_client/models/update_inbox_options'
78
86
  require 'mailslurp_client/models/upload_attachment_options'
@@ -19,93 +19,31 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Create an email alias
23
- # Create an email alias belonging to a user ID. To create anonymous aliases use the `createAnonymousAlias` method.
24
- # @param create_owned_alias_options [CreateOwnedAliasOptions] createOwnedAliasOptions
25
- # @param [Hash] opts the optional parameters
26
- # @return [nil]
27
- def create_alias(create_owned_alias_options, opts = {})
28
- create_alias_with_http_info(create_owned_alias_options, opts)
29
- nil
30
- end
31
-
32
- # Create an email alias
33
- # Create an email alias belonging to a user ID. To create anonymous aliases use the `createAnonymousAlias` method.
34
- # @param create_owned_alias_options [CreateOwnedAliasOptions] createOwnedAliasOptions
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
- def create_alias_with_http_info(create_owned_alias_options, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: AliasControllerApi.create_alias ...'
40
- end
41
- # verify the required parameter 'create_owned_alias_options' is set
42
- if @api_client.config.client_side_validation && create_owned_alias_options.nil?
43
- fail ArgumentError, "Missing the required parameter 'create_owned_alias_options' when calling AliasControllerApi.create_alias"
44
- end
45
- # resource path
46
- local_var_path = '/aliases'
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
- # HTTP header 'Content-Type'
56
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
-
58
- # form parameters
59
- form_params = opts[:form_params] || {}
60
-
61
- # http body (model)
62
- post_body = opts[:body] || @api_client.object_to_http_body(create_owned_alias_options)
63
-
64
- # return_type
65
- return_type = opts[:return_type]
66
-
67
- # auth_names
68
- auth_names = opts[:auth_names] || ['API_KEY']
69
-
70
- new_options = opts.merge(
71
- :header_params => header_params,
72
- :query_params => query_params,
73
- :form_params => form_params,
74
- :body => post_body,
75
- :auth_names => auth_names,
76
- :return_type => return_type
77
- )
78
-
79
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
- if @api_client.config.debugging
81
- @api_client.config.logger.debug "API called: AliasControllerApi#create_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
- end
83
- return data, status_code, headers
84
- end
85
-
86
- # Create an anonymous email alias
87
- # @param create_anonymous_alias_options [CreateAnonymousAliasOptions] createAnonymousAliasOptions
22
+ # Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.
23
+ # Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
24
+ # @param create_alias_options [CreateAliasOptions] createAliasOptions
88
25
  # @param [Hash] opts the optional parameters
89
26
  # @return [ModelAlias]
90
- def create_anonymous_alias(create_anonymous_alias_options, opts = {})
91
- data, _status_code, _headers = create_anonymous_alias_with_http_info(create_anonymous_alias_options, opts)
27
+ def create_alias(create_alias_options, opts = {})
28
+ data, _status_code, _headers = create_alias_with_http_info(create_alias_options, opts)
92
29
  data
93
30
  end
94
31
 
95
- # Create an anonymous email alias
96
- # @param create_anonymous_alias_options [CreateAnonymousAliasOptions] createAnonymousAliasOptions
32
+ # Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.
33
+ # Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
34
+ # @param create_alias_options [CreateAliasOptions] createAliasOptions
97
35
  # @param [Hash] opts the optional parameters
98
36
  # @return [Array<(ModelAlias, Integer, Hash)>] ModelAlias data, response status code and response headers
99
- def create_anonymous_alias_with_http_info(create_anonymous_alias_options, opts = {})
37
+ def create_alias_with_http_info(create_alias_options, opts = {})
100
38
  if @api_client.config.debugging
101
- @api_client.config.logger.debug 'Calling API: AliasControllerApi.create_anonymous_alias ...'
39
+ @api_client.config.logger.debug 'Calling API: AliasControllerApi.create_alias ...'
102
40
  end
103
- # verify the required parameter 'create_anonymous_alias_options' is set
104
- if @api_client.config.client_side_validation && create_anonymous_alias_options.nil?
105
- fail ArgumentError, "Missing the required parameter 'create_anonymous_alias_options' when calling AliasControllerApi.create_anonymous_alias"
41
+ # verify the required parameter 'create_alias_options' is set
42
+ if @api_client.config.client_side_validation && create_alias_options.nil?
43
+ fail ArgumentError, "Missing the required parameter 'create_alias_options' when calling AliasControllerApi.create_alias"
106
44
  end
107
45
  # resource path
108
- local_var_path = '/aliases/anonymous'
46
+ local_var_path = '/aliases'
109
47
 
110
48
  # query parameters
111
49
  query_params = opts[:query_params] || {}
@@ -121,7 +59,7 @@ module MailSlurpClient
121
59
  form_params = opts[:form_params] || {}
122
60
 
123
61
  # http body (model)
124
- post_body = opts[:body] || @api_client.object_to_http_body(create_anonymous_alias_options)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(create_alias_options)
125
63
 
126
64
  # return_type
127
65
  return_type = opts[:return_type] || 'ModelAlias'
@@ -140,12 +78,12 @@ module MailSlurpClient
140
78
 
141
79
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
142
80
  if @api_client.config.debugging
143
- @api_client.config.logger.debug "API called: AliasControllerApi#create_anonymous_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ @api_client.config.logger.debug "API called: AliasControllerApi#create_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
82
  end
145
83
  return data, status_code, headers
146
84
  end
147
85
 
148
- # Delete an owned alias
86
+ # Delete an email alias
149
87
  # @param alias_id [String] aliasId
150
88
  # @param [Hash] opts the optional parameters
151
89
  # @return [nil]
@@ -154,7 +92,7 @@ module MailSlurpClient
154
92
  nil
155
93
  end
156
94
 
157
- # Delete an owned alias
95
+ # Delete an email alias
158
96
  # @param alias_id [String] aliasId
159
97
  # @param [Hash] opts the optional parameters
160
98
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -207,7 +145,7 @@ module MailSlurpClient
207
145
  # Get an email alias by ID
208
146
  # @param alias_id [String] aliasId
209
147
  # @param [Hash] opts the optional parameters
210
- # @return [ModelAlias]
148
+ # @return [AliasDto]
211
149
  def get_alias(alias_id, opts = {})
212
150
  data, _status_code, _headers = get_alias_with_http_info(alias_id, opts)
213
151
  data
@@ -217,7 +155,7 @@ module MailSlurpClient
217
155
  # Get an email alias by ID
218
156
  # @param alias_id [String] aliasId
219
157
  # @param [Hash] opts the optional parameters
220
- # @return [Array<(ModelAlias, Integer, Hash)>] ModelAlias data, response status code and response headers
158
+ # @return [Array<(AliasDto, Integer, Hash)>] AliasDto data, response status code and response headers
221
159
  def get_alias_with_http_info(alias_id, opts = {})
222
160
  if @api_client.config.debugging
223
161
  @api_client.config.logger.debug 'Calling API: AliasControllerApi.get_alias ...'
@@ -244,7 +182,7 @@ module MailSlurpClient
244
182
  post_body = opts[:body]
245
183
 
246
184
  # return_type
247
- return_type = opts[:return_type] || 'ModelAlias'
185
+ return_type = opts[:return_type] || 'AliasDto'
248
186
 
249
187
  # auth_names
250
188
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -265,7 +203,7 @@ module MailSlurpClient
265
203
  return data, status_code, headers
266
204
  end
267
205
 
268
- # Get all email aliases
206
+ # Get all email aliases you have created
269
207
  # Get all email aliases in paginated form
270
208
  # @param [Hash] opts the optional parameters
271
209
  # @option opts [Integer] :page Optional page index in alias list pagination (default to 0)
@@ -277,7 +215,7 @@ module MailSlurpClient
277
215
  data
278
216
  end
279
217
 
280
- # Get all email aliases
218
+ # Get all email aliases you have created
281
219
  # Get all email aliases in paginated form
282
220
  # @param [Hash] opts the optional parameters
283
221
  # @option opts [Integer] :page Optional page index in alias list pagination
@@ -334,22 +272,22 @@ module MailSlurpClient
334
272
  return data, status_code, headers
335
273
  end
336
274
 
337
- # Update an owned alias
275
+ # Update an email alias
338
276
  # @param alias_id [String] aliasId
339
- # @param create_owned_alias_options [CreateOwnedAliasOptions] createOwnedAliasOptions
277
+ # @param update_alias_options [UpdateAliasOptions] updateAliasOptions
340
278
  # @param [Hash] opts the optional parameters
341
279
  # @return [nil]
342
- def update_alias(alias_id, create_owned_alias_options, opts = {})
343
- update_alias_with_http_info(alias_id, create_owned_alias_options, opts)
280
+ def update_alias(alias_id, update_alias_options, opts = {})
281
+ update_alias_with_http_info(alias_id, update_alias_options, opts)
344
282
  nil
345
283
  end
346
284
 
347
- # Update an owned alias
285
+ # Update an email alias
348
286
  # @param alias_id [String] aliasId
349
- # @param create_owned_alias_options [CreateOwnedAliasOptions] createOwnedAliasOptions
287
+ # @param update_alias_options [UpdateAliasOptions] updateAliasOptions
350
288
  # @param [Hash] opts the optional parameters
351
289
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
352
- def update_alias_with_http_info(alias_id, create_owned_alias_options, opts = {})
290
+ def update_alias_with_http_info(alias_id, update_alias_options, opts = {})
353
291
  if @api_client.config.debugging
354
292
  @api_client.config.logger.debug 'Calling API: AliasControllerApi.update_alias ...'
355
293
  end
@@ -357,9 +295,9 @@ module MailSlurpClient
357
295
  if @api_client.config.client_side_validation && alias_id.nil?
358
296
  fail ArgumentError, "Missing the required parameter 'alias_id' when calling AliasControllerApi.update_alias"
359
297
  end
360
- # verify the required parameter 'create_owned_alias_options' is set
361
- if @api_client.config.client_side_validation && create_owned_alias_options.nil?
362
- fail ArgumentError, "Missing the required parameter 'create_owned_alias_options' when calling AliasControllerApi.update_alias"
298
+ # verify the required parameter 'update_alias_options' is set
299
+ if @api_client.config.client_side_validation && update_alias_options.nil?
300
+ fail ArgumentError, "Missing the required parameter 'update_alias_options' when calling AliasControllerApi.update_alias"
363
301
  end
364
302
  # resource path
365
303
  local_var_path = '/aliases/{aliasId}'.sub('{' + 'aliasId' + '}', CGI.escape(alias_id.to_s))
@@ -378,7 +316,7 @@ module MailSlurpClient
378
316
  form_params = opts[:form_params] || {}
379
317
 
380
318
  # http body (model)
381
- post_body = opts[:body] || @api_client.object_to_http_body(create_owned_alias_options)
319
+ post_body = opts[:body] || @api_client.object_to_http_body(update_alias_options)
382
320
 
383
321
  # return_type
384
322
  return_type = opts[:return_type]
@@ -87,17 +87,17 @@ module MailSlurpClient
87
87
  # Delete a domain. This will disable any existing inboxes that use this domain.
88
88
  # @param id [String] id
89
89
  # @param [Hash] opts the optional parameters
90
- # @return [nil]
90
+ # @return [Array<String>]
91
91
  def delete_domain(id, opts = {})
92
- delete_domain_with_http_info(id, opts)
93
- nil
92
+ data, _status_code, _headers = delete_domain_with_http_info(id, opts)
93
+ data
94
94
  end
95
95
 
96
96
  # Delete a domain
97
97
  # Delete a domain. This will disable any existing inboxes that use this domain.
98
98
  # @param id [String] id
99
99
  # @param [Hash] opts the optional parameters
100
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
100
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
101
101
  def delete_domain_with_http_info(id, opts = {})
102
102
  if @api_client.config.debugging
103
103
  @api_client.config.logger.debug 'Calling API: DomainControllerApi.delete_domain ...'
@@ -114,6 +114,8 @@ module MailSlurpClient
114
114
 
115
115
  # header parameters
116
116
  header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
117
119
 
118
120
  # form parameters
119
121
  form_params = opts[:form_params] || {}
@@ -122,7 +124,7 @@ module MailSlurpClient
122
124
  post_body = opts[:body]
123
125
 
124
126
  # return_type
125
- return_type = opts[:return_type]
127
+ return_type = opts[:return_type] || 'Array<String>'
126
128
 
127
129
  # auth_names
128
130
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -675,7 +675,7 @@ module MailSlurpClient
675
675
  # @param [Hash] opts the optional parameters
676
676
  # @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
677
677
  # @option opts [Integer] :page Optional page index in email list pagination (default to 0)
678
- # @option opts [Integer] :size Optional page size in email list pagination (default to 20)
678
+ # @option opts [Integer] :size Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (default to 20)
679
679
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
680
680
  # @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (default to false)
681
681
  # @return [PageEmailProjection]
@@ -689,7 +689,7 @@ module MailSlurpClient
689
689
  # @param [Hash] opts the optional parameters
690
690
  # @option opts [Array<String>] :inbox_id Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
691
691
  # @option opts [Integer] :page Optional page index in email list pagination
692
- # @option opts [Integer] :size Optional page size in email list pagination
692
+ # @option opts [Integer] :size Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results
693
693
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
694
694
  # @option opts [Boolean] :unread_only Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
695
695
  # @return [Array<(PageEmailProjection, Integer, Hash)>] PageEmailProjection data, response status code and response headers
@@ -925,6 +925,76 @@ module MailSlurpClient
925
925
  return data, status_code, headers
926
926
  end
927
927
 
928
+ # Reply to an email
929
+ # Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
930
+ # @param email_id [String] emailId
931
+ # @param reply_to_email_options [ReplyToEmailOptions] replyToEmailOptions
932
+ # @param [Hash] opts the optional parameters
933
+ # @return [SentEmailDto]
934
+ def reply_to_email(email_id, reply_to_email_options, opts = {})
935
+ data, _status_code, _headers = reply_to_email_with_http_info(email_id, reply_to_email_options, opts)
936
+ data
937
+ end
938
+
939
+ # Reply to an email
940
+ # Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails &#x60;to&#x60;, &#x60;cc&#x60;, and &#x60;bcc&#x60;.
941
+ # @param email_id [String] emailId
942
+ # @param reply_to_email_options [ReplyToEmailOptions] replyToEmailOptions
943
+ # @param [Hash] opts the optional parameters
944
+ # @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers
945
+ def reply_to_email_with_http_info(email_id, reply_to_email_options, opts = {})
946
+ if @api_client.config.debugging
947
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.reply_to_email ...'
948
+ end
949
+ # verify the required parameter 'email_id' is set
950
+ if @api_client.config.client_side_validation && email_id.nil?
951
+ fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.reply_to_email"
952
+ end
953
+ # verify the required parameter 'reply_to_email_options' is set
954
+ if @api_client.config.client_side_validation && reply_to_email_options.nil?
955
+ fail ArgumentError, "Missing the required parameter 'reply_to_email_options' when calling EmailControllerApi.reply_to_email"
956
+ end
957
+ # resource path
958
+ local_var_path = '/emails/{emailId}'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
959
+
960
+ # query parameters
961
+ query_params = opts[:query_params] || {}
962
+
963
+ # header parameters
964
+ header_params = opts[:header_params] || {}
965
+ # HTTP header 'Accept' (if needed)
966
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
967
+ # HTTP header 'Content-Type'
968
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
969
+
970
+ # form parameters
971
+ form_params = opts[:form_params] || {}
972
+
973
+ # http body (model)
974
+ post_body = opts[:body] || @api_client.object_to_http_body(reply_to_email_options)
975
+
976
+ # return_type
977
+ return_type = opts[:return_type] || 'SentEmailDto'
978
+
979
+ # auth_names
980
+ auth_names = opts[:auth_names] || ['API_KEY']
981
+
982
+ new_options = opts.merge(
983
+ :header_params => header_params,
984
+ :query_params => query_params,
985
+ :form_params => form_params,
986
+ :body => post_body,
987
+ :auth_names => auth_names,
988
+ :return_type => return_type
989
+ )
990
+
991
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
992
+ if @api_client.config.debugging
993
+ @api_client.config.logger.debug "API called: EmailControllerApi#reply_to_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
994
+ end
995
+ return data, status_code, headers
996
+ end
997
+
928
998
  # Validate email
929
999
  # Validate the HTML content of email if HTML is found. Considered valid if no HTML.
930
1000
  # @param email_id [String] ID of email