mailslurp_client 12.4.6 → 12.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client.rb +13 -0
  3. data/lib/mailslurp_client/api/contact_controller_api.rb +4 -4
  4. data/lib/mailslurp_client/api/email_controller_api.rb +64 -0
  5. data/lib/mailslurp_client/api/group_controller_api.rb +4 -4
  6. data/lib/mailslurp_client/api/inbox_controller_api.rb +234 -8
  7. data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +548 -0
  8. data/lib/mailslurp_client/api/missed_email_controller_api.rb +81 -7
  9. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +150 -4
  10. data/lib/mailslurp_client/api/template_controller_api.rb +4 -4
  11. data/lib/mailslurp_client/api/tracking_controller_api.rb +218 -0
  12. data/lib/mailslurp_client/api/wait_for_controller_api.rb +2 -2
  13. data/lib/mailslurp_client/api/webhook_controller_api.rb +55 -1
  14. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +3 -3
  15. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +274 -0
  16. data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +215 -0
  17. data/lib/mailslurp_client/models/create_webhook_options.rb +3 -3
  18. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +353 -0
  19. data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +211 -0
  20. data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +223 -0
  21. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +299 -0
  22. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +299 -0
  23. data/lib/mailslurp_client/models/send_email_options.rb +11 -1
  24. data/lib/mailslurp_client/models/sent_email_dto.rb +12 -1
  25. data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +225 -0
  26. data/lib/mailslurp_client/models/tracking_pixel_dto.rb +303 -0
  27. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +289 -0
  28. data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
  29. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +322 -0
  30. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
  31. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +2 -2
  32. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
  33. data/lib/mailslurp_client/models/webhook_result_entity.rb +2 -2
  34. data/lib/mailslurp_client/version.rb +1 -1
  35. metadata +15 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4735e40354e684b690aadd1e1d03ff3eace4542c4bcd01e4b56c3db395ad9de9
4
- data.tar.gz: 5c15ff1a72086085e22a37919c67f962e593e73c6d75a2dc585f7a5b33d7c21c
3
+ metadata.gz: 2ddb6d7997eafd08191d6d69bf3a74dab0213c73391f70e844ccba68390c3d10
4
+ data.tar.gz: a22e111da54971b22b7d8523553331c81cf0c70d53d06013703965c5e5c2e42a
5
5
  SHA512:
6
- metadata.gz: 84c813c17abfc010f9c683be41082ed154bf39126b0c78a4d649b278ff393eeed5953698cee6ad5357dfaf757d9af34beb1f22d6e9438efb1c1df2e7ac5f4d5c
7
- data.tar.gz: 0e04546132ca3fb29505a5f9cc92ca49f4f9d1d61d8a1ac11dabb2bc3dbdfcf16c5b7542f40ff99e02a1ad300f030707d95e53d1645d2ed2195719e5884c1bf6
6
+ metadata.gz: 24a5291dc9eef3efbdbd802553e4bbbc7de663d73fbabee02d952e19ec3e97c21a9ab41e8c59cd4cd966112524349ba1334b4cf8c6d2c00716f4611edcb18a73
7
+ data.tar.gz: ea391088c7c1bd7658c8c616cc3af1e29bdf09177b8ece9847f8617c89d30661f39220b434932d6d8314e93d98e6c4a6441e99fb23e96826115a477b1b68777d
@@ -33,7 +33,9 @@ require 'mailslurp_client/models/create_contact_options'
33
33
  require 'mailslurp_client/models/create_domain_options'
34
34
  require 'mailslurp_client/models/create_group_options'
35
35
  require 'mailslurp_client/models/create_inbox_dto'
36
+ require 'mailslurp_client/models/create_inbox_ruleset_options'
36
37
  require 'mailslurp_client/models/create_template_options'
38
+ require 'mailslurp_client/models/create_tracking_pixel_options'
37
39
  require 'mailslurp_client/models/create_webhook_options'
38
40
  require 'mailslurp_client/models/dns_lookup_options'
39
41
  require 'mailslurp_client/models/dns_lookup_result'
@@ -64,6 +66,9 @@ require 'mailslurp_client/models/html_validation_result'
64
66
  require 'mailslurp_client/models/ip_address_result'
65
67
  require 'mailslurp_client/models/inbox'
66
68
  require 'mailslurp_client/models/inbox_projection'
