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

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

Go to download

Official MailSlurp email API - create real inboxes then send and receive emails and attachments from tests and code.

The newest version!
/*
 * 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.CreateEmergencyAddressOptions;
import com.mailslurp.models.EmergencyAddress;
import com.mailslurp.models.EmergencyAddressDto;
import com.mailslurp.models.EmptyResponseDto;
import java.time.OffsetDateTime;
import com.mailslurp.models.PagePhoneNumberProjection;
import com.mailslurp.models.PhoneNumberDto;
import com.mailslurp.models.PhonePlanDto;
import com.mailslurp.models.TestPhoneNumberOptions;
import java.util.UUID;

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

public class PhoneControllerApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for createEmergencyAddress
     * @param createEmergencyAddressOptions  (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 createEmergencyAddressCall(CreateEmergencyAddressOptions createEmergencyAddressOptions, final ApiCallback _callback) throws ApiException { Object localVarPostBody = createEmergencyAddressOptions; // create path and map variables String localVarPath = "/phone/emergency-addresses"; 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 createEmergencyAddressValidateBeforeCall(CreateEmergencyAddressOptions createEmergencyAddressOptions, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createEmergencyAddressOptions' is set if (createEmergencyAddressOptions == null) { throw new ApiException("Missing the required parameter 'createEmergencyAddressOptions' when calling createEmergencyAddress(Async)"); } okhttp3.Call localVarCall = createEmergencyAddressCall(createEmergencyAddressOptions, _callback); return localVarCall; } /** * * * @param createEmergencyAddressOptions (required) * @return EmergencyAddress * @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 EmergencyAddress createEmergencyAddress(CreateEmergencyAddressOptions createEmergencyAddressOptions) throws ApiException { ApiResponse localVarResp = createEmergencyAddressWithHttpInfo(createEmergencyAddressOptions); return localVarResp.getData(); } /** * * * @param createEmergencyAddressOptions (required) * @return ApiResponse<EmergencyAddress> * @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 createEmergencyAddressWithHttpInfo(CreateEmergencyAddressOptions createEmergencyAddressOptions) throws ApiException { okhttp3.Call localVarCall = createEmergencyAddressValidateBeforeCall(createEmergencyAddressOptions, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * * @param createEmergencyAddressOptions (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 createEmergencyAddressAsync(CreateEmergencyAddressOptions createEmergencyAddressOptions, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createEmergencyAddressValidateBeforeCall(createEmergencyAddressOptions, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteEmergencyAddress * @param addressId (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 deleteEmergencyAddressCall(UUID addressId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/phone/emergency-addresses/{addressId}" .replaceAll("\\{" + "addressId" + "\\}", localVarApiClient.escapeString(addressId.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 deleteEmergencyAddressValidateBeforeCall(UUID addressId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'addressId' is set if (addressId == null) { throw new ApiException("Missing the required parameter 'addressId' when calling deleteEmergencyAddress(Async)"); } okhttp3.Call localVarCall = deleteEmergencyAddressCall(addressId, _callback); return localVarCall; } /** * * * @param addressId (required) * @return EmptyResponseDto * @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 EmptyResponseDto deleteEmergencyAddress(UUID addressId) throws ApiException { ApiResponse localVarResp = deleteEmergencyAddressWithHttpInfo(addressId); return localVarResp.getData(); } /** * * * @param addressId (required) * @return ApiResponse<EmptyResponseDto> * @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 deleteEmergencyAddressWithHttpInfo(UUID addressId) throws ApiException { okhttp3.Call localVarCall = deleteEmergencyAddressValidateBeforeCall(addressId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * * @param addressId (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 deleteEmergencyAddressAsync(UUID addressId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteEmergencyAddressValidateBeforeCall(addressId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deletePhoneNumber * @param phoneNumberId (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 deletePhoneNumberCall(UUID phoneNumberId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/phone/numbers/{phoneNumberId}" .replaceAll("\\{" + "phoneNumberId" + "\\}", localVarApiClient.escapeString(phoneNumberId.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 deletePhoneNumberValidateBeforeCall(UUID phoneNumberId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'phoneNumberId' is set if (phoneNumberId == null) { throw new ApiException("Missing the required parameter 'phoneNumberId' when calling deletePhoneNumber(Async)"); } okhttp3.Call localVarCall = deletePhoneNumberCall(phoneNumberId, _callback); return localVarCall; } /** * * * @param phoneNumberId (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 deletePhoneNumber(UUID phoneNumberId) throws ApiException { deletePhoneNumberWithHttpInfo(phoneNumberId); } /** * * * @param phoneNumberId (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 deletePhoneNumberWithHttpInfo(UUID phoneNumberId) throws ApiException { okhttp3.Call localVarCall = deletePhoneNumberValidateBeforeCall(phoneNumberId, null); return localVarApiClient.execute(localVarCall); } /** * (asynchronously) * * @param phoneNumberId (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 deletePhoneNumberAsync(UUID phoneNumberId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deletePhoneNumberValidateBeforeCall(phoneNumberId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getEmergencyAddress * @param addressId (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 getEmergencyAddressCall(UUID addressId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/phone/emergency-addresses/{addressId}" .replaceAll("\\{" + "addressId" + "\\}", localVarApiClient.escapeString(addressId.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 getEmergencyAddressValidateBeforeCall(UUID addressId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'addressId' is set if (addressId == null) { throw new ApiException("Missing the required parameter 'addressId' when calling getEmergencyAddress(Async)"); } okhttp3.Call localVarCall = getEmergencyAddressCall(addressId, _callback); return localVarCall; } /** * * * @param addressId (required) * @return EmergencyAddress * @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 EmergencyAddress getEmergencyAddress(UUID addressId) throws ApiException { ApiResponse localVarResp = getEmergencyAddressWithHttpInfo(addressId); return localVarResp.getData(); } /** * * * @param addressId (required) * @return ApiResponse<EmergencyAddress> * @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 getEmergencyAddressWithHttpInfo(UUID addressId) throws ApiException { okhttp3.Call localVarCall = getEmergencyAddressValidateBeforeCall(addressId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * * @param addressId (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 getEmergencyAddressAsync(UUID addressId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getEmergencyAddressValidateBeforeCall(addressId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getEmergencyAddresses * @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 getEmergencyAddressesCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/phone/emergency-addresses"; 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 getEmergencyAddressesValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getEmergencyAddressesCall(_callback); return localVarCall; } /** * * * @return List<EmergencyAddressDto> * @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 getEmergencyAddresses() throws ApiException { ApiResponse> localVarResp = getEmergencyAddressesWithHttpInfo(); return localVarResp.getData(); } /** * * * @return ApiResponse<List<EmergencyAddressDto>> * @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> getEmergencyAddressesWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getEmergencyAddressesValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * * @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 getEmergencyAddressesAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getEmergencyAddressesValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getPhoneNumber * @param phoneNumberId (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 getPhoneNumberCall(UUID phoneNumberId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/phone/numbers/{phoneNumberId}" .replaceAll("\\{" + "phoneNumberId" + "\\}", localVarApiClient.escapeString(phoneNumberId.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 getPhoneNumberValidateBeforeCall(UUID phoneNumberId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'phoneNumberId' is set if (phoneNumberId == null) { throw new ApiException("Missing the required parameter 'phoneNumberId' when calling getPhoneNumber(Async)"); } okhttp3.Call localVarCall = getPhoneNumberCall(phoneNumberId, _callback); return localVarCall; } /** * * * @param phoneNumberId (required) * @return PhoneNumberDto * @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 PhoneNumberDto getPhoneNumber(UUID phoneNumberId) throws ApiException { ApiResponse localVarResp = getPhoneNumberWithHttpInfo(phoneNumberId); return localVarResp.getData(); } /** * * * @param phoneNumberId (required) * @return ApiResponse<PhoneNumberDto> * @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 getPhoneNumberWithHttpInfo(UUID phoneNumberId) throws ApiException { okhttp3.Call localVarCall = getPhoneNumberValidateBeforeCall(phoneNumberId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * * @param phoneNumberId (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 getPhoneNumberAsync(UUID phoneNumberId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPhoneNumberValidateBeforeCall(phoneNumberId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getPhoneNumbers * @param phoneCountry Optional phone country (optional) * @param page Optional page index for list pagination (optional, default to 0) * @param size Optional page size for list pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (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 getPhoneNumbersCall(String phoneCountry, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/phone/numbers"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (phoneCountry != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("phoneCountry", phoneCountry)); } 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 (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 getPhoneNumbersValidateBeforeCall(String phoneCountry, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPhoneNumbersCall(phoneCountry, page, size, sort, since, before, _callback); return localVarCall; } /** * * * @param phoneCountry Optional phone country (optional) * @param page Optional page index for list pagination (optional, default to 0) * @param size Optional page size for list pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (optional) * @return PagePhoneNumberProjection * @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 PagePhoneNumberProjection getPhoneNumbers(String phoneCountry, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { ApiResponse localVarResp = getPhoneNumbersWithHttpInfo(phoneCountry, page, size, sort, since, before); return localVarResp.getData(); } /** * * * @param phoneCountry Optional phone country (optional) * @param page Optional page index for list pagination (optional, default to 0) * @param size Optional page size for list pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (optional) * @return ApiResponse<PagePhoneNumberProjection> * @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 getPhoneNumbersWithHttpInfo(String phoneCountry, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before) throws ApiException { okhttp3.Call localVarCall = getPhoneNumbersValidateBeforeCall(phoneCountry, page, size, sort, since, before, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * * @param phoneCountry Optional phone country (optional) * @param page Optional page index for list pagination (optional, default to 0) * @param size Optional page size for list pagination (optional, default to 20) * @param sort Optional createdAt sort direction ASC or DESC (optional, default to ASC) * @param since Filter by created at after the given timestamp (optional) * @param before Filter by created at before the given timestamp (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 getPhoneNumbersAsync(String phoneCountry, Integer page, Integer size, String sort, OffsetDateTime since, OffsetDateTime before, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPhoneNumbersValidateBeforeCall(phoneCountry, page, size, sort, since, before, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getPhonePlans * @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 getPhonePlansCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/phone/plans"; 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 getPhonePlansValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPhonePlansCall(_callback); return localVarCall; } /** * * * @return List<PhonePlanDto> * @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 getPhonePlans() throws ApiException { ApiResponse> localVarResp = getPhonePlansWithHttpInfo(); return localVarResp.getData(); } /** * * * @return ApiResponse<List<PhonePlanDto>> * @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> getPhonePlansWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getPhonePlansValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * * @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 getPhonePlansAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getPhonePlansValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for testPhoneNumberSendSms * @param phoneNumberId (required) * @param testPhoneNumberOptions (required) * @param xTestId (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 testPhoneNumberSendSmsCall(UUID phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, String xTestId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = testPhoneNumberOptions; // create path and map variables String localVarPath = "/phone/numbers/{phoneNumberId}/test" .replaceAll("\\{" + "phoneNumberId" + "\\}", localVarApiClient.escapeString(phoneNumberId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); if (xTestId != null) { localVarHeaderParams.put("x-test-id", localVarApiClient.parameterToString(xTestId)); } 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 testPhoneNumberSendSmsValidateBeforeCall(UUID phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, String xTestId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'phoneNumberId' is set if (phoneNumberId == null) { throw new ApiException("Missing the required parameter 'phoneNumberId' when calling testPhoneNumberSendSms(Async)"); } // verify the required parameter 'testPhoneNumberOptions' is set if (testPhoneNumberOptions == null) { throw new ApiException("Missing the required parameter 'testPhoneNumberOptions' when calling testPhoneNumberSendSms(Async)"); } okhttp3.Call localVarCall = testPhoneNumberSendSmsCall(phoneNumberId, testPhoneNumberOptions, xTestId, _callback); return localVarCall; } /** * * * @param phoneNumberId (required) * @param testPhoneNumberOptions (required) * @param xTestId (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
200 OK -
*/ public void testPhoneNumberSendSms(UUID phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, String xTestId) throws ApiException { testPhoneNumberSendSmsWithHttpInfo(phoneNumberId, testPhoneNumberOptions, xTestId); } /** * * * @param phoneNumberId (required) * @param testPhoneNumberOptions (required) * @param xTestId (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
200 OK -
*/ public ApiResponse testPhoneNumberSendSmsWithHttpInfo(UUID phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, String xTestId) throws ApiException { okhttp3.Call localVarCall = testPhoneNumberSendSmsValidateBeforeCall(phoneNumberId, testPhoneNumberOptions, xTestId, null); return localVarApiClient.execute(localVarCall); } /** * (asynchronously) * * @param phoneNumberId (required) * @param testPhoneNumberOptions (required) * @param xTestId (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 testPhoneNumberSendSmsAsync(UUID phoneNumberId, TestPhoneNumberOptions testPhoneNumberOptions, String xTestId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = testPhoneNumberSendSmsValidateBeforeCall(phoneNumberId, testPhoneNumberOptions, xTestId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy