Java tutorial
/** * AS24 API v4.1 * No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: v4.1 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package abtlibrary.utils.as24ApiClient.api; import abtlibrary.utils.as24ApiClient.ApiCallback; import abtlibrary.utils.as24ApiClient.ApiClient; import abtlibrary.utils.as24ApiClient.ApiException; import abtlibrary.utils.as24ApiClient.ApiResponse; import abtlibrary.utils.as24ApiClient.Configuration; import abtlibrary.utils.as24ApiClient.Pair; import abtlibrary.utils.as24ApiClient.ProgressRequestBody; import abtlibrary.utils.as24ApiClient.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; import abtlibrary.utils.as24ApiClient.model.ResponseMessageDealerPageDealer; import abtlibrary.utils.as24ApiClient.model.ResponseMessageDealerPageAbout; import abtlibrary.utils.as24ApiClient.model.ResponseMessageCollectionListDealerPageDealer; import abtlibrary.utils.as24ApiClient.model.ResponseMessageDealerPageContact; import abtlibrary.utils.as24ApiClient.model.ResponseMessageCollectionListVehicleTypeMakeModel; import abtlibrary.utils.as24ApiClient.model.ResponseMessageDealerPageNews; import abtlibrary.utils.as24ApiClient.model.ResponseMessageListDealerPageTab; import abtlibrary.utils.as24ApiClient.model.ResponseMessageDealerPageTeam; import abtlibrary.utils.as24ApiClient.model.ResponseMessageCollectionListAd; import abtlibrary.utils.as24ApiClient.model.ResponseMessageDealerPageVideo; import abtlibrary.utils.as24ApiClient.model.ResponseMessageCollectionListMake; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class DealerPagesApi { private ApiClient apiClient; public DealerPagesApi() { this(Configuration.getDefaultApiClient()); } public DealerPagesApi(ApiClient apiClient) { this.apiClient = apiClient; } public ApiClient getApiClient() { return apiClient; } public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } /* Build call for gETpublicV41DealerpagesAccountid */ private com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidCall(Integer accountId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException( "Missing the required parameter 'accountId' when calling gETpublicV41DealerpagesAccountid(Async)"); } // create path and map variables String localVarPath = "/public/v4.1/dealerpages/{accountId}".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @param accountId (required) * @return ResponseMessageDealerPageDealer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageDealerPageDealer gETpublicV41DealerpagesAccountid(Integer accountId) throws ApiException { ApiResponse<ResponseMessageDealerPageDealer> resp = gETpublicV41DealerpagesAccountidWithHttpInfo(accountId); return resp.getData(); } /** * * * @param accountId (required) * @return ApiResponse<ResponseMessageDealerPageDealer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageDealerPageDealer> gETpublicV41DealerpagesAccountidWithHttpInfo( Integer accountId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidCall(accountId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageDealer>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * (asynchronously) * * @param accountId (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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidAsync(Integer accountId, final ApiCallback<ResponseMessageDealerPageDealer> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidCall(accountId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageDealer>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for gETpublicV41DealerpagesAccountidAbout */ private com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidAboutCall(Integer accountId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException( "Missing the required parameter 'accountId' when calling gETpublicV41DealerpagesAccountidAbout(Async)"); } // create path and map variables String localVarPath = "/public/v4.1/dealerpages/{accountId}/about".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @param accountId (required) * @return ResponseMessageDealerPageAbout * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageDealerPageAbout gETpublicV41DealerpagesAccountidAbout(Integer accountId) throws ApiException { ApiResponse<ResponseMessageDealerPageAbout> resp = gETpublicV41DealerpagesAccountidAboutWithHttpInfo( accountId); return resp.getData(); } /** * * * @param accountId (required) * @return ApiResponse<ResponseMessageDealerPageAbout> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageDealerPageAbout> gETpublicV41DealerpagesAccountidAboutWithHttpInfo( Integer accountId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidAboutCall(accountId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageAbout>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * (asynchronously) * * @param accountId (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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidAboutAsync(Integer accountId, final ApiCallback<ResponseMessageDealerPageAbout> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidAboutCall(accountId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageAbout>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for gETpublicV41DealerpagesAccountidAgencies */ private com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidAgenciesCall(Integer accountId, Integer skip, Integer take, String filter, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException( "Missing the required parameter 'accountId' when calling gETpublicV41DealerpagesAccountidAgencies(Async)"); } // verify the required parameter 'skip' is set if (skip == null) { throw new ApiException( "Missing the required parameter 'skip' when calling gETpublicV41DealerpagesAccountidAgencies(Async)"); } // verify the required parameter 'take' is set if (take == null) { throw new ApiException( "Missing the required parameter 'take' when calling gETpublicV41DealerpagesAccountidAgencies(Async)"); } // create path and map variables String localVarPath = "/public/v4.1/dealerpages/{accountId}/agencies".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (skip != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "skip", skip)); if (take != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "take", take)); if (filter != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @param accountId (required) * @param skip (required) * @param take (required) * @param filter (optional) * @return ResponseMessageCollectionListDealerPageDealer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageCollectionListDealerPageDealer gETpublicV41DealerpagesAccountidAgencies(Integer accountId, Integer skip, Integer take, String filter) throws ApiException { ApiResponse<ResponseMessageCollectionListDealerPageDealer> resp = gETpublicV41DealerpagesAccountidAgenciesWithHttpInfo( accountId, skip, take, filter); return resp.getData(); } /** * * * @param accountId (required) * @param skip (required) * @param take (required) * @param filter (optional) * @return ApiResponse<ResponseMessageCollectionListDealerPageDealer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageCollectionListDealerPageDealer> gETpublicV41DealerpagesAccountidAgenciesWithHttpInfo( Integer accountId, Integer skip, Integer take, String filter) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidAgenciesCall(accountId, skip, take, filter, null, null); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListDealerPageDealer>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * (asynchronously) * * @param accountId (required) * @param skip (required) * @param take (required) * @param filter (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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidAgenciesAsync(Integer accountId, Integer skip, Integer take, String filter, final ApiCallback<ResponseMessageCollectionListDealerPageDealer> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidAgenciesCall(accountId, skip, take, filter, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListDealerPageDealer>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for gETpublicV41DealerpagesAccountidContact */ private com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidContactCall(Integer accountId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException( "Missing the required parameter 'accountId' when calling gETpublicV41DealerpagesAccountidContact(Async)"); } // create path and map variables String localVarPath = "/public/v4.1/dealerpages/{accountId}/contact".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @param accountId (required) * @return ResponseMessageDealerPageContact * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageDealerPageContact gETpublicV41DealerpagesAccountidContact(Integer accountId) throws ApiException { ApiResponse<ResponseMessageDealerPageContact> resp = gETpublicV41DealerpagesAccountidContactWithHttpInfo( accountId); return resp.getData(); } /** * * * @param accountId (required) * @return ApiResponse<ResponseMessageDealerPageContact> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageDealerPageContact> gETpublicV41DealerpagesAccountidContactWithHttpInfo( Integer accountId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidContactCall(accountId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageContact>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * (asynchronously) * * @param accountId (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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidContactAsync(Integer accountId, final ApiCallback<ResponseMessageDealerPageContact> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidContactCall(accountId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageContact>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for gETpublicV41DealerpagesAccountidMakemodels */ private com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidMakemodelsCall(Integer accountId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException( "Missing the required parameter 'accountId' when calling gETpublicV41DealerpagesAccountidMakemodels(Async)"); } // create path and map variables String localVarPath = "/public/v4.1/dealerpages/{accountId}/makemodels".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @param accountId (required) * @return ResponseMessageCollectionListVehicleTypeMakeModel * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageCollectionListVehicleTypeMakeModel gETpublicV41DealerpagesAccountidMakemodels( Integer accountId) throws ApiException { ApiResponse<ResponseMessageCollectionListVehicleTypeMakeModel> resp = gETpublicV41DealerpagesAccountidMakemodelsWithHttpInfo( accountId); return resp.getData(); } /** * * * @param accountId (required) * @return ApiResponse<ResponseMessageCollectionListVehicleTypeMakeModel> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageCollectionListVehicleTypeMakeModel> gETpublicV41DealerpagesAccountidMakemodelsWithHttpInfo( Integer accountId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidMakemodelsCall(accountId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListVehicleTypeMakeModel>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * (asynchronously) * * @param accountId (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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidMakemodelsAsync(Integer accountId, final ApiCallback<ResponseMessageCollectionListVehicleTypeMakeModel> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidMakemodelsCall(accountId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListVehicleTypeMakeModel>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for gETpublicV41DealerpagesAccountidNews */ private com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidNewsCall(Integer accountId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException( "Missing the required parameter 'accountId' when calling gETpublicV41DealerpagesAccountidNews(Async)"); } // create path and map variables String localVarPath = "/public/v4.1/dealerpages/{accountId}/news".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @param accountId (required) * @return ResponseMessageDealerPageNews * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageDealerPageNews gETpublicV41DealerpagesAccountidNews(Integer accountId) throws ApiException { ApiResponse<ResponseMessageDealerPageNews> resp = gETpublicV41DealerpagesAccountidNewsWithHttpInfo( accountId); return resp.getData(); } /** * * * @param accountId (required) * @return ApiResponse<ResponseMessageDealerPageNews> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageDealerPageNews> gETpublicV41DealerpagesAccountidNewsWithHttpInfo( Integer accountId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidNewsCall(accountId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageNews>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * (asynchronously) * * @param accountId (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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidNewsAsync(Integer accountId, final ApiCallback<ResponseMessageDealerPageNews> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidNewsCall(accountId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageNews>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for gETpublicV41DealerpagesAccountidTabs */ private com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidTabsCall(Integer accountId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException( "Missing the required parameter 'accountId' when calling gETpublicV41DealerpagesAccountidTabs(Async)"); } // create path and map variables String localVarPath = "/public/v4.1/dealerpages/{accountId}/tabs".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @param accountId (required) * @return ResponseMessageListDealerPageTab * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageListDealerPageTab gETpublicV41DealerpagesAccountidTabs(Integer accountId) throws ApiException { ApiResponse<ResponseMessageListDealerPageTab> resp = gETpublicV41DealerpagesAccountidTabsWithHttpInfo( accountId); return resp.getData(); } /** * * * @param accountId (required) * @return ApiResponse<ResponseMessageListDealerPageTab> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageListDealerPageTab> gETpublicV41DealerpagesAccountidTabsWithHttpInfo( Integer accountId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidTabsCall(accountId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageListDealerPageTab>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * (asynchronously) * * @param accountId (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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidTabsAsync(Integer accountId, final ApiCallback<ResponseMessageListDealerPageTab> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidTabsCall(accountId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageListDealerPageTab>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for gETpublicV41DealerpagesAccountidTeam */ private com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidTeamCall(Integer accountId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException( "Missing the required parameter 'accountId' when calling gETpublicV41DealerpagesAccountidTeam(Async)"); } // create path and map variables String localVarPath = "/public/v4.1/dealerpages/{accountId}/team".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @param accountId (required) * @return ResponseMessageDealerPageTeam * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageDealerPageTeam gETpublicV41DealerpagesAccountidTeam(Integer accountId) throws ApiException { ApiResponse<ResponseMessageDealerPageTeam> resp = gETpublicV41DealerpagesAccountidTeamWithHttpInfo( accountId); return resp.getData(); } /** * * * @param accountId (required) * @return ApiResponse<ResponseMessageDealerPageTeam> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageDealerPageTeam> gETpublicV41DealerpagesAccountidTeamWithHttpInfo( Integer accountId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidTeamCall(accountId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageTeam>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * (asynchronously) * * @param accountId (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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidTeamAsync(Integer accountId, final ApiCallback<ResponseMessageDealerPageTeam> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidTeamCall(accountId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageTeam>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for gETpublicV41DealerpagesAccountidVehicles */ private com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidVehiclesCall(Integer accountId, Integer skip, Integer take, String filter, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException( "Missing the required parameter 'accountId' when calling gETpublicV41DealerpagesAccountidVehicles(Async)"); } // verify the required parameter 'skip' is set if (skip == null) { throw new ApiException( "Missing the required parameter 'skip' when calling gETpublicV41DealerpagesAccountidVehicles(Async)"); } // verify the required parameter 'take' is set if (take == null) { throw new ApiException( "Missing the required parameter 'take' when calling gETpublicV41DealerpagesAccountidVehicles(Async)"); } // create path and map variables String localVarPath = "/public/v4.1/dealerpages/{accountId}/vehicles".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (skip != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "skip", skip)); if (take != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "take", take)); if (filter != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @param accountId (required) * @param skip (required) * @param take (required) * @param filter (optional) * @return ResponseMessageCollectionListAd * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageCollectionListAd gETpublicV41DealerpagesAccountidVehicles(Integer accountId, Integer skip, Integer take, String filter) throws ApiException { ApiResponse<ResponseMessageCollectionListAd> resp = gETpublicV41DealerpagesAccountidVehiclesWithHttpInfo( accountId, skip, take, filter); return resp.getData(); } /** * * * @param accountId (required) * @param skip (required) * @param take (required) * @param filter (optional) * @return ApiResponse<ResponseMessageCollectionListAd> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageCollectionListAd> gETpublicV41DealerpagesAccountidVehiclesWithHttpInfo( Integer accountId, Integer skip, Integer take, String filter) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidVehiclesCall(accountId, skip, take, filter, null, null); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListAd>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * (asynchronously) * * @param accountId (required) * @param skip (required) * @param take (required) * @param filter (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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidVehiclesAsync(Integer accountId, Integer skip, Integer take, String filter, final ApiCallback<ResponseMessageCollectionListAd> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidVehiclesCall(accountId, skip, take, filter, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListAd>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for gETpublicV41DealerpagesAccountidVideo */ private com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidVideoCall(Integer accountId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException( "Missing the required parameter 'accountId' when calling gETpublicV41DealerpagesAccountidVideo(Async)"); } // create path and map variables String localVarPath = "/public/v4.1/dealerpages/{accountId}/video".replaceAll("\\{format\\}", "json") .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @param accountId (required) * @return ResponseMessageDealerPageVideo * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageDealerPageVideo gETpublicV41DealerpagesAccountidVideo(Integer accountId) throws ApiException { ApiResponse<ResponseMessageDealerPageVideo> resp = gETpublicV41DealerpagesAccountidVideoWithHttpInfo( accountId); return resp.getData(); } /** * * * @param accountId (required) * @return ApiResponse<ResponseMessageDealerPageVideo> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageDealerPageVideo> gETpublicV41DealerpagesAccountidVideoWithHttpInfo( Integer accountId) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidVideoCall(accountId, null, null); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageVideo>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * (asynchronously) * * @param accountId (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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesAccountidVideoAsync(Integer accountId, final ApiCallback<ResponseMessageDealerPageVideo> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesAccountidVideoCall(accountId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageDealerPageVideo>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for gETpublicV41DealerpagesDealers */ private com.squareup.okhttp.Call gETpublicV41DealerpagesDealersCall(Integer skip, Integer take, String filter, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'skip' is set if (skip == null) { throw new ApiException( "Missing the required parameter 'skip' when calling gETpublicV41DealerpagesDealers(Async)"); } // verify the required parameter 'take' is set if (take == null) { throw new ApiException( "Missing the required parameter 'take' when calling gETpublicV41DealerpagesDealers(Async)"); } // create path and map variables String localVarPath = "/public/v4.1/dealerpages/dealers".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); if (skip != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "skip", skip)); if (take != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "take", take)); if (filter != null) localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @param skip (required) * @param take (required) * @param filter (optional) * @return ResponseMessageCollectionListDealerPageDealer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageCollectionListDealerPageDealer gETpublicV41DealerpagesDealers(Integer skip, Integer take, String filter) throws ApiException { ApiResponse<ResponseMessageCollectionListDealerPageDealer> resp = gETpublicV41DealerpagesDealersWithHttpInfo( skip, take, filter); return resp.getData(); } /** * * * @param skip (required) * @param take (required) * @param filter (optional) * @return ApiResponse<ResponseMessageCollectionListDealerPageDealer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageCollectionListDealerPageDealer> gETpublicV41DealerpagesDealersWithHttpInfo( Integer skip, Integer take, String filter) throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesDealersCall(skip, take, filter, null, null); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListDealerPageDealer>() { }.getType(); return apiClient.execute(call, localVarReturnType); } /** * (asynchronously) * * @param skip (required) * @param take (required) * @param filter (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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesDealersAsync(Integer skip, Integer take, String filter, final ApiCallback<ResponseMessageCollectionListDealerPageDealer> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesDealersCall(skip, take, filter, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListDealerPageDealer>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for gETpublicV41DealerpagesMakes */ private com.squareup.okhttp.Call gETpublicV41DealerpagesMakesCall( final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/public/v4.1/dealerpages/makes".replaceAll("\\{format\\}", "json"); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, String>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>(); final String[] localVarAccepts = { "application/json", "text/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); if (progressListener != null) { apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.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()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)).build(); } }); } String[] localVarAuthNames = new String[] { "oauth2" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } /** * * * @return ResponseMessageCollectionListMake * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ResponseMessageCollectionListMake gETpublicV41DealerpagesMakes() throws ApiException { ApiResponse<ResponseMessageCollectionListMake> resp = gETpublicV41DealerpagesMakesWithHttpInfo(); return resp.getData(); } /** * * * @return ApiResponse<ResponseMessageCollectionListMake> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<ResponseMessageCollectionListMake> gETpublicV41DealerpagesMakesWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = gETpublicV41DealerpagesMakesCall(null, null); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListMake>() { }.getType(); return apiClient.execute(call, 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 */ public com.squareup.okhttp.Call gETpublicV41DealerpagesMakesAsync( final ApiCallback<ResponseMessageCollectionListMake> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = gETpublicV41DealerpagesMakesCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<ResponseMessageCollectionListMake>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } }