mailslurp_client 12.5.0 → 12.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client.rb +17 -2
  3. data/lib/mailslurp_client/api/contact_controller_api.rb +4 -4
  4. data/lib/mailslurp_client/api/email_controller_api.rb +71 -5
  5. data/lib/mailslurp_client/api/group_controller_api.rb +4 -4
  6. data/lib/mailslurp_client/api/inbox_controller_api.rb +107 -22
  7. data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +548 -0
  8. data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +211 -3
  9. data/lib/mailslurp_client/api/missed_email_controller_api.rb +75 -7
  10. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +150 -4
  11. data/lib/mailslurp_client/api/template_controller_api.rb +4 -4
  12. data/lib/mailslurp_client/api/tracking_controller_api.rb +218 -0
  13. data/lib/mailslurp_client/api/wait_for_controller_api.rb +2 -2
  14. data/lib/mailslurp_client/api/webhook_controller_api.rb +55 -1
  15. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +3 -3
  16. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +275 -0
  17. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +4 -4
  18. data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +215 -0
  19. data/lib/mailslurp_client/models/create_webhook_options.rb +3 -3
  20. data/lib/mailslurp_client/models/domain_preview.rb +66 -4
  21. data/lib/mailslurp_client/models/email.rb +11 -1
  22. data/lib/mailslurp_client/models/email_projection.rb +10 -1
  23. data/lib/mailslurp_client/models/{inbox_ruleset_projection.rb → inbox_forwarder_dto.rb} +55 -78
  24. data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +211 -0
  25. data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +227 -0
  26. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +17 -3
  27. data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +211 -0
  28. data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +223 -0
  29. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +299 -0
  30. data/lib/mailslurp_client/models/{page_inbox_ruleset_projection.rb → page_inbox_ruleset_dto.rb} +4 -4
  31. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +299 -0
  32. data/lib/mailslurp_client/models/send_email_options.rb +11 -1
  33. data/lib/mailslurp_client/models/sent_email_dto.rb +12 -1
  34. data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +225 -0
  35. data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +225 -0
  36. data/lib/mailslurp_client/models/tracking_pixel_dto.rb +303 -0
  37. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +289 -0
  38. data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
  39. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +322 -0
  40. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
  41. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +2 -2
  42. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
  43. data/lib/mailslurp_client/models/webhook_result_entity.rb +2 -2
  44. data/lib/mailslurp_client/version.rb +1 -1
  45. metadata +19 -4
@@ -270,9 +270,10 @@ module MailSlurpClient
270
270
  # @param [Hash] opts the optional parameters
271
271
  # @option opts [String] :inbox_id Optional inbox id to get rulesets from
272
272
  # @option opts [Integer] :page Optional page index in inbox ruleset list pagination (default to 0)
273
+ # @option opts [String] :search_filter Optional search filter
273
274
  # @option opts [Integer] :size Optional page size in inbox ruleset list pagination (default to 20)
274
275
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
275
- # @return [PageInboxRulesetProjection]
276
+ # @return [PageInboxRulesetDto]
276
277
  def get_inbox_rulesets(opts = {})
277
278
  data, _status_code, _headers = get_inbox_rulesets_with_http_info(opts)
278
279
  data
@@ -283,9 +284,10 @@ module MailSlurpClient
283
284
  # @param [Hash] opts the optional parameters
284
285
  # @option opts [String] :inbox_id Optional inbox id to get rulesets from
285
286
  # @option opts [Integer] :page Optional page index in inbox ruleset list pagination
287
+ # @option opts [String] :search_filter Optional search filter
286
288
  # @option opts [Integer] :size Optional page size in inbox ruleset list pagination
287
289
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
288
- # @return [Array<(PageInboxRulesetProjection, Integer, Hash)>] PageInboxRulesetProjection data, response status code and response headers
290
+ # @return [Array<(PageInboxRulesetDto, Integer, Hash)>] PageInboxRulesetDto data, response status code and response headers
289
291
  def get_inbox_rulesets_with_http_info(opts = {})
290
292
  if @api_client.config.debugging
291
293
  @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.get_inbox_rulesets ...'
@@ -301,6 +303,7 @@ module MailSlurpClient
301
303
  query_params = opts[:query_params] || {}
302
304
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
303
305
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
306
+ query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
304
307
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
305
308
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
306
309
 
@@ -316,7 +319,7 @@ module MailSlurpClient
316
319
  post_body = opts[:body]
317
320
 
318
321
  # return_type
319
- return_type = opts[:return_type] || 'PageInboxRulesetProjection'
322
+ return_type = opts[:return_type] || 'PageInboxRulesetDto'
320
323
 
321
324
  # auth_names
322
325
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -336,5 +339,210 @@ module MailSlurpClient
336
339
  end
337
340
  return data, status_code, headers
338
341
  end
342
+
343
+ # Test an inbox ruleset
344
+ # Test an inbox ruleset
345
+ # @param id [String] ID of inbox ruleset
346
+ # @param inbox_ruleset_test_options [InboxRulesetTestOptions] inboxRulesetTestOptions
347
+ # @param [Hash] opts the optional parameters
348
+ # @return [InboxRulesetTestResult]
349
+ def test_inbox_ruleset(id, inbox_ruleset_test_options, opts = {})
350
+ data, _status_code, _headers = test_inbox_ruleset_with_http_info(id, inbox_ruleset_test_options, opts)
351
+ data
352
+ end
353
+
354
+ # Test an inbox ruleset
355
+ # Test an inbox ruleset
356
+ # @param id [String] ID of inbox ruleset
357
+ # @param inbox_ruleset_test_options [InboxRulesetTestOptions] inboxRulesetTestOptions
358
+ # @param [Hash] opts the optional parameters
359
+ # @return [Array<(InboxRulesetTestResult, Integer, Hash)>] InboxRulesetTestResult data, response status code and response headers
360
+ def test_inbox_ruleset_with_http_info(id, inbox_ruleset_test_options, opts = {})
361
+ if @api_client.config.debugging
362
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.test_inbox_ruleset ...'
363
+ end
364
+ # verify the required parameter 'id' is set
365
+ if @api_client.config.client_side_validation && id.nil?
366
+ fail ArgumentError, "Missing the required parameter 'id' when calling InboxRulesetControllerApi.test_inbox_ruleset"
367
+ end
368
+ # verify the required parameter 'inbox_ruleset_test_options' is set
369
+ if @api_client.config.client_side_validation && inbox_ruleset_test_options.nil?
370
+ fail ArgumentError, "Missing the required parameter 'inbox_ruleset_test_options' when calling InboxRulesetControllerApi.test_inbox_ruleset"
371
+ end
372
+ # resource path
373
+ local_var_path = '/rulesets/{id}/test'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
374
+
375
+ # query parameters
376
+ query_params = opts[:query_params] || {}
377
+
378
+ # header parameters
379
+ header_params = opts[:header_params] || {}
380
+ # HTTP header 'Accept' (if needed)
381
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
382
+ # HTTP header 'Content-Type'
383
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
384
+
385
+ # form parameters
386
+ form_params = opts[:form_params] || {}
387
+
388
+ # http body (model)
389
+ post_body = opts[:body] || @api_client.object_to_http_body(inbox_ruleset_test_options)
390
+
391
+ # return_type
392
+ return_type = opts[:return_type] || 'InboxRulesetTestResult'
393
+
394
+ # auth_names
395
+ auth_names = opts[:auth_names] || ['API_KEY']
396
+
397
+ new_options = opts.merge(
398
+ :header_params => header_params,
399
+ :query_params => query_params,
400
+ :form_params => form_params,
401
+ :body => post_body,
402
+ :auth_names => auth_names,
403
+ :return_type => return_type
404
+ )
405
+
406
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
407
+ if @api_client.config.debugging
408
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#test_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
409
+ end
410
+ return data, status_code, headers
411
+ end
412
+
413
+ # Test inbox rulesets for inbox
414
+ # Test inbox rulesets for inbox
415
+ # @param inbox_id [String] ID of inbox
416
+ # @param inbox_ruleset_test_options [InboxRulesetTestOptions] inboxRulesetTestOptions
417
+ # @param [Hash] opts the optional parameters
418
+ # @return [InboxRulesetTestResult]
419
+ def test_inbox_rulesets_for_inbox(inbox_id, inbox_ruleset_test_options, opts = {})
420
+ data, _status_code, _headers = test_inbox_rulesets_for_inbox_with_http_info(inbox_id, inbox_ruleset_test_options, opts)
421
+ data
422
+ end
423
+
424
+ # Test inbox rulesets for inbox
425
+ # Test inbox rulesets for inbox
426
+ # @param inbox_id [String] ID of inbox
427
+ # @param inbox_ruleset_test_options [InboxRulesetTestOptions] inboxRulesetTestOptions
428
+ # @param [Hash] opts the optional parameters
429
+ # @return [Array<(InboxRulesetTestResult, Integer, Hash)>] InboxRulesetTestResult data, response status code and response headers
430
+ def test_inbox_rulesets_for_inbox_with_http_info(inbox_id, inbox_ruleset_test_options, opts = {})
431
+ if @api_client.config.debugging
432
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.test_inbox_rulesets_for_inbox ...'
433
+ end
434
+ # verify the required parameter 'inbox_id' is set
435
+ if @api_client.config.client_side_validation && inbox_id.nil?
436
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxRulesetControllerApi.test_inbox_rulesets_for_inbox"
437
+ end
438
+ # verify the required parameter 'inbox_ruleset_test_options' is set
439
+ if @api_client.config.client_side_validation && inbox_ruleset_test_options.nil?
440
+ fail ArgumentError, "Missing the required parameter 'inbox_ruleset_test_options' when calling InboxRulesetControllerApi.test_inbox_rulesets_for_inbox"
441
+ end
442
+ # resource path
443
+ local_var_path = '/rulesets'
444
+
445
+ # query parameters
446
+ query_params = opts[:query_params] || {}
447
+ query_params[:'inboxId'] = inbox_id
448
+
449
+ # header parameters
450
+ header_params = opts[:header_params] || {}
451
+ # HTTP header 'Accept' (if needed)
452
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
453
+ # HTTP header 'Content-Type'
454
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
455
+
456
+ # form parameters
457
+ form_params = opts[:form_params] || {}
458
+
459
+ # http body (model)
460
+ post_body = opts[:body] || @api_client.object_to_http_body(inbox_ruleset_test_options)
461
+
462
+ # return_type
463
+ return_type = opts[:return_type] || 'InboxRulesetTestResult'
464
+
465
+ # auth_names
466
+ auth_names = opts[:auth_names] || ['API_KEY']
467
+
468
+ new_options = opts.merge(
469
+ :header_params => header_params,
470
+ :query_params => query_params,
471
+ :form_params => form_params,
472
+ :body => post_body,
473
+ :auth_names => auth_names,
474
+ :return_type => return_type
475
+ )
476
+
477
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
478
+ if @api_client.config.debugging
479
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#test_inbox_rulesets_for_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
480
+ end
481
+ return data, status_code, headers
482
+ end
483
+
484
+ # Test new inbox ruleset
485
+ # Test new inbox ruleset
486
+ # @param test_new_inbox_ruleset_options [TestNewInboxRulesetOptions] testNewInboxRulesetOptions
487
+ # @param [Hash] opts the optional parameters
488
+ # @return [InboxRulesetTestResult]
489
+ def test_new_inbox_ruleset(test_new_inbox_ruleset_options, opts = {})
490
+ data, _status_code, _headers = test_new_inbox_ruleset_with_http_info(test_new_inbox_ruleset_options, opts)
491
+ data
492
+ end
493
+
494
+ # Test new inbox ruleset
495
+ # Test new inbox ruleset
496
+ # @param test_new_inbox_ruleset_options [TestNewInboxRulesetOptions] testNewInboxRulesetOptions
497
+ # @param [Hash] opts the optional parameters
498
+ # @return [Array<(InboxRulesetTestResult, Integer, Hash)>] InboxRulesetTestResult data, response status code and response headers
499
+ def test_new_inbox_ruleset_with_http_info(test_new_inbox_ruleset_options, opts = {})
500
+ if @api_client.config.debugging
501
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.test_new_inbox_ruleset ...'
502
+ end
503
+ # verify the required parameter 'test_new_inbox_ruleset_options' is set
504
+ if @api_client.config.client_side_validation && test_new_inbox_ruleset_options.nil?
505
+ fail ArgumentError, "Missing the required parameter 'test_new_inbox_ruleset_options' when calling InboxRulesetControllerApi.test_new_inbox_ruleset"
506
+ end
507
+ # resource path
508
+ local_var_path = '/rulesets'
509
+
510
+ # query parameters
511
+ query_params = opts[:query_params] || {}
512
+
513
+ # header parameters
514
+ header_params = opts[:header_params] || {}
515
+ # HTTP header 'Accept' (if needed)
516
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
517
+ # HTTP header 'Content-Type'
518
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
519
+
520
+ # form parameters
521
+ form_params = opts[:form_params] || {}
522
+
523
+ # http body (model)
524
+ post_body = opts[:body] || @api_client.object_to_http_body(test_new_inbox_ruleset_options)
525
+
526
+ # return_type
527
+ return_type = opts[:return_type] || 'InboxRulesetTestResult'
528
+
529
+ # auth_names
530
+ auth_names = opts[:auth_names] || ['API_KEY']
531
+
532
+ new_options = opts.merge(
533
+ :header_params => header_params,
534
+ :query_params => query_params,
535
+ :form_params => form_params,
536
+ :body => post_body,
537
+ :auth_names => auth_names,
538
+ :return_type => return_type
539
+ )
540
+
541
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
542
+ if @api_client.config.debugging
543
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#test_new_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
544
+ end
545
+ return data, status_code, headers
546
+ end
339
547
  end
340
548
  end
@@ -21,9 +21,10 @@ module MailSlurpClient
21
21
  end
22
22
  # Get all MissedEmails in paginated format
23
23
  # @param [Hash] opts the optional parameters
24
- # @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
24
+ # @option opts [String] :inbox_id Optional inbox ID filter
25
+ # @option opts [Integer] :page Optional page index in list pagination (default to 0)
25
26
  # @option opts [String] :search_filter Optional search filter
26
- # @option opts [Integer] :size Optional page size in inbox list pagination (default to 20)
27
+ # @option opts [Integer] :size Optional page size in list pagination (default to 20)
27
28
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
28
29
  # @return [PageMissedEmailProjection]
29
30
  def get_all_missed_emails(opts = {})
@@ -33,9 +34,10 @@ module MailSlurpClient
33
34
 
34
35
  # Get all MissedEmails in paginated format
35
36
  # @param [Hash] opts the optional parameters
36
- # @option opts [Integer] :page Optional page index in inbox list pagination
37
+ # @option opts [String] :inbox_id Optional inbox ID filter
38
+ # @option opts [Integer] :page Optional page index in list pagination
37
39
  # @option opts [String] :search_filter Optional search filter
38
- # @option opts [Integer] :size Optional page size in inbox list pagination
40
+ # @option opts [Integer] :size Optional page size in list pagination
39
41
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
40
42
  # @return [Array<(PageMissedEmailProjection, Integer, Hash)>] PageMissedEmailProjection data, response status code and response headers
41
43
  def get_all_missed_emails_with_http_info(opts = {})
@@ -51,6 +53,7 @@ module MailSlurpClient
51
53
 
52
54
  # query parameters
53
55
  query_params = opts[:query_params] || {}
56
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
54
57
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
55
58
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
56
59
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
@@ -90,7 +93,7 @@ module MailSlurpClient
90
93
  end
91
94
 
92
95
  # Get MissedEmail
93
- # @param missed_email_id [String] MissedEmailId
96
+ # @param missed_email_id [String] missedEmailId
94
97
  # @param [Hash] opts the optional parameters
95
98
  # @return [MissedEmail]
96
99
  def get_missed_email(missed_email_id, opts = {})
@@ -99,7 +102,7 @@ module MailSlurpClient
99
102
  end
100
103
 
101
104
  # Get MissedEmail
102
- # @param missed_email_id [String] MissedEmailId
105
+ # @param missed_email_id [String] missedEmailId
103
106
  # @param [Hash] opts the optional parameters
104
107
  # @return [Array<(MissedEmail, Integer, Hash)>] MissedEmail data, response status code and response headers
105
108
  def get_missed_email_with_http_info(missed_email_id, opts = {})
@@ -111,7 +114,7 @@ module MailSlurpClient
111
114
  fail ArgumentError, "Missing the required parameter 'missed_email_id' when calling MissedEmailControllerApi.get_missed_email"
