Search Results for

    Show / Hide Table of Contents

    Class WaitForControllerApi

    Represents a collection of functions to interact with the API endpoints

    Inheritance
    object
    WaitForControllerApi
    Implements
    IWaitForControllerApi
    IWaitForControllerApiSync
    IWaitForControllerApiAsync
    IApiAccessor
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: mailslurp.Api
    Assembly: mailslurp.dll
    Syntax
    public class WaitForControllerApi : IWaitForControllerApi, IWaitForControllerApiSync, IWaitForControllerApiAsync, IApiAccessor

    Constructors

    View Source

    WaitForControllerApi()

    Initializes a new instance of the WaitForControllerApi class.

    Declaration
    public WaitForControllerApi()
    View Source

    WaitForControllerApi(Configuration)

    Initializes a new instance of the WaitForControllerApi class using Configuration object

    Declaration
    public WaitForControllerApi(Configuration configuration)
    Parameters
    Type Name Description
    Configuration configuration

    An instance of Configuration

    View Source

    WaitForControllerApi(ISynchronousClient, IAsynchronousClient, IReadableConfiguration)

    Initializes a new instance of the WaitForControllerApi class using a Configuration object and client instance.

    Declaration
    public WaitForControllerApi(ISynchronousClient client, IAsynchronousClient asyncClient, IReadableConfiguration configuration)
    Parameters
    Type Name Description
    ISynchronousClient client

    The client interface for synchronous API access.

    IAsynchronousClient asyncClient

    The client interface for asynchronous API access.

    IReadableConfiguration configuration

    The configuration object.

    View Source

    WaitForControllerApi(string)

    Initializes a new instance of the WaitForControllerApi class.

    Declaration
    public WaitForControllerApi(string basePath)
    Parameters
    Type Name Description
    string basePath

    Properties

    View Source

    AsynchronousClient

    The client for accessing this underlying API asynchronously.

    Declaration
    public IAsynchronousClient AsynchronousClient { get; set; }
    Property Value
    Type Description
    IAsynchronousClient
    View Source

    Client

    The client for accessing this underlying API synchronously.

    Declaration
    public ISynchronousClient Client { get; set; }
    Property Value
    Type Description
    ISynchronousClient
    View Source

    Configuration

    Gets or sets the configuration object

    Declaration
    public IReadableConfiguration Configuration { get; set; }
    Property Value
    Type Description
    IReadableConfiguration

    An instance of the Configuration

    View Source

    ExceptionFactory

    Provides a factory method hook for the creation of exceptions.

    Declaration
    public ExceptionFactory ExceptionFactory { get; set; }
    Property Value
    Type Description
    ExceptionFactory

    Methods

    View Source

    GetBasePath()

    Gets the base path of the API client.

    Declaration
    public string GetBasePath()
    Returns
    Type Description
    string

    The base path

    View Source

    WaitFor(WaitForConditions, int)

    Wait for an email to match the provided filter conditions such as subject contains keyword. Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met

    Declaration
    public List<EmailPreview> WaitFor(WaitForConditions waitForConditions, int operationIndex = 0)
    Parameters
    Type Name Description
    WaitForConditions waitForConditions
    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    System.Collections.Generic.List<T><EmailPreview>

    List<EmailPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForAsync(WaitForConditions, int, CancellationToken)

    Wait for an email to match the provided filter conditions such as subject contains keyword. Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met

    Declaration
    public Task<List<EmailPreview>> WaitForAsync(WaitForConditions waitForConditions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForConditions waitForConditions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<System.Collections.Generic.List<T><EmailPreview>>

    Task of List<EmailPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForEmailCount(Guid, int, long?, bool?, DateTime?, DateTime?, string, long?, int)

    Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.

    Declaration
    public List<EmailPreview> WaitForEmailCount(Guid inboxId, int count, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater that 1

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    System.Collections.Generic.List<T><EmailPreview>

    List<EmailPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForEmailCountAsync(Guid, int, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.

    Declaration
    public Task<List<EmailPreview>> WaitForEmailCountAsync(Guid inboxId, int count, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater that 1

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<System.Collections.Generic.List<T><EmailPreview>>

    Task of List<EmailPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForEmailCountWithHttpInfo(Guid, int, long?, bool?, DateTime?, DateTime?, string, long?, int)

    Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.

    Declaration
    public ApiResponse<List<EmailPreview>> WaitForEmailCountWithHttpInfo(Guid inboxId, int count, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater that 1

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<System.Collections.Generic.List<T><EmailPreview>>

    ApiResponse of List<EmailPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForEmailCountWithHttpInfoAsync(Guid, int, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.

    Declaration
    public Task<ApiResponse<List<EmailPreview>>> WaitForEmailCountWithHttpInfoAsync(Guid inboxId, int count, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater that 1

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<System.Collections.Generic.List<T><EmailPreview>>>

    Task of ApiResponse (List<EmailPreview>)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestEmail(Guid?, long?, bool?, DateTime?, DateTime?, string, long?, int)

    Fetch inbox's latest email or if empty wait for an email to arrive Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set unreadOnly=true or see the other receive methods such as waitForNthEmail or waitForEmailCount.

    Declaration
    public Email WaitForLatestEmail(Guid? inboxId = null, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox we are fetching emails from (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only. (optional, default to false)

    DateTime? before

    Filter for emails that were before after the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    Email

    Email

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestEmailAsync(Guid?, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Fetch inbox's latest email or if empty wait for an email to arrive Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set unreadOnly=true or see the other receive methods such as waitForNthEmail or waitForEmailCount.

    Declaration
    public Task<Email> WaitForLatestEmailAsync(Guid? inboxId = null, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox we are fetching emails from (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only. (optional, default to false)

    DateTime? before

    Filter for emails that were before after the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<Email>

    Task of Email

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestEmailWithHttpInfo(Guid?, long?, bool?, DateTime?, DateTime?, string, long?, int)

    Fetch inbox's latest email or if empty wait for an email to arrive Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set unreadOnly=true or see the other receive methods such as waitForNthEmail or waitForEmailCount.

    Declaration
    public ApiResponse<Email> WaitForLatestEmailWithHttpInfo(Guid? inboxId = null, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox we are fetching emails from (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only. (optional, default to false)

    DateTime? before

    Filter for emails that were before after the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<Email>

    ApiResponse of Email

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestEmailWithHttpInfoAsync(Guid?, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Fetch inbox's latest email or if empty wait for an email to arrive Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set unreadOnly=true or see the other receive methods such as waitForNthEmail or waitForEmailCount.

    Declaration
    public Task<ApiResponse<Email>> WaitForLatestEmailWithHttpInfoAsync(Guid? inboxId = null, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox we are fetching emails from (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only. (optional, default to false)

    DateTime? before

    Filter for emails that were before after the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<Email>>

    Task of ApiResponse (Email)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestSms(WaitForSingleSmsOptions, int)

    Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. Wait until a phone number meets given conditions or return immediately if already met

    Declaration
    public SmsDto WaitForLatestSms(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0)
    Parameters
    Type Name Description
    WaitForSingleSmsOptions waitForSingleSmsOptions
    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    SmsDto

    SmsDto

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestSmsAsync(WaitForSingleSmsOptions, int, CancellationToken)

    Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. Wait until a phone number meets given conditions or return immediately if already met

    Declaration
    public Task<SmsDto> WaitForLatestSmsAsync(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForSingleSmsOptions waitForSingleSmsOptions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<SmsDto>

    Task of SmsDto

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestSmsWithHttpInfo(WaitForSingleSmsOptions, int)

    Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. Wait until a phone number meets given conditions or return immediately if already met

    Declaration
    public ApiResponse<SmsDto> WaitForLatestSmsWithHttpInfo(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0)
    Parameters
    Type Name Description
    WaitForSingleSmsOptions waitForSingleSmsOptions
    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<SmsDto>

    ApiResponse of SmsDto

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestSmsWithHttpInfoAsync(WaitForSingleSmsOptions, int, CancellationToken)

    Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. Wait until a phone number meets given conditions or return immediately if already met

    Declaration
    public Task<ApiResponse<SmsDto>> WaitForLatestSmsWithHttpInfoAsync(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForSingleSmsOptions waitForSingleSmsOptions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<SmsDto>>

    Task of ApiResponse (SmsDto)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingEmails(Guid, int, MatchOptions, DateTime?, DateTime?, string, long?, long?, bool?, int)

    Wait or return list of emails that match simple matching patterns Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Declaration
    public List<EmailPreview> WaitForMatchingEmails(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, long? timeout = null, bool? unreadOnly = null, int operationIndex = 0)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater or equal to 1

    MatchOptions matchOptions
    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    System.Collections.Generic.List<T><EmailPreview>

    List<EmailPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingEmailsAsync(Guid, int, MatchOptions, DateTime?, DateTime?, string, long?, long?, bool?, int, CancellationToken)

    Wait or return list of emails that match simple matching patterns Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Declaration
    public Task<List<EmailPreview>> WaitForMatchingEmailsAsync(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, long? timeout = null, bool? unreadOnly = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater or equal to 1

    MatchOptions matchOptions
    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<System.Collections.Generic.List<T><EmailPreview>>

    Task of List<EmailPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingEmailsWithHttpInfo(Guid, int, MatchOptions, DateTime?, DateTime?, string, long?, long?, bool?, int)

    Wait or return list of emails that match simple matching patterns Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Declaration
    public ApiResponse<List<EmailPreview>> WaitForMatchingEmailsWithHttpInfo(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, long? timeout = null, bool? unreadOnly = null, int operationIndex = 0)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater or equal to 1

    MatchOptions matchOptions
    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<System.Collections.Generic.List<T><EmailPreview>>

    ApiResponse of List<EmailPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingEmailsWithHttpInfoAsync(Guid, int, MatchOptions, DateTime?, DateTime?, string, long?, long?, bool?, int, CancellationToken)

    Wait or return list of emails that match simple matching patterns Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Declaration
    public Task<ApiResponse<List<EmailPreview>>> WaitForMatchingEmailsWithHttpInfoAsync(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, long? timeout = null, bool? unreadOnly = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater or equal to 1

    MatchOptions matchOptions
    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<System.Collections.Generic.List<T><EmailPreview>>>

    Task of ApiResponse (List<EmailPreview>)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingFirstEmail(Guid, MatchOptions, long?, bool?, DateTime?, DateTime?, string, long?, int)

    Wait for or return the first email that matches provided MatchOptions array Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Declaration
    public Email WaitForMatchingFirstEmail(Guid inboxId, MatchOptions matchOptions, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are matching an email for

    MatchOptions matchOptions
    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    Email

    Email

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingFirstEmailAsync(Guid, MatchOptions, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for or return the first email that matches provided MatchOptions array Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Declaration
    public Task<Email> WaitForMatchingFirstEmailAsync(Guid inboxId, MatchOptions matchOptions, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are matching an email for

    MatchOptions matchOptions
    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<Email>

    Task of Email

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingFirstEmailWithHttpInfo(Guid, MatchOptions, long?, bool?, DateTime?, DateTime?, string, long?, int)

    Wait for or return the first email that matches provided MatchOptions array Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Declaration
    public ApiResponse<Email> WaitForMatchingFirstEmailWithHttpInfo(Guid inboxId, MatchOptions matchOptions, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are matching an email for

    MatchOptions matchOptions
    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<Email>

    ApiResponse of Email

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingFirstEmailWithHttpInfoAsync(Guid, MatchOptions, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for or return the first email that matches provided MatchOptions array Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Declaration
    public Task<ApiResponse<Email>> WaitForMatchingFirstEmailWithHttpInfoAsync(Guid inboxId, MatchOptions matchOptions, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are matching an email for

    MatchOptions matchOptions
    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<Email>>

    Task of ApiResponse (Email)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForNthEmail(Guid?, int?, long?, bool?, DateTime?, DateTime?, string, long?, int)

    Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.

    Declaration
    public Email WaitForNthEmail(Guid? inboxId = null, int? index = null, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox you are fetching emails from (optional)

    int? index

    Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0)

    long? timeout

    Max milliseconds to wait for the nth email if not already present (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    Email

    Email

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForNthEmailAsync(Guid?, int?, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.

    Declaration
    public Task<Email> WaitForNthEmailAsync(Guid? inboxId = null, int? index = null, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox you are fetching emails from (optional)

    int? index

    Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0)

    long? timeout

    Max milliseconds to wait for the nth email if not already present (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<Email>

    Task of Email

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForNthEmailWithHttpInfo(Guid?, int?, long?, bool?, DateTime?, DateTime?, string, long?, int)

    Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.

    Declaration
    public ApiResponse<Email> WaitForNthEmailWithHttpInfo(Guid? inboxId = null, int? index = null, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox you are fetching emails from (optional)

    int? index

    Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0)

    long? timeout

    Max milliseconds to wait for the nth email if not already present (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<Email>

    ApiResponse of Email

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForNthEmailWithHttpInfoAsync(Guid?, int?, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.

    Declaration
    public Task<ApiResponse<Email>> WaitForNthEmailWithHttpInfoAsync(Guid? inboxId = null, int? index = null, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox you are fetching emails from (optional)

    int? index

    Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional, default to 0)

    long? timeout

    Max milliseconds to wait for the nth email if not already present (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<Email>>

    Task of ApiResponse (Email)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForSms(WaitForSmsConditions, int)

    Wait for an SMS message to match the provided filter conditions such as body contains keyword. Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met

    Declaration
    public List<SmsPreview> WaitForSms(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0)
    Parameters
    Type Name Description
    WaitForSmsConditions waitForSmsConditions
    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    System.Collections.Generic.List<T><SmsPreview>

    List<SmsPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForSmsAsync(WaitForSmsConditions, int, CancellationToken)

    Wait for an SMS message to match the provided filter conditions such as body contains keyword. Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met

    Declaration
    public Task<List<SmsPreview>> WaitForSmsAsync(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForSmsConditions waitForSmsConditions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<System.Collections.Generic.List<T><SmsPreview>>

    Task of List<SmsPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForSmsWithHttpInfo(WaitForSmsConditions, int)

    Wait for an SMS message to match the provided filter conditions such as body contains keyword. Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met

    Declaration
    public ApiResponse<List<SmsPreview>> WaitForSmsWithHttpInfo(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0)
    Parameters
    Type Name Description
    WaitForSmsConditions waitForSmsConditions
    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<System.Collections.Generic.List<T><SmsPreview>>

    ApiResponse of List<SmsPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForSmsWithHttpInfoAsync(WaitForSmsConditions, int, CancellationToken)

    Wait for an SMS message to match the provided filter conditions such as body contains keyword. Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met

    Declaration
    public Task<ApiResponse<List<SmsPreview>>> WaitForSmsWithHttpInfoAsync(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForSmsConditions waitForSmsConditions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<System.Collections.Generic.List<T><SmsPreview>>>

    Task of ApiResponse (List<SmsPreview>)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForWithHttpInfo(WaitForConditions, int)

    Wait for an email to match the provided filter conditions such as subject contains keyword. Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met

    Declaration
    public ApiResponse<List<EmailPreview>> WaitForWithHttpInfo(WaitForConditions waitForConditions, int operationIndex = 0)
    Parameters
    Type Name Description
    WaitForConditions waitForConditions
    int operationIndex

    Index associated with the operation.

    Returns
    Type Description
    ApiResponse<System.Collections.Generic.List<T><EmailPreview>>

    ApiResponse of List<EmailPreview>

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForWithHttpInfoAsync(WaitForConditions, int, CancellationToken)

    Wait for an email to match the provided filter conditions such as subject contains keyword. Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met

    Declaration
    public Task<ApiResponse<List<EmailPreview>>> WaitForWithHttpInfoAsync(WaitForConditions waitForConditions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForConditions waitForConditions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<System.Collections.Generic.List<T><EmailPreview>>>

    Task of ApiResponse (List<EmailPreview>)

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    Implements

    IWaitForControllerApi
    IWaitForControllerApiSync
    IWaitForControllerApiAsync
    IApiAccessor
    • View Source
    In This Article
    Back to top See MailSlurp website for more information.