Package 

Class WaitForControllerApi

    • Constructor Detail

      • WaitForControllerApi

        WaitForControllerApi(String xApiKey, String basePath)
    • Method Detail

      • waitFor

         final List<EmailPreview> waitFor(WaitForConditions waitForConditions)

        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

        Parameters:
        waitForConditions - Conditions to apply to emails that you are waiting for (optional)
      • waitForRequestConfig

         final RequestConfig waitForRequestConfig(WaitForConditions waitForConditions)

        To obtain the request config of the operation waitFor

        Parameters:
        waitForConditions - Conditions to apply to emails that you are waiting for (optional)
      • waitForEmailCount

         final List<EmailPreview> waitForEmailCount(OffsetDateTime before, Integer count, Long delay, UUID inboxId, OffsetDateTime since, String sort, Long timeout, Boolean unreadOnly)

        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.

        Parameters:
        before - Filter for emails that were received before the given timestamp (optional)
        count - Number of emails to wait for.
        delay - Max milliseconds delay between calls (optional)
        inboxId - Id of the inbox we are fetching emails from (optional)
        since - Filter for emails that were received after the given timestamp (optional)
        sort - Sort direction (optional)
        timeout - Max milliseconds to wait (optional)
        unreadOnly - Optional filter for unread only (optional, default to false)
      • waitForEmailCountRequestConfig

         final RequestConfig waitForEmailCountRequestConfig(OffsetDateTime before, Integer count, Long delay, UUID inboxId, OffsetDateTime since, String sort, Long timeout, Boolean unreadOnly)

        To obtain the request config of the operation waitForEmailCount

        Parameters:
        before - Filter for emails that were received before the given timestamp (optional)
        count - Number of emails to wait for.
        delay - Max milliseconds delay between calls (optional)
        inboxId - Id of the inbox we are fetching emails from (optional)
        since - Filter for emails that were received after the given timestamp (optional)
        sort - Sort direction (optional)
        timeout - Max milliseconds to wait (optional)
        unreadOnly - Optional filter for unread only (optional, default to false)
      • waitForLatestEmail

         final Email waitForLatestEmail(OffsetDateTime before, Long delay, UUID inboxId, OffsetDateTime since, String sort, Long timeout, Boolean unreadOnly)

        Fetch inbox&#39;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 &#x60;unreadOnly&#x3D;true&#x60; or see the other receive methods such as &#x60;waitForNthEmail&#x60; or &#x60;waitForEmailCount&#x60;.

        Parameters:
        before - Filter for emails that were before after the given timestamp (optional)
        delay - Max milliseconds delay between calls (optional)
        inboxId - Id of the inbox we are fetching emails from (optional)
        since - Filter for emails that were received after the given timestamp (optional)
        sort - Sort direction (optional)
        timeout - Max milliseconds to wait (optional)
        unreadOnly - Optional filter for unread only.
      • waitForLatestEmailRequestConfig

         final RequestConfig waitForLatestEmailRequestConfig(OffsetDateTime before, Long delay, UUID inboxId, OffsetDateTime since, String sort, Long timeout, Boolean unreadOnly)

        To obtain the request config of the operation waitForLatestEmail

        Parameters:
        before - Filter for emails that were before after the given timestamp (optional)
        delay - Max milliseconds delay between calls (optional)
        inboxId - Id of the inbox we are fetching emails from (optional)
        since - Filter for emails that were received after the given timestamp (optional)
        sort - Sort direction (optional)
        timeout - Max milliseconds to wait (optional)
        unreadOnly - Optional filter for unread only.
      • waitForMatchingEmails

         final List<EmailPreview> waitForMatchingEmails(MatchOptions matchOptions, OffsetDateTime before, Integer count, Long delay, UUID inboxId, OffsetDateTime since, String sort, Long timeout, Boolean unreadOnly)

        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 &#x60;MatchOptions&#x60; object for options. An example payload is &#x60;{ matches: {field: &#39;SUBJECT&#39;,should:&#39;CONTAIN&#39;,value:&#39;needle&#39;} }&#x60;. 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 &#x60;getEmailContentMatch&#x60; method.

        Parameters:
        matchOptions - matchOptions
        before - Filter for emails that were received before the given timestamp (optional)
        count - Number of emails to wait for.
        delay - Max milliseconds delay between calls (optional)
        inboxId - Id of the inbox we are fetching emails from (optional)
        since - Filter for emails that were received after the given timestamp (optional)
        sort - Sort direction (optional)
        timeout - Max milliseconds to wait (optional)
        unreadOnly - Optional filter for unread only (optional, default to false)
      • waitForMatchingEmailsRequestConfig

         final RequestConfig waitForMatchingEmailsRequestConfig(MatchOptions matchOptions, OffsetDateTime before, Integer count, Long delay, UUID inboxId, OffsetDateTime since, String sort, Long timeout, Boolean unreadOnly)

        To obtain the request config of the operation waitForMatchingEmails

        Parameters:
        matchOptions - matchOptions
        before - Filter for emails that were received before the given timestamp (optional)
        count - Number of emails to wait for.
        delay - Max milliseconds delay between calls (optional)
        inboxId - Id of the inbox we are fetching emails from (optional)
        since - Filter for emails that were received after the given timestamp (optional)
        sort - Sort direction (optional)
        timeout - Max milliseconds to wait (optional)
        unreadOnly - Optional filter for unread only (optional, default to false)
      • waitForMatchingFirstEmail

         final Email waitForMatchingFirstEmail(MatchOptions matchOptions, OffsetDateTime before, Long delay, UUID inboxId, OffsetDateTime since, String sort, Long timeout, Boolean unreadOnly)

        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 &#x60;MatchOptions&#x60; object for options. An example payload is &#x60;{ matches: {field: &#39;SUBJECT&#39;,should:&#39;CONTAIN&#39;,value:&#39;needle&#39;} }&#x60;. 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 &#x60;getEmailContentMatch&#x60; method.

        Parameters:
        matchOptions - matchOptions
        before - Filter for emails that were received before the given timestamp (optional)
        delay - Max milliseconds delay between calls (optional)
        inboxId - Id of the inbox we are matching an email for (optional)
        since - Filter for emails that were received after the given timestamp (optional)
        sort - Sort direction (optional)
        timeout - Max milliseconds to wait (optional)
        unreadOnly - Optional filter for unread only (optional, default to false)
      • waitForMatchingFirstEmailRequestConfig

         final RequestConfig waitForMatchingFirstEmailRequestConfig(MatchOptions matchOptions, OffsetDateTime before, Long delay, UUID inboxId, OffsetDateTime since, String sort, Long timeout, Boolean unreadOnly)

        To obtain the request config of the operation waitForMatchingFirstEmail

        Parameters:
        matchOptions - matchOptions
        before - Filter for emails that were received before the given timestamp (optional)
        delay - Max milliseconds delay between calls (optional)
        inboxId - Id of the inbox we are matching an email for (optional)
        since - Filter for emails that were received after the given timestamp (optional)
        sort - Sort direction (optional)
        timeout - Max milliseconds to wait (optional)
        unreadOnly - Optional filter for unread only (optional, default to false)
      • waitForNthEmail

         final Email waitForNthEmail(OffsetDateTime before, Long delay, UUID inboxId, Integer index, OffsetDateTime since, String sort, Long timeout, Boolean unreadOnly)

        Wait for or fetch the email with a given index in the inbox specified. If index doesn&#39;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.

        Parameters:
        before - Filter for emails that were received before the given timestamp (optional)
        delay - Max milliseconds delay between calls (optional)
        inboxId - Id of the inbox you are fetching emails from (optional)
        index - Zero based index of the email to wait for.
        since - Filter for emails that were received after the given timestamp (optional)
        sort - Sort direction (optional)
        timeout - Max milliseconds to wait for the nth email if not already present (optional)
        unreadOnly - Optional filter for unread only (optional, default to false)
      • waitForNthEmailRequestConfig

         final RequestConfig waitForNthEmailRequestConfig(OffsetDateTime before, Long delay, UUID inboxId, Integer index, OffsetDateTime since, String sort, Long timeout, Boolean unreadOnly)

        To obtain the request config of the operation waitForNthEmail

        Parameters:
        before - Filter for emails that were received before the given timestamp (optional)
        delay - Max milliseconds delay between calls (optional)
        inboxId - Id of the inbox you are fetching emails from (optional)
        index - Zero based index of the email to wait for.
        since - Filter for emails that were received after the given timestamp (optional)
        sort - Sort direction (optional)
        timeout - Max milliseconds to wait for the nth email if not already present (optional)
        unreadOnly - Optional filter for unread only (optional, default to false)