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

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

There is a newer version: 3.1.6.ALL
Show newest version
/*
 * 支付宝开放平台API
 * 支付宝开放平台v3协议文档
 *
 * The version of the OpenAPI document: 2024-01-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.AlipayOpenServicemarketOrderAcceptDefaultResponse;
import com.alipay.v3.model.AlipayOpenServicemarketOrderAcceptModel;
import com.alipay.v3.model.AlipayOpenServicemarketOrderCreateDefaultResponse;
import com.alipay.v3.model.AlipayOpenServicemarketOrderCreateModel;
import com.alipay.v3.model.AlipayOpenServicemarketOrderCreateResponseModel;
import com.alipay.v3.model.AlipayOpenServicemarketOrderNotifyDefaultResponse;
import com.alipay.v3.model.AlipayOpenServicemarketOrderQueryDefaultResponse;
import com.alipay.v3.model.AlipayOpenServicemarketOrderQueryResponseModel;
import com.alipay.v3.model.AlipayOpenServicemarketOrderRejectDefaultResponse;
import com.alipay.v3.model.AlipayOpenServicemarketOrderRejectModel;
import com.alipay.v3.model.CommonNotifyUrlModel;
import java.io.File;

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 AlipayOpenServicemarketOrderApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

    public AlipayOpenServicemarketOrderApi(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 accept
     * @param alipayOpenServicemarketOrderAcceptModel  (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 acceptCall(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel, 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() : alipayOpenServicemarketOrderAcceptModel; // create path and map variables String localVarPath = "/v3/alipay/open/servicemarket/order/accept"; 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 acceptValidateBeforeCall(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = acceptCall(alipayOpenServicemarketOrderAcceptModel, _callback, customizedParams); return localVarCall; } /** * 服务商接单操作 * 商户订购服务插件之后,需要服务商接单,调用此接口可完成接单操作 * @param alipayOpenServicemarketOrderAcceptModel (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 accept(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel) throws ApiException { ApiResponse localVarResp = acceptWithHttpInfo(alipayOpenServicemarketOrderAcceptModel, null); return localVarResp.getData(); } public Object accept(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel, CustomizedParams customizedParams) throws ApiException { ApiResponse localVarResp = acceptWithHttpInfo(alipayOpenServicemarketOrderAcceptModel, customizedParams); return localVarResp.getData(); } /** * 服务商接单操作 * 商户订购服务插件之后,需要服务商接单,调用此接口可完成接单操作 * @param alipayOpenServicemarketOrderAcceptModel (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 acceptWithHttpInfo(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = acceptValidateBeforeCall(alipayOpenServicemarketOrderAcceptModel, 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 alipayOpenServicemarketOrderAcceptModel (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 请求失败 -
*/ public okhttp3.Call acceptAsync(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = acceptValidateBeforeCall(alipayOpenServicemarketOrderAcceptModel, _callback, null); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public okhttp3.Call acceptAsync(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = acceptValidateBeforeCall(alipayOpenServicemarketOrderAcceptModel, _callback, customizedParams); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for create * @param appLogo (optional) * @param data (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 createCall(File appLogo, AlipayOpenServicemarketOrderCreateModel data, 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/servicemarket/order/create"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (appLogo != null) { localVarFormParams.put("app_logo", appLogo); } if (data != null) { localVarFormParams.put("data", data); } //自定义body内容 if (customizedParams != null && !Strings.isNullOrEmpty(customizedParams.getBodyContent())) { localVarFormParams.put("data", customizedParams.getBodyContent()); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "multipart/form-data" }; 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 createValidateBeforeCall(File appLogo, AlipayOpenServicemarketOrderCreateModel data, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = createCall(appLogo, data, _callback, customizedParams); return localVarCall; } /** * 服务市场代订购小程序 * 第三方服务商可以创建服务市场的订单,并代为创建小程序应用,小程序应用授权给服务商 * @param appLogo (optional) * @param data (optional) * @return AlipayOpenServicemarketOrderCreateResponseModel * @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 AlipayOpenServicemarketOrderCreateResponseModel create(File appLogo, AlipayOpenServicemarketOrderCreateModel data) throws ApiException { ApiResponse localVarResp = createWithHttpInfo(appLogo, data, null); return localVarResp.getData(); } public AlipayOpenServicemarketOrderCreateResponseModel create(File appLogo, AlipayOpenServicemarketOrderCreateModel data, CustomizedParams customizedParams) throws ApiException { ApiResponse localVarResp = createWithHttpInfo(appLogo, data, customizedParams); return localVarResp.getData(); } /** * 服务市场代订购小程序 * 第三方服务商可以创建服务市场的订单,并代为创建小程序应用,小程序应用授权给服务商 * @param appLogo (optional) * @param data (optional) * @return ApiResponse<AlipayOpenServicemarketOrderCreateResponseModel> * @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 createWithHttpInfo(File appLogo, AlipayOpenServicemarketOrderCreateModel data, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = createValidateBeforeCall(appLogo, data, 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 appLogo (optional) * @param data (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 请求失败 -
*/ public okhttp3.Call createAsync(File appLogo, AlipayOpenServicemarketOrderCreateModel data, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createValidateBeforeCall(appLogo, data, _callback, null); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public okhttp3.Call createAsync(File appLogo, AlipayOpenServicemarketOrderCreateModel data, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = createValidateBeforeCall(appLogo, data, _callback, customizedParams); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for notify * @param commonNotifyUrlModel (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 notifyCall(CommonNotifyUrlModel commonNotifyUrlModel, 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() : commonNotifyUrlModel; // create path and map variables String localVarPath = "/v3/alipay/open/servicemarket/order/notify"; 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 notifyValidateBeforeCall(CommonNotifyUrlModel commonNotifyUrlModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = notifyCall(commonNotifyUrlModel, _callback, customizedParams); return localVarCall; } /** * 服务市场商户确认订购通知 * 服务市场当商户选择服务商提供产品并订购确认时,通知服务商订单消息。服务商可以通过通知的消息内容回查该订单明细。回查接口(alipay.open.servicemarket.order.query) * @param commonNotifyUrlModel (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 notify(CommonNotifyUrlModel commonNotifyUrlModel) throws ApiException { ApiResponse localVarResp = notifyWithHttpInfo(commonNotifyUrlModel, null); return localVarResp.getData(); } public Object notify(CommonNotifyUrlModel commonNotifyUrlModel, CustomizedParams customizedParams) throws ApiException { ApiResponse localVarResp = notifyWithHttpInfo(commonNotifyUrlModel, customizedParams); return localVarResp.getData(); } /** * 服务市场商户确认订购通知 * 服务市场当商户选择服务商提供产品并订购确认时,通知服务商订单消息。服务商可以通过通知的消息内容回查该订单明细。回查接口(alipay.open.servicemarket.order.query) * @param commonNotifyUrlModel (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 notifyWithHttpInfo(CommonNotifyUrlModel commonNotifyUrlModel, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = notifyValidateBeforeCall(commonNotifyUrlModel, 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) * 服务市场当商户选择服务商提供产品并订购确认时,通知服务商订单消息。服务商可以通过通知的消息内容回查该订单明细。回查接口(alipay.open.servicemarket.order.query) * @param commonNotifyUrlModel (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 请求失败 -
*/ public okhttp3.Call notifyAsync(CommonNotifyUrlModel commonNotifyUrlModel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = notifyValidateBeforeCall(commonNotifyUrlModel, _callback, null); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public okhttp3.Call notifyAsync(CommonNotifyUrlModel commonNotifyUrlModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = notifyValidateBeforeCall(commonNotifyUrlModel, _callback, customizedParams); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for query * @param commodityOrderId 订购服务订单ID,通过支付宝发送的 https://opendocs.alipay.com/apis/api_3/alipay.open.servicemarket.order.notify(服务市场商户确认订购通知) 通知获取。 (optional) * @param startPage 查询开始页码,1 为第一页。 (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 commodityOrderId, String startPage, 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/servicemarket/order/query"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (commodityOrderId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("commodity_order_id", commodityOrderId)); } if (startPage != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("start_page", startPage)); } 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 commodityOrderId, String startPage, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = queryCall(commodityOrderId, startPage, _callback, customizedParams); return localVarCall; } /** * 服务市场订单明细查询 * 第三方服务商提供服务产品被商户订购后,服务市场会推送订单信息给服务商,服务商根据订单号回查该订单明细信息。 * @param commodityOrderId 订购服务订单ID,通过支付宝发送的 https://opendocs.alipay.com/apis/api_3/alipay.open.servicemarket.order.notify(服务市场商户确认订购通知) 通知获取。 (optional) * @param startPage 查询开始页码,1 为第一页。 (optional) * @return AlipayOpenServicemarketOrderQueryResponseModel * @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 AlipayOpenServicemarketOrderQueryResponseModel query(String commodityOrderId, String startPage) throws ApiException { ApiResponse localVarResp = queryWithHttpInfo(commodityOrderId, startPage, null); return localVarResp.getData(); } public AlipayOpenServicemarketOrderQueryResponseModel query(String commodityOrderId, String startPage, CustomizedParams customizedParams) throws ApiException { ApiResponse localVarResp = queryWithHttpInfo(commodityOrderId, startPage, customizedParams); return localVarResp.getData(); } /** * 服务市场订单明细查询 * 第三方服务商提供服务产品被商户订购后,服务市场会推送订单信息给服务商,服务商根据订单号回查该订单明细信息。 * @param commodityOrderId 订购服务订单ID,通过支付宝发送的 https://opendocs.alipay.com/apis/api_3/alipay.open.servicemarket.order.notify(服务市场商户确认订购通知) 通知获取。 (optional) * @param startPage 查询开始页码,1 为第一页。 (optional) * @return ApiResponse<AlipayOpenServicemarketOrderQueryResponseModel> * @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 commodityOrderId, String startPage, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = queryValidateBeforeCall(commodityOrderId, startPage, 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 commodityOrderId 订购服务订单ID,通过支付宝发送的 https://opendocs.alipay.com/apis/api_3/alipay.open.servicemarket.order.notify(服务市场商户确认订购通知) 通知获取。 (optional) * @param startPage 查询开始页码,1 为第一页。 (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 请求失败 -
*/ public okhttp3.Call queryAsync(String commodityOrderId, String startPage, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = queryValidateBeforeCall(commodityOrderId, startPage, _callback, null); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public okhttp3.Call queryAsync(String commodityOrderId, String startPage, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = queryValidateBeforeCall(commodityOrderId, startPage, _callback, customizedParams); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for reject * @param alipayOpenServicemarketOrderRejectModel (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 rejectCall(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel, 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() : alipayOpenServicemarketOrderRejectModel; // create path and map variables String localVarPath = "/v3/alipay/open/servicemarket/order/reject"; 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 rejectValidateBeforeCall(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = rejectCall(alipayOpenServicemarketOrderRejectModel, _callback, customizedParams); return localVarCall; } /** * 服务商拒绝接单 * 服务商可以拒接商户购买服务插件订单 * @param alipayOpenServicemarketOrderRejectModel (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 reject(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel) throws ApiException { ApiResponse localVarResp = rejectWithHttpInfo(alipayOpenServicemarketOrderRejectModel, null); return localVarResp.getData(); } public Object reject(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel, CustomizedParams customizedParams) throws ApiException { ApiResponse localVarResp = rejectWithHttpInfo(alipayOpenServicemarketOrderRejectModel, customizedParams); return localVarResp.getData(); } /** * 服务商拒绝接单 * 服务商可以拒接商户购买服务插件订单 * @param alipayOpenServicemarketOrderRejectModel (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 rejectWithHttpInfo(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = rejectValidateBeforeCall(alipayOpenServicemarketOrderRejectModel, 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 alipayOpenServicemarketOrderRejectModel (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 请求失败 -
*/ public okhttp3.Call rejectAsync(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = rejectValidateBeforeCall(alipayOpenServicemarketOrderRejectModel, _callback, null); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public okhttp3.Call rejectAsync(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel, final ApiCallback _callback, CustomizedParams customizedParams) throws ApiException { okhttp3.Call localVarCall = rejectValidateBeforeCall(alipayOpenServicemarketOrderRejectModel, _callback, customizedParams); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }