Interface IWaitForControllerApiSync
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: mailslurp.Api
Assembly: mailslurp.dll
Syntax
public interface IWaitForControllerApiSync : IApiAccessor
Methods
View SourceWaitFor(WaitForConditions, int)
Wait for an email to match the provided filter conditions such as subject contains keyword.
Declaration
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> |
Remarks
Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
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
Declaration
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> |
Remarks
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.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
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
Declaration
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> |
Remarks
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.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
WaitForLatestEmail(Guid?, long?, bool?, DateTime?, DateTime?, string, long?, int)
Fetch inbox's latest email or if empty wait for an email to arrive
Declaration
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 |
---|---|
Remarks
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
.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
WaitForLatestEmailWithHttpInfo(Guid?, long?, bool?, DateTime?, DateTime?, string, long?, int)
Fetch inbox's latest email or if empty wait for an email to arrive
Declaration
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 |
Remarks
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
.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
WaitForLatestSms(WaitForSingleSmsOptions, int)
Wait for the latest SMS message to match the provided filter conditions such as body contains keyword.
Declaration
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 |
Remarks
Wait until a phone number meets given conditions or return immediately if already met
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
WaitForLatestSmsWithHttpInfo(WaitForSingleSmsOptions, int)
Wait for the latest SMS message to match the provided filter conditions such as body contains keyword.
Declaration
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 |
Remarks
Wait until a phone number meets given conditions or return immediately if already met
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
WaitForMatchingEmails(Guid, int, MatchOptions, DateTime?, DateTime?, string, long?, long?, bool?, int)
Wait or return list of emails that match simple matching patterns
Declaration
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> |
Remarks
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: 'SUBJECT',should:'CONTAIN',value:'needle'}] }
. 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.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
WaitForMatchingEmailsWithHttpInfo(Guid, int, MatchOptions, DateTime?, DateTime?, string, long?, long?, bool?, int)
Wait or return list of emails that match simple matching patterns
Declaration
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> |
Remarks
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: 'SUBJECT',should:'CONTAIN',value:'needle'}] }
. 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.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
WaitForMatchingFirstEmail(Guid, MatchOptions, long?, bool?, DateTime?, DateTime?, string, long?, int)
Wait for or return the first email that matches provided MatchOptions array
Declaration
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 |
---|---|
Remarks
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: 'SUBJECT',should:'CONTAIN',value:'needle'}] }
. 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.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
WaitForMatchingFirstEmailWithHttpInfo(Guid, MatchOptions, long?, bool?, DateTime?, DateTime?, string, long?, int)
Wait for or return the first email that matches provided MatchOptions array
Declaration
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 |
Remarks
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: 'SUBJECT',should:'CONTAIN',value:'needle'}] }
. 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.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
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.
Declaration
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 |
---|---|
Remarks
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.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
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.
Declaration
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 |
Remarks
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.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
WaitForSms(WaitForSmsConditions, int)
Wait for an SMS message to match the provided filter conditions such as body contains keyword.
Declaration
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> |
Remarks
Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
WaitForSmsWithHttpInfo(WaitForSmsConditions, int)
Wait for an SMS message to match the provided filter conditions such as body contains keyword.
Declaration
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> |
Remarks
Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
WaitForWithHttpInfo(WaitForConditions, int)
Wait for an email to match the provided filter conditions such as subject contains keyword.
Declaration
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> |
Remarks
Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |