MailSlurp\InboxRulesetControllerApi
All URIs are relative to https://php.api.mailslurp.com.
Method | HTTP request | Description |
---|---|---|
createNewInboxRuleset() | POST /rulesets | Create an inbox ruleset |
deleteInboxRuleset() | DELETE /rulesets/{id} | Delete an inbox ruleset |
deleteInboxRulesets() | DELETE /rulesets | Delete inbox rulesets |
getInboxRuleset() | GET /rulesets/{id} | Get an inbox ruleset |
getInboxRulesets() | GET /rulesets | List inbox rulesets |
testInboxRuleset() | POST /rulesets/{id}/test | Test an inbox ruleset |
testInboxRulesetsForInbox() | PUT /rulesets | Test inbox rulesets for inbox |
testNewInboxRuleset() | PATCH /rulesets | Test new inbox ruleset |
createNewInboxRuleset()
Create an inbox ruleset
Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$inbox_id = 'inbox_id_example'; // string | Inbox id to attach ruleset to
$create_inbox_ruleset_options = new MailSlurpModelsCreateInboxRulesetOptions(); // MailSlurpModelsCreateInboxRulesetOptions
try {
$result = $apiInstance->createNewInboxRuleset($inbox_id, $create_inbox_ruleset_options);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InboxRulesetControllerApi->createNewInboxRuleset: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inbox_id | string | Inbox id to attach ruleset to | |
create_inbox_ruleset_options | MailSlurpModelsCreateInboxRulesetOptions |
Return type
MailSlurpModelsInboxRulesetDto
Authorization
HTTP request headers
- Content-Type:
application/json
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
deleteInboxRuleset()
Delete an inbox ruleset
Delete inbox ruleset
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$id = 'id_example'; // string | ID of inbox ruleset
try {
$apiInstance->deleteInboxRuleset($id);
} catch (Exception $e) {
echo 'Exception when calling InboxRulesetControllerApi->deleteInboxRuleset: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | string | ID of inbox ruleset |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
deleteInboxRulesets()
Delete inbox rulesets
Delete inbox rulesets. Accepts optional inboxId filter.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$inbox_id = 'inbox_id_example'; // string | Optional inbox id to attach ruleset to
try {
$apiInstance->deleteInboxRulesets($inbox_id);
} catch (Exception $e) {
echo 'Exception when calling InboxRulesetControllerApi->deleteInboxRulesets: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inbox_id | string | Optional inbox id to attach ruleset to | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getInboxRuleset()
Get an inbox ruleset
Get inbox ruleset
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$id = 'id_example'; // string | ID of inbox ruleset
try {
$result = $apiInstance->getInboxRuleset($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InboxRulesetControllerApi->getInboxRuleset: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | string | ID of inbox ruleset |
Return type
MailSlurpModelsInboxRulesetDto
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getInboxRulesets()
getInboxRulesets($inbox_id, $page, $size, $sort, $search_filter, $since, $before): MailSlurpModelsPageInboxRulesetDto
List inbox rulesets
List all rulesets attached to an inbox
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$inbox_id = 'inbox_id_example'; // string | Optional inbox id to get rulesets from
$page = 0; // int | Optional page in inbox ruleset list pagination
$size = 20; // int | Optional page size in inbox ruleset list pagination
$sort = 'ASC'; // string | Optional createdAt sort direction ASC or DESC
$search_filter = 'search_filter_example'; // string | Optional search filter
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp
try {
$result = $apiInstance->getInboxRulesets($inbox_id, $page, $size, $sort, $search_filter, $since, $before);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InboxRulesetControllerApi->getInboxRulesets: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inbox_id | string | Optional inbox id to get rulesets from | [optional] |
page | int | Optional page in inbox ruleset list pagination | [optional] [default to 0] |
size | int | Optional page size in inbox ruleset list pagination | [optional] [default to 20] |
sort | string | Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] |
search_filter | string | Optional search filter | [optional] |
since | DateTime | Filter by created at after the given timestamp | [optional] |
before | DateTime | Filter by created at before the given timestamp | [optional] |
Return type
MailSlurpModelsPageInboxRulesetDto
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
testInboxRuleset()
Test an inbox ruleset
Test an inbox ruleset
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$id = 'id_example'; // string | ID of inbox ruleset
$inbox_ruleset_test_options = new MailSlurpModelsInboxRulesetTestOptions(); // MailSlurpModelsInboxRulesetTestOptions
try {
$result = $apiInstance->testInboxRuleset($id, $inbox_ruleset_test_options);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InboxRulesetControllerApi->testInboxRuleset: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | string | ID of inbox ruleset | |
inbox_ruleset_test_options | MailSlurpModelsInboxRulesetTestOptions |
Return type
MailSlurpModelsInboxRulesetTestResult
Authorization
HTTP request headers
- Content-Type:
application/json
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
testInboxRulesetsForInbox()
testInboxRulesetsForInbox($inbox_id, $inbox_ruleset_test_options): MailSlurpModelsInboxRulesetTestResult
Test inbox rulesets for inbox
Test inbox rulesets for inbox
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$inbox_id = 'inbox_id_example'; // string | ID of inbox
$inbox_ruleset_test_options = new MailSlurpModelsInboxRulesetTestOptions(); // MailSlurpModelsInboxRulesetTestOptions
try {
$result = $apiInstance->testInboxRulesetsForInbox($inbox_id, $inbox_ruleset_test_options);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InboxRulesetControllerApi->testInboxRulesetsForInbox: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inbox_id | string | ID of inbox | |
inbox_ruleset_test_options | MailSlurpModelsInboxRulesetTestOptions |
Return type
MailSlurpModelsInboxRulesetTestResult
Authorization
HTTP request headers
- Content-Type:
application/json
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
testNewInboxRuleset()
Test new inbox ruleset
Test new inbox ruleset
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiInboxRulesetControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$test_new_inbox_ruleset_options = new MailSlurpModelsTestNewInboxRulesetOptions(); // MailSlurpModelsTestNewInboxRulesetOptions
try {
$result = $apiInstance->testNewInboxRuleset($test_new_inbox_ruleset_options);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InboxRulesetControllerApi->testNewInboxRuleset: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
test_new_inbox_ruleset_options | MailSlurpModelsTestNewInboxRulesetOptions |
Return type
MailSlurpModelsInboxRulesetTestResult
Authorization
HTTP request headers
- Content-Type:
application/json
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]