mailslurp.api.InboxRulesetControllerApi

Load the API package

import 'package:mailslurp/api.dart';

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

MethodHTTP requestDescription
createNewInboxRulesetPOST /rulesetsCreate an inbox ruleset
deleteInboxRulesetDELETE /rulesets/{id}Delete an inbox ruleset
deleteInboxRulesetsDELETE /rulesetsDelete inbox rulesets
getInboxRulesetGET /rulesets/{id}Get an inbox ruleset
getInboxRulesetsGET /rulesetsList inbox rulesets
testInboxRulesetPOST /rulesets/{id}/testTest an inbox ruleset
testInboxRulesetsForInboxPUT /rulesetsTest inbox rulesets for inbox
testNewInboxRulesetPATCH /rulesetsTest new inbox ruleset

createNewInboxRuleset

InboxRulesetDto createNewInboxRuleset(createInboxRulesetOptions, inboxId)

Create an inbox ruleset

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

Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = InboxRulesetControllerApi();
final createInboxRulesetOptions = CreateInboxRulesetOptions(); // CreateInboxRulesetOptions | createInboxRulesetOptions
final inboxId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Inbox id to attach ruleset to

try { 
    final result = api_instance.createNewInboxRuleset(createInboxRulesetOptions, inboxId);
    print(result);
} catch (e) {
    print('Exception when calling InboxRulesetControllerApi->createNewInboxRuleset: $en');
}

Parameters

NameTypeDescriptionNotes
createInboxRulesetOptionsCreateInboxRulesetOptionscreateInboxRulesetOptions
inboxIdStringInbox 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 ]

deleteInboxRuleset

deleteInboxRuleset(id)

Delete an inbox ruleset

Delete inbox ruleset

Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = InboxRulesetControllerApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | ID of inbox ruleset

try { 
    api_instance.deleteInboxRuleset(id);
} catch (e) {
    print('Exception when calling InboxRulesetControllerApi->deleteInboxRuleset: $en');
}

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 ]

deleteInboxRulesets

deleteInboxRulesets(inboxId)

Delete inbox rulesets

Delete inbox rulesets. Accepts optional inboxId filter.

Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = InboxRulesetControllerApi();
final inboxId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Optional inbox id to attach ruleset to

try { 
    api_instance.deleteInboxRulesets(inboxId);
} catch (e) {
    print('Exception when calling InboxRulesetControllerApi->deleteInboxRulesets: $en');
}

Parameters

NameTypeDescriptionNotes
inboxIdStringOptional 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 ]

getInboxRuleset

InboxRulesetDto getInboxRuleset(id)

Get an inbox ruleset

Get inbox ruleset

Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = InboxRulesetControllerApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | ID of inbox ruleset

try { 
    final result = api_instance.getInboxRuleset(id);
    print(result);
} catch (e) {
    print('Exception when calling InboxRulesetControllerApi->getInboxRuleset: $en');
}

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 ]

getInboxRulesets

PageInboxRulesetDto getInboxRulesets(before, inboxId, page, searchFilter, since, size, sort)

List inbox rulesets

List all rulesets attached to an inbox

Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = InboxRulesetControllerApi();
final before = 2013-10-20T19:20:30+01:00; // DateTime | Filter by created at before the given timestamp
final inboxId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Optional inbox id to get rulesets from
final page = 56; // int | Optional page  in inbox ruleset list pagination
final searchFilter = searchFilter_example; // String | Optional search filter
final since = 2013-10-20T19:20:30+01:00; // DateTime | Filter by created at after the given timestamp
final size = 56; // int | Optional page size in inbox ruleset list pagination
final sort = sort_example; // String | Optional createdAt sort direction ASC or DESC

try { 
    final result = api_instance.getInboxRulesets(before, inboxId, page, searchFilter, since, size, sort);
    print(result);
} catch (e) {
    print('Exception when calling InboxRulesetControllerApi->getInboxRulesets: $en');
}

Parameters

NameTypeDescriptionNotes
beforeDateTimeFilter by created at before the given timestamp[optional]
inboxIdStringOptional inbox id to get rulesets from[optional]
pageintOptional page in inbox ruleset list pagination[optional] [default to 0]
searchFilterStringOptional 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 ]

testInboxRuleset

InboxRulesetTestResult testInboxRuleset(id, inboxRulesetTestOptions)

Test an inbox ruleset

Test an inbox ruleset

Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = InboxRulesetControllerApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | ID of inbox ruleset
final inboxRulesetTestOptions = InboxRulesetTestOptions(); // InboxRulesetTestOptions | inboxRulesetTestOptions

try { 
    final result = api_instance.testInboxRuleset(id, inboxRulesetTestOptions);
    print(result);
} catch (e) {
    print('Exception when calling InboxRulesetControllerApi->testInboxRuleset: $en');
}

Parameters

NameTypeDescriptionNotes
idStringID of inbox ruleset
inboxRulesetTestOptionsInboxRulesetTestOptionsinboxRulesetTestOptions

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 ]

testInboxRulesetsForInbox

InboxRulesetTestResult testInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions)

Test inbox rulesets for inbox

Test inbox rulesets for inbox

Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = InboxRulesetControllerApi();
final inboxId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | ID of inbox
final inboxRulesetTestOptions = InboxRulesetTestOptions(); // InboxRulesetTestOptions | inboxRulesetTestOptions

try { 
    final result = api_instance.testInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions);
    print(result);
} catch (e) {
    print('Exception when calling InboxRulesetControllerApi->testInboxRulesetsForInbox: $en');
}

Parameters

NameTypeDescriptionNotes
inboxIdStringID of inbox
inboxRulesetTestOptionsInboxRulesetTestOptionsinboxRulesetTestOptions

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 ]

testNewInboxRuleset

InboxRulesetTestResult testNewInboxRuleset(testNewInboxRulesetOptions)

Test new inbox ruleset

Test new inbox ruleset

Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';

final api_instance = InboxRulesetControllerApi();
final testNewInboxRulesetOptions = TestNewInboxRulesetOptions(); // TestNewInboxRulesetOptions | testNewInboxRulesetOptions

try { 
    final result = api_instance.testNewInboxRuleset(testNewInboxRulesetOptions);
    print(result);
} catch (e) {
    print('Exception when calling InboxRulesetControllerApi->testNewInboxRuleset: $en');
}

Parameters

NameTypeDescriptionNotes
testNewInboxRulesetOptionsTestNewInboxRulesetOptionstestNewInboxRulesetOptions

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 ]