69
+ require 'mailslurp_client/models/inbox_ruleset_dto'
70
+ require 'mailslurp_client/models/inbox_ruleset_test_options'
71
+ require 'mailslurp_client/models/inbox_ruleset_test_result'
67
72
  require 'mailslurp_client/models/match_option'
68
73
  require 'mailslurp_client/models/match_options'
69
74
  require 'mailslurp_client/models/missed_email'
@@ -79,11 +84,13 @@ require 'mailslurp_client/models/page_email_projection'
79
84
  require 'mailslurp_client/models/page_expired_inbox_record_projection'
80
85
  require 'mailslurp_client/models/page_group_projection'
81
86
  require 'mailslurp_client/models/page_inbox_projection'
87
+ require 'mailslurp_client/models/page_inbox_ruleset_dto'
82
88
  require 'mailslurp_client/models/page_missed_email_projection'
83
89
  require 'mailslurp_client/models/page_organization_inbox_projection'
84
90
  require 'mailslurp_client/models/page_sent_email_projection'
85
91
  require 'mailslurp_client/models/page_template_projection'
86
92
  require 'mailslurp_client/models/page_thread_projection'
93
+ require 'mailslurp_client/models/page_tracking_pixel_projection'
87
94
  require 'mailslurp_client/models/page_webhook_projection'
88
95
  require 'mailslurp_client/models/page_webhook_result'
89
96
  require 'mailslurp_client/models/pageable'
@@ -99,7 +106,10 @@ require 'mailslurp_client/models/sort'
99
106
  require 'mailslurp_client/models/template_dto'
100
107
  require 'mailslurp_client/models/template_projection'
101
108
  require 'mailslurp_client/models/template_variable'
109
+ require 'mailslurp_client/models/test_new_inbox_ruleset_options'
102
110
  require 'mailslurp_client/models/thread_projection'
111
+ require 'mailslurp_client/models/tracking_pixel_dto'
112
+ require 'mailslurp_client/models/tracking_pixel_projection'
103
113
  require 'mailslurp_client/models/unread_count'
104
114
  require 'mailslurp_client/models/update_alias_options'
105
115
  require 'mailslurp_client/models/update_domain_options'
@@ -111,6 +121,7 @@ require 'mailslurp_client/models/validation_message'
111
121
  require 'mailslurp_client/models/verify_email_address_options'
112
122
  require 'mailslurp_client/models/wait_for_conditions'
113
123
  require 'mailslurp_client/models/webhook_dto'
124
+ require 'mailslurp_client/models/webhook_email_opened_payload'
114
125
  require 'mailslurp_client/models/webhook_new_attachment_payload'
115
126
  require 'mailslurp_client/models/webhook_new_contact_payload'
116
127
  require 'mailslurp_client/models/webhook_new_email_payload'
@@ -133,10 +144,12 @@ require 'mailslurp_client/api/export_controller_api'
133
144
  require 'mailslurp_client/api/form_controller_api'
134
145
  require 'mailslurp_client/api/group_controller_api'
135
146
  require 'mailslurp_client/api/inbox_controller_api'
147
+ require 'mailslurp_client/api/inbox_ruleset_controller_api'
136
148
  require 'mailslurp_client/api/mail_server_controller_api'
137
149
  require 'mailslurp_client/api/missed_email_controller_api'
138
150
  require 'mailslurp_client/api/sent_emails_controller_api'
139
151
  require 'mailslurp_client/api/template_controller_api'
152
+ require 'mailslurp_client/api/tracking_controller_api'
140
153
  require 'mailslurp_client/api/wait_for_controller_api'
141
154
  require 'mailslurp_client/api/webhook_controller_api'
142
155
 
@@ -141,8 +141,8 @@ module MailSlurpClient
141
141
 
142
142
  # Get all contacts
143
143
  # @param [Hash] opts the optional parameters
144
- # @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
145
- # @option opts [Integer] :size Optional page size in inbox list pagination (default to 20)
144
+ # @option opts [Integer] :page Optional page index in list pagination (default to 0)
145
+ # @option opts [Integer] :size Optional page size in list pagination (default to 20)
146
146
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
147
147
  # @return [PageContactProjection]
148
148
  def get_all_contacts(opts = {})
@@ -152,8 +152,8 @@ module MailSlurpClient
152
152
 
153
153
  # Get all contacts
154
154
  # @param [Hash] opts the optional parameters
