MailSlurp::InboxRulesetControllerApi

Load the API package

use MailSlurp::Object::InboxRulesetControllerApi;

All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
create_new_inbox_rulesetPOST /rulesetsCreate an inbox ruleset
delete_inbox_rulesetDELETE /rulesets/{id}Delete an inbox ruleset
delete_inbox_rulesetsDELETE /rulesetsDelete inbox rulesets
get_inbox_rulesetGET /rulesets/{id}Get an inbox ruleset
get_inbox_rulesetsGET /rulesetsList inbox rulesets
test_inbox_rulesetPOST /rulesets/{id}/testTest an inbox ruleset
test_inbox_rulesets_for_inboxPUT /rulesetsTest inbox rulesets for inbox
test_new_inbox_rulesetPATCH /rulesetsTest new inbox ruleset

create_new_inbox_ruleset

InboxRulesetDto create_new_inbox_ruleset(create_inbox_ruleset_options => $create_inbox_ruleset_options, inbox_id => $inbox_id)

Create an inbox ruleset

Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving

Example

use Data::Dumper;
use MailSlurp::InboxRulesetControllerApi;
my $api_instance = MailSlurp::InboxRulesetControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $create_inbox_ruleset_options = MailSlurp::Object::CreateInboxRulesetOptions->new(); # CreateInboxRulesetOptions | createInboxRulesetOptions
my $inbox_id = null; # string | Inbox id to attach ruleset to

