Skip to content

Latest commit

 

History

History
224 lines (175 loc) · 6.66 KB

AlipayOpenAppServiceApi.md

File metadata and controls

224 lines (175 loc) · 6.66 KB

AlipayOpenAppServiceApi

All URIs are relative to https://openapi.alipay.com

Method HTTP request Description
apply POST /v3/alipay/open/app/service/apply 服务提报申请
delete DELETE /v3/alipay/open/app/service/delete 服务失效接口
query GET /v3/alipay/open/app/service/query 服务查询

apply

AlipayOpenAppServiceApplyResponseModel apply(alipayOpenAppServiceApplyModel)

服务提报申请

服务提报申请

Example

// Import classes:
import com.alipay.v3.ApiClient;
import com.alipay.v3.ApiException;
import com.alipay.v3.Configuration;
import com.alipay.v3.util.*;
import com.alipay.v3.api.models.*;
import com.alipay.v3.api.AlipayOpenAppServiceApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://openapi.alipay.com");
    // 设置alipayConfig参数(全局设置一次)
    AlipayConfig config = new AlipayConfig();
    config.setAppId("app_id");
    config.setPrivateKey("private_key");
    config.setAlipayPublicKey("alipay_public_key");
    config.setEncryptKey("encrypt_key");
    defaultClient.setAlipayConfig(config);

    AlipayOpenAppServiceApi apiInstance = new AlipayOpenAppServiceApi(defaultClient);
    AlipayOpenAppServiceApplyModel alipayOpenAppServiceApplyModel = new AlipayOpenAppServiceApplyModel(); // AlipayOpenAppServiceApplyModel | 
    try {
      AlipayOpenAppServiceApplyResponseModel result = apiInstance.apply(alipayOpenAppServiceApplyModel);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlipayOpenAppServiceApi#apply");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
alipayOpenAppServiceApplyModel AlipayOpenAppServiceApplyModel [optional]

Return type

AlipayOpenAppServiceApplyResponseModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 common response -
0 请求失败 -

delete

Object delete(serviceCode)

服务失效接口

服务失效

Example

// Import classes:
import com.alipay.v3.ApiClient;
import com.alipay.v3.ApiException;
import com.alipay.v3.Configuration;
import com.alipay.v3.util.*;
import com.alipay.v3.api.models.*;
import com.alipay.v3.api.AlipayOpenAppServiceApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://openapi.alipay.com");
    // 设置alipayConfig参数(全局设置一次)
    AlipayConfig config = new AlipayConfig();
    config.setAppId("app_id");
    config.setPrivateKey("private_key");
    config.setAlipayPublicKey("alipay_public_key");
    config.setEncryptKey("encrypt_key");
    defaultClient.setAlipayConfig(config);

    AlipayOpenAppServiceApi apiInstance = new AlipayOpenAppServiceApi(defaultClient);
    String serviceCode = "12522641"; // String | 服务id
    try {
      Object result = apiInstance.delete(serviceCode);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlipayOpenAppServiceApi#delete");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
serviceCode String 服务id [optional]

Return type

Object

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 common response -
0 请求失败 -

query

AlipayOpenAppServiceQueryResponseModel query(serviceCode)

服务查询

服务查询

Example

// Import classes:
import com.alipay.v3.ApiClient;
import com.alipay.v3.ApiException;
import com.alipay.v3.Configuration;
import com.alipay.v3.util.*;
import com.alipay.v3.api.models.*;
import com.alipay.v3.api.AlipayOpenAppServiceApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://openapi.alipay.com");
    // 设置alipayConfig参数(全局设置一次)
    AlipayConfig config = new AlipayConfig();
    config.setAppId("app_id");
    config.setPrivateKey("private_key");
    config.setAlipayPublicKey("alipay_public_key");
    config.setEncryptKey("encrypt_key");
    defaultClient.setAlipayConfig(config);

    AlipayOpenAppServiceApi apiInstance = new AlipayOpenAppServiceApi(defaultClient);
    String serviceCode = "s1111"; // String | 服务id
    try {
      AlipayOpenAppServiceQueryResponseModel result = apiInstance.query(serviceCode);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlipayOpenAppServiceApi#query");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
serviceCode String 服务id [optional]

Return type

AlipayOpenAppServiceQueryResponseModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 common response -
0 请求失败 -