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

com.alipay.v3.api.AlipayOpenSearchBoxactivityApi Maven / Gradle / Ivy

There is a newer version: 3.1.6.ALL
Show newest version
/*
 * 支付宝开放平台API
 * 支付宝开放平台v3协议文档
 *
 * The version of the OpenAPI document: 2024-11-12
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.alipay.v3.api;

import com.alipay.v3.ApiCallback;
import com.alipay.v3.ApiClient;
import com.alipay.v3.ApiException;
import com.alipay.v3.ApiResponse;
import com.alipay.v3.Configuration;
import com.alipay.v3.Pair;
import com.alipay.v3.ProgressRequestBody;
import com.alipay.v3.ProgressResponseBody;
import com.alipay.v3.util.AlipayLogger;
import com.alipay.v3.util.model.CustomizedParams;

import com.google.common.base.Strings;
import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.alipay.v3.model.AlipayOpenSearchBoxactivityApplyDefaultResponse;
import com.alipay.v3.model.AlipayOpenSearchBoxactivityApplyModel;
import com.alipay.v3.model.AlipayOpenSearchBoxactivityApplyResponseModel;
import com.alipay.v3.model.AlipayOpenSearchBoxactivityBatchqueryDefaultResponse;
import com.alipay.v3.model.AlipayOpenSearchBoxactivityBatchqueryModel;
import com.alipay.v3.model.AlipayOpenSearchBoxactivityBatchqueryResponseModel;
import com.alipay.v3.model.AlipayOpenSearchBoxactivityModifyDefaultResponse;
import com.alipay.v3.model.AlipayOpenSearchBoxactivityModifyModel;
import com.alipay.v3.model.AlipayOpenSearchBoxactivityOfflineDefaultResponse;
import com.alipay.v3.model.AlipayOpenSearchBoxactivityOfflineModel;
import com.alipay.v3.model.AlipayOpenSearchBoxactivityQueryDefaultResponse;
import com.alipay.v3.model.AlipayOpenSearchBoxactivityQueryResponseModel;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;

public class AlipayOpenSearchBoxactivityApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    /**
     * Build call for apply
     * @param alipayOpenSearchBoxactivityApplyModel  (optional)
     * @param _callback Callback for upload/download progress
     * @param customizedParams
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public okhttp3.Call applyCall(AlipayOpenSearchBoxactivityApplyModel alipayOpenSearchBoxactivityApplyModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = (customizedParams != null && !Strings.isNullOrEmpty(customizedParams.getBodyContent())) ? customizedParams.getBodyContent() : alipayOpenSearchBoxactivityApplyModel; // create path and map variables String localVarPath = "/v3/alipay/open/search/boxactivity/apply"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (customizedParams != null) { //额外query参数 if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) { for (Map.Entry entry : customizedParams.getQueryParams().entrySet()) { localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue())); } } if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) { localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken()); } //额外非全局header参数 if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) { localVarHeaderParams.putAll(customizedParams.getHeaderParams()); } } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call applyValidateBeforeCall(AlipayOpenSearchBoxactivityApplyModel alipayOpenSearchBoxactivityApplyModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = applyCall(alipayOpenSearchBoxactivityApplyModel, _callback, customizedParams); return localVarCall; } /** * 申请创建搜索直达活动配置 * 当搜索直达处于上架状态时,通过该接口来创建banner活动。相关概念和说明详见 <a href=\"https://opendocs.alipay.com/mini/03fjba\"> 搜索直达 </a>。 * @param alipayOpenSearchBoxactivityApplyModel (optional) * @return AlipayOpenSearchBoxactivityApplyResponseModel * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public AlipayOpenSearchBoxactivityApplyResponseModel apply(AlipayOpenSearchBoxactivityApplyModel alipayOpenSearchBoxactivityApplyModel) throws ApiException { ApiResponse localVarResp = applyWithHttpInfo(alipayOpenSearchBoxactivityApplyModel, null); return localVarResp.getData(); } public AlipayOpenSearchBoxactivityApplyResponseModel apply(AlipayOpenSearchBoxactivityApplyModel alipayOpenSearchBoxactivityApplyModel, CustomizedParams customizedParams) throws ApiException { ApiResponse localVarResp = applyWithHttpInfo(alipayOpenSearchBoxactivityApplyModel, customizedParams); return localVarResp.getData(); } /** * 申请创建搜索直达活动配置 * 当搜索直达处于上架状态时,通过该接口来创建banner活动。相关概念和说明详见 <a href=\"https://opendocs.alipay.com/mini/03fjba\"> 搜索直达 </a>。 * @param alipayOpenSearchBoxactivityApplyModel (optional) * @return ApiResponse<AlipayOpenSearchBoxactivityApplyResponseModel> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public ApiResponse applyWithHttpInfo(AlipayOpenSearchBoxactivityApplyModel alipayOpenSearchBoxactivityApplyModel, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = applyValidateBeforeCall(alipayOpenSearchBoxactivityApplyModel, null, customizedParams); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { try { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); } catch (Exception ex) { AlipayLogger.logBizWarn(ex); } throw e; } } /** * 申请创建搜索直达活动配置 (asynchronously) * 当搜索直达处于上架状态时,通过该接口来创建banner活动。相关概念和说明详见 <a href=\"https://opendocs.alipay.com/mini/03fjba\"> 搜索直达 </a>。 * @param alipayOpenSearchBoxactivityApplyModel (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
* @deprecated */ @Deprecated public okhttp3.Call applyAsync(AlipayOpenSearchBoxactivityApplyModel alipayOpenSearchBoxactivityApplyModel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = applyValidateBeforeCall(alipayOpenSearchBoxactivityApplyModel, _callback, null); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @Deprecated public okhttp3.Call applyAsync(AlipayOpenSearchBoxactivityApplyModel alipayOpenSearchBoxactivityApplyModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = applyValidateBeforeCall(alipayOpenSearchBoxactivityApplyModel, _callback, customizedParams); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for batchquery * @param alipayOpenSearchBoxactivityBatchqueryModel (optional) * @param _callback Callback for upload/download progress * @param customizedParams * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public okhttp3.Call batchqueryCall(AlipayOpenSearchBoxactivityBatchqueryModel alipayOpenSearchBoxactivityBatchqueryModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = (customizedParams != null && !Strings.isNullOrEmpty(customizedParams.getBodyContent())) ? customizedParams.getBodyContent() : alipayOpenSearchBoxactivityBatchqueryModel; // create path and map variables String localVarPath = "/v3/alipay/open/search/boxactivity/batchquery"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (customizedParams != null) { //额外query参数 if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) { for (Map.Entry entry : customizedParams.getQueryParams().entrySet()) { localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue())); } } if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) { localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken()); } //额外非全局header参数 if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) { localVarHeaderParams.putAll(customizedParams.getHeaderParams()); } } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call batchqueryValidateBeforeCall(AlipayOpenSearchBoxactivityBatchqueryModel alipayOpenSearchBoxactivityBatchqueryModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = batchqueryCall(alipayOpenSearchBoxactivityBatchqueryModel, _callback, customizedParams); return localVarCall; } /** * 批量查询搜索直达活动配置 * 批量查询多个搜索直达banner的活动信息 * @param alipayOpenSearchBoxactivityBatchqueryModel (optional) * @return AlipayOpenSearchBoxactivityBatchqueryResponseModel * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public AlipayOpenSearchBoxactivityBatchqueryResponseModel batchquery(AlipayOpenSearchBoxactivityBatchqueryModel alipayOpenSearchBoxactivityBatchqueryModel) throws ApiException { ApiResponse localVarResp = batchqueryWithHttpInfo(alipayOpenSearchBoxactivityBatchqueryModel, null); return localVarResp.getData(); } public AlipayOpenSearchBoxactivityBatchqueryResponseModel batchquery(AlipayOpenSearchBoxactivityBatchqueryModel alipayOpenSearchBoxactivityBatchqueryModel, CustomizedParams customizedParams) throws ApiException { ApiResponse localVarResp = batchqueryWithHttpInfo(alipayOpenSearchBoxactivityBatchqueryModel, customizedParams); return localVarResp.getData(); } /** * 批量查询搜索直达活动配置 * 批量查询多个搜索直达banner的活动信息 * @param alipayOpenSearchBoxactivityBatchqueryModel (optional) * @return ApiResponse<AlipayOpenSearchBoxactivityBatchqueryResponseModel> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public ApiResponse batchqueryWithHttpInfo(AlipayOpenSearchBoxactivityBatchqueryModel alipayOpenSearchBoxactivityBatchqueryModel, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = batchqueryValidateBeforeCall(alipayOpenSearchBoxactivityBatchqueryModel, null, customizedParams); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { try { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); } catch (Exception ex) { AlipayLogger.logBizWarn(ex); } throw e; } } /** * 批量查询搜索直达活动配置 (asynchronously) * 批量查询多个搜索直达banner的活动信息 * @param alipayOpenSearchBoxactivityBatchqueryModel (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
* @deprecated */ @Deprecated public okhttp3.Call batchqueryAsync(AlipayOpenSearchBoxactivityBatchqueryModel alipayOpenSearchBoxactivityBatchqueryModel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = batchqueryValidateBeforeCall(alipayOpenSearchBoxactivityBatchqueryModel, _callback, null); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @Deprecated public okhttp3.Call batchqueryAsync(AlipayOpenSearchBoxactivityBatchqueryModel alipayOpenSearchBoxactivityBatchqueryModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = batchqueryValidateBeforeCall(alipayOpenSearchBoxactivityBatchqueryModel, _callback, customizedParams); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for modify * @param alipayOpenSearchBoxactivityModifyModel (optional) * @param _callback Callback for upload/download progress * @param customizedParams * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public okhttp3.Call modifyCall(AlipayOpenSearchBoxactivityModifyModel alipayOpenSearchBoxactivityModifyModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = (customizedParams != null && !Strings.isNullOrEmpty(customizedParams.getBodyContent())) ? customizedParams.getBodyContent() : alipayOpenSearchBoxactivityModifyModel; // create path and map variables String localVarPath = "/v3/alipay/open/search/boxactivity/modify"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (customizedParams != null) { //额外query参数 if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) { for (Map.Entry entry : customizedParams.getQueryParams().entrySet()) { localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue())); } } if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) { localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken()); } //额外非全局header参数 if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) { localVarHeaderParams.putAll(customizedParams.getHeaderParams()); } } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call modifyValidateBeforeCall(AlipayOpenSearchBoxactivityModifyModel alipayOpenSearchBoxactivityModifyModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = modifyCall(alipayOpenSearchBoxactivityModifyModel, _callback, customizedParams); return localVarCall; } /** * 修改搜索直达活动配置 * 修改搜索直达活动配置 * @param alipayOpenSearchBoxactivityModifyModel (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public Object modify(AlipayOpenSearchBoxactivityModifyModel alipayOpenSearchBoxactivityModifyModel) throws ApiException { ApiResponse localVarResp = modifyWithHttpInfo(alipayOpenSearchBoxactivityModifyModel, null); return localVarResp.getData(); } public Object modify(AlipayOpenSearchBoxactivityModifyModel alipayOpenSearchBoxactivityModifyModel, CustomizedParams customizedParams) throws ApiException { ApiResponse localVarResp = modifyWithHttpInfo(alipayOpenSearchBoxactivityModifyModel, customizedParams); return localVarResp.getData(); } /** * 修改搜索直达活动配置 * 修改搜索直达活动配置 * @param alipayOpenSearchBoxactivityModifyModel (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public ApiResponse modifyWithHttpInfo(AlipayOpenSearchBoxactivityModifyModel alipayOpenSearchBoxactivityModifyModel, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = modifyValidateBeforeCall(alipayOpenSearchBoxactivityModifyModel, null, customizedParams); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { try { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); } catch (Exception ex) { AlipayLogger.logBizWarn(ex); } throw e; } } /** * 修改搜索直达活动配置 (asynchronously) * 修改搜索直达活动配置 * @param alipayOpenSearchBoxactivityModifyModel (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
* @deprecated */ @Deprecated public okhttp3.Call modifyAsync(AlipayOpenSearchBoxactivityModifyModel alipayOpenSearchBoxactivityModifyModel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = modifyValidateBeforeCall(alipayOpenSearchBoxactivityModifyModel, _callback, null); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @Deprecated public okhttp3.Call modifyAsync(AlipayOpenSearchBoxactivityModifyModel alipayOpenSearchBoxactivityModifyModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = modifyValidateBeforeCall(alipayOpenSearchBoxactivityModifyModel, _callback, customizedParams); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for offline * @param alipayOpenSearchBoxactivityOfflineModel (optional) * @param _callback Callback for upload/download progress * @param customizedParams * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public okhttp3.Call offlineCall(AlipayOpenSearchBoxactivityOfflineModel alipayOpenSearchBoxactivityOfflineModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = (customizedParams != null && !Strings.isNullOrEmpty(customizedParams.getBodyContent())) ? customizedParams.getBodyContent() : alipayOpenSearchBoxactivityOfflineModel; // create path and map variables String localVarPath = "/v3/alipay/open/search/boxactivity/offline"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (customizedParams != null) { //额外query参数 if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) { for (Map.Entry entry : customizedParams.getQueryParams().entrySet()) { localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue())); } } if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) { localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken()); } //额外非全局header参数 if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) { localVarHeaderParams.putAll(customizedParams.getHeaderParams()); } } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call offlineValidateBeforeCall(AlipayOpenSearchBoxactivityOfflineModel alipayOpenSearchBoxactivityOfflineModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = offlineCall(alipayOpenSearchBoxactivityOfflineModel, _callback, customizedParams); return localVarCall; } /** * 下架搜索直达活动 * 需要下架某个banner活动时,可通过此接口来进行下架操作 * @param alipayOpenSearchBoxactivityOfflineModel (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public Object offline(AlipayOpenSearchBoxactivityOfflineModel alipayOpenSearchBoxactivityOfflineModel) throws ApiException { ApiResponse localVarResp = offlineWithHttpInfo(alipayOpenSearchBoxactivityOfflineModel, null); return localVarResp.getData(); } public Object offline(AlipayOpenSearchBoxactivityOfflineModel alipayOpenSearchBoxactivityOfflineModel, CustomizedParams customizedParams) throws ApiException { ApiResponse localVarResp = offlineWithHttpInfo(alipayOpenSearchBoxactivityOfflineModel, customizedParams); return localVarResp.getData(); } /** * 下架搜索直达活动 * 需要下架某个banner活动时,可通过此接口来进行下架操作 * @param alipayOpenSearchBoxactivityOfflineModel (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public ApiResponse offlineWithHttpInfo(AlipayOpenSearchBoxactivityOfflineModel alipayOpenSearchBoxactivityOfflineModel, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = offlineValidateBeforeCall(alipayOpenSearchBoxactivityOfflineModel, null, customizedParams); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { try { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); } catch (Exception ex) { AlipayLogger.logBizWarn(ex); } throw e; } } /** * 下架搜索直达活动 (asynchronously) * 需要下架某个banner活动时,可通过此接口来进行下架操作 * @param alipayOpenSearchBoxactivityOfflineModel (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
* @deprecated */ @Deprecated public okhttp3.Call offlineAsync(AlipayOpenSearchBoxactivityOfflineModel alipayOpenSearchBoxactivityOfflineModel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = offlineValidateBeforeCall(alipayOpenSearchBoxactivityOfflineModel, _callback, null); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @Deprecated public okhttp3.Call offlineAsync(AlipayOpenSearchBoxactivityOfflineModel alipayOpenSearchBoxactivityOfflineModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = offlineValidateBeforeCall(alipayOpenSearchBoxactivityOfflineModel, _callback, customizedParams); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for query * @param boxActivityId 搜索直达活动id (optional) * @param merchantId 商户id,代运营模式下传入。代运营模式,需要服务商已获得商家\"运营支付宝小程序\"授权。 (optional) * @param _callback Callback for upload/download progress * @param customizedParams * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public okhttp3.Call queryCall(String boxActivityId, String merchantId, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/v3/alipay/open/search/boxactivity/query"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (boxActivityId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("box_activity_id", boxActivityId)); } if (merchantId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("merchant_id", merchantId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } if (customizedParams != null) { //额外query参数 if (customizedParams.getQueryParams() != null && customizedParams.getQueryParams().size() > 0) { for (Map.Entry entry : customizedParams.getQueryParams().entrySet()) { localVarQueryParams.addAll(localVarApiClient.parameterToPair(entry.getKey(), entry.getValue())); } } if (!Strings.isNullOrEmpty(customizedParams.getAppAuthToken())) { localVarHeaderParams.put("alipay-app-auth-token", customizedParams.getAppAuthToken()); } //额外非全局header参数 if (customizedParams.getHeaderParams() != null && customizedParams.getHeaderParams().size() > 0) { localVarHeaderParams.putAll(customizedParams.getHeaderParams()); } } String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call queryValidateBeforeCall(String boxActivityId, String merchantId, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = queryCall(boxActivityId, merchantId, _callback, customizedParams); return localVarCall; } /** * 查询搜索直达活动配置详情 * 查询单个搜索直达banner的活动信息 * @param boxActivityId 搜索直达活动id (optional) * @param merchantId 商户id,代运营模式下传入。代运营模式,需要服务商已获得商家\"运营支付宝小程序\"授权。 (optional) * @return AlipayOpenSearchBoxactivityQueryResponseModel * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public AlipayOpenSearchBoxactivityQueryResponseModel query(String boxActivityId, String merchantId) throws ApiException { ApiResponse localVarResp = queryWithHttpInfo(boxActivityId, merchantId, null); return localVarResp.getData(); } public AlipayOpenSearchBoxactivityQueryResponseModel query(String boxActivityId, String merchantId, CustomizedParams customizedParams) throws ApiException { ApiResponse localVarResp = queryWithHttpInfo(boxActivityId, merchantId, customizedParams); return localVarResp.getData(); } /** * 查询搜索直达活动配置详情 * 查询单个搜索直达banner的活动信息 * @param boxActivityId 搜索直达活动id (optional) * @param merchantId 商户id,代运营模式下传入。代运营模式,需要服务商已获得商家\"运营支付宝小程序\"授权。 (optional) * @return ApiResponse<AlipayOpenSearchBoxactivityQueryResponseModel> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
*/ public ApiResponse queryWithHttpInfo(String boxActivityId, String merchantId, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = queryValidateBeforeCall(boxActivityId, merchantId, null, customizedParams); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { try { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); } catch (Exception ex) { AlipayLogger.logBizWarn(ex); } throw e; } } /** * 查询搜索直达活动配置详情 (asynchronously) * 查询单个搜索直达banner的活动信息 * @param boxActivityId 搜索直达活动id (optional) * @param merchantId 商户id,代运营模式下传入。代运营模式,需要服务商已获得商家\"运营支付宝小程序\"授权。 (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 common response -
0 请求失败 -
* @deprecated */ @Deprecated public okhttp3.Call queryAsync(String boxActivityId, String merchantId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryValidateBeforeCall(boxActivityId, merchantId, _callback, null); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @Deprecated public okhttp3.Call queryAsync(String boxActivityId, String merchantId, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = queryValidateBeforeCall(boxActivityId, merchantId, _callback, customizedParams); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }