public ApiResponse<ApiSuccessResponse> alternateWithHttpInfo(String id, AlternateData alternateData) throws ApiException {
        com.squareup.okhttp.Call call = alternateValidateBeforeCall(id, alternateData, null, null);
        Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
public ApiResponse < ApiSuccessResponse > alternateWithHttpInfo ( String id , AlternateData alternateData ) throws ApiException { com . squareup . okhttp . Call call = alternateValidateBeforeCall ( id , alternateData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; }
Alternate between calls
Alternate two calls so that you retrieve a call on hold and place the established call on hold instead. This is a shortcut for doing [/voice/calls/{id}/hold](/reference/workspace/Voice/index.html#hold) and [/voice/calls/{id}/retrieve](/reference/workspace/Voice/index.html#retrieve) separately.
@param id The connection ID of the established call that should be placed on hold. (required)
@param alternateData  (required)
@return ApiResponse&lt;ApiSuccessResponse&gt;
@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body