mailslurp_netstandard_2x.Api.InboxRulesetControllerApi
All URIs are relative to https://csharp.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 |
InboxRulesetDto CreateNewInboxRuleset (Guid inboxId, CreateInboxRulesetOptions createInboxRulesetOptions)
Create an inbox ruleset
Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class CreateNewInboxRulesetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new InboxRulesetControllerApi(config);
var inboxId = new Guid(); // Guid | Inbox id to attach ruleset to
var createInboxRulesetOptions = new CreateInboxRulesetOptions(); // CreateInboxRulesetOptions |
try
{
// Create an inbox ruleset
InboxRulesetDto result = apiInstance.CreateNewInboxRuleset(inboxId, createInboxRulesetOptions);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InboxRulesetControllerApi.CreateNewInboxRuleset: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | Guid | Inbox id to attach ruleset to | |
createInboxRulesetOptions | CreateInboxRulesetOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
void DeleteInboxRuleset (Guid id)
Delete an inbox ruleset
Delete inbox ruleset
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class DeleteInboxRulesetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new InboxRulesetControllerApi(config);
var id = new Guid(); // Guid | ID of inbox ruleset
try
{
// Delete an inbox ruleset
apiInstance.DeleteInboxRuleset(id);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InboxRulesetControllerApi.DeleteInboxRuleset: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | Guid | ID of inbox ruleset |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
void DeleteInboxRulesets (Guid? inboxId = null)
Delete inbox rulesets
Delete inbox rulesets. Accepts optional inboxId filter.
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class DeleteInboxRulesetsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new InboxRulesetControllerApi(config);
var inboxId = new Guid?(); // Guid? | Optional inbox id to attach ruleset to (optional)
try
{
// Delete inbox rulesets
apiInstance.DeleteInboxRulesets(inboxId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InboxRulesetControllerApi.DeleteInboxRulesets: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | Guid? | 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
HTTP response details
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
InboxRulesetDto GetInboxRuleset (Guid id)
Get an inbox ruleset
Get inbox ruleset
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetInboxRulesetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new InboxRulesetControllerApi(config);
var id = new Guid(); // Guid | ID of inbox ruleset
try
{
// Get an inbox ruleset
InboxRulesetDto result = apiInstance.GetInboxRuleset(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InboxRulesetControllerApi.GetInboxRuleset: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | Guid | ID of inbox ruleset |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageInboxRulesetDto GetInboxRulesets (Guid? inboxId = null, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null)
List inbox rulesets
List all rulesets attached to an inbox
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetInboxRulesetsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new InboxRulesetControllerApi(config);
var inboxId = new Guid?(); // Guid? | Optional inbox id to get rulesets from (optional)
var page = 56; // int? | Optional page in inbox ruleset list pagination (optional) (default to 0)
var size = 56; // int? | Optional page size in inbox ruleset list pagination (optional) (default to 20)
var sort = sort_example; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var searchFilter = searchFilter_example; // string | Optional search filter (optional)
var since = 2013-10-20T19:20:30+01:00; // DateTime? | Filter by created at after the given timestamp (optional)
var before = 2013-10-20T19:20:30+01:00; // DateTime? | Filter by created at before the given timestamp (optional)
try
{
// List inbox rulesets
PageInboxRulesetDto result = apiInstance.GetInboxRulesets(inboxId, page, size, sort, searchFilter, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InboxRulesetControllerApi.GetInboxRulesets: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | Guid? | 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] |
searchFilter | 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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
InboxRulesetTestResult TestInboxRuleset (Guid id, InboxRulesetTestOptions inboxRulesetTestOptions)
Test an inbox ruleset
Test an inbox ruleset
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class TestInboxRulesetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new InboxRulesetControllerApi(config);
var id = new Guid(); // Guid | ID of inbox ruleset
var inboxRulesetTestOptions = new InboxRulesetTestOptions(); // InboxRulesetTestOptions |
try
{
// Test an inbox ruleset
InboxRulesetTestResult result = apiInstance.TestInboxRuleset(id, inboxRulesetTestOptions);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InboxRulesetControllerApi.TestInboxRuleset: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | Guid | ID of inbox ruleset | |
inboxRulesetTestOptions | InboxRulesetTestOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
InboxRulesetTestResult TestInboxRulesetsForInbox (Guid inboxId, InboxRulesetTestOptions inboxRulesetTestOptions)
Test inbox rulesets for inbox
Test inbox rulesets for inbox
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class TestInboxRulesetsForInboxExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new InboxRulesetControllerApi(config);
var inboxId = new Guid(); // Guid | ID of inbox
var inboxRulesetTestOptions = new InboxRulesetTestOptions(); // InboxRulesetTestOptions |
try
{
// Test inbox rulesets for inbox
InboxRulesetTestResult result = apiInstance.TestInboxRulesetsForInbox(inboxId, inboxRulesetTestOptions);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InboxRulesetControllerApi.TestInboxRulesetsForInbox: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | Guid | ID of inbox | |
inboxRulesetTestOptions | InboxRulesetTestOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
InboxRulesetTestResult TestNewInboxRuleset (TestNewInboxRulesetOptions testNewInboxRulesetOptions)
Test new inbox ruleset
Test new inbox ruleset
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class TestNewInboxRulesetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.api.mailslurp.com";
// Configure API key authorization: API_KEY
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
var apiInstance = new InboxRulesetControllerApi(config);
var testNewInboxRulesetOptions = new TestNewInboxRulesetOptions(); // TestNewInboxRulesetOptions |
try
{
// Test new inbox ruleset
InboxRulesetTestResult result = apiInstance.TestNewInboxRuleset(testNewInboxRulesetOptions);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InboxRulesetControllerApi.TestNewInboxRuleset: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
testNewInboxRulesetOptions | TestNewInboxRulesetOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]