mailslurp_client 12.4.5 → 12.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client.rb +12 -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 +152 -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/template_controller_api.rb +4 -4
  10. data/lib/mailslurp_client/api/tracking_controller_api.rb +215 -0
  11. data/lib/mailslurp_client/api/wait_for_controller_api.rb +2 -2
  12. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +274 -0
  13. data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +215 -0
  14. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +353 -0
  15. data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +211 -0
  16. data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +223 -0
  17. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +299 -0
  18. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +299 -0
  19. data/lib/mailslurp_client/models/send_email_options.rb +11 -1
  20. data/lib/mailslurp_client/models/sent_email_dto.rb +12 -1
  21. data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +225 -0
  22. data/lib/mailslurp_client/models/tracking_pixel_dto.rb +262 -0
  23. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +262 -0
  24. data/lib/mailslurp_client/version.rb +1 -1
  25. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da8dea1905c104e63ec8b2fbfb335a1309549bb9460d2b0eae66e67800a5b011
4
- data.tar.gz: 70987bff92bf7705b1185ac3bdcb04878efb38a6333218b793e7a1dc4c19ec63
3
+ metadata.gz: 70db6bce103b2e7d4ae3eca78e63daa2427d3b3f29db4a8c68cc99d2e2c199a4
4
+ data.tar.gz: 9f3ece76f8fc73b995257bf490e07742f1b955fd4880242bcbd1a275ef01bacf
5
5
  SHA512:
6
- metadata.gz: 8192755ff36a77ec4ac99f926bdec134e399c204d40cec1102cb7be31e0948dcca931fc6a27c1e0565d970f181d1b7ab6c652df50b0fdbaf67fa62e183922a1f
7
- data.tar.gz: cf83c2c2238b3b0ff1111b0e1c70aeb72ab96d98b73587a8d51069fa02c418c7ea260222831ceab19b0ca7d04779c2eff711e7b4439770ee0f11fc5d6a953098
6
+ metadata.gz: f9055da51031061aecc74efaa4ba90e84cfd1caae931fe467ec9c4c5cc7b902a248ac9ea2deea15983a6ee4d40eb104e35cee5e9ccb872a8c50803b50bb95308
7
+ data.tar.gz: e748394f21ccbb85dc20605367d2311dd00d5abc3508da54624b53e1945c345d1eea05551489084f3879163ebfdfd54b110d2afb38e4e78fb1f9a508091f972e
@@ -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'
@@ -133,10 +143,12 @@ require 'mailslurp_client/api/export_controller_api'
133
143
  require 'mailslurp_client/api/form_controller_api'
134
144
  require 'mailslurp_client/api/group_controller_api'
135
145
  require 'mailslurp_client/api/inbox_controller_api'
146
+ require 'mailslurp_client/api/inbox_ruleset_controller_api'
136
147
  require 'mailslurp_client/api/mail_server_controller_api'
137
148
  require 'mailslurp_client/api/missed_email_controller_api'
138
149
  require 'mailslurp_client/api/sent_emails_controller_api'
139
150
  require 'mailslurp_client/api/template_controller_api'
151
+ require 'mailslurp_client/api/tracking_controller_api'
140
152
  require 'mailslurp_client/api/wait_for_controller_api'
141
153
  require 'mailslurp_client/api/webhook_controller_api'
142
154
 
@@ -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,74 @@ 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 [nil]
118
+ def create_inbox_ruleset(inbox_id, create_inbox_ruleset_options, opts = {})
119
+ create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, opts)
120
+ nil
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<(nil, Integer, Hash)>] nil, 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 'Content-Type'
150
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
151
+
152
+ # form parameters
153
+ form_params = opts[:form_params] || {}
154
+
155
+ # http body (model)
156
+ post_body = opts[:body] || @api_client.object_to_http_body(create_inbox_ruleset_options)
157
+
158
+ # return_type
159
+ return_type = opts[:return_type]
160
+
161
+ # auth_names
162
+ auth_names = opts[:auth_names] || ['API_KEY']
163
+
164
+ new_options = opts.merge(
165
+ :header_params => header_params,
166
+ :query_params => query_params,
167
+ :form_params => form_params,
168
+ :body => post_body,
169
+ :auth_names => auth_names,
170
+ :return_type => return_type
171
+ )
172
+
173
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug "API called: InboxControllerApi#create_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
+ end
177
+ return data, status_code, headers
178
+ end
179
+
112
180
  # Create an inbox with default options. Uses MailSlurp domain pool address and is private.