155
- # @option opts [Integer] :page Optional page index in inbox list pagination
156
- # @option opts [Integer] :size Optional page size in inbox list pagination
155
+ # @option opts [Integer] :page Optional page index in list pagination
156
+ # @option opts [Integer] :size Optional page size in list pagination
157
157
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
158
158
  # @return [Array<(PageContactProjection, Integer, Hash)>] PageContactProjection data, response status code and response headers
159
159
  def get_all_contacts_with_http_info(opts = {})
@@ -1451,6 +1451,70 @@ module MailSlurpClient
1451
1451
  return data, status_code, headers
1452
1452
  end
1453
1453
 
1454
+ # Send email
1455
+ # Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
1456
+ # @param [Hash] opts the optional parameters
1457
+ # @option opts [String] :inbox_id ID of the inbox you want to send the email from
1458
+ # @option opts [Boolean] :use_domain_pool Use domain pool. Optionally create inbox to send from using the mailslurp domain pool.
1459
+ # @option opts [SendEmailOptions] :send_email_options Options for the email
1460
+ # @return [nil]
1461
+ def send_email_source_optional(opts = {})
1462
+ send_email_source_optional_with_http_info(opts)
1463
+ nil
1464
+ end
1465
+
1466
+ # Send email
1467
+ # Alias for &#x60;InboxController.sendEmail&#x60; method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
1468
+ # @param [Hash] opts the optional parameters
1469
+ # @option opts [String] :inbox_id ID of the inbox you want to send the email from
1470
+ # @option opts [Boolean] :use_domain_pool Use domain pool. Optionally create inbox to send from using the mailslurp domain pool.
1471
+ # @option opts [SendEmailOptions] :send_email_options Options for the email
1472
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1473
+ def send_email_source_optional_with_http_info(opts = {})
1474
+ if @api_client.config.debugging
1475
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.send_email_source_optional ...'
1476
+ end
1477
+ # resource path
1478
+ local_var_path = '/emails'
1479
+
1480
+ # query parameters
1481
+ query_params = opts[:query_params] || {}
1482
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
1483
+ query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
1484
+
1485
+ # header parameters
1486
+ header_params = opts[:header_params] || {}
1487
+ # HTTP header 'Content-Type'
1488
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1489
+
1490
+ # form parameters
1491
+ form_params = opts[:form_params] || {}
1492
+
1493
+ # http body (model)
1494
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'send_email_options'])
1495
+
1496
+ # return_type
1497
+ return_type = opts[:return_type]
1498
+
1499
+ # auth_names
1500
+ auth_names = opts[:auth_names] || ['API_KEY']
1501
+
1502
+ new_options = opts.merge(
1503
+ :header_params => header_params,
1504
+ :query_params => query_params,
1505
+ :form_params => form_params,
1506
+ :body => post_body,
1507
+ :auth_names => auth_names,
1508
+ :return_type => return_type
1509
+ )
1510
+
1511
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1512
+ if @api_client.config.debugging
1513
+ @api_client.config.logger.debug "API called: EmailControllerApi#send_email_source_optional\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1514
+ end
1515
+ return data, status_code, headers
1516
+ end
1517
+
1454
1518
  # Validate email HTML contents
1455
1519
  # Validate the HTML content of email if HTML is found. Considered valid if no HTML is present.
1456
1520
  # @param email_id [String] ID of email
@@ -209,8 +209,8 @@ module MailSlurpClient
209
209
 
210
210
  # Get all Contact Groups in paginated format
211
211
  # @param [Hash] opts the optional parameters
212
- # @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
213
- # @option opts [Integer] :size Optional page size in inbox list pagination (default to 20)
212
+ # @option opts [Integer] :page Optional page index in list pagination (default to 0)
213
+ # @option opts [Integer] :size Optional page size in list pagination (default to 20)
214
214
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
215
215
  # @return [PageGroupProjection]
216
216
  def get_all_groups(opts = {})
@@ -220,8 +220,8 @@ module MailSlurpClient
220
220
 
221
221
  # Get all Contact Groups in paginated format
222
222
  # @param [Hash] opts the optional parameters
223
- # @option opts [Integer] :page Optional page index in inbox list pagination
224
- # @option opts [Integer] :size Optional page size in inbox list pagination
223
+ # @option opts [Integer] :page Optional page index in list pagination
224
+ # @option opts [Integer] :size Optional page size in list pagination
225
225
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
226
226
  # @return [Array<(PageGroupProjection, Integer, Hash)>] PageGroupProjection data, response status code and response headers
227
227
  def get_all_groups_with_http_info(opts = {})