eval { 
    my $result = $api_instance->create_new_inbox_ruleset(create_inbox_ruleset_options => $create_inbox_ruleset_options, inbox_id => $inbox_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InboxRulesetControllerApi->create_new_inbox_ruleset: $@n";
}

Parameters

NameTypeDescriptionNotes
create_inbox_ruleset_optionsCreateInboxRulesetOptionscreateInboxRulesetOptions
inbox_idstringInbox id to attach ruleset to[optional]

Return type

InboxRulesetDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

delete_inbox_ruleset

delete_inbox_ruleset(id => $id)

Delete an inbox ruleset

Delete inbox ruleset

Example

use Data::Dumper;
use MailSlurp::InboxRulesetControllerApi;
my $api_instance = MailSlurp::InboxRulesetControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $id = null; # string | ID of inbox ruleset

eval { 
    $api_instance->delete_inbox_ruleset(id => $id);
};
if ($@) {
    warn "Exception when calling InboxRulesetControllerApi->delete_inbox_ruleset: $@n";
}

Parameters

NameTypeDescriptionNotes
idstringID of inbox ruleset

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

delete_inbox_rulesets

delete_inbox_rulesets(inbox_id => $inbox_id)

Delete inbox rulesets

Delete inbox rulesets. Accepts optional inboxId filter.

Example

use Data::Dumper;
use MailSlurp::InboxRulesetControllerApi;
my $api_instance = MailSlurp::InboxRulesetControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $inbox_id = null; # string | Optional inbox id to attach ruleset to

eval { 
    $api_instance->delete_inbox_rulesets(inbox_id => $inbox_id);
};
if ($@) {
    warn "Exception when calling InboxRulesetControllerApi->delete_inbox_rulesets: $@n";
}

Parameters

NameTypeDescriptionNotes
inbox_idstringOptional inbox id to attach ruleset to[optional]

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_inbox_ruleset

InboxRulesetDto get_inbox_ruleset(id => $id)

Get an inbox ruleset

Get inbox ruleset

Example

use Data::Dumper;
use MailSlurp::InboxRulesetControllerApi;
my $api_instance = MailSlurp::InboxRulesetControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $id = null; # string | ID of inbox ruleset

eval { 
    my $result = $api_instance->get_inbox_ruleset(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InboxRulesetControllerApi->get_inbox_ruleset: $@n";
}

Parameters

NameTypeDescriptionNotes
idstringID of inbox ruleset

Return type

InboxRulesetDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_inbox_rulesets

PageInboxRulesetDto get_inbox_rulesets(before => $before, inbox_id => $inbox_id, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort)

List inbox rulesets

List all rulesets attached to an inbox

Example

use Data::Dumper;
use MailSlurp::InboxRulesetControllerApi;
my $api_instance = MailSlurp::InboxRulesetControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $before = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at before the given timestamp
my $inbox_id = null; # string | Optional inbox id to get rulesets from
my $page = 0; # int | Optional page  in inbox ruleset list pagination
my $search_filter = "search_filter_example"; # string | Optional search filter
my $since = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at after the given timestamp
my $size = 20; # int | Optional page size in inbox ruleset list pagination
my $sort = 'ASC'; # string | Optional createdAt sort direction ASC or DESC

eval { 
    my $result = $api_instance->get_inbox_rulesets(before => $before, inbox_id => $inbox_id, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InboxRulesetControllerApi->get_inbox_rulesets: $@n";
}

Parameters

NameTypeDescriptionNotes
beforeDateTimeFilter by created at before the given timestamp[optional]
inbox_idstringOptional inbox id to get rulesets from[optional]
pageintOptional page in inbox ruleset list pagination[optional] [default to 0]
search_filterstringOptional search filter[optional]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeintOptional page size in inbox ruleset list pagination[optional] [default to 20]
sortstringOptional createdAt sort direction ASC or DESC[optional] [default to ‘ASC’]

Return type

PageInboxRulesetDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

test_inbox_ruleset

InboxRulesetTestResult test_inbox_ruleset(id => $id, inbox_ruleset_test_options => $inbox_ruleset_test_options)

Test an inbox ruleset

Test an inbox ruleset

Example

use Data::Dumper;
use MailSlurp::InboxRulesetControllerApi;
my $api_instance = MailSlurp::InboxRulesetControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $id = null; # string | ID of inbox ruleset
my $inbox_ruleset_test_options = MailSlurp::Object::InboxRulesetTestOptions->new(); # InboxRulesetTestOptions | inboxRulesetTestOptions

eval { 
    my $result = $api_instance->test_inbox_ruleset(id => $id, inbox_ruleset_test_options => $inbox_ruleset_test_options);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InboxRulesetControllerApi->test_inbox_ruleset: $@n";
}

Parameters

NameTypeDescriptionNotes
idstringID of inbox ruleset
inbox_ruleset_test_optionsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

InboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

test_inbox_rulesets_for_inbox

InboxRulesetTestResult test_inbox_rulesets_for_inbox(inbox_id => $inbox_id, inbox_ruleset_test_options => $inbox_ruleset_test_options)

Test inbox rulesets for inbox

Test inbox rulesets for inbox

Example

use Data::Dumper;
use MailSlurp::InboxRulesetControllerApi;
my $api_instance = MailSlurp::InboxRulesetControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $inbox_id = null; # string | ID of inbox
my $inbox_ruleset_test_options = MailSlurp::Object::InboxRulesetTestOptions->new(); # InboxRulesetTestOptions | inboxRulesetTestOptions

eval { 
    my $result = $api_instance->test_inbox_rulesets_for_inbox(inbox_id => $inbox_id, inbox_ruleset_test_options => $inbox_ruleset_test_options);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InboxRulesetControllerApi->test_inbox_rulesets_for_inbox: $@n";
}

Parameters

NameTypeDescriptionNotes
inbox_idstringID of inbox
inbox_ruleset_test_optionsInboxRulesetTestOptionsinboxRulesetTestOptions

Return type

InboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

test_new_inbox_ruleset

InboxRulesetTestResult test_new_inbox_ruleset(test_new_inbox_ruleset_options => $test_new_inbox_ruleset_options)

Test new inbox ruleset

Test new inbox ruleset

Example

use Data::Dumper;
use MailSlurp::InboxRulesetControllerApi;
my $api_instance = MailSlurp::InboxRulesetControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $test_new_inbox_ruleset_options = MailSlurp::Object::TestNewInboxRulesetOptions->new(); # TestNewInboxRulesetOptions | testNewInboxRulesetOptions

eval { 
    my $result = $api_instance->test_new_inbox_ruleset(test_new_inbox_ruleset_options => $test_new_inbox_ruleset_options);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InboxRulesetControllerApi->test_new_inbox_ruleset: $@n";
}

Parameters

NameTypeDescriptionNotes
test_new_inbox_ruleset_optionsTestNewInboxRulesetOptionstestNewInboxRulesetOptions

Return type

InboxRulesetTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]