113
181
  # @param [Hash] opts the optional parameters
114
182
  # @return [Inbox]
@@ -345,9 +413,9 @@ module MailSlurpClient
345
413
  # 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
414
  # @param [Hash] opts the optional parameters
347
415
  # @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)
416
+ # @option opts [Integer] :page Optional page index in list pagination (default to 0)
349
417
  # @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)
418
+ # @option opts [Integer] :size Optional page size in list pagination (default to 20)
351
419
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
352
420
  # @option opts [String] :tag Optionally filter by tags. Will return inboxes that include given tags
353
421
  # @option opts [Boolean] :team_access Optionally filter by team access. Defaults to false so organization inboxes are not included (default to false)
@@ -361,9 +429,9 @@ module MailSlurpClient
361
429
  # 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
430
  # @param [Hash] opts the optional parameters
363
431
  # @option opts [Boolean] :favourite Optionally filter results for favourites only
364
- # @option opts [Integer] :page Optional page index in inbox list pagination
432
+ # @option opts [Integer] :page Optional page index in list pagination
365
433
  # @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
434
+ # @option opts [Integer] :size Optional page size in list pagination
367
435
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
368
436
  # @option opts [String] :tag Optionally filter by tags. Will return inboxes that include given tags
369
437
  # @option opts [Boolean] :team_access Optionally filter by team access. Defaults to false so organization inboxes are not included
@@ -846,9 +914,9 @@ module MailSlurpClient
846
914
  # List Organization Inboxes Paginated
847
915
  # 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
916
  # @param [Hash] opts the optional parameters
849
- # @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
917
+ # @option opts [Integer] :page Optional page index in list pagination (default to 0)
850
918
  # @option opts [String] :search_filter Optional search filter
851
- # @option opts [Integer] :size Optional page size in inbox list pagination (default to 20)
919
+ # @option opts [Integer] :size Optional page size in list pagination (default to 20)
852
920
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
853
921
  # @return [PageOrganizationInboxProjection]
854
922
  def get_organization_inboxes(opts = {})
@@ -859,9 +927,9 @@ module MailSlurpClient
859
927
  # List Organization Inboxes Paginated
860
928
  # 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
929
  # @param [Hash] opts the optional parameters
862
- # @option opts [Integer] :page Optional page index in inbox list pagination
930
+ # @option opts [Integer] :page Optional page index in list pagination
863
931
  # @option opts [String] :search_filter Optional search filter
864
- # @option opts [Integer] :size Optional page size in inbox list pagination
932
+ # @option opts [Integer] :size Optional page size in list pagination
865
933
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
866
934
  # @return [Array<(PageOrganizationInboxProjection, Integer, Hash)>] PageOrganizationInboxProjection data, response status code and response headers
867
935
  def get_organization_inboxes_with_http_info(opts = {})
@@ -915,6 +983,82 @@ module MailSlurpClient
915
983
  return data, status_code, headers
916
984
  end
917
985
 
