All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mailslurp.apis.SmsControllerApi Maven / Gradle / Ivy

/*
 * 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.CountDto;
import java.time.OffsetDateTime;
import com.mailslurp.models.PageSmsProjection;
import com.mailslurp.models.ReplyForSms;
import com.mailslurp.models.SentSmsDto;
import com.mailslurp.models.SmsDto;
import com.mailslurp.models.SmsReplyOptions;
import java.util.UUID;
import com.mailslurp.models.UnreadCount;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class SmsControllerApi {
    private ApiClient localVarApiClient;

    public SmsControllerApi() {
        this(Configuration.getDefaultApiClient());
    }

    public SmsControllerApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    /**
     * Build call for deleteSmsMessage
     * @param smsId  (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
204 No Content -
*/ public okhttp3.Call deleteSmsMessageCall(UUID smsId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/sms/{smsId}" .replaceAll("\\{" + "smsId" + "\\}", localVarApiClient.escapeString(smsId.toString())); 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 = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "API_KEY" }; return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteSmsMessageValidateBeforeCall(UUID smsId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'smsId' is set if (smsId == null) { throw new ApiException("Missing the required parameter 'smsId' when calling deleteSmsMessage(Async)"); } okhttp3.Call localVarCall = deleteSmsMessageCall(smsId, _callback); return localVarCall; } /** * Delete SMS message. * Delete an SMS message * @param smsId (required) * @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
204 No Content -
*/ public void deleteSmsMessage(UUID smsId) throws ApiException { deleteSmsMessageWithHttpInfo(smsId); } /** * Delete SMS message. * Delete an SMS message * @param smsId (required) * @return ApiResponse<Void> * @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
204 No Content -
*/ public ApiResponse deleteSmsMessageWithHttpInfo(UUID smsId) throws ApiException { okhttp3.Call localVarCall = deleteSmsMessageValidateBeforeCall(smsId, null); return localVarApiClient.execute(localVarCall); } /** * Delete SMS message. (asynchronously) * Delete an SMS message * @param smsId (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
204 No Content -
*/ public okhttp3.Call deleteSmsMessageAsync(UUID smsId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteSmsMessageValidateBeforeCall(smsId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteSmsMessages * @param phoneNumberId (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
204 No Content -
*/ public okhttp3.Call deleteSmsMessagesCall(UUID phoneNumberId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/sms"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (phoneNumberId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("phoneNumberId", phoneNumberId)); } 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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteSmsMessagesValidateBeforeCall(UUID phoneNumberId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteSmsMessagesCall(phoneNumberId, _callback); return localVarCall; } /** * Delete all SMS messages * Delete all SMS messages or all messages for a given phone number * @param phoneNumberId (optional) * @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
204 No Content -
*/ public void deleteSmsMessages(UUID phoneNumberId) throws ApiException { deleteSmsMessagesWithHttpInfo(phoneNumberId); } /** * Delete all SMS messages * Delete all SMS messages or all messages for a given phone number * @param phoneNumberId (optional) * @return ApiResponse<Void> * @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
204 No Content -
*/ public ApiResponse deleteSmsMessagesWithHttpInfo(UUID phoneNumberId) throws ApiException { okhttp3.Call localVarCall = deleteSmsMessagesValidateBeforeCall(phoneNumberId, null); return localVarApiClient.execute(localVarCall); } /** * Delete all SMS messages (asynchronously) * Delete all SMS messages or all messages for a given phone number * @param phoneNumberId (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
204 No Content -
*/ public okhttp3.Call deleteSmsMessagesAsync(UUID phoneNumberId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteSmsMessagesValidateBeforeCall(phoneNumberId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getReplyForSmsMessage * @param smsId (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 getReplyForSmsMessageCall(UUID smsId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/sms/{smsId}/reply" .replaceAll("\\{" + "smsId" + "\\}", localVarApiClient.escapeString(smsId.toString())); 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 = { }; 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 getReplyForSmsMessageValidateBeforeCall(UUID smsId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'smsId' is set if (smsId == null) { throw new ApiException("Missing the required parameter 'smsId' when calling getReplyForSmsMessage(Async)"); } okhttp3.Call localVarCall = getReplyForSmsMessageCall(smsId, _callback); return localVarCall; } /** * Get reply for an SMS message * Get reply for an SMS message. * @param smsId (required) * @return ReplyForSms * @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 ReplyForSms getReplyForSmsMessage(UUID smsId) throws ApiException { ApiResponse localVarResp = getReplyForSmsMessageWithHttpInfo(smsId); return localVarResp.getData(); } /** * Get reply for an SMS message * Get reply for an SMS message. * @param smsId (required) * @return ApiResponse<ReplyForSms> * @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 getReplyForSmsMessageWithHttpInfo(UUID smsId) throws ApiException { okhttp3.Call localVarCall = getReplyForSmsMessageValidateBeforeCall(smsId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get reply for an SMS message (asynchronously) * Get reply for an SMS message. * @param smsId (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 getReplyForSmsMessageAsync(UUID smsId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getReplyForSmsMessageValidateBeforeCall(smsId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSmsCount * @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 getSmsCountCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/sms/count"; 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 = { }; 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 getSmsCountValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSmsCountCall(_callback); return localVarCall; } /** * Get SMS count * Get number of SMS * @return CountDto * @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 CountDto getSmsCount() throws ApiException { ApiResponse localVarResp = getSmsCountWithHttpInfo(); return localVarResp.getData(); } /** * Get SMS count * Get number of SMS * @return ApiResponse<CountDto> * @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 getSmsCountWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getSmsCountValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get SMS count (asynchronously) * Get number of SMS * @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 getSmsCountAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSmsCountValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSmsMessage * @param smsId (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 getSmsMessageCall(UUID smsId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/sms/{smsId}" .replaceAll("\\{" + "smsId" + "\\}", localVarApiClient.escapeString(smsId.toString())); 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 = { }; 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 getSmsMessageValidateBeforeCall(UUID smsId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'smsId' is set if (smsId == null) { throw new ApiException("Missing the required parameter 'smsId' when calling getSmsMessage(Async)"); } okhttp3.Call localVarCall = getSmsMessageCall(smsId, _callback); return localVarCall; } /** * Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. * Returns a SMS summary object with content. * @param smsId (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 getSmsMessage(UUID smsId) throws ApiException { ApiResponse localVarResp = getSmsMessageWithHttpInfo(smsId); return localVarResp.getData(); } /** * Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. * Returns a SMS summary object with content. * @param smsId (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 getSmsMessageWithHttpInfo(UUID smsId) throws ApiException { okhttp3.Call localVarCall = getSmsMessageValidateBeforeCall(smsId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. (asynchronously) * Returns a SMS summary object with content. * @param smsId (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 getSmsMessageAsync(UUID smsId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSmsMessageValidateBeforeCall(smsId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getSmsMessagesPaginated * @param phoneNumber Optional receiving phone number to filter SMS messages for (optional) * @param page Optional page index in SMS list pagination (optional, default to 0) * @param size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param unreadOnly Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) * @param since Optional filter SMSs received after given date time (optional) * @param before Optional filter SMSs received before given date time (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 getSmsMessagesPaginatedCall(UUID phoneNumber, Integer page, Integer size, String sort, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/sms"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (phoneNumber != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("phoneNumber", phoneNumber)); } if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } if (size != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); } if (sort != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort", sort)); } 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)); } 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 getSmsMessagesPaginatedValidateBeforeCall(UUID phoneNumber, Integer page, Integer size, String sort, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSmsMessagesPaginatedCall(phoneNumber, page, size, sort, unreadOnly, since, before, _callback); return localVarCall; } /** * Get all SMS messages in all phone numbers in paginated form. . * By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages * @param phoneNumber Optional receiving phone number to filter SMS messages for (optional) * @param page Optional page index in SMS list pagination (optional, default to 0) * @param size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param unreadOnly Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) * @param since Optional filter SMSs received after given date time (optional) * @param before Optional filter SMSs received before given date time (optional) * @return PageSmsProjection * @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 PageSmsProjection getSmsMessagesPaginated(UUID phoneNumber, Integer page, Integer size, String sort, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before) throws ApiException { ApiResponse localVarResp = getSmsMessagesPaginatedWithHttpInfo(phoneNumber, page, size, sort, unreadOnly, since, before); return localVarResp.getData(); } /** * Get all SMS messages in all phone numbers in paginated form. . * By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages * @param phoneNumber Optional receiving phone number to filter SMS messages for (optional) * @param page Optional page index in SMS list pagination (optional, default to 0) * @param size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param unreadOnly Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) * @param since Optional filter SMSs received after given date time (optional) * @param before Optional filter SMSs received before given date time (optional) * @return ApiResponse<PageSmsProjection> * @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 getSmsMessagesPaginatedWithHttpInfo(UUID phoneNumber, Integer page, Integer size, String sort, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before) throws ApiException { okhttp3.Call localVarCall = getSmsMessagesPaginatedValidateBeforeCall(phoneNumber, page, size, sort, unreadOnly, since, before, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get all SMS messages in all phone numbers in paginated form. . (asynchronously) * By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages * @param phoneNumber Optional receiving phone number to filter SMS messages for (optional) * @param page Optional page index in SMS list pagination (optional, default to 0) * @param size Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param unreadOnly Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) * @param since Optional filter SMSs received after given date time (optional) * @param before Optional filter SMSs received before given date time (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 getSmsMessagesPaginatedAsync(UUID phoneNumber, Integer page, Integer size, String sort, Boolean unreadOnly, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getSmsMessagesPaginatedValidateBeforeCall(phoneNumber, page, size, sort, unreadOnly, since, before, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getUnreadSmsCount * @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 getUnreadSmsCountCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/sms/unreadCount"; 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 = { }; 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 getUnreadSmsCountValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUnreadSmsCountCall(_callback); return localVarCall; } /** * Get unread SMS count * Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response * @return UnreadCount * @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 UnreadCount getUnreadSmsCount() throws ApiException { ApiResponse localVarResp = getUnreadSmsCountWithHttpInfo(); return localVarResp.getData(); } /** * Get unread SMS count * Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response * @return ApiResponse<UnreadCount> * @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 getUnreadSmsCountWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getUnreadSmsCountValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get unread SMS count (asynchronously) * Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response * @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 getUnreadSmsCountAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUnreadSmsCountValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for replyToSmsMessage * @param smsId (required) * @param smsReplyOptions (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 replyToSmsMessageCall(UUID smsId, SmsReplyOptions smsReplyOptions, final ApiCallback _callback) throws ApiException { Object localVarPostBody = smsReplyOptions; // create path and map variables String localVarPath = "/sms/{smsId}/reply" .replaceAll("\\{" + "smsId" + "\\}", localVarApiClient.escapeString(smsId.toString())); 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 replyToSmsMessageValidateBeforeCall(UUID smsId, SmsReplyOptions smsReplyOptions, final ApiCallback _callback) throws ApiException { // verify the required parameter 'smsId' is set if (smsId == null) { throw new ApiException("Missing the required parameter 'smsId' when calling replyToSmsMessage(Async)"); } // verify the required parameter 'smsReplyOptions' is set if (smsReplyOptions == null) { throw new ApiException("Missing the required parameter 'smsReplyOptions' when calling replyToSmsMessage(Async)"); } okhttp3.Call localVarCall = replyToSmsMessageCall(smsId, smsReplyOptions, _callback); return localVarCall; } /** * Send a reply to a received SMS message. Replies are sent from the receiving number. * Reply to an SMS message. * @param smsId (required) * @param smsReplyOptions (required) * @return SentSmsDto * @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 SentSmsDto replyToSmsMessage(UUID smsId, SmsReplyOptions smsReplyOptions) throws ApiException { ApiResponse localVarResp = replyToSmsMessageWithHttpInfo(smsId, smsReplyOptions); return localVarResp.getData(); } /** * Send a reply to a received SMS message. Replies are sent from the receiving number. * Reply to an SMS message. * @param smsId (required) * @param smsReplyOptions (required) * @return ApiResponse<SentSmsDto> * @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 replyToSmsMessageWithHttpInfo(UUID smsId, SmsReplyOptions smsReplyOptions) throws ApiException { okhttp3.Call localVarCall = replyToSmsMessageValidateBeforeCall(smsId, smsReplyOptions, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Send a reply to a received SMS message. Replies are sent from the receiving number. (asynchronously) * Reply to an SMS message. * @param smsId (required) * @param smsReplyOptions (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 replyToSmsMessageAsync(UUID smsId, SmsReplyOptions smsReplyOptions, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = replyToSmsMessageValidateBeforeCall(smsId, smsReplyOptions, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy