InboxRulesetControllerAPI

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

    open class func createNewInboxRuleset( createInboxRulesetOptions: CreateInboxRulesetOptions,  inboxId: UUID? = nil) -> Promise<InboxRulesetDto>

Create an inbox ruleset

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

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let createInboxRulesetOptions = CreateInboxRulesetOptions(action: "action_example", scope: "scope_example", target: "target_example") // CreateInboxRulesetOptions | createInboxRulesetOptions
let inboxId = 987 // UUID | Inbox id to attach ruleset to (optional)

// Create an inbox ruleset
InboxRulesetControllerAPI.createNewInboxRuleset(createInboxRulesetOptions: createInboxRulesetOptions, inboxId: inboxId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
createInboxRulesetOptionsCreateInboxRulesetOptionscreateInboxRulesetOptions
inboxIdUUIDInbox 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

    open class func deleteInboxRuleset( _id: UUID) -> Promise<Void>

Delete an inbox ruleset

Delete inbox ruleset

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | ID of inbox ruleset

// Delete an inbox ruleset
InboxRulesetControllerAPI.deleteInboxRuleset(_id: _id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
_idUUIDID 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

    open class func deleteInboxRulesets( inboxId: UUID? = nil) -> Promise<Void>

Delete inbox rulesets

Delete inbox rulesets. Accepts optional inboxId filter.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let inboxId = 987 // UUID | Optional inbox id to attach ruleset to (optional)

// Delete inbox rulesets
InboxRulesetControllerAPI.deleteInboxRulesets(inboxId: inboxId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
inboxIdUUIDOptional 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

    open class func getInboxRuleset( _id: UUID) -> Promise<InboxRulesetDto>

Get an inbox ruleset

Get inbox ruleset

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | ID of inbox ruleset

// Get an inbox ruleset
InboxRulesetControllerAPI.getInboxRuleset(_id: _id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
_idUUIDID 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

    open class func getInboxRulesets( before: Date? = nil,  inboxId: UUID? = nil,  page: Int? = nil,  searchFilter: String? = nil,  since: Date? = nil,  size: Int? = nil,  sort: Sort_getInboxRulesets? = nil) -> Promise<PageInboxRulesetDto>

List inbox rulesets

List all rulesets attached to an inbox

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let before = Date() // Date | Filter by created at before the given timestamp (optional)
let inboxId = 987 // UUID | Optional inbox id to get rulesets from (optional)
let page = 987 // Int | Optional page  in inbox ruleset list pagination (optional) (default to 0)
let searchFilter = "searchFilter_example" // String | Optional search filter (optional)
let since = Date() // Date | Filter by created at after the given timestamp (optional)
let size = 987 // Int | Optional page size in inbox ruleset list pagination (optional) (default to 20)
let sort = "sort_example" // String | Optional createdAt sort direction ASC or DESC (optional) (default to .asc)

// List inbox rulesets
InboxRulesetControllerAPI.getInboxRulesets(before: before, inboxId: inboxId, page: page, searchFilter: searchFilter, since: since, size: size, sort: sort).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
beforeDateFilter by created at before the given timestamp[optional]
inboxIdUUIDOptional inbox id to get rulesets from[optional]
pageIntOptional page in inbox ruleset list pagination[optional] [default to 0]
searchFilterStringOptional search filter[optional]
sinceDateFilter 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

    open class func testInboxRuleset( _id: UUID,  inboxRulesetTestOptions: InboxRulesetTestOptions) -> Promise<InboxRulesetTestResult>

Test an inbox ruleset

Test an inbox ruleset

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | ID of inbox ruleset
let inboxRulesetTestOptions = InboxRulesetTestOptions(testTarget: "testTarget_example") // InboxRulesetTestOptions | inboxRulesetTestOptions

// Test an inbox ruleset
InboxRulesetControllerAPI.testInboxRuleset(_id: _id, inboxRulesetTestOptions: inboxRulesetTestOptions).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
_idUUIDID 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

    open class func testInboxRulesetsForInbox( inboxId: UUID,  inboxRulesetTestOptions: InboxRulesetTestOptions) -> Promise<InboxRulesetTestResult>

Test inbox rulesets for inbox

Test inbox rulesets for inbox

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let inboxId = 987 // UUID | ID of inbox
let inboxRulesetTestOptions = InboxRulesetTestOptions(testTarget: "testTarget_example") // InboxRulesetTestOptions | inboxRulesetTestOptions

// Test inbox rulesets for inbox
InboxRulesetControllerAPI.testInboxRulesetsForInbox(inboxId: inboxId, inboxRulesetTestOptions: inboxRulesetTestOptions).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

NameTypeDescriptionNotes
inboxIdUUIDID 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

    open class func testNewInboxRuleset( testNewInboxRulesetOptions: TestNewInboxRulesetOptions) -> Promise<InboxRulesetTestResult>

Test new inbox ruleset

Test new inbox ruleset

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let testNewInboxRulesetOptions = TestNewInboxRulesetOptions(inboxRulesetTestOptions: InboxRulesetTestOptions(testTarget: "testTarget_example"), createInboxRulesetOptions: CreateInboxRulesetOptions(action: "action_example", scope: "scope_example", target: "target_example")) // TestNewInboxRulesetOptions | testNewInboxRulesetOptions

// Test new inbox ruleset
InboxRulesetControllerAPI.testNewInboxRuleset(testNewInboxRulesetOptions: testNewInboxRulesetOptions).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

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 ]