Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* MailSlurp API
* MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
*
* The version of the OpenAPI document: 6.5.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.mailslurp.apis;
import com.mailslurp.clients.ApiCallback;
import com.mailslurp.clients.ApiClient;
import com.mailslurp.clients.ApiException;
import com.mailslurp.clients.ApiResponse;
import com.mailslurp.clients.Configuration;
import com.mailslurp.clients.Pair;
import com.mailslurp.clients.ProgressRequestBody;
import com.mailslurp.clients.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.mailslurp.models.Email;
import com.mailslurp.models.EmailPreview;
import com.mailslurp.models.MatchOptions;
import java.time.OffsetDateTime;
import com.mailslurp.models.SmsDto;
import com.mailslurp.models.SmsPreview;
import java.util.UUID;
import com.mailslurp.models.WaitForConditions;
import com.mailslurp.models.WaitForSingleSmsOptions;
import com.mailslurp.models.WaitForSmsConditions;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class WaitForControllerApi {
private ApiClient localVarApiClient;
public WaitForControllerApi() {
this(Configuration.getDefaultApiClient());
}
public WaitForControllerApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for waitFor
* @param waitForConditions (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForCall(WaitForConditions waitForConditions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = waitForConditions;
// create path and map variables
String localVarPath = "/waitFor";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call waitForValidateBeforeCall(WaitForConditions waitForConditions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'waitForConditions' is set
if (waitForConditions == null) {
throw new ApiException("Missing the required parameter 'waitForConditions' when calling waitFor(Async)");
}
okhttp3.Call localVarCall = waitForCall(waitForConditions, _callback);
return localVarCall;
}
/**
* 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
* @param waitForConditions (required)
* @return List<EmailPreview>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public List waitFor(WaitForConditions waitForConditions) throws ApiException {
ApiResponse> localVarResp = waitForWithHttpInfo(waitForConditions);
return localVarResp.getData();
}
/**
* 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
* @param waitForConditions (required)
* @return ApiResponse<List<EmailPreview>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse> waitForWithHttpInfo(WaitForConditions waitForConditions) throws ApiException {
okhttp3.Call localVarCall = waitForValidateBeforeCall(waitForConditions, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Wait for an email to match the provided filter conditions such as subject contains keyword. (asynchronously)
* Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
* @param waitForConditions (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForAsync(WaitForConditions waitForConditions, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = waitForValidateBeforeCall(waitForConditions, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for waitForEmailCount
* @param inboxId Id of the inbox we are fetching emails from (required)
* @param count Number of emails to wait for. Must be greater that 1 (required)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForEmailCountCall(UUID inboxId, Integer count, Long timeout, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since, String sort, Long delay, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/waitForEmailCount";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (inboxId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("inboxId", inboxId));
}
if (count != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", count));
}
if (timeout != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeout", timeout));
}
if (unreadOnly != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("unreadOnly", unreadOnly));
}
if (before != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before));
}
if (since != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since));
}
if (sort != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort));
}
if (delay != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("delay", delay));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call waitForEmailCountValidateBeforeCall(UUID inboxId, Integer count, Long timeout, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since, String sort, Long delay, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'inboxId' is set
if (inboxId == null) {
throw new ApiException("Missing the required parameter 'inboxId' when calling waitForEmailCount(Async)");
}
// verify the required parameter 'count' is set
if (count == null) {
throw new ApiException("Missing the required parameter 'count' when calling waitForEmailCount(Async)");
}
okhttp3.Call localVarCall = waitForEmailCountCall(inboxId, count, timeout, unreadOnly, before, since, sort, delay, _callback);
return localVarCall;
}
/**
* 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.
* @param inboxId Id of the inbox we are fetching emails from (required)
* @param count Number of emails to wait for. Must be greater that 1 (required)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @return List<EmailPreview>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public List waitForEmailCount(UUID inboxId, Integer count, Long timeout, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since, String sort, Long delay) throws ApiException {
ApiResponse> localVarResp = waitForEmailCountWithHttpInfo(inboxId, count, timeout, unreadOnly, before, since, sort, delay);
return localVarResp.getData();
}
/**
* 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.
* @param inboxId Id of the inbox we are fetching emails from (required)
* @param count Number of emails to wait for. Must be greater that 1 (required)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @return ApiResponse<List<EmailPreview>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse> waitForEmailCountWithHttpInfo(UUID inboxId, Integer count, Long timeout, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since, String sort, Long delay) throws ApiException {
okhttp3.Call localVarCall = waitForEmailCountValidateBeforeCall(inboxId, count, timeout, unreadOnly, before, since, sort, delay, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs (asynchronously)
* 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.
* @param inboxId Id of the inbox we are fetching emails from (required)
* @param count Number of emails to wait for. Must be greater that 1 (required)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForEmailCountAsync(UUID inboxId, Integer count, Long timeout, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since, String sort, Long delay, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = waitForEmailCountValidateBeforeCall(inboxId, count, timeout, unreadOnly, before, since, sort, delay, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for waitForLatestEmail
* @param inboxId Id of the inbox we are fetching emails from (optional)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only. (optional, default to false)
* @param before Filter for emails that were before after the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForLatestEmailCall(UUID inboxId, Long timeout, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since, String sort, Long delay, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/waitForLatestEmail";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (inboxId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("inboxId", inboxId));
}
if (timeout != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeout", timeout));
}
if (unreadOnly != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("unreadOnly", unreadOnly));
}
if (before != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before));
}
if (since != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since));
}
if (sort != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort));
}
if (delay != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("delay", delay));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call waitForLatestEmailValidateBeforeCall(UUID inboxId, Long timeout, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since, String sort, Long delay, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = waitForLatestEmailCall(inboxId, timeout, unreadOnly, before, since, sort, delay, _callback);
return localVarCall;
}
/**
* 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`.
* @param inboxId Id of the inbox we are fetching emails from (optional)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only. (optional, default to false)
* @param before Filter for emails that were before after the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @return Email
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public Email waitForLatestEmail(UUID inboxId, Long timeout, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since, String sort, Long delay) throws ApiException {
ApiResponse localVarResp = waitForLatestEmailWithHttpInfo(inboxId, timeout, unreadOnly, before, since, sort, delay);
return localVarResp.getData();
}
/**
* 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`.
* @param inboxId Id of the inbox we are fetching emails from (optional)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only. (optional, default to false)
* @param before Filter for emails that were before after the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @return ApiResponse<Email>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse waitForLatestEmailWithHttpInfo(UUID inboxId, Long timeout, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since, String sort, Long delay) throws ApiException {
okhttp3.Call localVarCall = waitForLatestEmailValidateBeforeCall(inboxId, timeout, unreadOnly, before, since, sort, delay, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Fetch inbox's latest email or if empty wait for an email to arrive (asynchronously)
* 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`.
* @param inboxId Id of the inbox we are fetching emails from (optional)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only. (optional, default to false)
* @param before Filter for emails that were before after the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForLatestEmailAsync(UUID inboxId, Long timeout, Boolean unreadOnly, OffsetDateTime before, OffsetDateTime since, String sort, Long delay, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = waitForLatestEmailValidateBeforeCall(inboxId, timeout, unreadOnly, before, since, sort, delay, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for waitForLatestSms
* @param waitForSingleSmsOptions (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForLatestSmsCall(WaitForSingleSmsOptions waitForSingleSmsOptions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = waitForSingleSmsOptions;
// create path and map variables
String localVarPath = "/waitForLatestSms";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call waitForLatestSmsValidateBeforeCall(WaitForSingleSmsOptions waitForSingleSmsOptions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'waitForSingleSmsOptions' is set
if (waitForSingleSmsOptions == null) {
throw new ApiException("Missing the required parameter 'waitForSingleSmsOptions' when calling waitForLatestSms(Async)");
}
okhttp3.Call localVarCall = waitForLatestSmsCall(waitForSingleSmsOptions, _callback);
return localVarCall;
}
/**
* 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
* @param waitForSingleSmsOptions (required)
* @return SmsDto
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public SmsDto waitForLatestSms(WaitForSingleSmsOptions waitForSingleSmsOptions) throws ApiException {
ApiResponse localVarResp = waitForLatestSmsWithHttpInfo(waitForSingleSmsOptions);
return localVarResp.getData();
}
/**
* 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
* @param waitForSingleSmsOptions (required)
* @return ApiResponse<SmsDto>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse waitForLatestSmsWithHttpInfo(WaitForSingleSmsOptions waitForSingleSmsOptions) throws ApiException {
okhttp3.Call localVarCall = waitForLatestSmsValidateBeforeCall(waitForSingleSmsOptions, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. (asynchronously)
* Wait until a phone number meets given conditions or return immediately if already met
* @param waitForSingleSmsOptions (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForLatestSmsAsync(WaitForSingleSmsOptions waitForSingleSmsOptions, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = waitForLatestSmsValidateBeforeCall(waitForSingleSmsOptions, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for waitForMatchingEmails
* @param inboxId Id of the inbox we are fetching emails from (required)
* @param count Number of emails to wait for. Must be greater or equal to 1 (required)
* @param matchOptions (required)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForMatchingEmailsCall(UUID inboxId, Integer count, MatchOptions matchOptions, OffsetDateTime before, OffsetDateTime since, String sort, Long delay, Long timeout, Boolean unreadOnly, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = matchOptions;
// create path and map variables
String localVarPath = "/waitForMatchingEmails";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (inboxId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("inboxId", inboxId));
}
if (count != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", count));
}
if (before != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before));
}
if (since != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since));
}
if (sort != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort));
}
if (delay != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("delay", delay));
}
if (timeout != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeout", timeout));
}
if (unreadOnly != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("unreadOnly", unreadOnly));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call waitForMatchingEmailsValidateBeforeCall(UUID inboxId, Integer count, MatchOptions matchOptions, OffsetDateTime before, OffsetDateTime since, String sort, Long delay, Long timeout, Boolean unreadOnly, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'inboxId' is set
if (inboxId == null) {
throw new ApiException("Missing the required parameter 'inboxId' when calling waitForMatchingEmails(Async)");
}
// verify the required parameter 'count' is set
if (count == null) {
throw new ApiException("Missing the required parameter 'count' when calling waitForMatchingEmails(Async)");
}
// verify the required parameter 'matchOptions' is set
if (matchOptions == null) {
throw new ApiException("Missing the required parameter 'matchOptions' when calling waitForMatchingEmails(Async)");
}
okhttp3.Call localVarCall = waitForMatchingEmailsCall(inboxId, count, matchOptions, before, since, sort, delay, timeout, unreadOnly, _callback);
return localVarCall;
}
/**
* 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: '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.
* @param inboxId Id of the inbox we are fetching emails from (required)
* @param count Number of emails to wait for. Must be greater or equal to 1 (required)
* @param matchOptions (required)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @return List<EmailPreview>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public List waitForMatchingEmails(UUID inboxId, Integer count, MatchOptions matchOptions, OffsetDateTime before, OffsetDateTime since, String sort, Long delay, Long timeout, Boolean unreadOnly) throws ApiException {
ApiResponse> localVarResp = waitForMatchingEmailsWithHttpInfo(inboxId, count, matchOptions, before, since, sort, delay, timeout, unreadOnly);
return localVarResp.getData();
}
/**
* 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: '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.
* @param inboxId Id of the inbox we are fetching emails from (required)
* @param count Number of emails to wait for. Must be greater or equal to 1 (required)
* @param matchOptions (required)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @return ApiResponse<List<EmailPreview>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse> waitForMatchingEmailsWithHttpInfo(UUID inboxId, Integer count, MatchOptions matchOptions, OffsetDateTime before, OffsetDateTime since, String sort, Long delay, Long timeout, Boolean unreadOnly) throws ApiException {
okhttp3.Call localVarCall = waitForMatchingEmailsValidateBeforeCall(inboxId, count, matchOptions, before, since, sort, delay, timeout, unreadOnly, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Wait or return list of emails that match simple matching patterns (asynchronously)
* 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.
* @param inboxId Id of the inbox we are fetching emails from (required)
* @param count Number of emails to wait for. Must be greater or equal to 1 (required)
* @param matchOptions (required)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForMatchingEmailsAsync(UUID inboxId, Integer count, MatchOptions matchOptions, OffsetDateTime before, OffsetDateTime since, String sort, Long delay, Long timeout, Boolean unreadOnly, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = waitForMatchingEmailsValidateBeforeCall(inboxId, count, matchOptions, before, since, sort, delay, timeout, unreadOnly, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for waitForMatchingFirstEmail
* @param inboxId Id of the inbox we are matching an email for (required)
* @param matchOptions (required)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForMatchingFirstEmailCall(UUID inboxId, MatchOptions matchOptions, Long timeout, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, String sort, Long delay, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = matchOptions;
// create path and map variables
String localVarPath = "/waitForMatchingFirstEmail";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (inboxId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("inboxId", inboxId));
}
if (timeout != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeout", timeout));
}
if (unreadOnly != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("unreadOnly", unreadOnly));
}
if (since != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since));
}
if (before != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before));
}
if (sort != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort));
}
if (delay != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("delay", delay));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call waitForMatchingFirstEmailValidateBeforeCall(UUID inboxId, MatchOptions matchOptions, Long timeout, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, String sort, Long delay, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'inboxId' is set
if (inboxId == null) {
throw new ApiException("Missing the required parameter 'inboxId' when calling waitForMatchingFirstEmail(Async)");
}
// verify the required parameter 'matchOptions' is set
if (matchOptions == null) {
throw new ApiException("Missing the required parameter 'matchOptions' when calling waitForMatchingFirstEmail(Async)");
}
okhttp3.Call localVarCall = waitForMatchingFirstEmailCall(inboxId, matchOptions, timeout, unreadOnly, since, before, sort, delay, _callback);
return localVarCall;
}
/**
* 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: '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.
* @param inboxId Id of the inbox we are matching an email for (required)
* @param matchOptions (required)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @return Email
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public Email waitForMatchingFirstEmail(UUID inboxId, MatchOptions matchOptions, Long timeout, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, String sort, Long delay) throws ApiException {
ApiResponse localVarResp = waitForMatchingFirstEmailWithHttpInfo(inboxId, matchOptions, timeout, unreadOnly, since, before, sort, delay);
return localVarResp.getData();
}
/**
* 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: '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.
* @param inboxId Id of the inbox we are matching an email for (required)
* @param matchOptions (required)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @return ApiResponse<Email>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse waitForMatchingFirstEmailWithHttpInfo(UUID inboxId, MatchOptions matchOptions, Long timeout, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, String sort, Long delay) throws ApiException {
okhttp3.Call localVarCall = waitForMatchingFirstEmailValidateBeforeCall(inboxId, matchOptions, timeout, unreadOnly, since, before, sort, delay, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Wait for or return the first email that matches provided MatchOptions array (asynchronously)
* 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.
* @param inboxId Id of the inbox we are matching an email for (required)
* @param matchOptions (required)
* @param timeout Max milliseconds to wait (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForMatchingFirstEmailAsync(UUID inboxId, MatchOptions matchOptions, Long timeout, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, String sort, Long delay, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = waitForMatchingFirstEmailValidateBeforeCall(inboxId, matchOptions, timeout, unreadOnly, since, before, sort, delay, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for waitForNthEmail
* @param inboxId Id of the inbox you are fetching emails from (optional)
* @param 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)
* @param timeout Max milliseconds to wait for the nth email if not already present (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForNthEmailCall(UUID inboxId, Integer index, Long timeout, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, String sort, Long delay, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/waitForNthEmail";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (inboxId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("inboxId", inboxId));
}
if (index != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("index", index));
}
if (timeout != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("timeout", timeout));
}
if (unreadOnly != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("unreadOnly", unreadOnly));
}
if (since != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since));
}
if (before != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("before", before));
}
if (sort != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort));
}
if (delay != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("delay", delay));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call waitForNthEmailValidateBeforeCall(UUID inboxId, Integer index, Long timeout, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, String sort, Long delay, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = waitForNthEmailCall(inboxId, index, timeout, unreadOnly, since, before, sort, delay, _callback);
return localVarCall;
}
/**
* 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.
* @param inboxId Id of the inbox you are fetching emails from (optional)
* @param 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)
* @param timeout Max milliseconds to wait for the nth email if not already present (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @return Email
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public Email waitForNthEmail(UUID inboxId, Integer index, Long timeout, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, String sort, Long delay) throws ApiException {
ApiResponse localVarResp = waitForNthEmailWithHttpInfo(inboxId, index, timeout, unreadOnly, since, before, sort, delay);
return localVarResp.getData();
}
/**
* 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.
* @param inboxId Id of the inbox you are fetching emails from (optional)
* @param 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)
* @param timeout Max milliseconds to wait for the nth email if not already present (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @return ApiResponse<Email>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse waitForNthEmailWithHttpInfo(UUID inboxId, Integer index, Long timeout, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, String sort, Long delay) throws ApiException {
okhttp3.Call localVarCall = waitForNthEmailValidateBeforeCall(inboxId, index, timeout, unreadOnly, since, before, sort, delay, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* 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. (asynchronously)
* 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.
* @param inboxId Id of the inbox you are fetching emails from (optional)
* @param 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)
* @param timeout Max milliseconds to wait for the nth email if not already present (optional)
* @param unreadOnly Optional filter for unread only (optional, default to false)
* @param since Filter for emails that were received after the given timestamp (optional)
* @param before Filter for emails that were received before the given timestamp (optional)
* @param sort Sort direction (optional)
* @param delay Max milliseconds delay between calls (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForNthEmailAsync(UUID inboxId, Integer index, Long timeout, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, String sort, Long delay, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = waitForNthEmailValidateBeforeCall(inboxId, index, timeout, unreadOnly, since, before, sort, delay, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for waitForSms
* @param waitForSmsConditions (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForSmsCall(WaitForSmsConditions waitForSmsConditions, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = waitForSmsConditions;
// create path and map variables
String localVarPath = "/waitForSms";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"*/*"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "API_KEY" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call waitForSmsValidateBeforeCall(WaitForSmsConditions waitForSmsConditions, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'waitForSmsConditions' is set
if (waitForSmsConditions == null) {
throw new ApiException("Missing the required parameter 'waitForSmsConditions' when calling waitForSms(Async)");
}
okhttp3.Call localVarCall = waitForSmsCall(waitForSmsConditions, _callback);
return localVarCall;
}
/**
* 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
* @param waitForSmsConditions (required)
* @return List<SmsPreview>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public List waitForSms(WaitForSmsConditions waitForSmsConditions) throws ApiException {
ApiResponse> localVarResp = waitForSmsWithHttpInfo(waitForSmsConditions);
return localVarResp.getData();
}
/**
* 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
* @param waitForSmsConditions (required)
* @return ApiResponse<List<SmsPreview>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse> waitForSmsWithHttpInfo(WaitForSmsConditions waitForSmsConditions) throws ApiException {
okhttp3.Call localVarCall = waitForSmsValidateBeforeCall(waitForSmsConditions, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Wait for an SMS message to match the provided filter conditions such as body contains keyword. (asynchronously)
* Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met
* @param waitForSmsConditions (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call waitForSmsAsync(WaitForSmsConditions waitForSmsConditions, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = waitForSmsValidateBeforeCall(waitForSmsConditions, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}