112
115
  end
113
116
  # resource path
114
- local_var_path = '/missed-emails/{MissedEmailId}'.sub('{' + 'MissedEmailId' + '}', CGI.escape(missed_email_id.to_s))
117
+ local_var_path = '/missed-emails/{missedEmailId}'.sub('{' + 'missedEmailId' + '}', CGI.escape(missed_email_id.to_s))
115
118
 
116
119
  # query parameters
117
120
  query_params = opts[:query_params] || {}
@@ -148,5 +151,70 @@ module MailSlurpClient
148
151
  end
149
152
  return data, status_code, headers
150
153
  end
154
+
155
+ # Wait for Nth missed email
156
+ # Wait for 0 based index missed email
157
+ # @param [Hash] opts the optional parameters
158
+ # @option opts [String] :inbox_id Optional inbox ID filter
159
+ # @option opts [Integer] :index Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index&#x3D;1
160
+ # @option opts [Integer] :timeout Optional timeout milliseconds
161
+ # @return [MissedEmail]
162
+ def wait_for_nth_missed_email(opts = {})
163
+ data, _status_code, _headers = wait_for_nth_missed_email_with_http_info(opts)
164
+ data
165
+ end
166
+
167
+ # Wait for Nth missed email
168
+ # Wait for 0 based index missed email
169
+ # @param [Hash] opts the optional parameters
170
+ # @option opts [String] :inbox_id Optional inbox ID filter
171
+ # @option opts [Integer] :index Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index&#x3D;1
172
+ # @option opts [Integer] :timeout Optional timeout milliseconds
173
+ # @return [Array<(MissedEmail, Integer, Hash)>] MissedEmail data, response status code and response headers
174
+ def wait_for_nth_missed_email_with_http_info(opts = {})
175
+ if @api_client.config.debugging
176
+ @api_client.config.logger.debug 'Calling API: MissedEmailControllerApi.wait_for_nth_missed_email ...'
177
+ end
178
+ # resource path
179
+ local_var_path = '/missed-emails/waitForNthMissedEmail'
180
+
181
+ # query parameters
182
+ query_params = opts[:query_params] || {}
183
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
184
+ query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
185
+ query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
186
+
187
+ # header parameters
188
+ header_params = opts[:header_params] || {}
189
+ # HTTP header 'Accept' (if needed)
190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
191
+
192
+ # form parameters
193
+ form_params = opts[:form_params] || {}
194
+
195
+ # http body (model)
196
+ post_body = opts[:body]
197
+
198
+ # return_type
199
+ return_type = opts[:return_type] || 'MissedEmail'
200
+
201
+ # auth_names
202
+ auth_names = opts[:auth_names] || ['API_KEY']
203
+
204
+ new_options = opts.merge(
205
+ :header_params => header_params,
206
+ :query_params => query_params,
207
+ :form_params => form_params,
208
+ :body => post_body,
209
+ :auth_names => auth_names,
210
+ :return_type => return_type
211
+ )
212
+
213
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
214
+ if @api_client.config.debugging
215
+ @api_client.config.logger.debug "API called: MissedEmailControllerApi#wait_for_nth_missed_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
216
+ end
217
+ return data, status_code, headers
218
+ end
151
219
  end