986
+ # List inbox rulesets
987
+ # List all rulesets attached to an inbox
988
+ # @param inbox_id [String] inboxId
989
+ # @param [Hash] opts the optional parameters
990
+ # @option opts [Integer] :page Optional page index in inbox ruleset list pagination (default to 0)
991
+ # @option opts [String] :search_filter Optional search filter
992
+ # @option opts [Integer] :size Optional page size in inbox ruleset list pagination (default to 20)
993
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
994
+ # @return [nil]
995
+ def list_inbox_rulesets(inbox_id, opts = {})
996
+ list_inbox_rulesets_with_http_info(inbox_id, opts)
997
+ nil
998
+ end
999
+
1000
+ # List inbox rulesets
1001
+ # List all rulesets attached to an inbox
1002
+ # @param inbox_id [String] inboxId
1003
+ # @param [Hash] opts the optional parameters
1004
+ # @option opts [Integer] :page Optional page index in inbox ruleset list pagination
1005
+ # @option opts [String] :search_filter Optional search filter
1006
+ # @option opts [Integer] :size Optional page size in inbox ruleset list pagination
1007
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
1008
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1009
+ def list_inbox_rulesets_with_http_info(inbox_id, opts = {})
1010
+ if @api_client.config.debugging
1011
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.list_inbox_rulesets ...'
1012
+ end
1013
+ # verify the required parameter 'inbox_id' is set
1014
+ if @api_client.config.client_side_validation && inbox_id.nil?
1015
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.list_inbox_rulesets"
1016
+ end
1017
+ allowable_values = ["ASC", "DESC"]
1018
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1019
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1020
+ end
1021
+ # resource path
1022
+ local_var_path = '/inboxes/{inboxId}/rulesets'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
1023
+
1024
+ # query parameters
1025
+ query_params = opts[:query_params] || {}
1026
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1027
+ query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
1028
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
1029
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1030
+
1031
+ # header parameters
1032
+ header_params = opts[:header_params] || {}
1033
+
1034
+ # form parameters
1035
+ form_params = opts[:form_params] || {}
1036
+
1037
+ # http body (model)
1038
+ post_body = opts[:body]
1039
+
1040
+ # return_type
1041
+ return_type = opts[:return_type]
1042
+
1043
+ # auth_names
1044
+ auth_names = opts[:auth_names] || ['API_KEY']
1045
+
1046
+ new_options = opts.merge(
1047
+ :header_params => header_params,
1048
+ :query_params => query_params,
1049
+ :form_params => form_params,
1050
+ :body => post_body,
1051
+ :auth_names => auth_names,
1052
+ :return_type => return_type
1053
+ )
1054
+
1055
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1056
+ if @api_client.config.debugging
1057
+ @api_client.config.logger.debug "API called: InboxControllerApi#list_inbox_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1058
+ end
1059
+ return data, status_code, headers
1060
+ end
1061
+
918
1062
  # Send Email
919
1063
  # 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
1064
  # @param inbox_id [String] ID of the inbox you want to send the email from
@@ -0,0 +1,548 @@
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 InboxRulesetControllerApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create an inbox ruleset
23
+ # Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
24
+ # @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :inbox_id Inbox id to attach ruleset to
27
+ # @return [InboxRulesetDto]
28
+ def create_new_inbox_ruleset(create_inbox_ruleset_options, opts = {})
29
+ data, _status_code, _headers = create_new_inbox_ruleset_with_http_info(create_inbox_ruleset_options, opts)
30
+ data
31
+ end
32
+
33
+ # Create an inbox ruleset
34
+ # Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
35
+ # @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :inbox_id Inbox id to attach ruleset to
38
+ # @return [Array<(InboxRulesetDto, Integer, Hash)>] InboxRulesetDto data, response status code and response headers
39
+ def create_new_inbox_ruleset_with_http_info(create_inbox_ruleset_options, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.create_new_inbox_ruleset ...'
42
+ end
43
+ # verify the required parameter 'create_inbox_ruleset_options' is set
44
+ if @api_client.config.client_side_validation && create_inbox_ruleset_options.nil?
45
+ fail ArgumentError, "Missing the required parameter 'create_inbox_ruleset_options' when calling InboxRulesetControllerApi.create_new_inbox_ruleset"
46
+ end
47
+ # resource path
48
+ local_var_path = '/rulesets'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:body] || @api_client.object_to_http_body(create_inbox_ruleset_options)
66
+
67
+ # return_type
68
+ return_type = opts[:return_type] || 'InboxRulesetDto'
69
+
70
+ # auth_names
71
+ auth_names = opts[:auth_names] || ['API_KEY']
72
+
73
+ new_options = opts.merge(
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#create_new_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # Delete an inbox ruleset
90
+ # Delete inbox ruleset
91
+ # @param id [String] ID of inbox ruleset
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [nil]
94
+ def delete_inbox_ruleset(id, opts = {})
95
+ delete_inbox_ruleset_with_http_info(id, opts)
96
+ nil
97
+ end
98
+
99
+ # Delete an inbox ruleset
100
+ # Delete inbox ruleset
101
+ # @param id [String] ID of inbox ruleset
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
104
+ def delete_inbox_ruleset_with_http_info(id, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.delete_inbox_ruleset ...'
107
+ end
108
+ # verify the required parameter 'id' is set
109
+ if @api_client.config.client_side_validation && id.nil?
110
+ fail ArgumentError, "Missing the required parameter 'id' when calling InboxRulesetControllerApi.delete_inbox_ruleset"
111
+ end
112
+ # resource path
113
+ local_var_path = '/rulesets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
114
+
115
+ # query parameters
116
+ query_params = opts[:query_params] || {}
117
+
118
+ # header parameters
119
+ header_params = opts[:header_params] || {}
120
+
121
+ # form parameters
122
+ form_params = opts[:form_params] || {}
123
+
124
+ # http body (model)
125
+ post_body = opts[:body]
126
+
127
+ # return_type
128
+ return_type = opts[:return_type]
129
+
130
+ # auth_names
131
+ auth_names = opts[:auth_names] || ['API_KEY']
132
+
133
+ new_options = opts.merge(
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => return_type
140
+ )
141
+
142
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#delete_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+
149
+ # Delete inbox rulesets
150
+ # Delete inbox rulesets. Accepts optional inboxId filter.
151
+ # @param [Hash] opts the optional parameters
152
+ # @option opts [String] :inbox_id Optional inbox id to attach ruleset to
153
+ # @return [nil]
154
+ def delete_inbox_rulesets(opts = {})
155
+ delete_inbox_rulesets_with_http_info(opts)
156
+ nil
157
+ end
158
+
159
+ # Delete inbox rulesets
160
+ # Delete inbox rulesets. Accepts optional inboxId filter.
161
+ # @param [Hash] opts the optional parameters
162
+ # @option opts [String] :inbox_id Optional inbox id to attach ruleset to
163
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
164
+ def delete_inbox_rulesets_with_http_info(opts = {})
165
+ if @api_client.config.debugging
166
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.delete_inbox_rulesets ...'
167
+ end
168
+ # resource path
169
+ local_var_path = '/rulesets'
170
+
171
+ # query parameters
172
+ query_params = opts[:query_params] || {}
173
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
174
+
175
+ # header parameters
176
+ header_params = opts[:header_params] || {}
177
+
178
+ # form parameters
179
+ form_params = opts[:form_params] || {}
180
+
181
+ # http body (model)
182
+ post_body = opts[:body]
183
+
184
+ # return_type
185
+ return_type = opts[:return_type]
186
+
187
+ # auth_names
188
+ auth_names = opts[:auth_names] || ['API_KEY']
189
+
190
+ new_options = opts.merge(
191
+ :header_params => header_params,
192
+ :query_params => query_params,
193
+ :form_params => form_params,
194
+ :body => post_body,
195
+ :auth_names => auth_names,
196
+ :return_type => return_type
197
+ )
198
+
199
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#delete_inbox_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
202
+ end
203
+ return data, status_code, headers
204
+ end
205
+
206
+ # Get an inbox ruleset
207
+ # Get inbox ruleset
208
+ # @param id [String] ID of inbox ruleset
209
+ # @param [Hash] opts the optional parameters
210
+ # @return [InboxRulesetDto]
211
+ def get_inbox_ruleset(id, opts = {})
212
+ data, _status_code, _headers = get_inbox_ruleset_with_http_info(id, opts)
213
+ data
214
+ end
215
+
216
+ # Get an inbox ruleset
217
+ # Get inbox ruleset
218
+ # @param id [String] ID of inbox ruleset
219
+ # @param [Hash] opts the optional parameters
220
+ # @return [Array<(InboxRulesetDto, Integer, Hash)>] InboxRulesetDto data, response status code and response headers
221
+ def get_inbox_ruleset_with_http_info(id, opts = {})
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.get_inbox_ruleset ...'
224
+ end
225
+ # verify the required parameter 'id' is set
226
+ if @api_client.config.client_side_validation && id.nil?
227
+ fail ArgumentError, "Missing the required parameter 'id' when calling InboxRulesetControllerApi.get_inbox_ruleset"
228
+ end
229
+ # resource path
230
+ local_var_path = '/rulesets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
231
+
232
+ # query parameters
233
+ query_params = opts[:query_params] || {}
234
+
235
+ # header parameters
236
+ header_params = opts[:header_params] || {}
237
+ # HTTP header 'Accept' (if needed)
238
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
239
+
240
+ # form parameters
241
+ form_params = opts[:form_params] || {}
242
+
243
+ # http body (model)
244
+ post_body = opts[:body]
245
+
246
+ # return_type
247
+ return_type = opts[:return_type] || 'InboxRulesetDto'
248
+
249
+ # auth_names
250
+ auth_names = opts[:auth_names] || ['API_KEY']
251
+
252
+ new_options = opts.merge(
253
+ :header_params => header_params,
254
+ :query_params => query_params,
255
+ :form_params => form_params,
256
+ :body => post_body,
257
+ :auth_names => auth_names,
258
+ :return_type => return_type
259
+ )
260
+
261
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#get_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
264
+ end
265
+ return data, status_code, headers
266
+ end
267
+
268
+ # List inbox rulesets
269
+ # List all rulesets attached to an inbox
270
+ # @param [Hash] opts the optional parameters
271
+ # @option opts [String] :inbox_id Optional inbox id to get rulesets from
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
274
+ # @option opts [Integer] :size Optional page size in inbox ruleset list pagination (default to 20)
275
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
276
+ # @return [PageInboxRulesetDto]
277
+ def get_inbox_rulesets(opts = {})
278
+ data, _status_code, _headers = get_inbox_rulesets_with_http_info(opts)
279
+ data
280
+ end
281
+
282
+ # List inbox rulesets
283
+ # List all rulesets attached to an inbox
284
+ # @param [Hash] opts the optional parameters
285
+ # @option opts [String] :inbox_id Optional inbox id to get rulesets from
286
+ # @option opts [Integer] :page Optional page index in inbox ruleset list pagination
287
+ # @option opts [String] :search_filter Optional search filter
288
+ # @option opts [Integer] :size Optional page size in inbox ruleset list pagination
289
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
290
+ # @return [Array<(PageInboxRulesetDto, Integer, Hash)>] PageInboxRulesetDto data, response status code and response headers
291
+ def get_inbox_rulesets_with_http_info(opts = {})
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.get_inbox_rulesets ...'
294
+ end
295
+ allowable_values = ["ASC", "DESC"]
296
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
297
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
298
+ end
299
+ # resource path
300
+ local_var_path = '/rulesets'
301
+
302
+ # query parameters
303
+ query_params = opts[:query_params] || {}
304
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
305
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
306
+ query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
307
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
308
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
309
+
310
+ # header parameters
311
+ header_params = opts[:header_params] || {}
312
+ # HTTP header 'Accept' (if needed)
313
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
314
+
315
+ # form parameters
316
+ form_params = opts[:form_params] || {}
317
+
318
+ # http body (model)
319
+ post_body = opts[:body]
320
+
321
+ # return_type
322
+ return_type = opts[:return_type] || 'PageInboxRulesetDto'
323
+
324
+ # auth_names
325
+ auth_names = opts[:auth_names] || ['API_KEY']
326
+
327
+ new_options = opts.merge(
328
+ :header_params => header_params,
329
+ :query_params => query_params,
330
+ :form_params => form_params,
331
+ :body => post_body,
332
+ :auth_names => auth_names,
333
+ :return_type => return_type
334
+ )
335
+
336
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
337
+ if @api_client.config.debugging
338
+ @api_client.config.logger.debug "API called: InboxRulesetControllerApi#get_inbox_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
339
+ end
340
+ return data, status_code, headers
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
547
+ end
548
+ end