content: /*
   * 支付宝开放平台API
   * 支付宝开放平台v3协议文档
   *
   * The version of the OpenAPI document: 2025-08-26
   * 
   *
   * 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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      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<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          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<String, String> 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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public Object accept(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel) throws ApiException {
          ApiResponse<Object> localVarResp = acceptWithHttpInfo(alipayOpenServicemarketOrderAcceptModel, null);
          return localVarResp.getData();
      }
  
      public Object accept(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<Object> localVarResp = acceptWithHttpInfo(alipayOpenServicemarketOrderAcceptModel, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 服务商接单操作
       * 商户订购服务插件之后，需要服务商接单，调用此接口可完成接单操作
       * @param alipayOpenServicemarketOrderAcceptModel  (optional)
       * @return ApiResponse&lt;Object&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<Object> acceptWithHttpInfo(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = acceptValidateBeforeCall(alipayOpenServicemarketOrderAcceptModel, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<Object>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenServicemarketOrderAcceptDefaultResponse>(){}.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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call acceptAsync(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel, final ApiCallback<Object> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = acceptValidateBeforeCall(alipayOpenServicemarketOrderAcceptModel, _callback, null);
          Type localVarReturnType = new TypeToken<Object>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call acceptAsync(AlipayOpenServicemarketOrderAcceptModel alipayOpenServicemarketOrderAcceptModel, final ApiCallback<Object> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = acceptValidateBeforeCall(alipayOpenServicemarketOrderAcceptModel, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<Object>(){}.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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      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<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          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<String, String> 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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public AlipayOpenServicemarketOrderCreateResponseModel create(File appLogo, AlipayOpenServicemarketOrderCreateModel data) throws ApiException {
          ApiResponse<AlipayOpenServicemarketOrderCreateResponseModel> localVarResp = createWithHttpInfo(appLogo, data, null);
          return localVarResp.getData();
      }
  
      public AlipayOpenServicemarketOrderCreateResponseModel create(File appLogo, AlipayOpenServicemarketOrderCreateModel data, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<AlipayOpenServicemarketOrderCreateResponseModel> localVarResp = createWithHttpInfo(appLogo, data, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 服务市场代订购小程序
       * 第三方服务商可以创建服务市场的订单，并代为创建小程序应用，小程序应用授权给服务商
       * @param appLogo  (optional)
       * @param data  (optional)
       * @return ApiResponse&lt;AlipayOpenServicemarketOrderCreateResponseModel&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<AlipayOpenServicemarketOrderCreateResponseModel> createWithHttpInfo(File appLogo, AlipayOpenServicemarketOrderCreateModel data, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = createValidateBeforeCall(appLogo, data, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<AlipayOpenServicemarketOrderCreateResponseModel>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenServicemarketOrderCreateDefaultResponse>(){}.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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call createAsync(File appLogo, AlipayOpenServicemarketOrderCreateModel data, final ApiCallback<AlipayOpenServicemarketOrderCreateResponseModel> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = createValidateBeforeCall(appLogo, data, _callback, null);
          Type localVarReturnType = new TypeToken<AlipayOpenServicemarketOrderCreateResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call createAsync(File appLogo, AlipayOpenServicemarketOrderCreateModel data, final ApiCallback<AlipayOpenServicemarketOrderCreateResponseModel> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = createValidateBeforeCall(appLogo, data, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<AlipayOpenServicemarketOrderCreateResponseModel>(){}.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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      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<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          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<String, String> 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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public Object notify(CommonNotifyUrlModel commonNotifyUrlModel) throws ApiException {
          ApiResponse<Object> localVarResp = notifyWithHttpInfo(commonNotifyUrlModel, null);
          return localVarResp.getData();
      }
  
      public Object notify(CommonNotifyUrlModel commonNotifyUrlModel, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<Object> localVarResp = notifyWithHttpInfo(commonNotifyUrlModel, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 服务市场商户确认订购通知
       * 服务市场当商户选择服务商提供产品并订购确认时，通知服务商订单消息。服务商可以通过通知的消息内容回查该订单明细。回查接口（alipay.open.servicemarket.order.query）
       * @param commonNotifyUrlModel  (optional)
       * @return ApiResponse&lt;Object&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<Object> notifyWithHttpInfo(CommonNotifyUrlModel commonNotifyUrlModel, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = notifyValidateBeforeCall(commonNotifyUrlModel, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<Object>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenServicemarketOrderNotifyDefaultResponse>(){}.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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call notifyAsync(CommonNotifyUrlModel commonNotifyUrlModel, final ApiCallback<Object> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = notifyValidateBeforeCall(commonNotifyUrlModel, _callback, null);
          Type localVarReturnType = new TypeToken<Object>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call notifyAsync(CommonNotifyUrlModel commonNotifyUrlModel, final ApiCallback<Object> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = notifyValidateBeforeCall(commonNotifyUrlModel, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<Object>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
      /**
       * Build call for query
       * @param commodityOrderId 订购服务订单ID，通过支付宝发送的 &lt;a href&#x3D;\&quot;https://opendocs.alipay.com/isv/b7f7864a_alipay.open.servicemarket.order.notify?scene&#x3D;common&amp;pathHash&#x3D;af6ed436\&quot;&gt;服务市场商户确认订购通知&lt;/a&gt; 获取。 (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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      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<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          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<String, String> 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，通过支付宝发送的 &lt;a href&#x3D;\&quot;https://opendocs.alipay.com/isv/b7f7864a_alipay.open.servicemarket.order.notify?scene&#x3D;common&amp;pathHash&#x3D;af6ed436\&quot;&gt;服务市场商户确认订购通知&lt;/a&gt; 获取。 (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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public AlipayOpenServicemarketOrderQueryResponseModel query(String commodityOrderId, String startPage) throws ApiException {
          ApiResponse<AlipayOpenServicemarketOrderQueryResponseModel> localVarResp = queryWithHttpInfo(commodityOrderId, startPage, null);
          return localVarResp.getData();
      }
  
      public AlipayOpenServicemarketOrderQueryResponseModel query(String commodityOrderId, String startPage, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<AlipayOpenServicemarketOrderQueryResponseModel> localVarResp = queryWithHttpInfo(commodityOrderId, startPage, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 服务市场订单明细查询
       * 第三方服务商提供服务产品被商户订购后，服务市场会推送订单信息给服务商，服务商根据订单号回查该订单明细信息。
       * @param commodityOrderId 订购服务订单ID，通过支付宝发送的 &lt;a href&#x3D;\&quot;https://opendocs.alipay.com/isv/b7f7864a_alipay.open.servicemarket.order.notify?scene&#x3D;common&amp;pathHash&#x3D;af6ed436\&quot;&gt;服务市场商户确认订购通知&lt;/a&gt; 获取。 (optional)
       * @param startPage 查询开始页码，1 为第一页。 (optional)
       * @return ApiResponse&lt;AlipayOpenServicemarketOrderQueryResponseModel&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<AlipayOpenServicemarketOrderQueryResponseModel> queryWithHttpInfo(String commodityOrderId, String startPage, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = queryValidateBeforeCall(commodityOrderId, startPage, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<AlipayOpenServicemarketOrderQueryResponseModel>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenServicemarketOrderQueryDefaultResponse>(){}.getType()));
              } catch (Exception ex) {
                  AlipayLogger.logBizWarn(ex);
              }
              throw e;
          }
      }
  
      /**
       * 服务市场订单明细查询 (asynchronously)
       * 第三方服务商提供服务产品被商户订购后，服务市场会推送订单信息给服务商，服务商根据订单号回查该订单明细信息。
       * @param commodityOrderId 订购服务订单ID，通过支付宝发送的 &lt;a href&#x3D;\&quot;https://opendocs.alipay.com/isv/b7f7864a_alipay.open.servicemarket.order.notify?scene&#x3D;common&amp;pathHash&#x3D;af6ed436\&quot;&gt;服务市场商户确认订购通知&lt;/a&gt; 获取。 (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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call queryAsync(String commodityOrderId, String startPage, final ApiCallback<AlipayOpenServicemarketOrderQueryResponseModel> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = queryValidateBeforeCall(commodityOrderId, startPage, _callback, null);
          Type localVarReturnType = new TypeToken<AlipayOpenServicemarketOrderQueryResponseModel>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call queryAsync(String commodityOrderId, String startPage, final ApiCallback<AlipayOpenServicemarketOrderQueryResponseModel> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = queryValidateBeforeCall(commodityOrderId, startPage, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<AlipayOpenServicemarketOrderQueryResponseModel>(){}.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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      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<Pair> localVarQueryParams = new ArrayList<Pair>();
          List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
          Map<String, String> localVarHeaderParams = new HashMap<String, String>();
          Map<String, String> localVarCookieParams = new HashMap<String, String>();
          Map<String, Object> localVarFormParams = new HashMap<String, Object>();
  
          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<String, String> 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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public Object reject(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel) throws ApiException {
          ApiResponse<Object> localVarResp = rejectWithHttpInfo(alipayOpenServicemarketOrderRejectModel, null);
          return localVarResp.getData();
      }
  
      public Object reject(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel, CustomizedParams customizedParams) throws ApiException {
          ApiResponse<Object> localVarResp = rejectWithHttpInfo(alipayOpenServicemarketOrderRejectModel, customizedParams);
          return localVarResp.getData();
      }
  
      /**
       * 服务商拒绝接单
       * 服务商可以拒接商户购买服务插件订单
       * @param alipayOpenServicemarketOrderRejectModel  (optional)
       * @return ApiResponse&lt;Object&gt;
       * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
       * @http.response.details
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       */
      public ApiResponse<Object> rejectWithHttpInfo(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel, CustomizedParams customizedParams) throws ApiException {
          okhttp3.Call localVarCall = rejectValidateBeforeCall(alipayOpenServicemarketOrderRejectModel, null, customizedParams);
          try {
              Type localVarReturnType = new TypeToken<Object>(){}.getType();
              return localVarApiClient.execute(localVarCall, localVarReturnType);
          } catch (ApiException e) {
              try {
                  e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<AlipayOpenServicemarketOrderRejectDefaultResponse>(){}.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
       <table summary="Response Details" border="1">
          <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
          <tr><td> 200 </td><td> common response </td><td>  -  </td></tr>
          <tr><td> 0 </td><td> 请求失败 </td><td>  -  </td></tr>
       </table>
       * @deprecated
       */
      @Deprecated
      public okhttp3.Call rejectAsync(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel, final ApiCallback<Object> _callback) throws ApiException {
  
          okhttp3.Call localVarCall = rejectValidateBeforeCall(alipayOpenServicemarketOrderRejectModel, _callback, null);
          Type localVarReturnType = new TypeToken<Object>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  
      @Deprecated
      public okhttp3.Call rejectAsync(AlipayOpenServicemarketOrderRejectModel alipayOpenServicemarketOrderRejectModel, final ApiCallback<Object> _callback, CustomizedParams customizedParams) throws ApiException {
  
          okhttp3.Call localVarCall = rejectValidateBeforeCall(alipayOpenServicemarketOrderRejectModel, _callback, customizedParams);
          Type localVarReturnType = new TypeToken<Object>(){}.getType();
          localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
          return localVarCall;
      }
  }
  