@@ -109,6 +109,76 @@ module MailSlurpClient
109
109
  return data, status_code, headers
110
110
  end
111
111
 
112
+ # Create an inbox ruleset
113
+ # Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
114
+ # @param inbox_id [String] inboxId
115
+ # @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
116
+ # @param [Hash] opts the optional parameters
117
+ # @return [InboxRulesetDto]
118
+ def create_inbox_ruleset(inbox_id, create_inbox_ruleset_options, opts = {})
119
+ data, _status_code, _headers = create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, opts)
120
+ data
121
+ end
122
+
123
+ # Create an inbox ruleset
124
+ # Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
125
+ # @param inbox_id [String] inboxId
126
+ # @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
127
+ # @param [Hash] opts the optional parameters
128
+ # @return [Array<(InboxRulesetDto, Integer, Hash)>] InboxRulesetDto data, response status code and response headers
129
+ def create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, opts = {})
130
+ if @api_client.config.debugging
131
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.create_inbox_ruleset ...'
132
+ end
133
+ # verify the required parameter 'inbox_id' is set
134
+ if @api_client.config.client_side_validation && inbox_id.nil?
135
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.create_inbox_ruleset"
136
+ end
137
+ # verify the required parameter 'create_inbox_ruleset_options' is set
138
+ if @api_client.config.client_side_validation && create_inbox_ruleset_options.nil?
139
+ fail ArgumentError, "Missing the required parameter 'create_inbox_ruleset_options' when calling InboxControllerApi.create_inbox_ruleset"
140
+ end
141
+ # resource path
142
+ local_var_path = '/inboxes/{inboxId}/rulesets'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
143
+
144
+ # query parameters
145
+ query_params = opts[:query_params] || {}
146
+
147
+ # header parameters
148
+ header_params = opts[:header_params] || {}
149
+ # HTTP header 'Accept' (if needed)
150
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
151
+ # HTTP header 'Content-Type'
152
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
153
+
154
+ # form parameters
155
+ form_params = opts[:form_params] || {}
156
+
157
+ # http body (model)
158
+ post_body = opts[:body] || @api_client.object_to_http_body(create_inbox_ruleset_options)
159
+
160
+ # return_type
161
+ return_type = opts[:return_type] || 'InboxRulesetDto'
162
+
163
+ # auth_names
164
+ auth_names = opts[:auth_names] || ['API_KEY']
165
+
166
+ new_options = opts.merge(
167
+ :header_params => header_params,
168
+ :query_params => query_params,
169
+ :form_params => form_params,
170
+ :body => post_body,
171
+ :auth_names => auth_names,
172
+ :return_type => return_type
173
+ )
174
+
175
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug "API called: InboxControllerApi#create_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
+ end
179
+ return data, status_code, headers
180
+ end
181
+
112
182
  # Create an inbox with default options. Uses MailSlurp domain pool address and is private.
113
183
  # @param [Hash] opts the optional parameters
114
184
  # @return [Inbox]
@@ -345,9 +415,9 @@ module MailSlurpClient
345
415
  # List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. Results do not include team access inboxes by default. Use organization method to list team inboxes or set `teamAccess` to true.
346
416
  # @param [Hash] opts the optional parameters
347
417
  # @option opts [Boolean] :favourite Optionally filter results for favourites only (default to false)
348
- # @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
418
+ # @option opts [Integer] :page Optional page index in list pagination (default to 0)
349
419
  # @option opts [String] :search Optionally filter by search words partial matching ID, tags, name, and email address
350
- # @option opts [Integer] :size Optional page size in inbox list pagination (default to 20)
420
+ # @option opts [Integer] :size Optional page size in list pagination (default to 20)
351
421
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
352
422
  # @option opts [String] :tag Optionally filter by tags. Will return inboxes that include given tags
353
423
  # @option opts [Boolean] :team_access Optionally filter by team access. Defaults to false so organization inboxes are not included (default to false)
@@ -361,9 +431,9 @@ module MailSlurpClient
361
431
  # List inboxes in paginated form. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative &#x60;getInboxes&#x60; method returns a full list of inboxes but is limited to 100 results. Results do not include team access inboxes by default. Use organization method to list team inboxes or set &#x60;teamAccess&#x60; to true.
362
432
  # @param [Hash] opts the optional parameters
363
433
  # @option opts [Boolean] :favourite Optionally filter results for favourites only