152
220
  end
@@ -19,6 +19,76 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Get all sent email tracking pixels in paginated form
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [Integer] :page Optional page index in sent email tracking pixel list pagination (default to 0)
25
+ # @option opts [String] :search_filter Optional search filter
26
+ # @option opts [Integer] :size Optional page size in sent email tracking pixel list pagination (default to 20)
27
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
28
+ # @return [PageTrackingPixelProjection]
29
+ def get_all_sent_tracking_pixels(opts = {})
30
+ data, _status_code, _headers = get_all_sent_tracking_pixels_with_http_info(opts)
31
+ data
32
+ end
33
+
34
+ # Get all sent email tracking pixels in paginated form
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [Integer] :page Optional page index in sent email tracking pixel list pagination
37
+ # @option opts [String] :search_filter Optional search filter
38
+ # @option opts [Integer] :size Optional page size in sent email tracking pixel list pagination
39
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
40
+ # @return [Array<(PageTrackingPixelProjection, Integer, Hash)>] PageTrackingPixelProjection data, response status code and response headers
41
+ def get_all_sent_tracking_pixels_with_http_info(opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: SentEmailsControllerApi.get_all_sent_tracking_pixels ...'
44
+ end
45
+ allowable_values = ["ASC", "DESC"]
46
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
47
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
48
+ end
49
+ # resource path
50
+ local_var_path = '/sent/tracking-pixels'
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
55
+ query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
56
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
57
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
58
+
59
+ # header parameters
60
+ header_params = opts[:header_params] || {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:body]
69
+
70
+ # return_type
71
+ return_type = opts[:return_type] || 'PageTrackingPixelProjection'
72
+
73
+ # auth_names
74
+ auth_names = opts[:auth_names] || ['API_KEY']
75
+
76
+ new_options = opts.merge(
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: SentEmailsControllerApi#get_all_sent_tracking_pixels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
22
92
  # Get sent email receipt
23
93
  # @param id [String] id
24
94
  # @param [Hash] opts the optional parameters
@@ -79,6 +149,82 @@ module MailSlurpClient
79
149
  return data, status_code, headers
80
150
  end
81
151
 
152
+ # Get all tracking pixels for a sent email in paginated form
153
+ # @param id [String] id
154
+ # @param [Hash] opts the optional parameters
155
+ # @option opts [Integer] :page Optional page index in sent email tracking pixel list pagination (default to 0)
156
+ # @option opts [String] :search_filter Optional search filter
157
+ # @option opts [Integer] :size Optional page size in sent email tracking pixel list pagination (default to 20)
158
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
159
+ # @return [PageTrackingPixelProjection]
160
+ def get_sent_email_tracking_pixels(id, opts = {})
161
+ data, _status_code, _headers = get_sent_email_tracking_pixels_with_http_info(id, opts)
162
+ data
163
+ end
164
+
165
+ # Get all tracking pixels for a sent email in paginated form
166
+ # @param id [String] id
167
+ # @param [Hash] opts the optional parameters
168
+ # @option opts [Integer] :page Optional page index in sent email tracking pixel list pagination
169
+ # @option opts [String] :search_filter Optional search filter
170
+ # @option opts [Integer] :size Optional page size in sent email tracking pixel list pagination
171
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
172
+ # @return [Array<(PageTrackingPixelProjection, Integer, Hash)>] PageTrackingPixelProjection data, response status code and response headers
173
+ def get_sent_email_tracking_pixels_with_http_info(id, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: SentEmailsControllerApi.get_sent_email_tracking_pixels ...'
176
+ end
177
+ # verify the required parameter 'id' is set
178
+ if @api_client.config.client_side_validation && id.nil?
179
+ fail ArgumentError, "Missing the required parameter 'id' when calling SentEmailsControllerApi.get_sent_email_tracking_pixels"
180
+ end
181
+ allowable_values = ["ASC", "DESC"]
182
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
183
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
184
+ end
185
+ # resource path
186
+ local_var_path = '/sent/{id}/tracking-pixels'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
187
+
188
+ # query parameters
189
+ query_params = opts[:query_params] || {}
190
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
191
+ query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
192
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
193
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
194
+
195
+ # header parameters
196
+ header_params = opts[:header_params] || {}
197
+ # HTTP header 'Accept' (if needed)
198
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
199
+
200
+ # form parameters
201
+ form_params = opts[:form_params] || {}
202
+
203
+ # http body (model)
204
+ post_body = opts[:body]
205
+
206
+ # return_type
207
+ return_type = opts[:return_type] || 'PageTrackingPixelProjection'
208
+
209
+ # auth_names
210
+ auth_names = opts[:auth_names] || ['API_KEY']
211
+
212
+ new_options = opts.merge(
213
+ :header_params => header_params,
214
+ :query_params => query_params,
215
+ :form_params => form_params,
216
+ :body => post_body,
217
+ :auth_names => auth_names,
218
+ :return_type => return_type
219
+ )
220
+
221
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug "API called: SentEmailsControllerApi#get_sent_email_tracking_pixels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
224
+ end
225
+ return data, status_code, headers
226
+ end
227
+
82
228
  # Get all sent emails in paginated form
83
229
  # @param [Hash] opts the optional parameters
84
230
  # @option opts [String] :inbox_id Optional inboxId to filter sender of sent emails by
@@ -155,9 +301,9 @@ module MailSlurpClient
155
301
  # Get all sent organization emails in paginated form
156
302
  # @param [Hash] opts the optional parameters
157
303
  # @option opts [String] :inbox_id Optional inboxId to filter sender of sent emails by
158
- # @option opts [Integer] :page Optional page index in inbox sent email list pagination (default to 0)
304
+ # @option opts [Integer] :page Optional page index in sent email list pagination (default to 0)
159
305
  # @option opts [String] :search_filter Optional search filter
160
- # @option opts [Integer] :size Optional page size in inbox sent email list pagination (default to 20)
306
+ # @option opts [Integer] :size Optional page size in sent email list pagination (default to 20)
161
307
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
162
308
  # @return [PageSentEmailProjection]
163
309
  def get_sent_organization_emails(opts = {})
@@ -168,9 +314,9 @@ module MailSlurpClient
168
314
  # Get all sent organization emails in paginated form
169
315
  # @param [Hash] opts the optional parameters
170
316
  # @option opts [String] :inbox_id Optional inboxId to filter sender of sent emails by
171
- # @option opts [Integer] :page Optional page index in inbox sent email list pagination
317
+ # @option opts [Integer] :page Optional page index in sent email list pagination
172
318
  # @option opts [String] :search_filter Optional search filter
173
- # @option opts [Integer] :size Optional page size in inbox sent email list pagination
319
+ # @option opts [Integer] :size Optional page size in sent email list pagination
174
320
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
175
321
  # @return [Array<(PageSentEmailProjection, Integer, Hash)>] PageSentEmailProjection data, response status code and response headers
176
322
  def get_sent_organization_emails_with_http_info(opts = {})