Class: MailSlurpClient::RulesetControllerApi
- Inherits:
-
Object
- Object
- MailSlurpClient::RulesetControllerApi
- Defined in:
- lib/mailslurp_client/api/ruleset_controller_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_new_ruleset(create_ruleset_options, opts = {}) ⇒ RulesetDto
Create a ruleset Create a new inbox or phone number rule for forwarding, blocking, and allowing emails or SMS when sending and receiving.
-
#create_new_ruleset_with_http_info(create_ruleset_options, opts = {}) ⇒ Array<(RulesetDto, Integer, Hash)>
Create a ruleset Create a new inbox or phone number rule for forwarding, blocking, and allowing emails or SMS when sending and receiving.
-
#delete_ruleset(id, opts = {}) ⇒ nil
Delete a ruleset Delete ruleset.
-
#delete_ruleset_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a ruleset Delete ruleset.
-
#delete_rulesets(opts = {}) ⇒ nil
Delete rulesets Delete rulesets.
-
#delete_rulesets_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete rulesets Delete rulesets.
-
#get_ruleset(id, opts = {}) ⇒ RulesetDto
Get a ruleset Get ruleset.
-
#get_ruleset_with_http_info(id, opts = {}) ⇒ Array<(RulesetDto, Integer, Hash)>
Get a ruleset Get ruleset.
-
#get_rulesets(opts = {}) ⇒ PageRulesetDto
List rulesets block and allow lists List all rulesets attached to an inbox or phone or account.
-
#get_rulesets_with_http_info(opts = {}) ⇒ Array<(PageRulesetDto, Integer, Hash)>
List rulesets block and allow lists List all rulesets attached to an inbox or phone or account.
-
#initialize(api_client = ApiClient.default) ⇒ RulesetControllerApi
constructor
A new instance of RulesetControllerApi.
-
#test_inbox_rulesets_for_inbox(inbox_id, ruleset_test_options, opts = {}) ⇒ InboxRulesetTestResult
Test inbox rulesets for inbox Test inbox rulesets for inbox.
-
#test_inbox_rulesets_for_inbox_with_http_info(inbox_id, ruleset_test_options, opts = {}) ⇒ Array<(InboxRulesetTestResult, Integer, Hash)>
Test inbox rulesets for inbox Test inbox rulesets for inbox.
-
#test_new_ruleset(test_new_inbox_ruleset_options, opts = {}) ⇒ InboxRulesetTestResult
Test new ruleset Test new ruleset.
-
#test_new_ruleset_with_http_info(test_new_inbox_ruleset_options, opts = {}) ⇒ Array<(InboxRulesetTestResult, Integer, Hash)>
Test new ruleset Test new ruleset.
-
#test_ruleset(id, ruleset_test_options, opts = {}) ⇒ InboxRulesetTestResult
Test a ruleset Test an inbox or phone ruleset.
-
#test_ruleset_receiving(test_ruleset_receiving_options, opts = {}) ⇒ TestRulesetReceivingResult
Test receiving with rulesets Test whether inbound emails from an email address would be blocked or allowed by inbox rulesets or test if phone number can receive SMS.
-
#test_ruleset_receiving_with_http_info(test_ruleset_receiving_options, opts = {}) ⇒ Array<(TestRulesetReceivingResult, Integer, Hash)>
Test receiving with rulesets Test whether inbound emails from an email address would be blocked or allowed by inbox rulesets or test if phone number can receive SMS.
-
#test_ruleset_sending(test_inbox_ruleset_sending_options, opts = {}) ⇒ TestRulesetSendingResult
Test sending with rulesets Test whether outbound emails to an email address would be blocked or allowed by inbox rulesets or whether a phone number can send SMS.
-
#test_ruleset_sending_with_http_info(test_inbox_ruleset_sending_options, opts = {}) ⇒ Array<(TestRulesetSendingResult, Integer, Hash)>
Test sending with rulesets Test whether outbound emails to an email address would be blocked or allowed by inbox rulesets or whether a phone number can send SMS.
-
#test_ruleset_with_http_info(id, ruleset_test_options, opts = {}) ⇒ Array<(InboxRulesetTestResult, Integer, Hash)>
Test a ruleset Test an inbox or phone ruleset.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RulesetControllerApi
Returns a new instance of RulesetControllerApi.
19 20 21 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_new_ruleset(create_ruleset_options, opts = {}) ⇒ RulesetDto
Create a ruleset Create a new inbox or phone number rule for forwarding, blocking, and allowing emails or SMS when sending and receiving
29 30 31 32 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 29 def create_new_ruleset(, opts = {}) data, _status_code, _headers = create_new_ruleset_with_http_info(, opts) data end |
#create_new_ruleset_with_http_info(create_ruleset_options, opts = {}) ⇒ Array<(RulesetDto, Integer, Hash)>
Create a ruleset Create a new inbox or phone number rule for forwarding, blocking, and allowing emails or SMS when sending and receiving
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 41 def create_new_ruleset_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RulesetControllerApi.create_new_ruleset ...' end # verify the required parameter 'create_ruleset_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'create_ruleset_options' when calling RulesetControllerApi.create_new_ruleset" end # resource path local_var_path = '/rulesets' # query parameters query_params = opts[:query_params] || {} query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil? query_params[:'phoneId'] = opts[:'phone_id'] if !opts[:'phone_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body() # return_type return_type = opts[:return_type] || 'RulesetDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RulesetControllerApi#create_new_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ruleset(id, opts = {}) ⇒ nil
Delete a ruleset Delete ruleset
97 98 99 100 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 97 def delete_ruleset(id, opts = {}) delete_ruleset_with_http_info(id, opts) nil end |
#delete_ruleset_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a ruleset Delete ruleset
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 107 def delete_ruleset_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RulesetControllerApi.delete_ruleset ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RulesetControllerApi.delete_ruleset" end # resource path local_var_path = '/rulesets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RulesetControllerApi#delete_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_rulesets(opts = {}) ⇒ nil
Delete rulesets Delete rulesets. Accepts optional inboxId or phoneId filters.
158 159 160 161 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 158 def delete_rulesets(opts = {}) delete_rulesets_with_http_info(opts) nil end |
#delete_rulesets_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete rulesets Delete rulesets. Accepts optional inboxId or phoneId filters.
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 169 def delete_rulesets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RulesetControllerApi.delete_rulesets ...' end # resource path local_var_path = '/rulesets' # query parameters query_params = opts[:query_params] || {} query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil? query_params[:'phoneId'] = opts[:'phone_id'] if !opts[:'phone_id'].nil? # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RulesetControllerApi#delete_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ruleset(id, opts = {}) ⇒ RulesetDto
Get a ruleset Get ruleset
217 218 219 220 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 217 def get_ruleset(id, opts = {}) data, _status_code, _headers = get_ruleset_with_http_info(id, opts) data end |
#get_ruleset_with_http_info(id, opts = {}) ⇒ Array<(RulesetDto, Integer, Hash)>
Get a ruleset Get ruleset
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 227 def get_ruleset_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RulesetControllerApi.get_ruleset ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RulesetControllerApi.get_ruleset" end # resource path local_var_path = '/rulesets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'RulesetDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RulesetControllerApi#get_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_rulesets(opts = {}) ⇒ PageRulesetDto
List rulesets block and allow lists List all rulesets attached to an inbox or phone or account
286 287 288 289 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 286 def get_rulesets(opts = {}) data, _status_code, _headers = get_rulesets_with_http_info(opts) data end |
#get_rulesets_with_http_info(opts = {}) ⇒ Array<(PageRulesetDto, Integer, Hash)>
List rulesets block and allow lists List all rulesets attached to an inbox or phone or account
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 303 def get_rulesets_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RulesetControllerApi.get_rulesets ...' end allowable_values = ["ASC", "DESC"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/rulesets' # query parameters query_params = opts[:query_params] || {} query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil? query_params[:'phoneId'] = opts[:'phone_id'] if !opts[:'phone_id'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'PageRulesetDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RulesetControllerApi#get_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#test_inbox_rulesets_for_inbox(inbox_id, ruleset_test_options, opts = {}) ⇒ InboxRulesetTestResult
Test inbox rulesets for inbox Test inbox rulesets for inbox
364 365 366 367 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 364 def test_inbox_rulesets_for_inbox(inbox_id, , opts = {}) data, _status_code, _headers = test_inbox_rulesets_for_inbox_with_http_info(inbox_id, , opts) data end |
#test_inbox_rulesets_for_inbox_with_http_info(inbox_id, ruleset_test_options, opts = {}) ⇒ Array<(InboxRulesetTestResult, Integer, Hash)>
Test inbox rulesets for inbox Test inbox rulesets for inbox
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 375 def test_inbox_rulesets_for_inbox_with_http_info(inbox_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RulesetControllerApi.test_inbox_rulesets_for_inbox ...' end # verify the required parameter 'inbox_id' is set if @api_client.config.client_side_validation && inbox_id.nil? fail ArgumentError, "Missing the required parameter 'inbox_id' when calling RulesetControllerApi.test_inbox_rulesets_for_inbox" end # verify the required parameter 'ruleset_test_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'ruleset_test_options' when calling RulesetControllerApi.test_inbox_rulesets_for_inbox" end # resource path local_var_path = '/rulesets' # query parameters query_params = opts[:query_params] || {} query_params[:'inboxId'] = inbox_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body() # return_type return_type = opts[:return_type] || 'InboxRulesetTestResult' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RulesetControllerApi#test_inbox_rulesets_for_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#test_new_ruleset(test_new_inbox_ruleset_options, opts = {}) ⇒ InboxRulesetTestResult
Test new ruleset Test new ruleset
434 435 436 437 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 434 def test_new_ruleset(, opts = {}) data, _status_code, _headers = test_new_ruleset_with_http_info(, opts) data end |
#test_new_ruleset_with_http_info(test_new_inbox_ruleset_options, opts = {}) ⇒ Array<(InboxRulesetTestResult, Integer, Hash)>
Test new ruleset Test new ruleset
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 444 def test_new_ruleset_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RulesetControllerApi.test_new_ruleset ...' end # verify the required parameter 'test_new_inbox_ruleset_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'test_new_inbox_ruleset_options' when calling RulesetControllerApi.test_new_ruleset" end # resource path local_var_path = '/rulesets' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body() # return_type return_type = opts[:return_type] || 'InboxRulesetTestResult' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RulesetControllerApi#test_new_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#test_ruleset(id, ruleset_test_options, opts = {}) ⇒ InboxRulesetTestResult
Test a ruleset Test an inbox or phone ruleset
499 500 501 502 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 499 def test_ruleset(id, , opts = {}) data, _status_code, _headers = test_ruleset_with_http_info(id, , opts) data end |
#test_ruleset_receiving(test_ruleset_receiving_options, opts = {}) ⇒ TestRulesetReceivingResult
Test receiving with rulesets Test whether inbound emails from an email address would be blocked or allowed by inbox rulesets or test if phone number can receive SMS
568 569 570 571 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 568 def test_ruleset_receiving(, opts = {}) data, _status_code, _headers = test_ruleset_receiving_with_http_info(, opts) data end |
#test_ruleset_receiving_with_http_info(test_ruleset_receiving_options, opts = {}) ⇒ Array<(TestRulesetReceivingResult, Integer, Hash)>
Test receiving with rulesets Test whether inbound emails from an email address would be blocked or allowed by inbox rulesets or test if phone number can receive SMS
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 578 def test_ruleset_receiving_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RulesetControllerApi.test_ruleset_receiving ...' end # verify the required parameter 'test_ruleset_receiving_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'test_ruleset_receiving_options' when calling RulesetControllerApi.test_ruleset_receiving" end # resource path local_var_path = '/rulesets/test-receiving' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body() # return_type return_type = opts[:return_type] || 'TestRulesetReceivingResult' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RulesetControllerApi#test_ruleset_receiving\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#test_ruleset_sending(test_inbox_ruleset_sending_options, opts = {}) ⇒ TestRulesetSendingResult
Test sending with rulesets Test whether outbound emails to an email address would be blocked or allowed by inbox rulesets or whether a phone number can send SMS
632 633 634 635 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 632 def test_ruleset_sending(, opts = {}) data, _status_code, _headers = test_ruleset_sending_with_http_info(, opts) data end |
#test_ruleset_sending_with_http_info(test_inbox_ruleset_sending_options, opts = {}) ⇒ Array<(TestRulesetSendingResult, Integer, Hash)>
Test sending with rulesets Test whether outbound emails to an email address would be blocked or allowed by inbox rulesets or whether a phone number can send SMS
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 642 def test_ruleset_sending_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RulesetControllerApi.test_ruleset_sending ...' end # verify the required parameter 'test_inbox_ruleset_sending_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'test_inbox_ruleset_sending_options' when calling RulesetControllerApi.test_ruleset_sending" end # resource path local_var_path = '/rulesets/test-sending' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body() # return_type return_type = opts[:return_type] || 'TestRulesetSendingResult' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RulesetControllerApi#test_ruleset_sending\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#test_ruleset_with_http_info(id, ruleset_test_options, opts = {}) ⇒ Array<(InboxRulesetTestResult, Integer, Hash)>
Test a ruleset Test an inbox or phone ruleset
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 |
# File 'lib/mailslurp_client/api/ruleset_controller_api.rb', line 510 def test_ruleset_with_http_info(id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RulesetControllerApi.test_ruleset ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RulesetControllerApi.test_ruleset" end # verify the required parameter 'ruleset_test_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'ruleset_test_options' when calling RulesetControllerApi.test_ruleset" end # resource path local_var_path = '/rulesets/{id}/test'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body() # return_type return_type = opts[:return_type] || 'InboxRulesetTestResult' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RulesetControllerApi#test_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |