diff --git a/pom.xml b/pom.xml
index 1680262..d79b45f 100755
--- a/pom.xml
+++ b/pom.xml
@@ -194,13 +194,13 @@
${swagger-core-version}
- com.squareup.okhttp
- okhttp
+ com.squareup.okhttp3
+ okhttp
${okhttp-version}
- com.squareup.okhttp
- logging-interceptor
+ com.squareup.okhttp3
+ logging-interceptor
${okhttp-version}
@@ -213,11 +213,16 @@
gson-fire
${gson-fire-version}
-
- org.threeten
- threetenbp
- ${threetenbp-version}
-
+
+ org.json
+ json
+ ${json-version}
+
+
+ org.threeten
+ threetenbp
+ ${threetenbp-version}
+
junit
@@ -232,11 +237,12 @@
${java.version}
1.8.0
1.5.18
- 2.7.5
+ 3.11.0
2.8.1
- 1.3.5
+ 1.3.5
1.0.0
4.12
+ 20180130
UTF-8
diff --git a/src/main/java/com/telstra/ApiClient.java b/src/main/java/com/telstra/ApiClient.java
index b2cfc0a..03d36e6 100755
--- a/src/main/java/com/telstra/ApiClient.java
+++ b/src/main/java/com/telstra/ApiClient.java
@@ -13,17 +13,6 @@
package com.telstra;
-import com.squareup.okhttp.*;
-import com.squareup.okhttp.internal.http.HttpMethod;
-import com.squareup.okhttp.logging.HttpLoggingInterceptor;
-import com.squareup.okhttp.logging.HttpLoggingInterceptor.Level;
-import okio.BufferedSink;
-import okio.Okio;
-import org.threeten.bp.LocalDate;
-import org.threeten.bp.OffsetDateTime;
-import org.threeten.bp.format.DateTimeFormatter;
-
-import javax.net.ssl.*;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -39,19 +28,54 @@
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.text.DateFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.KeyManager;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.X509TrustManager;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.threeten.bp.LocalDate;
+import org.threeten.bp.OffsetDateTime;
+import org.threeten.bp.format.DateTimeFormatter;
+
+import com.telstra.auth.ApiKeyAuth;
import com.telstra.auth.Authentication;
import com.telstra.auth.HttpBasicAuth;
-import com.telstra.auth.ApiKeyAuth;
import com.telstra.auth.OAuth;
-public class ApiClient {
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.FormBody;
+import okhttp3.Headers;
+import okhttp3.MediaType;
+import okhttp3.MultipartBody;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
+import okhttp3.internal.http.HttpMethod;
+import okhttp3.logging.HttpLoggingInterceptor;
+import okhttp3.logging.HttpLoggingInterceptor.Level;
+import okio.BufferedSink;
+import okio.Okio;
+public class ApiClient {
private String basePath = "https://tapi.telstra.com/v2";
private boolean debugging = false;
private Map defaultHeaderMap = new HashMap();
@@ -78,10 +102,7 @@ public class ApiClient {
*/
public ApiClient() {
httpClient = new OkHttpClient();
-
-
verifyingSsl = true;
-
json = new JSON();
// Set default User-Agent.
@@ -421,7 +442,7 @@ public ApiClient setTempFolderPath(String tempFolderPath) {
* @return Timeout in milliseconds
*/
public int getConnectTimeout() {
- return httpClient.getConnectTimeout();
+ return httpClient.connectTimeoutMillis();
}
/**
@@ -433,7 +454,7 @@ public int getConnectTimeout() {
* @return Api client
*/
public ApiClient setConnectTimeout(int connectionTimeout) {
- httpClient.setConnectTimeout(connectionTimeout, TimeUnit.MILLISECONDS);
+ httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build();
return this;
}
@@ -443,7 +464,7 @@ public ApiClient setConnectTimeout(int connectionTimeout) {
* @return Timeout in milliseconds
*/
public int getReadTimeout() {
- return httpClient.getReadTimeout();
+ return httpClient.readTimeoutMillis();
}
/**
@@ -455,7 +476,7 @@ public int getReadTimeout() {
* @return Api client
*/
public ApiClient setReadTimeout(int readTimeout) {
- httpClient.setReadTimeout(readTimeout, TimeUnit.MILLISECONDS);
+ httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build();
return this;
}
@@ -465,7 +486,7 @@ public ApiClient setReadTimeout(int readTimeout) {
* @return Timeout in milliseconds
*/
public int getWriteTimeout() {
- return httpClient.getWriteTimeout();
+ return httpClient.writeTimeoutMillis();
}
/**
@@ -477,7 +498,7 @@ public int getWriteTimeout() {
* @return Api client
*/
public ApiClient setWriteTimeout(int writeTimeout) {
- httpClient.setWriteTimeout(writeTimeout, TimeUnit.MILLISECONDS);
+ httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build();
return this;
}
@@ -709,6 +730,15 @@ public T deserialize(Response response, Type returnType) throws ApiException
contentType = "application/json";
}
if (isJsonMime(contentType)) {
+ JSONObject jsonObj = new JSONObject(respBody);
+ JSONArray array = jsonObj.optJSONArray("Country");
+ if (array != null) {
+ String arrayString = array.toString();
+ arrayString = "\"" + arrayString.replaceAll("\"", "\'") + "\"";
+ jsonObj.put("Country", arrayString);
+ respBody = jsonObj.toString();
+ }
+
return json.deserialize(respBody, returnType);
} else if (returnType.equals(String.class)) {
// Expecting string, return the raw response body.
@@ -869,13 +899,13 @@ public void executeAsync(Call call, ApiCallback callback) {
@SuppressWarnings("unchecked")
public void executeAsync(Call call, final Type returnType, final ApiCallback callback) {
call.enqueue(new Callback() {
- @Override
- public void onFailure(Request request, IOException e) {
+ @Override
+ public void onFailure(Call call, IOException e) {
callback.onFailure(new ApiException(e), 0, null);
- }
+ }
- @Override
- public void onResponse(Response response) throws IOException {
+ @Override
+ public void onResponse(Call call, Response response) throws IOException {
T result;
try {
result = (T) handleResponse(response, returnType);
@@ -884,7 +914,7 @@ public void onResponse(Response response) throws IOException {
return;
}
callback.onSuccess(result, response.code(), response.headers().toMultimap());
- }
+ }
});
}
@@ -904,11 +934,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept
// returning null if the returnType is not defined,
// or the status code is 204 (No Content)
if (response.body() != null) {
- try {
- response.body().close();
- } catch (IOException e) {
- throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap());
- }
+ response.body().close();
}
return null;
} else {
@@ -1095,9 +1121,9 @@ public void updateParamsForAuth(String[] authNames, List queryParams, Map<
* @return RequestBody
*/
public RequestBody buildRequestBodyFormEncoding(Map formParams) {
- FormEncodingBuilder formBuilder = new FormEncodingBuilder();
+ FormBody.Builder formBuilder = new FormBody.Builder();
for (Entry param : formParams.entrySet()) {
- formBuilder.add(param.getKey(), parameterToString(param.getValue()));
+ formBuilder.add(param.getKey(), parameterToString(param.getValue()));
}
return formBuilder.build();
}
@@ -1110,7 +1136,7 @@ public RequestBody buildRequestBodyFormEncoding(Map formParams)
* @return RequestBody
*/
public RequestBody buildRequestBodyMultipart(Map formParams) {
- MultipartBuilder mpBuilder = new MultipartBuilder().type(MultipartBuilder.FORM);
+ MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM);
for (Entry param : formParams.entrySet()) {
if (param.getValue() instanceof File) {
File file = (File) param.getValue();
@@ -1184,11 +1210,11 @@ public void checkServerTrusted(X509Certificate[] chain, String authType) throws
if (keyManagers != null || trustManagers != null) {
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(keyManagers, trustManagers, new SecureRandom());
- httpClient.setSslSocketFactory(sslContext.getSocketFactory());
+ httpClient = httpClient.newBuilder().sslSocketFactory(sslContext.getSocketFactory()).build();
} else {
- httpClient.setSslSocketFactory(null);
+ httpClient = httpClient.newBuilder().sslSocketFactory(null).build();
}
- httpClient.setHostnameVerifier(hostnameVerifier);
+ httpClient = httpClient.newBuilder().hostnameVerifier(hostnameVerifier).build();
} catch (GeneralSecurityException e) {
throw new RuntimeException(e);
}
diff --git a/src/main/java/com/telstra/GzipRequestInterceptor.java b/src/main/java/com/telstra/GzipRequestInterceptor.java
index 9c68024..1e24a55 100755
--- a/src/main/java/com/telstra/GzipRequestInterceptor.java
+++ b/src/main/java/com/telstra/GzipRequestInterceptor.java
@@ -13,14 +13,18 @@
package com.telstra;
-import com.squareup.okhttp.*;
+import java.io.IOException;
+
+import okhttp3.Interceptor;
+import okhttp3.MediaType;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
import okio.Buffer;
import okio.BufferedSink;
import okio.GzipSink;
import okio.Okio;
-import java.io.IOException;
-
/**
* Encodes request bodies using gzip.
*
diff --git a/src/main/java/com/telstra/ProgressRequestBody.java b/src/main/java/com/telstra/ProgressRequestBody.java
index d08c4d7..b7ad382 100755
--- a/src/main/java/com/telstra/ProgressRequestBody.java
+++ b/src/main/java/com/telstra/ProgressRequestBody.java
@@ -13,11 +13,10 @@
package com.telstra;
-import com.squareup.okhttp.MediaType;
-import com.squareup.okhttp.RequestBody;
-
import java.io.IOException;
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
import okio.Buffer;
import okio.BufferedSink;
import okio.ForwardingSink;
diff --git a/src/main/java/com/telstra/ProgressResponseBody.java b/src/main/java/com/telstra/ProgressResponseBody.java
index abc5313..8cafa1f 100755
--- a/src/main/java/com/telstra/ProgressResponseBody.java
+++ b/src/main/java/com/telstra/ProgressResponseBody.java
@@ -13,11 +13,10 @@
package com.telstra;
-import com.squareup.okhttp.MediaType;
-import com.squareup.okhttp.ResponseBody;
-
import java.io.IOException;
+import okhttp3.MediaType;
+import okhttp3.ResponseBody;
import okio.Buffer;
import okio.BufferedSource;
import okio.ForwardingSource;
@@ -45,12 +44,12 @@ public MediaType contentType() {
}
@Override
- public long contentLength() throws IOException {
+ public long contentLength() {
return responseBody.contentLength();
}
@Override
- public BufferedSource source() throws IOException {
+ public BufferedSource source() {
if (bufferedSource == null) {
bufferedSource = Okio.buffer(source(responseBody.source()));
}
diff --git a/src/main/java/com/telstra/auth/HttpBasicAuth.java b/src/main/java/com/telstra/auth/HttpBasicAuth.java
index 18b3323..5acec89 100755
--- a/src/main/java/com/telstra/auth/HttpBasicAuth.java
+++ b/src/main/java/com/telstra/auth/HttpBasicAuth.java
@@ -13,14 +13,12 @@
package com.telstra.auth;
-import com.telstra.Pair;
-
-import com.squareup.okhttp.Credentials;
-
-import java.util.Map;
import java.util.List;
+import java.util.Map;
+
+import com.telstra.Pair;
-import java.io.UnsupportedEncodingException;
+import okhttp3.Credentials;
public class HttpBasicAuth implements Authentication {
private String username;
diff --git a/src/main/java/com/telstra/messaging/AuthenticationApi.java b/src/main/java/com/telstra/messaging/AuthenticationApi.java
index 47a4e63..57dfa4e 100755
--- a/src/main/java/com/telstra/messaging/AuthenticationApi.java
+++ b/src/main/java/com/telstra/messaging/AuthenticationApi.java
@@ -13,6 +13,14 @@
package com.telstra.messaging;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.google.gson.reflect.TypeToken;
import com.telstra.ApiCallback;
import com.telstra.ApiClient;
import com.telstra.ApiException;
@@ -22,19 +30,6 @@
import com.telstra.ProgressRequestBody;
import com.telstra.ProgressResponseBody;
-import com.google.gson.reflect.TypeToken;
-
-import java.io.IOException;
-
-
-import com.telstra.messaging.OAuthResponse;
-
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
public class AuthenticationApi {
private ApiClient apiClient;
@@ -64,7 +59,7 @@ public void setApiClient(ApiClient apiClient) {
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call authTokenCall(String clientId, String clientSecret, String grantType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call authTokenCall(String clientId, String clientSecret, String grantType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = new Object();
// create path and map variables
@@ -96,10 +91,10 @@ public com.squareup.okhttp.Call authTokenCall(String clientId, String clientSecr
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
+ okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
@@ -111,8 +106,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call authTokenValidateBeforeCall(String clientId, String clientSecret, String grantType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call authTokenValidateBeforeCall(String clientId, String clientSecret, String grantType, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'clientId' is set
if (clientId == null) {
@@ -130,7 +124,7 @@ private com.squareup.okhttp.Call authTokenValidateBeforeCall(String clientId, St
}
- com.squareup.okhttp.Call call = authTokenCall(clientId, clientSecret, grantType, progressListener, progressRequestListener);
+ okhttp3.Call call = authTokenCall(clientId, clientSecret, grantType, progressListener, progressRequestListener);
return call;
}
@@ -159,7 +153,7 @@ public OAuthResponse authToken(String clientId, String clientSecret, String gran
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse authTokenWithHttpInfo(String clientId, String clientSecret, String grantType) throws ApiException {
- com.squareup.okhttp.Call call = authTokenValidateBeforeCall(clientId, clientSecret, grantType, null, null);
+ okhttp3.Call call = authTokenValidateBeforeCall(clientId, clientSecret, grantType, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -174,7 +168,7 @@ public ApiResponse authTokenWithHttpInfo(String clientId, String
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call authTokenAsync(String clientId, String clientSecret, String grantType, final ApiCallback callback) throws ApiException {
+ public okhttp3.Call authTokenAsync(String clientId, String clientSecret, String grantType, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -195,7 +189,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = authTokenValidateBeforeCall(clientId, clientSecret, grantType, progressListener, progressRequestListener);
+ okhttp3.Call call = authTokenValidateBeforeCall(clientId, clientSecret, grantType, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
diff --git a/src/main/java/com/telstra/messaging/MessagingApi.java b/src/main/java/com/telstra/messaging/MessagingApi.java
index 33f9109..c67dccd 100755
--- a/src/main/java/com/telstra/messaging/MessagingApi.java
+++ b/src/main/java/com/telstra/messaging/MessagingApi.java
@@ -13,6 +13,14 @@
package com.telstra.messaging;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.google.gson.reflect.TypeToken;
import com.telstra.ApiCallback;
import com.telstra.ApiClient;
import com.telstra.ApiException;
@@ -22,24 +30,6 @@
import com.telstra.ProgressRequestBody;
import com.telstra.ProgressResponseBody;
-import com.google.gson.reflect.TypeToken;
-
-import java.io.IOException;
-
-
-import com.telstra.messaging.InboundPollResponse;
-import com.telstra.messaging.MMSContent;
-import com.telstra.messaging.MessageSentResponse;
-import com.telstra.messaging.OutboundPollResponse;
-import com.telstra.messaging.SendMmsRequest;
-import com.telstra.messaging.SendSMSRequest;
-
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
public class MessagingApi {
private ApiClient apiClient;
@@ -67,7 +57,7 @@ public void setApiClient(ApiClient apiClient) {
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call getMMSStatusCall(String messageid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call getMMSStatusCall(String messageid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = new Object();
// create path and map variables
@@ -94,10 +84,10 @@ public com.squareup.okhttp.Call getMMSStatusCall(String messageid, final Progres
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
+ okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
@@ -109,8 +99,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getMMSStatusValidateBeforeCall(String messageid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getMMSStatusValidateBeforeCall(String messageid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'messageid' is set
if (messageid == null) {
@@ -118,7 +107,7 @@ private com.squareup.okhttp.Call getMMSStatusValidateBeforeCall(String messageid
}
- com.squareup.okhttp.Call call = getMMSStatusCall(messageid, progressListener, progressRequestListener);
+ okhttp3.Call call = getMMSStatusCall(messageid, progressListener, progressRequestListener);
return call;
}
@@ -143,7 +132,7 @@ public List getMMSStatus(String messageid) throws ApiExcep
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> getMMSStatusWithHttpInfo(String messageid) throws ApiException {
- com.squareup.okhttp.Call call = getMMSStatusValidateBeforeCall(messageid, null, null);
+ okhttp3.Call call = getMMSStatusValidateBeforeCall(messageid, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -156,7 +145,7 @@ public ApiResponse> getMMSStatusWithHttpInfo(String m
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call getMMSStatusAsync(String messageid, final ApiCallback> callback) throws ApiException {
+ public okhttp3.Call getMMSStatusAsync(String messageid, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -177,7 +166,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = getMMSStatusValidateBeforeCall(messageid, progressListener, progressRequestListener);
+ okhttp3.Call call = getMMSStatusValidateBeforeCall(messageid, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -190,7 +179,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call getSMSStatusCall(String messageId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call getSMSStatusCall(String messageId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = new Object();
// create path and map variables
@@ -217,10 +206,10 @@ public com.squareup.okhttp.Call getSMSStatusCall(String messageId, final Progres
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
+ okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
@@ -232,8 +221,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getSMSStatusValidateBeforeCall(String messageId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getSMSStatusValidateBeforeCall(String messageId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'messageId' is set
if (messageId == null) {
@@ -241,7 +229,7 @@ private com.squareup.okhttp.Call getSMSStatusValidateBeforeCall(String messageId
}
- com.squareup.okhttp.Call call = getSMSStatusCall(messageId, progressListener, progressRequestListener);
+ okhttp3.Call call = getSMSStatusCall(messageId, progressListener, progressRequestListener);
return call;
}
@@ -266,7 +254,7 @@ public List getSMSStatus(String messageId) throws ApiExcep
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> getSMSStatusWithHttpInfo(String messageId) throws ApiException {
- com.squareup.okhttp.Call call = getSMSStatusValidateBeforeCall(messageId, null, null);
+ okhttp3.Call call = getSMSStatusValidateBeforeCall(messageId, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -279,7 +267,7 @@ public ApiResponse> getSMSStatusWithHttpInfo(String m
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call getSMSStatusAsync(String messageId, final ApiCallback> callback) throws ApiException {
+ public okhttp3.Call getSMSStatusAsync(String messageId, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -300,7 +288,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = getSMSStatusValidateBeforeCall(messageId, progressListener, progressRequestListener);
+ okhttp3.Call call = getSMSStatusValidateBeforeCall(messageId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -312,7 +300,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call retrieveMMSResponsesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call retrieveMMSResponsesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = new Object();
// create path and map variables
@@ -338,10 +326,10 @@ public com.squareup.okhttp.Call retrieveMMSResponsesCall(final ProgressResponseB
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
+ okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
@@ -353,11 +341,10 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call retrieveMMSResponsesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call retrieveMMSResponsesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- com.squareup.okhttp.Call call = retrieveMMSResponsesCall(progressListener, progressRequestListener);
+ okhttp3.Call call = retrieveMMSResponsesCall(progressListener, progressRequestListener);
return call;
}
@@ -380,7 +367,7 @@ public List retrieveMMSResponses() throws ApiException {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse> retrieveMMSResponsesWithHttpInfo() throws ApiException {
- com.squareup.okhttp.Call call = retrieveMMSResponsesValidateBeforeCall(null, null);
+ okhttp3.Call call = retrieveMMSResponsesValidateBeforeCall(null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -392,7 +379,7 @@ public ApiResponse> retrieveMMSResponsesWithHttpInfo() throws A
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call retrieveMMSResponsesAsync(final ApiCallback> callback) throws ApiException {
+ public okhttp3.Call retrieveMMSResponsesAsync(final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -413,7 +400,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = retrieveMMSResponsesValidateBeforeCall(progressListener, progressRequestListener);
+ okhttp3.Call call = retrieveMMSResponsesValidateBeforeCall(progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -425,7 +412,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call retrieveSMSResponsesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call retrieveSMSResponsesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = new Object();
// create path and map variables
@@ -451,10 +438,10 @@ public com.squareup.okhttp.Call retrieveSMSResponsesCall(final ProgressResponseB
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
+ okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
@@ -466,11 +453,10 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call retrieveSMSResponsesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call retrieveSMSResponsesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- com.squareup.okhttp.Call call = retrieveSMSResponsesCall(progressListener, progressRequestListener);
+ okhttp3.Call call = retrieveSMSResponsesCall(progressListener, progressRequestListener);
return call;
}
@@ -493,7 +479,7 @@ public InboundPollResponse retrieveSMSResponses() throws ApiException {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse retrieveSMSResponsesWithHttpInfo() throws ApiException {
- com.squareup.okhttp.Call call = retrieveSMSResponsesValidateBeforeCall(null, null);
+ okhttp3.Call call = retrieveSMSResponsesValidateBeforeCall(null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -505,7 +491,7 @@ public ApiResponse retrieveSMSResponsesWithHttpInfo() throw
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call retrieveSMSResponsesAsync(final ApiCallback callback) throws ApiException {
+ public okhttp3.Call retrieveSMSResponsesAsync(final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -526,7 +512,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = retrieveSMSResponsesValidateBeforeCall(progressListener, progressRequestListener);
+ okhttp3.Call call = retrieveSMSResponsesValidateBeforeCall(progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -540,7 +526,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call sendMMSCall(SendMmsRequest sendMmsRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call sendMMSCall(SendMmsRequest sendMmsRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = sendMmsRequest;
// create path and map variables
@@ -566,10 +552,10 @@ public com.squareup.okhttp.Call sendMMSCall(SendMmsRequest sendMmsRequest, final
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
+ okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
@@ -581,8 +567,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call sendMMSValidateBeforeCall(SendMmsRequest sendMmsRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call sendMMSValidateBeforeCall(SendMmsRequest sendMmsRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'sendMmsRequest' is set
if (sendMmsRequest == null) {
@@ -590,7 +575,7 @@ private com.squareup.okhttp.Call sendMMSValidateBeforeCall(SendMmsRequest sendMm
}
- com.squareup.okhttp.Call call = sendMMSCall(sendMmsRequest, progressListener, progressRequestListener);
+ okhttp3.Call call = sendMMSCall(sendMmsRequest, progressListener, progressRequestListener);
return call;
}
@@ -617,7 +602,7 @@ public MessageSentResponse sendMMS(SendMmsRequest sendMmsRequest) throws ApiExce
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse sendMMSWithHttpInfo(SendMmsRequest sendMmsRequest) throws ApiException {
- com.squareup.okhttp.Call call = sendMMSValidateBeforeCall(sendMmsRequest, null, null);
+ okhttp3.Call call = sendMMSValidateBeforeCall(sendMmsRequest, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -631,7 +616,7 @@ public ApiResponse sendMMSWithHttpInfo(SendMmsRequest sendM
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call sendMMSAsync(SendMmsRequest sendMmsRequest, final ApiCallback callback) throws ApiException {
+ public okhttp3.Call sendMMSAsync(SendMmsRequest sendMmsRequest, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -652,7 +637,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = sendMMSValidateBeforeCall(sendMmsRequest, progressListener, progressRequestListener);
+ okhttp3.Call call = sendMMSValidateBeforeCall(sendMmsRequest, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -666,7 +651,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call sendSMSCall(SendSMSRequest sendSMSRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call sendSMSCall(SendSMSRequest sendSMSRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = sendSMSRequest;
// create path and map variables
@@ -692,10 +677,10 @@ public com.squareup.okhttp.Call sendSMSCall(SendSMSRequest sendSMSRequest, final
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
+ okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
@@ -707,8 +692,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call sendSMSValidateBeforeCall(SendSMSRequest sendSMSRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call sendSMSValidateBeforeCall(SendSMSRequest sendSMSRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'sendSMSRequest' is set
if (sendSMSRequest == null) {
@@ -716,7 +700,7 @@ private com.squareup.okhttp.Call sendSMSValidateBeforeCall(SendSMSRequest sendSM
}
- com.squareup.okhttp.Call call = sendSMSCall(sendSMSRequest, progressListener, progressRequestListener);
+ okhttp3.Call call = sendSMSCall(sendSMSRequest, progressListener, progressRequestListener);
return call;
}
@@ -743,7 +727,7 @@ public MessageSentResponse sendSMS(SendSMSRequest sendSMSRequest) throws ApiExce
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse sendSMSWithHttpInfo(SendSMSRequest sendSMSRequest) throws ApiException {
- com.squareup.okhttp.Call call = sendSMSValidateBeforeCall(sendSMSRequest, null, null);
+ okhttp3.Call call = sendSMSValidateBeforeCall(sendSMSRequest, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -757,7 +741,7 @@ public ApiResponse sendSMSWithHttpInfo(SendSMSRequest sendS
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call sendSMSAsync(SendSMSRequest sendSMSRequest, final ApiCallback callback) throws ApiException {
+ public okhttp3.Call sendSMSAsync(SendSMSRequest sendSMSRequest, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -778,7 +762,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = sendSMSValidateBeforeCall(sendSMSRequest, progressListener, progressRequestListener);
+ okhttp3.Call call = sendSMSValidateBeforeCall(sendSMSRequest, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
diff --git a/src/main/java/com/telstra/messaging/ProvisioningApi.java b/src/main/java/com/telstra/messaging/ProvisioningApi.java
index c334b1d..e447e61 100755
--- a/src/main/java/com/telstra/messaging/ProvisioningApi.java
+++ b/src/main/java/com/telstra/messaging/ProvisioningApi.java
@@ -13,6 +13,14 @@
package com.telstra.messaging;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.google.gson.reflect.TypeToken;
import com.telstra.ApiCallback;
import com.telstra.ApiClient;
import com.telstra.ApiException;
@@ -22,22 +30,6 @@
import com.telstra.ProgressRequestBody;
import com.telstra.ProgressResponseBody;
-import com.google.gson.reflect.TypeToken;
-
-import java.io.IOException;
-
-
-import com.telstra.messaging.DeleteNumberRequest;
-import com.telstra.messaging.GetSubscriptionResponse;
-import com.telstra.messaging.ProvisionNumberRequest;
-import com.telstra.messaging.ProvisionNumberResponse;
-
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
public class ProvisioningApi {
private ApiClient apiClient;
@@ -65,7 +57,7 @@ public void setApiClient(ApiClient apiClient) {
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call createSubscriptionCall(ProvisionNumberRequest provisionNumberRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call createSubscriptionCall(ProvisionNumberRequest provisionNumberRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = provisionNumberRequest;
// create path and map variables
@@ -91,10 +83,10 @@ public com.squareup.okhttp.Call createSubscriptionCall(ProvisionNumberRequest pr
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
+ okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
@@ -106,8 +98,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call createSubscriptionValidateBeforeCall(ProvisionNumberRequest provisionNumberRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call createSubscriptionValidateBeforeCall(ProvisionNumberRequest provisionNumberRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'provisionNumberRequest' is set
if (provisionNumberRequest == null) {
@@ -115,7 +106,7 @@ private com.squareup.okhttp.Call createSubscriptionValidateBeforeCall(ProvisionN
}
- com.squareup.okhttp.Call call = createSubscriptionCall(provisionNumberRequest, progressListener, progressRequestListener);
+ okhttp3.Call call = createSubscriptionCall(provisionNumberRequest, progressListener, progressRequestListener);
return call;
}
@@ -140,7 +131,7 @@ public ProvisionNumberResponse createSubscription(ProvisionNumberRequest provisi
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse createSubscriptionWithHttpInfo(ProvisionNumberRequest provisionNumberRequest) throws ApiException {
- com.squareup.okhttp.Call call = createSubscriptionValidateBeforeCall(provisionNumberRequest, null, null);
+ okhttp3.Call call = createSubscriptionValidateBeforeCall(provisionNumberRequest, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -153,7 +144,7 @@ public ApiResponse createSubscriptionWithHttpInfo(Provi
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call createSubscriptionAsync(ProvisionNumberRequest provisionNumberRequest, final ApiCallback callback) throws ApiException {
+ public okhttp3.Call createSubscriptionAsync(ProvisionNumberRequest provisionNumberRequest, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -174,7 +165,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = createSubscriptionValidateBeforeCall(provisionNumberRequest, progressListener, progressRequestListener);
+ okhttp3.Call call = createSubscriptionValidateBeforeCall(provisionNumberRequest, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -187,7 +178,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call deleteSubscriptionCall(DeleteNumberRequest deleteNumberRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call deleteSubscriptionCall(DeleteNumberRequest deleteNumberRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = deleteNumberRequest;
// create path and map variables
@@ -213,10 +204,10 @@ public com.squareup.okhttp.Call deleteSubscriptionCall(DeleteNumberRequest delet
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
+ okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
@@ -228,8 +219,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call deleteSubscriptionValidateBeforeCall(DeleteNumberRequest deleteNumberRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call deleteSubscriptionValidateBeforeCall(DeleteNumberRequest deleteNumberRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'deleteNumberRequest' is set
if (deleteNumberRequest == null) {
@@ -237,7 +227,7 @@ private com.squareup.okhttp.Call deleteSubscriptionValidateBeforeCall(DeleteNumb
}
- com.squareup.okhttp.Call call = deleteSubscriptionCall(deleteNumberRequest, progressListener, progressRequestListener);
+ okhttp3.Call call = deleteSubscriptionCall(deleteNumberRequest, progressListener, progressRequestListener);
return call;
}
@@ -260,7 +250,7 @@ public void deleteSubscription(DeleteNumberRequest deleteNumberRequest) throws A
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse deleteSubscriptionWithHttpInfo(DeleteNumberRequest deleteNumberRequest) throws ApiException {
- com.squareup.okhttp.Call call = deleteSubscriptionValidateBeforeCall(deleteNumberRequest, null, null);
+ okhttp3.Call call = deleteSubscriptionValidateBeforeCall(deleteNumberRequest, null, null);
return apiClient.execute(call);
}
@@ -272,7 +262,7 @@ public ApiResponse deleteSubscriptionWithHttpInfo(DeleteNumberRequest dele
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call deleteSubscriptionAsync(DeleteNumberRequest deleteNumberRequest, final ApiCallback callback) throws ApiException {
+ public okhttp3.Call deleteSubscriptionAsync(DeleteNumberRequest deleteNumberRequest, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -293,7 +283,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = deleteSubscriptionValidateBeforeCall(deleteNumberRequest, progressListener, progressRequestListener);
+ okhttp3.Call call = deleteSubscriptionValidateBeforeCall(deleteNumberRequest, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -304,7 +294,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call getSubscriptionCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public okhttp3.Call getSubscriptionCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = new Object();
// create path and map variables
@@ -330,10 +320,10 @@ public com.squareup.okhttp.Call getSubscriptionCall(final ProgressResponseBody.P
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ apiClient.getHttpClient().networkInterceptors().add(new okhttp3.Interceptor() {
@Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
+ okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
@@ -345,11 +335,10 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getSubscriptionValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private okhttp3.Call getSubscriptionValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- com.squareup.okhttp.Call call = getSubscriptionCall(progressListener, progressRequestListener);
+ okhttp3.Call call = getSubscriptionCall(progressListener, progressRequestListener);
return call;
}
@@ -372,7 +361,7 @@ public GetSubscriptionResponse getSubscription() throws ApiException {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse getSubscriptionWithHttpInfo() throws ApiException {
- com.squareup.okhttp.Call call = getSubscriptionValidateBeforeCall(null, null);
+ okhttp3.Call call = getSubscriptionValidateBeforeCall(null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -384,7 +373,7 @@ public ApiResponse getSubscriptionWithHttpInfo() throws
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call getSubscriptionAsync(final ApiCallback callback) throws ApiException {
+ public okhttp3.Call getSubscriptionAsync(final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -405,7 +394,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = getSubscriptionValidateBeforeCall(progressListener, progressRequestListener);
+ okhttp3.Call call = getSubscriptionValidateBeforeCall(progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;