364
- # @option opts [Integer] :page Optional page index in inbox list pagination
434
+ # @option opts [Integer] :page Optional page index in list pagination
365
435
  # @option opts [String] :search Optionally filter by search words partial matching ID, tags, name, and email address
366
- # @option opts [Integer] :size Optional page size in inbox list pagination
436
+ # @option opts [Integer] :size Optional page size in list pagination
367
437
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
368
438
  # @option opts [String] :tag Optionally filter by tags. Will return inboxes that include given tags
369
439
  # @option opts [Boolean] :team_access Optionally filter by team access. Defaults to false so organization inboxes are not included
@@ -846,9 +916,9 @@ module MailSlurpClient
846
916
  # List Organization Inboxes Paginated
847
917
  # List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time).
848
918
  # @param [Hash] opts the optional parameters
849
- # @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
919
+ # @option opts [Integer] :page Optional page index in list pagination (default to 0)
850
920
  # @option opts [String] :search_filter Optional search filter
851
- # @option opts [Integer] :size Optional page size in inbox list pagination (default to 20)
921
+ # @option opts [Integer] :size Optional page size in list pagination (default to 20)
852
922
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
853
923
  # @return [PageOrganizationInboxProjection]
854
924
  def get_organization_inboxes(opts = {})
@@ -859,9 +929,9 @@ module MailSlurpClient
859
929
  # List Organization Inboxes Paginated
860
930
  # List organization inboxes in paginated form. These are inboxes created with &#x60;allowTeamAccess&#x60; flag enabled. Organization inboxes are &#x60;readOnly&#x60; for non-admin users. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time).
861
931
  # @param [Hash] opts the optional parameters
862
- # @option opts [Integer] :page Optional page index in inbox list pagination
932
+ # @option opts [Integer] :page Optional page index in list pagination
863
933
  # @option opts [String] :search_filter Optional search filter
864
- # @option opts [Integer] :size Optional page size in inbox list pagination
934
+ # @option opts [Integer] :size Optional page size in list pagination
865
935
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
866
936
  # @return [Array<(PageOrganizationInboxProjection, Integer, Hash)>] PageOrganizationInboxProjection data, response status code and response headers
867
937
  def get_organization_inboxes_with_http_info(opts = {})
@@ -915,6 +985,162 @@ module MailSlurpClient
915
985
  return data, status_code, headers
916
986
  end
917
987
 
988
+ # List inbox rulesets
989
+ # List all rulesets attached to an inbox
990
+ # @param inbox_id [String] inboxId
991
+ # @param [Hash] opts the optional parameters
992
+ # @option opts [Integer] :page Optional page index in inbox ruleset list pagination (default to 0)
993
+ # @option opts [String] :search_filter Optional search filter
994
+ # @option opts [Integer] :size Optional page size in inbox ruleset list pagination (default to 20)
995
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
996
+ # @return [PageInboxRulesetDto]
997
+ def list_inbox_rulesets(inbox_id, opts = {})
998
+ data, _status_code, _headers = list_inbox_rulesets_with_http_info(inbox_id, opts)
999
+ data
1000
+ end
1001
+
1002
+ # List inbox rulesets
1003
+ # List all rulesets attached to an inbox
1004
+ # @param inbox_id [String] inboxId
1005
+ # @param [Hash] opts the optional parameters
1006
+ # @option opts [Integer] :page Optional page index in inbox ruleset list pagination
1007
+ # @option opts [String] :search_filter Optional search filter
1008
+ # @option opts [Integer] :size Optional page size in inbox ruleset list pagination
1009
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
1010
+ # @return [Array<(PageInboxRulesetDto, Integer, Hash)>] PageInboxRulesetDto data, response status code and response headers
1011
+ def list_inbox_rulesets_with_http_info(inbox_id, opts = {})
1012
+ if @api_client.config.debugging
1013
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.list_inbox_rulesets ...'
1014
+ end
1015
+ # verify the required parameter 'inbox_id' is set
1016
+ if @api_client.config.client_side_validation && inbox_id.nil?
1017
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.list_inbox_rulesets"
1018
+ end
1019
+ allowable_values = ["ASC", "DESC"]
1020
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1021
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1022
+ end
1023
+ # resource path
1024
+ local_var_path = '/inboxes/{inboxId}/rulesets'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
1025
+
1026
+ # query parameters
1027
+ query_params = opts[:query_params] || {}
1028
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1029
+ query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
1030
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1031
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1032
+
1033
+ # header parameters
1034
+ header_params = opts[:header_params] || {}
1035
+ # HTTP header 'Accept' (if needed)
1036
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1037
+
1038
+ # form parameters
1039
+ form_params = opts[:form_params] || {}
1040
+
1041
+ # http body (model)
1042
+ post_body = opts[:body]
1043
+
1044
+ # return_type
1045
+ return_type = opts[:return_type] || 'PageInboxRulesetDto'
1046
+
1047
+ # auth_names
1048
+ auth_names = opts[:auth_names] || ['API_KEY']
1049
+
1050
+ new_options = opts.merge(
1051
+ :header_params => header_params,
1052
+ :query_params => query_params,
1053
+ :form_params => form_params,
1054
+ :body => post_body,
1055
+ :auth_names => auth_names,
1056
+ :return_type => return_type
1057
+ )
1058
+
1059
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1060
+ if @api_client.config.debugging
1061
+ @api_client.config.logger.debug "API called: InboxControllerApi#list_inbox_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1062
+ end
1063
+ return data, status_code, headers
1064
+ end
1065
+
1066
+ # List inbox tracking pixels
1067
+ # List all tracking pixels sent from an inbox
1068
+ # @param inbox_id [String] inboxId
1069
+ # @param [Hash] opts the optional parameters
1070
+ # @option opts [Integer] :page Optional page index in inbox tracking pixel list pagination (default to 0)
1071
+ # @option opts [String] :search_filter Optional search filter
1072
+ # @option opts [Integer] :size Optional page size in inbox tracking pixel list pagination (default to 20)
1073
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
1074
+ # @return [PageTrackingPixelProjection]
1075
+ def list_inbox_tracking_pixels(inbox_id, opts = {})
1076
+ data, _status_code, _headers = list_inbox_tracking_pixels_with_http_info(inbox_id, opts)
1077
+ data
1078
+ end
1079
+
1080
+ # List inbox tracking pixels
1081
+ # List all tracking pixels sent from an inbox
1082
+ # @param inbox_id [String] inboxId
1083
+ # @param [Hash] opts the optional parameters
1084
+ # @option opts [Integer] :page Optional page index in inbox tracking pixel list pagination
1085
+ # @option opts [String] :search_filter Optional search filter
1086
+ # @option opts [Integer] :size Optional page size in inbox tracking pixel list pagination
1087
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
1088
+ # @return [Array<(PageTrackingPixelProjection, Integer, Hash)>] PageTrackingPixelProjection data, response status code and response headers
1089
+ def list_inbox_tracking_pixels_with_http_info(inbox_id, opts = {})
1090
+ if @api_client.config.debugging
1091
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.list_inbox_tracking_pixels ...'
1092
+ end
1093
+ # verify the required parameter 'inbox_id' is set
1094
+ if @api_client.config.client_side_validation && inbox_id.nil?
1095
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.list_inbox_tracking_pixels"
1096
+ end
1097
+ allowable_values = ["ASC", "DESC"]
1098
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1099
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1100
+ end
1101
+ # resource path
1102
+ local_var_path = '/inboxes/{inboxId}/tracking-pixels'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
1103
+
1104
+ # query parameters
1105
+ query_params = opts[:query_params] || {}
1106
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1107
+ query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
1108
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1109
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1110
+
1111
+ # header parameters
1112
+ header_params = opts[:header_params] || {}
1113
+ # HTTP header 'Accept' (if needed)
1114
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1115
+
1116
+ # form parameters
1117
+ form_params = opts[:form_params] || {}
1118
+
1119
+ # http body (model)
1120
+ post_body = opts[:body]
1121
+
1122
+ # return_type
1123
+ return_type = opts[:return_type] || 'PageTrackingPixelProjection'
1124
+
1125
+ # auth_names
1126
+ auth_names = opts[:auth_names] || ['API_KEY']
1127
+
1128
+ new_options = opts.merge(
1129
+ :header_params => header_params,
1130
+ :query_params => query_params,
1131
+ :form_params => form_params,
1132
+ :body => post_body,
1133
+ :auth_names => auth_names,
1134
+ :return_type => return_type
1135
+ )
1136
+
1137
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1138
+ if @api_client.config.debugging
1139
+ @api_client.config.logger.debug "API called: InboxControllerApi#list_inbox_tracking_pixels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1140
+ end
1141
+ return data, status_code, headers
1142
+ end
1143
+
918
1144
  # Send Email
919
1145
  # Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`.
920
1146
  # @param inbox_id [String] ID of the inbox you want to send the email from