diff --git a/src/main/java/com/alipay/global/api/AlipayClient.java b/src/main/java/com/alipay/global/api/AlipayClient.java index b66046b..5b19cba 100644 --- a/src/main/java/com/alipay/global/api/AlipayClient.java +++ b/src/main/java/com/alipay/global/api/AlipayClient.java @@ -6,6 +6,5 @@ public interface AlipayClient { - T execute(AlipayRequest alipayRequest) throws AlipayApiException; - + T execute(AlipayRequest alipayRequest) throws AlipayApiException; } diff --git a/src/main/java/com/alipay/global/api/BaseAlipayClient.java b/src/main/java/com/alipay/global/api/BaseAlipayClient.java index 96a9f4c..9dd369e 100644 --- a/src/main/java/com/alipay/global/api/BaseAlipayClient.java +++ b/src/main/java/com/alipay/global/api/BaseAlipayClient.java @@ -1,10 +1,5 @@ package com.alipay.global.api; -import java.util.HashMap; -import java.util.Map; - -import org.apache.commons.lang3.StringUtils; - import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.serializer.SerializerFeature; import com.alipay.global.api.exception.AlipayApiException; @@ -15,238 +10,244 @@ import com.alipay.global.api.tools.Constants; import com.alipay.global.api.tools.DateTool; import com.alipay.global.api.tools.SignatureTool; +import java.util.HashMap; +import java.util.Map; +import org.apache.commons.lang3.StringUtils; public abstract class BaseAlipayClient implements AlipayClient { - private static final Integer DEFAULT_KEY_VERSION = 1; - /** - * eg: https://open-na.alipay.com - */ - private String gatewayUrl; - /** - * merchants private key - */ - private String merchantPrivateKey; - /** - * alipay public key - */ - private String alipayPublicKey; - /** - * client id - */ - private String clientId; - /** - * is sandbox mode - */ - private boolean isSandboxMode = false; - - private String agentToken; - - public BaseAlipayClient() { - } - - public BaseAlipayClient(String gatewayUrl, String merchantPrivateKey, String alipayPublicKey) { - this.gatewayUrl = gatewayUrl; - this.merchantPrivateKey = merchantPrivateKey; - this.alipayPublicKey = alipayPublicKey; - } - - public BaseAlipayClient(String gatewayUrl, String merchantPrivateKey, String alipayPublicKey, String clientId) { - this.gatewayUrl = gatewayUrl; - this.merchantPrivateKey = merchantPrivateKey; - this.alipayPublicKey = alipayPublicKey; - this.clientId = clientId; - - // if client id starts with SANDBOX_, set to sandbox mode - if (clientId.startsWith("SANDBOX_")) { - this.isSandboxMode = true; - } - } - - public BaseAlipayClient(String gatewayUrl, String merchantPrivateKey, String alipayPublicKey, String clientId, String agentToken) { - this.gatewayUrl = gatewayUrl; - this.merchantPrivateKey = merchantPrivateKey; - this.alipayPublicKey = alipayPublicKey; - this.clientId = clientId; - this.agentToken = agentToken; - - // if client id starts with SANDBOX_, set to sandbox mode - if (clientId.startsWith("SANDBOX_")) { - this.isSandboxMode = true; - } - } - - public T execute(AlipayRequest alipayRequest) throws AlipayApiException { - - // compatible with old version which clientId does not exist in BaseAlipayClient - alipayRequest.setClientId(alipayRequest.getClientId() == null ? this.clientId : alipayRequest.getClientId()); - - // replace with sandbox url if needed - adjustSandboxUrl(alipayRequest); - - // check request params - checkRequestParams(alipayRequest); - - String clientId = alipayRequest.getClientId(); - String httpMethod = alipayRequest.getHttpMethod(); - String path = alipayRequest.getPath(); - Integer keyVersion = alipayRequest.getKeyVersion(); - String reqTime = DateTool.getCurrentTimeMillis(); - String reqBody = JSON.toJSONString(alipayRequest, SerializerFeature.DisableCircularReferenceDetect); - - /** - * 对内容加签(Sign the content) - */ - String signValue = genSignValue(httpMethod, path, clientId, reqTime, reqBody); - - /** - * 生成必要header(Generate required headers) - */ - Map header = buildBaseHeader(reqTime, clientId, keyVersion, signValue); - Map customHeader = buildCustomHeader(); - if (customHeader != null && !customHeader.isEmpty()) { - header.putAll(customHeader); - } - - String requestUrl = genRequestUrl(path); - /** - * 向网关发起http请求(Make an HTTP request to the gateway) - */ - HttpRpcResult rsp = sendRequest(requestUrl, httpMethod, header, reqBody); - - if (rsp == null) { - throw new AlipayApiException("HttpRpcResult is null."); - } - - int httpRespCode = rsp.getRspCode(); - String rspBody = rsp.getRspBody(); - if (httpRespCode != Constants.HTTP_SUCCESS_CODE) { - throw new AlipayApiException("Response data error, rspBody:" + rspBody); - } - Class responseClass = alipayRequest.getResponseClass(); - T alipayResponse = JSON.parseObject(rspBody, responseClass); - Result result = alipayResponse.getResult(); - if (result == null) { - throw new AlipayApiException("Response data error, result field is null, rspBody:" + rspBody); - } - - String rspSignValue = rsp.getRspSign(); - String rspTime = rsp.getResponseTime(); - if (null == rspSignValue || rspSignValue.isEmpty() || null == rspTime || rspTime.isEmpty()) { - return alipayResponse; - } - - /** - * 对返回结果验签(Verify the result signature) - */ - boolean isVerifySuccess = checkRspSign(httpMethod, path, clientId, rspTime, rspBody, rspSignValue); - if (!isVerifySuccess) { - throw new AlipayApiException("Response signature verify fail."); - } - - return alipayResponse; - } - - private String genSignValue(String httpMethod, String path, String clientId, String requestTime, String reqBody) throws AlipayApiException { - String signatureValue; - try { - signatureValue = SignatureTool.sign(httpMethod, path, clientId, requestTime, reqBody, merchantPrivateKey); - } catch (Exception e) { - throw new AlipayApiException("generate signature error", e); - } - return signatureValue; - } - - private boolean checkRspSign(String httpMethod, String path, String clientId, String responseTime, String rspBody, String rspSignValue) throws AlipayApiException { - try { - return SignatureTool.verify(httpMethod, path, clientId, responseTime, rspBody, rspSignValue, alipayPublicKey); - } catch (Exception e) { - throw new AlipayApiException("verify signature error", e); - } - } - - private void checkRequestParams(AlipayRequest alipayRequest) throws AlipayApiException { - if (alipayRequest == null) { - throw new AlipayApiException("alipayRequest can't null"); - } - - String clientId = alipayRequest.getClientId(); - String httpMethod = alipayRequest.getHttpMethod(); - String path = alipayRequest.getPath(); - - if (StringUtils.isBlank(gatewayUrl)) { - throw new AlipayApiException("gatewayUrl can't null"); - } - - if (StringUtils.isBlank(clientId)) { - throw new AlipayApiException("clientId can't null"); - } - - if (StringUtils.isBlank(httpMethod)) { - throw new AlipayApiException("httpMethod can't null"); - } - - if (StringUtils.isBlank(path)) { - throw new AlipayApiException("path can't null"); - } - - if (!path.startsWith("/")) { - throw new AlipayApiException("path must start with /"); - } - - } - - private String genRequestUrl(String path) { - if (!gatewayUrl.startsWith("http://") && !gatewayUrl.startsWith("https://")) { - gatewayUrl = "https://" + gatewayUrl; - } - if (gatewayUrl.endsWith("/")) { - int len = gatewayUrl.length(); - gatewayUrl = gatewayUrl.substring(0, len - 1); - } - return gatewayUrl + path; - - } - - /** - * If is sandbox mode, modify the path - * - * @param alipayRequest - */ - private void adjustSandboxUrl(AlipayRequest alipayRequest) { - if (isSandboxMode && alipayRequest.usingSandboxUrl()) { - String originPath = alipayRequest.getPath(); - alipayRequest.setPath(originPath.replaceFirst("/ams/api", "/ams/sandbox/api")); - } - } - - /** - * Generate required headers - * - * @param requestTime - * @param clientId - * @param keyVersion - * @param signatureValue - * @return - */ - private Map buildBaseHeader(String requestTime, String clientId, Integer keyVersion, String signatureValue) { - Map header = new HashMap(); - header.put(Constants.CONTENT_TYPE_HEADER, "application/json; charset=UTF-8"); - header.put(Constants.REQ_TIME_HEADER, requestTime); - header.put(Constants.CLIENT_ID_HEADER, clientId); - if (keyVersion == null) { - keyVersion = DEFAULT_KEY_VERSION; - } - String signatureHeader = "algorithm=RSA256,keyVersion=" + keyVersion + ",signature=" + signatureValue; - header.put(Constants.REQ_SIGN_HEADER, signatureHeader); - if (StringUtils.isNotBlank(agentToken)) { - header.put(Constants.AGENT_TOKEN_HEADER, agentToken); - } - return header; - } - - public abstract Map buildCustomHeader(); - - public abstract HttpRpcResult sendRequest(String requestUrl, String httpMethod, Map header, String reqBody) throws AlipayApiException; + private static final Integer DEFAULT_KEY_VERSION = 1; + /** eg: https://open-na.alipay.com */ + private String gatewayUrl; + /** merchants private key */ + private String merchantPrivateKey; + /** alipay public key */ + private String alipayPublicKey; + /** client id */ + private String clientId; + /** is sandbox mode */ + private boolean isSandboxMode = false; + + private String agentToken; + + public BaseAlipayClient() {} + + public BaseAlipayClient(String gatewayUrl, String merchantPrivateKey, String alipayPublicKey) { + this.gatewayUrl = gatewayUrl; + this.merchantPrivateKey = merchantPrivateKey; + this.alipayPublicKey = alipayPublicKey; + } + + public BaseAlipayClient( + String gatewayUrl, String merchantPrivateKey, String alipayPublicKey, String clientId) { + this.gatewayUrl = gatewayUrl; + this.merchantPrivateKey = merchantPrivateKey; + this.alipayPublicKey = alipayPublicKey; + this.clientId = clientId; + + // if client id starts with SANDBOX_, set to sandbox mode + if (clientId.startsWith("SANDBOX_")) { + this.isSandboxMode = true; + } + } + + public BaseAlipayClient( + String gatewayUrl, + String merchantPrivateKey, + String alipayPublicKey, + String clientId, + String agentToken) { + this.gatewayUrl = gatewayUrl; + this.merchantPrivateKey = merchantPrivateKey; + this.alipayPublicKey = alipayPublicKey; + this.clientId = clientId; + this.agentToken = agentToken; + + // if client id starts with SANDBOX_, set to sandbox mode + if (clientId.startsWith("SANDBOX_")) { + this.isSandboxMode = true; + } + } + + public T execute(AlipayRequest alipayRequest) + throws AlipayApiException { + + // compatible with old version which clientId does not exist in BaseAlipayClient + alipayRequest.setClientId( + alipayRequest.getClientId() == null ? this.clientId : alipayRequest.getClientId()); + + // replace with sandbox url if needed + adjustSandboxUrl(alipayRequest); + + // check request params + checkRequestParams(alipayRequest); + + String clientId = alipayRequest.getClientId(); + String httpMethod = alipayRequest.getHttpMethod(); + String path = alipayRequest.getPath(); + Integer keyVersion = alipayRequest.getKeyVersion(); + String reqTime = DateTool.getCurrentTimeMillis(); + String reqBody = + JSON.toJSONString(alipayRequest, SerializerFeature.DisableCircularReferenceDetect); + + /** 对内容加签(Sign the content) */ + String signValue = genSignValue(httpMethod, path, clientId, reqTime, reqBody); + + /** 生成必要header(Generate required headers) */ + Map header = buildBaseHeader(reqTime, clientId, keyVersion, signValue); + Map customHeader = buildCustomHeader(); + if (customHeader != null && !customHeader.isEmpty()) { + header.putAll(customHeader); + } + + String requestUrl = genRequestUrl(path); + /** 向网关发起http请求(Make an HTTP request to the gateway) */ + HttpRpcResult rsp = sendRequest(requestUrl, httpMethod, header, reqBody); + + if (rsp == null) { + throw new AlipayApiException("HttpRpcResult is null."); + } + + int httpRespCode = rsp.getRspCode(); + String rspBody = rsp.getRspBody(); + if (httpRespCode != Constants.HTTP_SUCCESS_CODE) { + throw new AlipayApiException("Response data error, rspBody:" + rspBody); + } + Class responseClass = alipayRequest.getResponseClass(); + T alipayResponse = JSON.parseObject(rspBody, responseClass); + Result result = alipayResponse.getResult(); + if (result == null) { + throw new AlipayApiException("Response data error, result field is null, rspBody:" + rspBody); + } + + String rspSignValue = rsp.getRspSign(); + String rspTime = rsp.getResponseTime(); + if (null == rspSignValue || rspSignValue.isEmpty() || null == rspTime || rspTime.isEmpty()) { + return alipayResponse; + } + + /** 对返回结果验签(Verify the result signature) */ + boolean isVerifySuccess = + checkRspSign(httpMethod, path, clientId, rspTime, rspBody, rspSignValue); + if (!isVerifySuccess) { + throw new AlipayApiException("Response signature verify fail."); + } + + return alipayResponse; + } + + private String genSignValue( + String httpMethod, String path, String clientId, String requestTime, String reqBody) + throws AlipayApiException { + String signatureValue; + try { + signatureValue = + SignatureTool.sign(httpMethod, path, clientId, requestTime, reqBody, merchantPrivateKey); + } catch (Exception e) { + throw new AlipayApiException("generate signature error", e); + } + return signatureValue; + } + + private boolean checkRspSign( + String httpMethod, + String path, + String clientId, + String responseTime, + String rspBody, + String rspSignValue) + throws AlipayApiException { + try { + return SignatureTool.verify( + httpMethod, path, clientId, responseTime, rspBody, rspSignValue, alipayPublicKey); + } catch (Exception e) { + throw new AlipayApiException("verify signature error", e); + } + } + + private void checkRequestParams(AlipayRequest alipayRequest) throws AlipayApiException { + if (alipayRequest == null) { + throw new AlipayApiException("alipayRequest can't null"); + } + + String clientId = alipayRequest.getClientId(); + String httpMethod = alipayRequest.getHttpMethod(); + String path = alipayRequest.getPath(); + + if (StringUtils.isBlank(gatewayUrl)) { + throw new AlipayApiException("gatewayUrl can't null"); + } + + if (StringUtils.isBlank(clientId)) { + throw new AlipayApiException("clientId can't null"); + } + + if (StringUtils.isBlank(httpMethod)) { + throw new AlipayApiException("httpMethod can't null"); + } + + if (StringUtils.isBlank(path)) { + throw new AlipayApiException("path can't null"); + } + + if (!path.startsWith("/")) { + throw new AlipayApiException("path must start with /"); + } + } + + private String genRequestUrl(String path) { + if (!gatewayUrl.startsWith("http://") && !gatewayUrl.startsWith("https://")) { + gatewayUrl = "https://" + gatewayUrl; + } + if (gatewayUrl.endsWith("/")) { + int len = gatewayUrl.length(); + gatewayUrl = gatewayUrl.substring(0, len - 1); + } + return gatewayUrl + path; + } + + /** + * If is sandbox mode, modify the path + * + * @param alipayRequest + */ + private void adjustSandboxUrl(AlipayRequest alipayRequest) { + if (isSandboxMode && alipayRequest.usingSandboxUrl()) { + String originPath = alipayRequest.getPath(); + alipayRequest.setPath(originPath.replaceFirst("/ams/api", "/ams/sandbox/api")); + } + } + + /** + * Generate required headers + * + * @param requestTime + * @param clientId + * @param keyVersion + * @param signatureValue + * @return + */ + private Map buildBaseHeader( + String requestTime, String clientId, Integer keyVersion, String signatureValue) { + Map header = new HashMap(); + header.put(Constants.CONTENT_TYPE_HEADER, "application/json; charset=UTF-8"); + header.put(Constants.REQ_TIME_HEADER, requestTime); + header.put(Constants.CLIENT_ID_HEADER, clientId); + if (keyVersion == null) { + keyVersion = DEFAULT_KEY_VERSION; + } + String signatureHeader = + "algorithm=RSA256,keyVersion=" + keyVersion + ",signature=" + signatureValue; + header.put(Constants.REQ_SIGN_HEADER, signatureHeader); + if (StringUtils.isNotBlank(agentToken)) { + header.put(Constants.AGENT_TOKEN_HEADER, agentToken); + } + return header; + } + + public abstract Map buildCustomHeader(); + public abstract HttpRpcResult sendRequest( + String requestUrl, String httpMethod, Map header, String reqBody) + throws AlipayApiException; } diff --git a/src/main/java/com/alipay/global/api/DefaultAlipayClient.java b/src/main/java/com/alipay/global/api/DefaultAlipayClient.java index 056ff4e..41e39de 100644 --- a/src/main/java/com/alipay/global/api/DefaultAlipayClient.java +++ b/src/main/java/com/alipay/global/api/DefaultAlipayClient.java @@ -3,36 +3,42 @@ import com.alipay.global.api.exception.AlipayApiException; import com.alipay.global.api.net.DefaultHttpRPC; import com.alipay.global.api.net.HttpRpcResult; - import java.util.Map; public class DefaultAlipayClient extends BaseAlipayClient { - public DefaultAlipayClient(String gatewayUrl, String merchantPrivateKey, String alipayPublicKey) { - super(gatewayUrl, merchantPrivateKey, alipayPublicKey); - } - - public DefaultAlipayClient(String gatewayUrl, String merchantPrivateKey, String alipayPublicKey, String clientId) { - super(gatewayUrl, merchantPrivateKey, alipayPublicKey, clientId); - } - - public DefaultAlipayClient(String gatewayUrl, String merchantPrivateKey, String alipayPublicKey, String clientId, String agentToken) { - super(gatewayUrl, merchantPrivateKey, alipayPublicKey, clientId, agentToken); + public DefaultAlipayClient(String gatewayUrl, String merchantPrivateKey, String alipayPublicKey) { + super(gatewayUrl, merchantPrivateKey, alipayPublicKey); + } + + public DefaultAlipayClient( + String gatewayUrl, String merchantPrivateKey, String alipayPublicKey, String clientId) { + super(gatewayUrl, merchantPrivateKey, alipayPublicKey, clientId); + } + + public DefaultAlipayClient( + String gatewayUrl, + String merchantPrivateKey, + String alipayPublicKey, + String clientId, + String agentToken) { + super(gatewayUrl, merchantPrivateKey, alipayPublicKey, clientId, agentToken); + } + + @Override + public Map buildCustomHeader() { + return null; + } + + public HttpRpcResult sendRequest( + String requestUrl, String httpMethod, Map header, String reqBody) + throws AlipayApiException { + HttpRpcResult httpRpcResult; + try { + httpRpcResult = DefaultHttpRPC.doPost(requestUrl, header, reqBody); + } catch (Exception e) { + throw new AlipayApiException(e); } - - @Override - public Map buildCustomHeader() { - return null; - } - - public HttpRpcResult sendRequest(String requestUrl, String httpMethod, Map header, String reqBody) throws AlipayApiException { - HttpRpcResult httpRpcResult; - try { - httpRpcResult = DefaultHttpRPC.doPost(requestUrl, header, reqBody); - } catch (Exception e) { - throw new AlipayApiException(e); - } - return httpRpcResult; - } - + return httpRpcResult; + } } diff --git a/src/main/java/com/alipay/global/api/base64/Base64Encryptor.java b/src/main/java/com/alipay/global/api/base64/Base64Encryptor.java index e702690..72d08c8 100644 --- a/src/main/java/com/alipay/global/api/base64/Base64Encryptor.java +++ b/src/main/java/com/alipay/global/api/base64/Base64Encryptor.java @@ -2,8 +2,7 @@ public interface Base64Encryptor { - public String encodeToString(byte[] src); - - public byte[] decode(String src); + public String encodeToString(byte[] src); + public byte[] decode(String src); } diff --git a/src/main/java/com/alipay/global/api/base64/Base64Provider.java b/src/main/java/com/alipay/global/api/base64/Base64Provider.java index ff1c26b..445c1dd 100644 --- a/src/main/java/com/alipay/global/api/base64/Base64Provider.java +++ b/src/main/java/com/alipay/global/api/base64/Base64Provider.java @@ -2,16 +2,12 @@ import lombok.Getter; -/** - * 可以根据需求定制base64实现 - */ +/** 可以根据需求定制base64实现 */ public class Base64Provider { - @Getter - private static Base64Encryptor base64Encryptor = new DefaultBase64Encryptor(); + @Getter private static Base64Encryptor base64Encryptor = new DefaultBase64Encryptor(); - public static void setBase64Encryptor(Base64Encryptor base64Encryptor) { - Base64Provider.base64Encryptor = base64Encryptor; - } - -} \ No newline at end of file + public static void setBase64Encryptor(Base64Encryptor base64Encryptor) { + Base64Provider.base64Encryptor = base64Encryptor; + } +} diff --git a/src/main/java/com/alipay/global/api/base64/DefaultBase64Encryptor.java b/src/main/java/com/alipay/global/api/base64/DefaultBase64Encryptor.java index 4be8c10..dc6f6e2 100644 --- a/src/main/java/com/alipay/global/api/base64/DefaultBase64Encryptor.java +++ b/src/main/java/com/alipay/global/api/base64/DefaultBase64Encryptor.java @@ -2,19 +2,16 @@ import javax.xml.bind.DatatypeConverter; -/** - * 为兼容低版本的java,默认使用javax.xml.bind.DatatypeConverter - */ +/** 为兼容低版本的java,默认使用javax.xml.bind.DatatypeConverter */ public class DefaultBase64Encryptor implements Base64Encryptor { - @Override - public String encodeToString(byte[] src) { - return DatatypeConverter.printBase64Binary(src); - } - - @Override - public byte[] decode(String src) { - return DatatypeConverter.parseBase64Binary(src); - } + @Override + public String encodeToString(byte[] src) { + return DatatypeConverter.printBase64Binary(src); + } + @Override + public byte[] decode(String src) { + return DatatypeConverter.parseBase64Binary(src); + } } diff --git a/src/main/java/com/alipay/global/api/example/CashierPayDemoCode.java b/src/main/java/com/alipay/global/api/example/CashierPayDemoCode.java index e0a9156..d3387ed 100644 --- a/src/main/java/com/alipay/global/api/example/CashierPayDemoCode.java +++ b/src/main/java/com/alipay/global/api/example/CashierPayDemoCode.java @@ -14,253 +14,261 @@ import com.alipay.global.api.response.ams.pay.AlipayPayQueryResponse; import com.alipay.global.api.response.ams.pay.AlipayPayResponse; import com.alipay.global.api.response.ams.pay.AlipayPaymentSessionResponse; - import java.util.HashMap; import java.util.Map; import java.util.UUID; public class CashierPayDemoCode { - /** - * replace with your client id. - * find your client id here: quickStart - */ - public static final String CLIENT_ID = ""; - - /** - * replace with your antom public key (used to verify signature). - * find your antom public key here: quickStart - */ - public static final String ANTOM_PUBLIC_KEY = ""; - - /** - * replace with your private key (used to sign). - * please ensure the secure storage of your private key to prevent leakage - */ - public static final String MERCHANT_PRIVATE_KEY = ""; - - /** - * please replace with your endpoint. - * find your endpoint here: quickStart - */ - private final static AlipayClient CLIENT = new DefaultAlipayClient( - EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); - - public static void main(String[] args) { - executeConsult(); - // executePayWithCard(); - // executePayWithBlik(); - // executePaymentSessionCreateWithCard(); - // executeInquiry(); + /** + * replace with your client id. find your client id here: quickStart + */ + public static final String CLIENT_ID = ""; + + /** + * replace with your antom public key (used to verify signature). find your antom public key here: + * quickStart + */ + public static final String ANTOM_PUBLIC_KEY = ""; + + /** + * replace with your private key (used to sign). please ensure the secure storage of your private + * key to prevent leakage + */ + public static final String MERCHANT_PRIVATE_KEY = ""; + + /** + * please replace with your endpoint. find your endpoint here: quickStart + */ + private static final AlipayClient CLIENT = + new DefaultAlipayClient( + EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); + + public static void main(String[] args) { + executeConsult(); + // executePayWithCard(); + // executePayWithBlik(); + // executePaymentSessionCreateWithCard(); + // executeInquiry(); + } + + public static void executeConsult() { + AlipayPayConsultRequest alipayPayConsultRequest = new AlipayPayConsultRequest(); + alipayPayConsultRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); + + // set amount + Amount amount = Amount.builder().value("4200").currency("BRL").build(); + alipayPayConsultRequest.setPaymentAmount(amount); + + // set env Info + Env env = Env.builder().terminalType(TerminalType.WEB).build(); + alipayPayConsultRequest.setEnv(env); + + AlipayPayConsultResponse alipayPayConsultResponse = null; + + try { + alipayPayConsultResponse = CLIENT.execute(alipayPayConsultRequest); + System.out.println(JSONObject.toJSON(alipayPayConsultResponse)); + } catch (AlipayApiException e) { + String errorMsg = e.getMessage(); + // handle error condition } - - public static void executeConsult() { - AlipayPayConsultRequest alipayPayConsultRequest = new AlipayPayConsultRequest(); - alipayPayConsultRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); - - // set amount - Amount amount = Amount.builder().value("4200").currency("BRL").build(); - alipayPayConsultRequest.setPaymentAmount(amount); - - // set env Info - Env env = Env.builder().terminalType(TerminalType.WEB).build(); - alipayPayConsultRequest.setEnv(env); - - AlipayPayConsultResponse alipayPayConsultResponse = null; - - try { - alipayPayConsultResponse = CLIENT.execute(alipayPayConsultRequest); - System.out.println(JSONObject.toJSON(alipayPayConsultResponse)); - } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - // handle error condition - } + } + + /** show how to finish a payment by Card paymentMethod */ + public static void executePayWithCard() { + AlipayPayRequest alipayPayRequest = new AlipayPayRequest(); + alipayPayRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); + + // replace with your paymentRequestId + String paymentRequestId = UUID.randomUUID().toString(); + alipayPayRequest.setPaymentRequestId(paymentRequestId); + + // set amount + Amount amount = Amount.builder().value("4200").currency("BRL").build(); + alipayPayRequest.setPaymentAmount(amount); + + // if merchant collect card info, set card info in this paymentMethodMetaData + Map paymentMethodMetaData = new HashMap(); + paymentMethodMetaData.put("cardNo", "0255187751531899"); + paymentMethodMetaData.put("cvv", "712"); + paymentMethodMetaData.put("expiryMonth", "06"); + paymentMethodMetaData.put("expiryYear", "28"); + paymentMethodMetaData.put("tokenize", false); + paymentMethodMetaData.put("cpf", "671.998.112-31"); + JSONObject cardholderName = new JSONObject(); + cardholderName.put("firstName", "Alan"); + cardholderName.put("lastName", "Wallex"); + paymentMethodMetaData.put("cardholderName", cardholderName); + + // set paymentMethod + PaymentMethod paymentMethod = + PaymentMethod.builder() + .paymentMethodType("CARD") + .paymentMethodMetaData(paymentMethodMetaData) + .build(); + alipayPayRequest.setPaymentMethod(paymentMethod); + + // replace with your orderId + String orderId = UUID.randomUUID().toString(); + + // set buyer info + Buyer buyer = Buyer.builder().referenceBuyerId("yourBuyerId").build(); + + // set order info + Order order = + Order.builder() + .referenceOrderId(orderId) + .orderDescription("antom testing order") + .orderAmount(amount) + .buyer(buyer) + .build(); + alipayPayRequest.setOrder(order); + + // set env info + Env env = Env.builder().terminalType(TerminalType.WEB).clientIp("1.2.3.4").build(); + alipayPayRequest.setEnv(env); + + // set auth capture payment mode + PaymentFactor paymentFactor = PaymentFactor.builder().isAuthorization(true).build(); + alipayPayRequest.setPaymentFactor(paymentFactor); + + // replace with your notify url + alipayPayRequest.setPaymentNotifyUrl("http://www.yourNotifyUrl.com"); + + // replace with your redirect url + alipayPayRequest.setPaymentRedirectUrl("http://www.yourRedirectUrl.com"); + + // do payment + AlipayPayResponse alipayPayResponse = null; + try { + alipayPayResponse = CLIENT.execute(alipayPayRequest); + System.out.println(JSONObject.toJSON(alipayPayResponse)); + } catch (AlipayApiException e) { + String errorMsg = e.getMessage(); + // handle error condition } - - /** - * show how to finish a payment by Card paymentMethod - */ - public static void executePayWithCard() { - AlipayPayRequest alipayPayRequest = new AlipayPayRequest(); - alipayPayRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); - - // replace with your paymentRequestId - String paymentRequestId = UUID.randomUUID().toString(); - alipayPayRequest.setPaymentRequestId(paymentRequestId); - - // set amount - Amount amount = Amount.builder().value("4200").currency("BRL").build(); - alipayPayRequest.setPaymentAmount(amount); - - // if merchant collect card info, set card info in this paymentMethodMetaData - Map paymentMethodMetaData = new HashMap(); - paymentMethodMetaData.put("cardNo", "0255187751531899"); - paymentMethodMetaData.put("cvv", "712"); - paymentMethodMetaData.put("expiryMonth", "06"); - paymentMethodMetaData.put("expiryYear", "28"); - paymentMethodMetaData.put("tokenize", false); - paymentMethodMetaData.put("cpf", "671.998.112-31"); - JSONObject cardholderName = new JSONObject(); - cardholderName.put("firstName", "Alan"); - cardholderName.put("lastName", "Wallex"); - paymentMethodMetaData.put("cardholderName", cardholderName); - - // set paymentMethod - PaymentMethod paymentMethod = PaymentMethod.builder().paymentMethodType("CARD") - .paymentMethodMetaData(paymentMethodMetaData).build(); - alipayPayRequest.setPaymentMethod(paymentMethod); - - // replace with your orderId - String orderId = UUID.randomUUID().toString(); - - // set buyer info - Buyer buyer = Buyer.builder().referenceBuyerId("yourBuyerId").build(); - - // set order info - Order order = Order.builder().referenceOrderId(orderId) - .orderDescription("antom testing order").orderAmount(amount).buyer(buyer).build(); - alipayPayRequest.setOrder(order); - - // set env info - Env env = Env.builder().terminalType(TerminalType.WEB) - .clientIp("1.2.3.4").build(); - alipayPayRequest.setEnv(env); - - // set auth capture payment mode - PaymentFactor paymentFactor = PaymentFactor.builder().isAuthorization(true).build(); - alipayPayRequest.setPaymentFactor(paymentFactor); - - // replace with your notify url - alipayPayRequest.setPaymentNotifyUrl("http://www.yourNotifyUrl.com"); - - // replace with your redirect url - alipayPayRequest.setPaymentRedirectUrl("http://www.yourRedirectUrl.com"); - - // do payment - AlipayPayResponse alipayPayResponse = null; - try { - alipayPayResponse = CLIENT.execute(alipayPayRequest); - System.out.println(JSONObject.toJSON(alipayPayResponse)); - } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - // handle error condition - } + } + + /** show how to finish a payment by Blik */ + public static void executePayWithBlik() { + AlipayPayRequest alipayPayRequest = new AlipayPayRequest(); + alipayPayRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); + + // replace with your paymentRequestId + String paymentRequestId = UUID.randomUUID().toString(); + alipayPayRequest.setPaymentRequestId(paymentRequestId); + + // set amount + Amount amount = Amount.builder().value("4200").currency("PLN").build(); + alipayPayRequest.setPaymentAmount(amount); + + // set paymentMethod + PaymentMethod paymentMethod = PaymentMethod.builder().paymentMethodType("BLIK").build(); + alipayPayRequest.setPaymentMethod(paymentMethod); + + // replace with your orderId + String orderId = UUID.randomUUID().toString(); + + // set buyer info + Buyer buyer = Buyer.builder().referenceBuyerId("yourBuyerId").build(); + + // set order info + Order order = + Order.builder() + .referenceOrderId(orderId) + .orderDescription("antom testing order") + .orderAmount(amount) + .buyer(buyer) + .build(); + alipayPayRequest.setOrder(order); + + // set env info + Env env = Env.builder().terminalType(TerminalType.WEB).clientIp("1.2.3.4").build(); + alipayPayRequest.setEnv(env); + + // replace with your notify url + alipayPayRequest.setPaymentNotifyUrl("http://www.yourNotifyUrl.com"); + + // replace with your redirect url + alipayPayRequest.setPaymentRedirectUrl("http://www.yourRedirectUrl.com"); + + // do payment + AlipayPayResponse alipayPayResponse = null; + try { + alipayPayResponse = CLIENT.execute(alipayPayRequest); + } catch (AlipayApiException e) { + String errorMsg = e.getMessage(); + // handle error condition } - - /** - * show how to finish a payment by Blik - */ - public static void executePayWithBlik() { - AlipayPayRequest alipayPayRequest = new AlipayPayRequest(); - alipayPayRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); - - // replace with your paymentRequestId - String paymentRequestId = UUID.randomUUID().toString(); - alipayPayRequest.setPaymentRequestId(paymentRequestId); - - // set amount - Amount amount = Amount.builder().value("4200").currency("PLN").build(); - alipayPayRequest.setPaymentAmount(amount); - - // set paymentMethod - PaymentMethod paymentMethod = PaymentMethod.builder().paymentMethodType("BLIK").build(); - alipayPayRequest.setPaymentMethod(paymentMethod); - - // replace with your orderId - String orderId = UUID.randomUUID().toString(); - - // set buyer info - Buyer buyer = Buyer.builder().referenceBuyerId("yourBuyerId").build(); - - // set order info - Order order = Order.builder().referenceOrderId(orderId) - .orderDescription("antom testing order").orderAmount(amount).buyer(buyer).build(); - alipayPayRequest.setOrder(order); - - // set env info - Env env = Env.builder().terminalType(TerminalType.WEB) - .clientIp("1.2.3.4").build(); - alipayPayRequest.setEnv(env); - - // replace with your notify url - alipayPayRequest.setPaymentNotifyUrl("http://www.yourNotifyUrl.com"); - - // replace with your redirect url - alipayPayRequest.setPaymentRedirectUrl("http://www.yourRedirectUrl.com"); - - // do payment - AlipayPayResponse alipayPayResponse = null; - try { - alipayPayResponse = CLIENT.execute(alipayPayRequest); - } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - // handle error condition - } + } + + /** show how to card payment Session(need to finish payment by Antom SDK) */ + public static void executePaymentSessionCreateWithCard() { + AlipayPaymentSessionRequest alipayPaymentSessionRequest = new AlipayPaymentSessionRequest(); + alipayPaymentSessionRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); + + // replace with your paymentRequestId + String paymentRequestId = UUID.randomUUID().toString(); + alipayPaymentSessionRequest.setPaymentRequestId(paymentRequestId); + + // set amount + Amount amount = Amount.builder().value("4200").currency("BRL").build(); + alipayPaymentSessionRequest.setPaymentAmount(amount); + + // set paymentMethod + PaymentMethod paymentMethod = PaymentMethod.builder().paymentMethodType("CARD").build(); + alipayPaymentSessionRequest.setPaymentMethod(paymentMethod); + + // set auth capture payment mode + PaymentFactor paymentFactor = PaymentFactor.builder().isAuthorization(true).build(); + alipayPaymentSessionRequest.setPaymentFactor(paymentFactor); + + // replace with your orderId + String orderId = UUID.randomUUID().toString(); + + // set buyer info + Buyer buyer = Buyer.builder().referenceBuyerId("yourBuyerId").build(); + + // set order info + Order order = + Order.builder() + .referenceOrderId(orderId) + .orderDescription("antom testing order") + .orderAmount(amount) + .buyer(buyer) + .build(); + alipayPaymentSessionRequest.setOrder(order); + + // replace with your notify url + alipayPaymentSessionRequest.setPaymentNotifyUrl("http://www.yourNotifyUrl.com"); + + // replace with your redirect url + alipayPaymentSessionRequest.setPaymentRedirectUrl("http://www.yourRedirectUrl.com"); + + // do payment + AlipayPaymentSessionResponse alipayPaymentSessionResponse = null; + try { + alipayPaymentSessionResponse = CLIENT.execute(alipayPaymentSessionRequest); + } catch (AlipayApiException e) { + String errorMsg = e.getMessage(); + // handle error condition } - - /** - * show how to card payment Session(need to finish payment by Antom SDK) - */ - public static void executePaymentSessionCreateWithCard() { - AlipayPaymentSessionRequest alipayPaymentSessionRequest = new AlipayPaymentSessionRequest(); - alipayPaymentSessionRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); - - // replace with your paymentRequestId - String paymentRequestId = UUID.randomUUID().toString(); - alipayPaymentSessionRequest.setPaymentRequestId(paymentRequestId); - - // set amount - Amount amount = Amount.builder().value("4200").currency("BRL").build(); - alipayPaymentSessionRequest.setPaymentAmount(amount); - - // set paymentMethod - PaymentMethod paymentMethod = PaymentMethod.builder().paymentMethodType("CARD").build(); - alipayPaymentSessionRequest.setPaymentMethod(paymentMethod); - - // set auth capture payment mode - PaymentFactor paymentFactor = PaymentFactor.builder().isAuthorization(true).build(); - alipayPaymentSessionRequest.setPaymentFactor(paymentFactor); - - // replace with your orderId - String orderId = UUID.randomUUID().toString(); - - // set buyer info - Buyer buyer = Buyer.builder().referenceBuyerId("yourBuyerId").build(); - - // set order info - Order order = Order.builder().referenceOrderId(orderId) - .orderDescription("antom testing order").orderAmount(amount).buyer(buyer).build(); - alipayPaymentSessionRequest.setOrder(order); - - // replace with your notify url - alipayPaymentSessionRequest.setPaymentNotifyUrl("http://www.yourNotifyUrl.com"); - - // replace with your redirect url - alipayPaymentSessionRequest.setPaymentRedirectUrl("http://www.yourRedirectUrl.com"); - - // do payment - AlipayPaymentSessionResponse alipayPaymentSessionResponse = null; - try { - alipayPaymentSessionResponse = CLIENT.execute(alipayPaymentSessionRequest); - } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - // handle error condition - } - } - - /** - * show how to inquiry PaymentResult - */ - public static void executeInquiry() { - AlipayPayQueryRequest alipayPayQueryRequest = new AlipayPayQueryRequest(); - alipayPayQueryRequest.setPaymentRequestId("yourPaymentRequestId"); - - AlipayPayQueryResponse alipayPayQueryResponse = null; - try { - alipayPayQueryResponse = CLIENT.execute(alipayPayQueryRequest); - } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - // handle error condition - } + } + + /** show how to inquiry PaymentResult */ + public static void executeInquiry() { + AlipayPayQueryRequest alipayPayQueryRequest = new AlipayPayQueryRequest(); + alipayPayQueryRequest.setPaymentRequestId("yourPaymentRequestId"); + + AlipayPayQueryResponse alipayPayQueryResponse = null; + try { + alipayPayQueryResponse = CLIENT.execute(alipayPayQueryRequest); + } catch (AlipayApiException e) { + String errorMsg = e.getMessage(); + // handle error condition } + } } diff --git a/src/main/java/com/alipay/global/api/example/EasyPayDemoCode.java b/src/main/java/com/alipay/global/api/example/EasyPayDemoCode.java index c6557bc..5513cff 100644 --- a/src/main/java/com/alipay/global/api/example/EasyPayDemoCode.java +++ b/src/main/java/com/alipay/global/api/example/EasyPayDemoCode.java @@ -11,76 +11,78 @@ import com.alipay.global.api.model.constants.ProductSceneConstants; import com.alipay.global.api.request.ams.pay.AlipayPaymentSessionRequest; import com.alipay.global.api.response.ams.pay.AlipayPaymentSessionResponse; - import java.util.UUID; public class EasyPayDemoCode { - /** - * replace with your client id. - * find your client id here: quickStart - */ - public static final String CLIENT_ID = ""; - - /** - * replace with your antom public key (used to verify signature). - * find your antom public key here: quickStart - */ - public static final String ANTOM_PUBLIC_KEY = ""; - - /** - * replace with your private key (used to sign). - * please ensure the secure storage of your private key to prevent leakage - */ - public static final String MERCHANT_PRIVATE_KEY = ""; - - /** - * please replace with your endpoint. - * find your endpoint here: quickStart - */ - private final static AlipayClient CLIENT = new DefaultAlipayClient( - EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); - - public static void main(String[] args) { - easyPaySession(); - } - - public static void easyPaySession() { - AlipayPaymentSessionRequest alipayPaymentSessionRequest = new AlipayPaymentSessionRequest(); - alipayPaymentSessionRequest.setProductScene(ProductSceneConstants.EASY_PAY); - alipayPaymentSessionRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); - - // replace with your paymentRequestId - String paymentRequestId = UUID.randomUUID().toString(); - alipayPaymentSessionRequest.setPaymentRequestId(paymentRequestId); - - // set amount - Amount amount = Amount.builder().value("4200").currency("HKD").build(); - alipayPaymentSessionRequest.setPaymentAmount(amount); - - // set paymentMethod - PaymentMethod paymentMethod = PaymentMethod.builder().paymentMethodType("CARD").build(); - alipayPaymentSessionRequest.setPaymentMethod(paymentMethod); - - // replace with your orderId - String orderId = UUID.randomUUID().toString(); - - // set order info - Order order = Order.builder().referenceOrderId(orderId) - .orderDescription("antom testing order").orderAmount(amount).build(); - alipayPaymentSessionRequest.setOrder(order); - - AlipayPaymentSessionResponse alipayPaymentSessionResponse = null; - - try { - alipayPaymentSessionResponse = CLIENT.execute(alipayPaymentSessionRequest); - } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - // handle error condition - } - - System.out.println(alipayPaymentSessionResponse); - + /** + * replace with your client id. find your client id here: quickStart + */ + public static final String CLIENT_ID = ""; + + /** + * replace with your antom public key (used to verify signature). find your antom public key here: + * quickStart + */ + public static final String ANTOM_PUBLIC_KEY = ""; + + /** + * replace with your private key (used to sign). please ensure the secure storage of your private + * key to prevent leakage + */ + public static final String MERCHANT_PRIVATE_KEY = ""; + + /** + * please replace with your endpoint. find your endpoint here: quickStart + */ + private static final AlipayClient CLIENT = + new DefaultAlipayClient( + EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); + + public static void main(String[] args) { + easyPaySession(); + } + + public static void easyPaySession() { + AlipayPaymentSessionRequest alipayPaymentSessionRequest = new AlipayPaymentSessionRequest(); + alipayPaymentSessionRequest.setProductScene(ProductSceneConstants.EASY_PAY); + alipayPaymentSessionRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); + + // replace with your paymentRequestId + String paymentRequestId = UUID.randomUUID().toString(); + alipayPaymentSessionRequest.setPaymentRequestId(paymentRequestId); + + // set amount + Amount amount = Amount.builder().value("4200").currency("HKD").build(); + alipayPaymentSessionRequest.setPaymentAmount(amount); + + // set paymentMethod + PaymentMethod paymentMethod = PaymentMethod.builder().paymentMethodType("CARD").build(); + alipayPaymentSessionRequest.setPaymentMethod(paymentMethod); + + // replace with your orderId + String orderId = UUID.randomUUID().toString(); + + // set order info + Order order = + Order.builder() + .referenceOrderId(orderId) + .orderDescription("antom testing order") + .orderAmount(amount) + .build(); + alipayPaymentSessionRequest.setOrder(order); + + AlipayPaymentSessionResponse alipayPaymentSessionResponse = null; + + try { + alipayPaymentSessionResponse = CLIENT.execute(alipayPaymentSessionRequest); + } catch (AlipayApiException e) { + String errorMsg = e.getMessage(); + // handle error condition } + System.out.println(alipayPaymentSessionResponse); + } } diff --git a/src/main/java/com/alipay/global/api/example/IsvPayDemo.java b/src/main/java/com/alipay/global/api/example/IsvPayDemo.java index 0b96f07..5ecc91d 100644 --- a/src/main/java/com/alipay/global/api/example/IsvPayDemo.java +++ b/src/main/java/com/alipay/global/api/example/IsvPayDemo.java @@ -10,120 +10,118 @@ import com.alipay.global.api.request.ams.pay.AlipayPayRequest; import com.alipay.global.api.response.ams.pay.AlipayPayConsultResponse; import com.alipay.global.api.response.ams.pay.AlipayPayResponse; - import java.util.UUID; public class IsvPayDemo { - /** - * replace with your client id. - * find your client id here: quickStart - */ - public static final String CLIENT_ID = ""; - - /** - * replace with your antom public key (used to verify signature). - * find your antom public key here: quickStart - */ - public static final String ANTOM_PUBLIC_KEY = ""; - - /** - * replace with your private key (used to sign). - * please ensure the secure storage of your private key to prevent leakage - */ - public static final String MERCHANT_PRIVATE_KEY = ""; - - /** - * ISV agentToken - */ - public static final String AGENT_TOKEN = ""; - - /** - * please replace with your endpoint. - * find your endpoint here: quickStart - */ - private final static AlipayClient CLIENT = new DefaultAlipayClient( - EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID, AGENT_TOKEN); - - public static void main(String[] args) { - executeConsult(); -// executePayWithBlik(); - } - - public static void executeConsult() { - AlipayPayConsultRequest alipayPayConsultRequest = new AlipayPayConsultRequest(); - alipayPayConsultRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); - - // set amount - Amount amount = Amount.builder().value("4200").currency("BRL").build(); - alipayPayConsultRequest.setPaymentAmount(amount); - - // set env Info - Env env = Env.builder().terminalType(TerminalType.WEB).build(); - alipayPayConsultRequest.setEnv(env); - - AlipayPayConsultResponse alipayPayConsultResponse = null; - - try { - alipayPayConsultResponse = CLIENT.execute(alipayPayConsultRequest); - System.out.println(JSONObject.toJSON(alipayPayConsultResponse)); - } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - e.printStackTrace(); - } + /** + * replace with your client id. find your client id here: quickStart + */ + public static final String CLIENT_ID = ""; + + /** + * replace with your antom public key (used to verify signature). find your antom public key here: + * quickStart + */ + public static final String ANTOM_PUBLIC_KEY = ""; + + /** + * replace with your private key (used to sign). please ensure the secure storage of your private + * key to prevent leakage + */ + public static final String MERCHANT_PRIVATE_KEY = ""; + + /** ISV agentToken */ + public static final String AGENT_TOKEN = ""; + + /** + * please replace with your endpoint. find your endpoint here: quickStart + */ + private static final AlipayClient CLIENT = + new DefaultAlipayClient( + EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID, AGENT_TOKEN); + + public static void main(String[] args) { + executeConsult(); + // executePayWithBlik(); + } + + public static void executeConsult() { + AlipayPayConsultRequest alipayPayConsultRequest = new AlipayPayConsultRequest(); + alipayPayConsultRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); + + // set amount + Amount amount = Amount.builder().value("4200").currency("BRL").build(); + alipayPayConsultRequest.setPaymentAmount(amount); + + // set env Info + Env env = Env.builder().terminalType(TerminalType.WEB).build(); + alipayPayConsultRequest.setEnv(env); + + AlipayPayConsultResponse alipayPayConsultResponse = null; + + try { + alipayPayConsultResponse = CLIENT.execute(alipayPayConsultRequest); + System.out.println(JSONObject.toJSON(alipayPayConsultResponse)); + } catch (AlipayApiException e) { + String errorMsg = e.getMessage(); + e.printStackTrace(); } - - /** - * show how to finish a payment by Blik - */ - public static void executePayWithBlik() { - AlipayPayRequest alipayPayRequest = new AlipayPayRequest(); - alipayPayRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); - - // replace with your paymentRequestId - String paymentRequestId = UUID.randomUUID().toString(); - alipayPayRequest.setPaymentRequestId(paymentRequestId); - - // set amount - Amount amount = Amount.builder().value("4200").currency("PLN").build(); - alipayPayRequest.setPaymentAmount(amount); - - // set paymentMethod - PaymentMethod paymentMethod = PaymentMethod.builder().paymentMethodType("BLIK").build(); - alipayPayRequest.setPaymentMethod(paymentMethod); - - // replace with your orderId - String orderId = UUID.randomUUID().toString(); - - // set buyer info - Buyer buyer = Buyer.builder().referenceBuyerId("yourBuyerId").build(); - - // set order info - Order order = Order.builder().referenceOrderId(orderId) - .orderDescription("antom testing order").orderAmount(amount).buyer(buyer).build(); - alipayPayRequest.setOrder(order); - - // set env info - Env env = Env.builder().terminalType(TerminalType.WEB) - .clientIp("1.2.3.4").build(); - alipayPayRequest.setEnv(env); - - // replace with your notify url - alipayPayRequest.setPaymentNotifyUrl("http://www.yourNotifyUrl.com"); - - // replace with your redirect url - alipayPayRequest.setPaymentRedirectUrl("http://www.yourRedirectUrl.com"); - - // do payment - AlipayPayResponse alipayPayResponse = null; - try { - alipayPayResponse = CLIENT.execute(alipayPayRequest); - System.out.println(JSONObject.toJSON(alipayPayResponse)); - } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - System.out.println(errorMsg); - } + } + + /** show how to finish a payment by Blik */ + public static void executePayWithBlik() { + AlipayPayRequest alipayPayRequest = new AlipayPayRequest(); + alipayPayRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); + + // replace with your paymentRequestId + String paymentRequestId = UUID.randomUUID().toString(); + alipayPayRequest.setPaymentRequestId(paymentRequestId); + + // set amount + Amount amount = Amount.builder().value("4200").currency("PLN").build(); + alipayPayRequest.setPaymentAmount(amount); + + // set paymentMethod + PaymentMethod paymentMethod = PaymentMethod.builder().paymentMethodType("BLIK").build(); + alipayPayRequest.setPaymentMethod(paymentMethod); + + // replace with your orderId + String orderId = UUID.randomUUID().toString(); + + // set buyer info + Buyer buyer = Buyer.builder().referenceBuyerId("yourBuyerId").build(); + + // set order info + Order order = + Order.builder() + .referenceOrderId(orderId) + .orderDescription("antom testing order") + .orderAmount(amount) + .buyer(buyer) + .build(); + alipayPayRequest.setOrder(order); + + // set env info + Env env = Env.builder().terminalType(TerminalType.WEB).clientIp("1.2.3.4").build(); + alipayPayRequest.setEnv(env); + + // replace with your notify url + alipayPayRequest.setPaymentNotifyUrl("http://www.yourNotifyUrl.com"); + + // replace with your redirect url + alipayPayRequest.setPaymentRedirectUrl("http://www.yourRedirectUrl.com"); + + // do payment + AlipayPayResponse alipayPayResponse = null; + try { + alipayPayResponse = CLIENT.execute(alipayPayRequest); + System.out.println(JSONObject.toJSON(alipayPayResponse)); + } catch (AlipayApiException e) { + String errorMsg = e.getMessage(); + System.out.println(errorMsg); } - - + } } diff --git a/src/main/java/com/alipay/global/api/example/RiskDecideDemoCode.java b/src/main/java/com/alipay/global/api/example/RiskDecideDemoCode.java index ce139a3..0be8eaa 100644 --- a/src/main/java/com/alipay/global/api/example/RiskDecideDemoCode.java +++ b/src/main/java/com/alipay/global/api/example/RiskDecideDemoCode.java @@ -9,10 +9,10 @@ import com.alipay.global.api.exception.AlipayApiException; import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.constants.EndPointConstants; +import com.alipay.global.api.model.risk.*; import com.alipay.global.api.model.risk.Merchant; import com.alipay.global.api.model.risk.Order; import com.alipay.global.api.model.risk.PaymentMethod; -import com.alipay.global.api.model.risk.*; import com.alipay.global.api.request.ams.risk.RiskDecideRequest; import com.alipay.global.api.request.ams.risk.RiskReportRequest; import com.alipay.global.api.request.ams.risk.SendPaymentResultRequest; @@ -21,240 +21,240 @@ import com.alipay.global.api.response.ams.risk.RiskReportResponse; import com.alipay.global.api.response.ams.risk.SendPaymentResultResponse; import com.alipay.global.api.response.ams.risk.SendRefundResultResponse; - import java.util.Collections; import java.util.Date; public class RiskDecideDemoCode { - /** - * replace with your client id. - * find your client id here: quickStart - */ - public static final String CLIENT_ID = ""; + /** + * replace with your client id. find your client id here: quickStart + */ + public static final String CLIENT_ID = ""; - /** - * replace with your antom public key (used to verify signature). - * find your antom public key here: quickStart - */ - public static final String ANTOM_PUBLIC_KEY = ""; + /** + * replace with your antom public key (used to verify signature). find your antom public key here: + * quickStart + */ + public static final String ANTOM_PUBLIC_KEY = ""; - /** - * replace with your private key (used to sign). - * please ensure the secure storage of your private key to prevent leakage - */ - public static final String MERCHANT_PRIVATE_KEY = ""; + /** + * replace with your private key (used to sign). please ensure the secure storage of your private + * key to prevent leakage + */ + public static final String MERCHANT_PRIVATE_KEY = ""; - /** - * please replace with your endpoint. - * find your endpoint here: quickStart - */ - private final static AlipayClient CLIENT = new DefaultAlipayClient( - EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); + /** + * please replace with your endpoint. find your endpoint here: quickStart + */ + private static final AlipayClient CLIENT = + new DefaultAlipayClient( + EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); - public static void main(String[] args) { - preAuthDecide(); - } + public static void main(String[] args) { + preAuthDecide(); + } - public static RiskDecideResponse preAuthDecide() { - RiskDecideRequest request = new RiskDecideRequest(); - request.setReferenceTransactionId("test_20231012091493242"); - request.setAuthorizationPhase(AuthorizationPhase.PRE_AUTHORIZATION); - buildRiskDecideRequest(request); + public static RiskDecideResponse preAuthDecide() { + RiskDecideRequest request = new RiskDecideRequest(); + request.setReferenceTransactionId("test_20231012091493242"); + request.setAuthorizationPhase(AuthorizationPhase.PRE_AUTHORIZATION); + buildRiskDecideRequest(request); - RiskDecideResponse response = null; - try { - response = CLIENT.execute(request); - } catch (AlipayApiException e) { - // TODO Handle AlipayApiException and log - } - return response; + RiskDecideResponse response = null; + try { + response = CLIENT.execute(request); + } catch (AlipayApiException e) { + // TODO Handle AlipayApiException and log } + return response; + } - public static RiskDecideResponse postAuthDecide() { - RiskDecideRequest request = new RiskDecideRequest(); - request.setReferenceTransactionId("test_20231012091493242"); - request.setAuthorizationPhase(AuthorizationPhase.POST_AUTHORIZATION); - buildRiskDecideRequest(request); - PaymentDetail paymentDetail = request.getPaymentDetails().get(0); - PaymentMethodMetaData paymentMethodMetaData = paymentDetail.getPaymentMethod() - .getPaymentMethodMetaData(); - CardVerificationResult cardVerificationResult = new CardVerificationResult(); - cardVerificationResult.setAuthenticationType("3D"); - cardVerificationResult.setAuthorizationCode("10000"); - RiskThreeDSResult riskThreeDSResult = new RiskThreeDSResult(); - riskThreeDSResult.setEci("00"); - riskThreeDSResult.setThreeDSVersion("2.0"); - riskThreeDSResult.setCavv("0"); - riskThreeDSResult.setThreeDSInteractionMode("CHALLENGE"); - cardVerificationResult.setThreeDSResult(riskThreeDSResult); - paymentMethodMetaData.setCardVerificationResult(cardVerificationResult); + public static RiskDecideResponse postAuthDecide() { + RiskDecideRequest request = new RiskDecideRequest(); + request.setReferenceTransactionId("test_20231012091493242"); + request.setAuthorizationPhase(AuthorizationPhase.POST_AUTHORIZATION); + buildRiskDecideRequest(request); + PaymentDetail paymentDetail = request.getPaymentDetails().get(0); + PaymentMethodMetaData paymentMethodMetaData = + paymentDetail.getPaymentMethod().getPaymentMethodMetaData(); + CardVerificationResult cardVerificationResult = new CardVerificationResult(); + cardVerificationResult.setAuthenticationType("3D"); + cardVerificationResult.setAuthorizationCode("10000"); + RiskThreeDSResult riskThreeDSResult = new RiskThreeDSResult(); + riskThreeDSResult.setEci("00"); + riskThreeDSResult.setThreeDSVersion("2.0"); + riskThreeDSResult.setCavv("0"); + riskThreeDSResult.setThreeDSInteractionMode("CHALLENGE"); + cardVerificationResult.setThreeDSResult(riskThreeDSResult); + paymentMethodMetaData.setCardVerificationResult(cardVerificationResult); - RiskDecideResponse response = null; - try { - response = CLIENT.execute(request); - } catch (AlipayApiException e) { - // TODO Handle AlipayApiException and log - } - return response; + RiskDecideResponse response = null; + try { + response = CLIENT.execute(request); + } catch (AlipayApiException e) { + // TODO Handle AlipayApiException and log } + return response; + } - public static SendPaymentResultResponse sendPaymentResult() { - SendPaymentResultRequest request = new SendPaymentResultRequest(); - request.setReferenceTransactionId("test_20231012091493242"); + public static SendPaymentResultResponse sendPaymentResult() { + SendPaymentResultRequest request = new SendPaymentResultRequest(); + request.setReferenceTransactionId("test_20231012091493242"); - request.setPaymentStatus("SUCCESS"); - request.setReferenceTransactionId("test_20231012091493242"); - CardVerificationResult cardVerificationResult = new CardVerificationResult(); - cardVerificationResult.setAuthenticationType("3D"); - cardVerificationResult.setAuthorizationCode("10000"); - RiskThreeDSResult threeDSResult = new RiskThreeDSResult(); - threeDSResult.setEci("05"); - threeDSResult.setThreeDSVersion("2.0"); - threeDSResult.setCavv("0"); - threeDSResult.setThreeDSInteractionMode("CHALLENGE"); - cardVerificationResult.setThreeDSResult(threeDSResult); - request.setCardVerificationResult(cardVerificationResult); - SendPaymentResultResponse response = null; - try { - response = CLIENT.execute(request); - } catch (AlipayApiException e) { - // TODO Handle AlipayApiException and log - } - return response; + request.setPaymentStatus("SUCCESS"); + request.setReferenceTransactionId("test_20231012091493242"); + CardVerificationResult cardVerificationResult = new CardVerificationResult(); + cardVerificationResult.setAuthenticationType("3D"); + cardVerificationResult.setAuthorizationCode("10000"); + RiskThreeDSResult threeDSResult = new RiskThreeDSResult(); + threeDSResult.setEci("05"); + threeDSResult.setThreeDSVersion("2.0"); + threeDSResult.setCavv("0"); + threeDSResult.setThreeDSInteractionMode("CHALLENGE"); + cardVerificationResult.setThreeDSResult(threeDSResult); + request.setCardVerificationResult(cardVerificationResult); + SendPaymentResultResponse response = null; + try { + response = CLIENT.execute(request); + } catch (AlipayApiException e) { + // TODO Handle AlipayApiException and log } + return response; + } - public static SendRefundResultResponse sendPaymentRefund() { - SendRefundResultRequest request = new SendRefundResultRequest(); - request.setReferenceTransactionId("test_20231012091493242"); + public static SendRefundResultResponse sendPaymentRefund() { + SendRefundResultRequest request = new SendRefundResultRequest(); + request.setReferenceTransactionId("test_20231012091493242"); - SendRefundResultResponse response = null; - try { - response = CLIENT.execute(request); - } catch (AlipayApiException e) { - // TODO Handle AlipayApiException and log - } - return response; + SendRefundResultResponse response = null; + try { + response = CLIENT.execute(request); + } catch (AlipayApiException e) { + // TODO Handle AlipayApiException and log } + return response; + } - public static RiskReportResponse reportRisk() { - RiskReportRequest request = new RiskReportRequest(); - request.setReferenceTransactionId("test_20231012091493242"); - request.setReportReason("test"); - request.setRiskType("FRAUD"); - request.setRiskOccurrenceTime(new Date()); + public static RiskReportResponse reportRisk() { + RiskReportRequest request = new RiskReportRequest(); + request.setReferenceTransactionId("test_20231012091493242"); + request.setReportReason("test"); + request.setRiskType("FRAUD"); + request.setRiskOccurrenceTime(new Date()); - RiskReportResponse response = null; - try { - response = CLIENT.execute(request); - } catch (AlipayApiException e) { - // TODO Handle AlipayApiException and log - } - return response; + RiskReportResponse response = null; + try { + response = CLIENT.execute(request); + } catch (AlipayApiException e) { + // TODO Handle AlipayApiException and log } + return response; + } - public static void buildRiskDecideRequest(RiskDecideRequest request) { - Order order = new Order(); - order.setReferenceOrderId("test_202310120914932421"); - Amount orderAmount = new Amount(); - orderAmount.setCurrency("BRL"); - orderAmount.setValue("30000"); - order.setOrderAmount(orderAmount); - order.setOrderDescription("Cappuccino #grande (Mika's coffee shop)"); - Merchant merchant = new Merchant(); - merchant.setReferenceMerchantId("SM_001"); - order.setMerchant(merchant); - Goods goods = new Goods(); - goods.setReferenceGoodsId("383382011_SGAMZ-904520356"); - goods.setGoodsName( - "[3 Boxes] Starbucks Cappuccino Milk Coffee Pods / Coffee Capsules by Nescafe Dolce Gusto"); - goods.setGoodsCategory("Digital Goods/Digital Vouchers/Food and Beverages"); - goods.setDeliveryMethodType("DIGITAL"); - goods.setGoodsQuantity("1"); - Amount goodsAmount = new Amount(); - goodsAmount.setValue("30000"); - goodsAmount.setCurrency("BRL"); - goods.setGoodsUnitAmount(goodsAmount); - order.setGoods(Collections.singletonList(goods)); - Shipping shipping = new Shipping(); - shipping.setShippingCarrier("FedEx"); - shipping.setShippingPhoneNo("12345678912"); - shipping.setShipToEmail("fenghoureject@163.com"); - UserName shippingName = new UserName(); - shippingName.setFirstName("Dehua"); - shippingName.setLastName("Liu"); - shippingName.setMiddleName("Skr"); - shippingName.setFullName("Dehua Skr Liu"); - shipping.setShippingName(shippingName); - Address shippingAddress = new Address(); - shippingAddress.setRegion("CN"); - shippingAddress.setState("Zhejiang"); - shippingAddress.setCity("Hangzhou"); - shippingAddress.setAddress1("Wuchang road"); - shippingAddress.setAddress2("Xihu"); - shippingAddress.setZipCode("310000"); - shipping.setShippingAddress(shippingAddress); - order.setShipping(shipping); - request.setOrders(Collections.singletonList(order)); + public static void buildRiskDecideRequest(RiskDecideRequest request) { + Order order = new Order(); + order.setReferenceOrderId("test_202310120914932421"); + Amount orderAmount = new Amount(); + orderAmount.setCurrency("BRL"); + orderAmount.setValue("30000"); + order.setOrderAmount(orderAmount); + order.setOrderDescription("Cappuccino #grande (Mika's coffee shop)"); + Merchant merchant = new Merchant(); + merchant.setReferenceMerchantId("SM_001"); + order.setMerchant(merchant); + Goods goods = new Goods(); + goods.setReferenceGoodsId("383382011_SGAMZ-904520356"); + goods.setGoodsName( + "[3 Boxes] Starbucks Cappuccino Milk Coffee Pods / Coffee Capsules by Nescafe Dolce Gusto"); + goods.setGoodsCategory("Digital Goods/Digital Vouchers/Food and Beverages"); + goods.setDeliveryMethodType("DIGITAL"); + goods.setGoodsQuantity("1"); + Amount goodsAmount = new Amount(); + goodsAmount.setValue("30000"); + goodsAmount.setCurrency("BRL"); + goods.setGoodsUnitAmount(goodsAmount); + order.setGoods(Collections.singletonList(goods)); + Shipping shipping = new Shipping(); + shipping.setShippingCarrier("FedEx"); + shipping.setShippingPhoneNo("12345678912"); + shipping.setShipToEmail("fenghoureject@163.com"); + UserName shippingName = new UserName(); + shippingName.setFirstName("Dehua"); + shippingName.setLastName("Liu"); + shippingName.setMiddleName("Skr"); + shippingName.setFullName("Dehua Skr Liu"); + shipping.setShippingName(shippingName); + Address shippingAddress = new Address(); + shippingAddress.setRegion("CN"); + shippingAddress.setState("Zhejiang"); + shippingAddress.setCity("Hangzhou"); + shippingAddress.setAddress1("Wuchang road"); + shippingAddress.setAddress2("Xihu"); + shippingAddress.setZipCode("310000"); + shipping.setShippingAddress(shippingAddress); + order.setShipping(shipping); + request.setOrders(Collections.singletonList(order)); - Buyer buyer = new Buyer(); - buyer.setReferenceBuyerId("test12345678"); - buyer.setBuyerPhoneNo("12345678912"); - buyer.setBuyerEmail("alipay@alipay.com"); - buyer.setIsAccountVerified(true); - buyer.setSuccessfulOrderCount(100); - UserName buyerName = new UserName(); - buyerName.setFirstName("Dehua"); - buyerName.setLastName("Liu"); - buyerName.setMiddleName("Skr"); - buyerName.setFullName("Dehua Skr Liu"); - buyer.setBuyerName(buyerName); - request.setBuyer(buyer); + Buyer buyer = new Buyer(); + buyer.setReferenceBuyerId("test12345678"); + buyer.setBuyerPhoneNo("12345678912"); + buyer.setBuyerEmail("alipay@alipay.com"); + buyer.setIsAccountVerified(true); + buyer.setSuccessfulOrderCount(100); + UserName buyerName = new UserName(); + buyerName.setFirstName("Dehua"); + buyerName.setLastName("Liu"); + buyerName.setMiddleName("Skr"); + buyerName.setFullName("Dehua Skr Liu"); + buyer.setBuyerName(buyerName); + request.setBuyer(buyer); - Amount actualPaymentAmount = new Amount(); - actualPaymentAmount.setCurrency("BRL"); - actualPaymentAmount.setValue("300000"); - request.setActualPaymentAmount(actualPaymentAmount); + Amount actualPaymentAmount = new Amount(); + actualPaymentAmount.setCurrency("BRL"); + actualPaymentAmount.setValue("300000"); + request.setActualPaymentAmount(actualPaymentAmount); - PaymentDetail paymentDetail = new PaymentDetail(); - Amount paymentAmount = new Amount(); - paymentAmount.setCurrency("BRL"); - paymentAmount.setValue("300000"); - paymentDetail.setAmount(paymentAmount); - PaymentMethod paymentMethod = new PaymentMethod(); - paymentMethod.setPaymentMethodId("0656XXXXXXX0001"); - paymentMethod.setPaymentMethodType("CARD"); - PaymentMethodMetaData paymentMethodMetaData = new PaymentMethodMetaData(); - paymentMethodMetaData.setCpf("02987654320"); - paymentMethodMetaData.setExpiryMonth("12"); - paymentMethodMetaData.setExpiryYear("29"); - paymentMethodMetaData.setCardNo("4117347806156383"); - UserName cardHolderName = new UserName(); - cardHolderName.setFirstName("Tom"); - cardHolderName.setLastName("Jay"); - paymentMethodMetaData.setCardHolderName(cardHolderName); - Address billingAddress = new Address(); - billingAddress.setRegion("CN"); - billingAddress.setState("Zhejiang"); - billingAddress.setCity("Hangzhou"); - billingAddress.setAddress1("test_address1"); - billingAddress.setAddress2("test_address2"); - billingAddress.setZipCode("310000"); - paymentMethodMetaData.setBillingAddress(billingAddress); - paymentMethod.setPaymentMethodMetaData(paymentMethodMetaData); - paymentDetail.setPaymentMethod(paymentMethod); - request.setPaymentDetails(Collections.singletonList(paymentDetail)); + PaymentDetail paymentDetail = new PaymentDetail(); + Amount paymentAmount = new Amount(); + paymentAmount.setCurrency("BRL"); + paymentAmount.setValue("300000"); + paymentDetail.setAmount(paymentAmount); + PaymentMethod paymentMethod = new PaymentMethod(); + paymentMethod.setPaymentMethodId("0656XXXXXXX0001"); + paymentMethod.setPaymentMethodType("CARD"); + PaymentMethodMetaData paymentMethodMetaData = new PaymentMethodMetaData(); + paymentMethodMetaData.setCpf("02987654320"); + paymentMethodMetaData.setExpiryMonth("12"); + paymentMethodMetaData.setExpiryYear("29"); + paymentMethodMetaData.setCardNo("4117347806156383"); + UserName cardHolderName = new UserName(); + cardHolderName.setFirstName("Tom"); + cardHolderName.setLastName("Jay"); + paymentMethodMetaData.setCardHolderName(cardHolderName); + Address billingAddress = new Address(); + billingAddress.setRegion("CN"); + billingAddress.setState("Zhejiang"); + billingAddress.setCity("Hangzhou"); + billingAddress.setAddress1("test_address1"); + billingAddress.setAddress2("test_address2"); + billingAddress.setZipCode("310000"); + paymentMethodMetaData.setBillingAddress(billingAddress); + paymentMethod.setPaymentMethodMetaData(paymentMethodMetaData); + paymentDetail.setPaymentMethod(paymentMethod); + request.setPaymentDetails(Collections.singletonList(paymentDetail)); - Env env = new Env(); - env.setTerminalType(TerminalType.APP); - env.setClientIp("00.00.00.00"); - env.setOsType(OsType.IOS); - env.setDeviceLanguage("zh_CN"); - env.setDeviceId("test_deviceId"); - request.setEnv(env); + Env env = new Env(); + env.setTerminalType(TerminalType.APP); + env.setClientIp("00.00.00.00"); + env.setOsType(OsType.IOS); + env.setDeviceLanguage("zh_CN"); + env.setDeviceId("test_deviceId"); + request.setEnv(env); - Amount discountAmount = new Amount(); - discountAmount.setCurrency("BRL"); - discountAmount.setValue("0"); - request.setDiscountAmount(discountAmount); - } -} \ No newline at end of file + Amount discountAmount = new Amount(); + discountAmount.setCurrency("BRL"); + discountAmount.setValue("0"); + request.setDiscountAmount(discountAmount); + } +} diff --git a/src/main/java/com/alipay/global/api/example/RiskDecideTeeDemoCode.java b/src/main/java/com/alipay/global/api/example/RiskDecideTeeDemoCode.java index 81a2b12..395593f 100644 --- a/src/main/java/com/alipay/global/api/example/RiskDecideTeeDemoCode.java +++ b/src/main/java/com/alipay/global/api/example/RiskDecideTeeDemoCode.java @@ -8,269 +8,269 @@ import com.alipay.global.api.DefaultAlipayClient; import com.alipay.global.api.exception.AlipayApiException; import com.alipay.global.api.model.ams.*; +import com.alipay.global.api.model.risk.*; import com.alipay.global.api.model.risk.Merchant; import com.alipay.global.api.model.risk.Order; import com.alipay.global.api.model.risk.PaymentMethod; -import com.alipay.global.api.model.risk.*; import com.alipay.global.api.request.ams.risk.RiskDecideRequest; import com.alipay.global.api.request.ams.risk.RiskReportRequest; import com.alipay.global.api.request.ams.risk.SendPaymentResultRequest; import com.alipay.global.api.request.ams.risk.SendRefundResultRequest; +import com.alipay.global.api.request.ams.risk.tee.encryptutil.RiskDecideEncryptUtil; +import com.alipay.global.api.request.ams.risk.tee.enums.EncryptKeyEnum; import com.alipay.global.api.request.ams.risk.tee.exception.CryptoException; import com.alipay.global.api.response.ams.risk.RiskDecideResponse; import com.alipay.global.api.response.ams.risk.RiskReportResponse; import com.alipay.global.api.response.ams.risk.SendPaymentResultResponse; import com.alipay.global.api.response.ams.risk.SendRefundResultResponse; -import com.alipay.global.api.request.ams.risk.tee.encryptutil.RiskDecideEncryptUtil; -import com.alipay.global.api.request.ams.risk.tee.enums.EncryptKeyEnum; - import java.util.Arrays; import java.util.Collections; import java.util.Date; import java.util.List; - public class RiskDecideTeeDemoCode { - private static final String CLIENT_ID = ""; - private static final String GATE_WAY_URL = ""; - private static final String merchantPrivateKey = ""; - private static final String alipayPublicKey = ""; - private static final AlipayClient defaultAlipayClient = new DefaultAlipayClient(GATE_WAY_URL, merchantPrivateKey, alipayPublicKey, CLIENT_ID); + private static final String CLIENT_ID = ""; + private static final String GATE_WAY_URL = ""; + private static final String merchantPrivateKey = ""; + private static final String alipayPublicKey = ""; + private static final AlipayClient defaultAlipayClient = + new DefaultAlipayClient(GATE_WAY_URL, merchantPrivateKey, alipayPublicKey, CLIENT_ID); - private static final String DATA_KEY = ""; + private static final String DATA_KEY = ""; - public static void main(String[] args) { - preAuthDecide(); - } + public static void main(String[] args) { + preAuthDecide(); + } - public static RiskDecideResponse preAuthDecide() { - RiskDecideRequest request = new RiskDecideRequest(); - request.setReferenceTransactionId("test_20231012091493242"); - request.setAuthorizationPhase(AuthorizationPhase.PRE_AUTHORIZATION); - // 1. build plaintext request - buildRiskDecideRequest(request); - RiskDecideResponse response = null; - try { - // 2. encrypt request - encryptRequest(request); - // 3. send request - response = defaultAlipayClient.execute(request); - } catch (CryptoException e) { - // TODO Handle CryptoException and log - } catch (AlipayApiException e) { - // TODO Handle AlipayApiException and log - } - return response; + public static RiskDecideResponse preAuthDecide() { + RiskDecideRequest request = new RiskDecideRequest(); + request.setReferenceTransactionId("test_20231012091493242"); + request.setAuthorizationPhase(AuthorizationPhase.PRE_AUTHORIZATION); + // 1. build plaintext request + buildRiskDecideRequest(request); + RiskDecideResponse response = null; + try { + // 2. encrypt request + encryptRequest(request); + // 3. send request + response = defaultAlipayClient.execute(request); + } catch (CryptoException e) { + // TODO Handle CryptoException and log + } catch (AlipayApiException e) { + // TODO Handle AlipayApiException and log } + return response; + } - public static RiskDecideResponse postAuthDecide() { - RiskDecideRequest request = new RiskDecideRequest(); - request.setReferenceTransactionId("test_20231012091493242"); - request.setAuthorizationPhase(AuthorizationPhase.POST_AUTHORIZATION); - // 1. build plaintext request - buildRiskDecideRequest(request); - PaymentDetail paymentDetail = request.getPaymentDetails().get(0); - PaymentMethodMetaData paymentMethodMetaData = paymentDetail.getPaymentMethod().getPaymentMethodMetaData(); - CardVerificationResult cardVerificationResult = new CardVerificationResult(); - cardVerificationResult.setAuthenticationType("3D"); - cardVerificationResult.setAuthorizationCode("10000"); - RiskThreeDSResult riskThreeDSResult = new RiskThreeDSResult(); - riskThreeDSResult.setEci("00"); - riskThreeDSResult.setThreeDSVersion("2.0"); - riskThreeDSResult.setCavv("0"); - riskThreeDSResult.setThreeDSInteractionMode("CHALLENGE"); - cardVerificationResult.setThreeDSResult(riskThreeDSResult); - paymentMethodMetaData.setCardVerificationResult(cardVerificationResult); - RiskDecideResponse response = null; - try { - // 2. encrypt request - encryptRequest(request); - // 3. send request - response = defaultAlipayClient.execute(request); - } catch (CryptoException e) { - // TODO Handle CryptoException and log - } catch (AlipayApiException e) { - // TODO Handle AlipayApiException and log - } - return response; + public static RiskDecideResponse postAuthDecide() { + RiskDecideRequest request = new RiskDecideRequest(); + request.setReferenceTransactionId("test_20231012091493242"); + request.setAuthorizationPhase(AuthorizationPhase.POST_AUTHORIZATION); + // 1. build plaintext request + buildRiskDecideRequest(request); + PaymentDetail paymentDetail = request.getPaymentDetails().get(0); + PaymentMethodMetaData paymentMethodMetaData = + paymentDetail.getPaymentMethod().getPaymentMethodMetaData(); + CardVerificationResult cardVerificationResult = new CardVerificationResult(); + cardVerificationResult.setAuthenticationType("3D"); + cardVerificationResult.setAuthorizationCode("10000"); + RiskThreeDSResult riskThreeDSResult = new RiskThreeDSResult(); + riskThreeDSResult.setEci("00"); + riskThreeDSResult.setThreeDSVersion("2.0"); + riskThreeDSResult.setCavv("0"); + riskThreeDSResult.setThreeDSInteractionMode("CHALLENGE"); + cardVerificationResult.setThreeDSResult(riskThreeDSResult); + paymentMethodMetaData.setCardVerificationResult(cardVerificationResult); + RiskDecideResponse response = null; + try { + // 2. encrypt request + encryptRequest(request); + // 3. send request + response = defaultAlipayClient.execute(request); + } catch (CryptoException e) { + // TODO Handle CryptoException and log + } catch (AlipayApiException e) { + // TODO Handle AlipayApiException and log } + return response; + } - private static void encryptRequest(RiskDecideRequest request) throws CryptoException { - // 2.1. please confirm selected encryptKey whit Ant Group, build encryptList - List encryptList = Arrays.asList( - EncryptKeyEnum.BUYER_EMAIL, - EncryptKeyEnum.BUYER_PHONE_NO, - EncryptKeyEnum.BUYER_REGISTRATION_TIME, - EncryptKeyEnum.CARDHOLDER_NAME, - EncryptKeyEnum.SHIPPING_ADDRESS1, - EncryptKeyEnum.SHIPPING_ADDRESS2, - EncryptKeyEnum.SHIPPING_NAME, - EncryptKeyEnum.SHIP_TO_EMAIL, - EncryptKeyEnum.SHIPPING_PHONE_NO - ); - // 2.2. encrypt request by using RiskDecideEncryptUtil - RiskDecideEncryptUtil.encrypt(DATA_KEY, request, encryptList); - } + private static void encryptRequest(RiskDecideRequest request) throws CryptoException { + // 2.1. please confirm selected encryptKey whit Ant Group, build encryptList + List encryptList = + Arrays.asList( + EncryptKeyEnum.BUYER_EMAIL, + EncryptKeyEnum.BUYER_PHONE_NO, + EncryptKeyEnum.BUYER_REGISTRATION_TIME, + EncryptKeyEnum.CARDHOLDER_NAME, + EncryptKeyEnum.SHIPPING_ADDRESS1, + EncryptKeyEnum.SHIPPING_ADDRESS2, + EncryptKeyEnum.SHIPPING_NAME, + EncryptKeyEnum.SHIP_TO_EMAIL, + EncryptKeyEnum.SHIPPING_PHONE_NO); + // 2.2. encrypt request by using RiskDecideEncryptUtil + RiskDecideEncryptUtil.encrypt(DATA_KEY, request, encryptList); + } - public static SendPaymentResultResponse sendPaymentResult() { - SendPaymentResultRequest request = new SendPaymentResultRequest(); - request.setReferenceTransactionId("test_20231012091493242"); + public static SendPaymentResultResponse sendPaymentResult() { + SendPaymentResultRequest request = new SendPaymentResultRequest(); + request.setReferenceTransactionId("test_20231012091493242"); - request.setPaymentStatus("SUCCESS"); - request.setReferenceTransactionId("test_20231012091493242"); - CardVerificationResult cardVerificationResult = new CardVerificationResult(); - cardVerificationResult.setAuthenticationType("3D"); - cardVerificationResult.setAuthorizationCode("10000"); - RiskThreeDSResult threeDSResult = new RiskThreeDSResult(); - threeDSResult.setEci("05"); - threeDSResult.setThreeDSVersion("2.0"); - threeDSResult.setCavv("0"); - threeDSResult.setThreeDSInteractionMode("CHALLENGE"); - cardVerificationResult.setThreeDSResult(threeDSResult); - request.setCardVerificationResult(cardVerificationResult); - SendPaymentResultResponse response = null; - try { - response = defaultAlipayClient.execute(request); - } catch (AlipayApiException e) { - // TODO Handle AlipayApiException and log - } - return response; + request.setPaymentStatus("SUCCESS"); + request.setReferenceTransactionId("test_20231012091493242"); + CardVerificationResult cardVerificationResult = new CardVerificationResult(); + cardVerificationResult.setAuthenticationType("3D"); + cardVerificationResult.setAuthorizationCode("10000"); + RiskThreeDSResult threeDSResult = new RiskThreeDSResult(); + threeDSResult.setEci("05"); + threeDSResult.setThreeDSVersion("2.0"); + threeDSResult.setCavv("0"); + threeDSResult.setThreeDSInteractionMode("CHALLENGE"); + cardVerificationResult.setThreeDSResult(threeDSResult); + request.setCardVerificationResult(cardVerificationResult); + SendPaymentResultResponse response = null; + try { + response = defaultAlipayClient.execute(request); + } catch (AlipayApiException e) { + // TODO Handle AlipayApiException and log } + return response; + } - public static SendRefundResultResponse sendPaymentRefund() { - SendRefundResultRequest request = new SendRefundResultRequest(); - request.setReferenceTransactionId("test_20231012091493242"); + public static SendRefundResultResponse sendPaymentRefund() { + SendRefundResultRequest request = new SendRefundResultRequest(); + request.setReferenceTransactionId("test_20231012091493242"); - SendRefundResultResponse response = null; - try { - response = defaultAlipayClient.execute(request); - } catch (AlipayApiException e) { - // TODO Handle AlipayApiException and log - } - return response; + SendRefundResultResponse response = null; + try { + response = defaultAlipayClient.execute(request); + } catch (AlipayApiException e) { + // TODO Handle AlipayApiException and log } + return response; + } - public static RiskReportResponse reportRisk() { - RiskReportRequest request = new RiskReportRequest(); - request.setReferenceTransactionId("test_20231012091493242"); - request.setReportReason("test"); - request.setRiskType("FRAUD"); - request.setRiskOccurrenceTime(new Date()); + public static RiskReportResponse reportRisk() { + RiskReportRequest request = new RiskReportRequest(); + request.setReferenceTransactionId("test_20231012091493242"); + request.setReportReason("test"); + request.setRiskType("FRAUD"); + request.setRiskOccurrenceTime(new Date()); - RiskReportResponse response = null; - try { - response = defaultAlipayClient.execute(request); - } catch (AlipayApiException e) { - // TODO Handle AlipayApiException and log - } - return response; + RiskReportResponse response = null; + try { + response = defaultAlipayClient.execute(request); + } catch (AlipayApiException e) { + // TODO Handle AlipayApiException and log } + return response; + } - private static void buildRiskDecideRequest(RiskDecideRequest request) { - Order order = new Order(); - order.setReferenceOrderId("test_202310120914932421"); - Amount orderAmount = new Amount(); - orderAmount.setCurrency("BRL"); - orderAmount.setValue("30000"); - order.setOrderAmount(orderAmount); - order.setOrderDescription("Cappuccino #grande (Mika's coffee shop)"); - Merchant merchant = new Merchant(); - merchant.setReferenceMerchantId("SM_001"); - merchant.setMerchantEmail("12345678@foxmail.com"); - order.setMerchant(merchant); - Goods goods = new Goods(); - goods.setReferenceGoodsId("383382011_SGAMZ-904520356"); - goods.setGoodsName("[3 Boxes] Starbucks Cappuccino Milk Coffee Pods / Coffee Capsules by Nescafe Dolce Gusto"); - goods.setGoodsCategory("Digital Goods/Digital Vouchers/Food and Beverages"); - goods.setDeliveryMethodType("DIGITAL"); - goods.setGoodsQuantity("1"); - Amount goodsAmount = new Amount(); - goodsAmount.setValue("30000"); - goodsAmount.setCurrency("BRL"); - goods.setGoodsUnitAmount(goodsAmount); - order.setGoods(Collections.singletonList(goods)); - Shipping shipping = new Shipping(); - shipping.setShippingCarrier("FedEx"); - shipping.setShippingPhoneNo("12345678912"); - shipping.setShipToEmail("fenghoureject@163.com"); - UserName shippingName = new UserName(); - shippingName.setFirstName("Dehua"); - shippingName.setLastName("Liu"); - shippingName.setMiddleName("Skr"); - shippingName.setFullName("Dehua Skr Liu"); - shipping.setShippingName(shippingName); - Address shippingAddress = new Address(); - shippingAddress.setRegion("CN"); - shippingAddress.setState("Zhejiang"); - shippingAddress.setCity("Hangzhou"); - shippingAddress.setAddress1("Wuchang road"); - shippingAddress.setAddress2("Xihu"); - shippingAddress.setZipCode("310000"); - shipping.setShippingAddress(shippingAddress); - order.setShipping(shipping); - request.setOrders(Collections.singletonList(order)); - - Buyer buyer = new Buyer(); - buyer.setReferenceBuyerId("test12345678"); - buyer.setBuyerPhoneNo("12345678912"); - buyer.setBuyerEmail("alipay@alipay.com"); - buyer.setIsAccountVerified(true); - buyer.setSuccessfulOrderCount(100); - UserName buyerName = new UserName(); - buyerName.setFirstName("Dehua"); - buyerName.setLastName("Liu"); - buyerName.setMiddleName("Skr"); - buyerName.setFullName("Dehua Skr Liu"); - buyer.setBuyerName(buyerName); - buyer.setBuyerRegistrationTime("2023-01-01T12:08:56+08:00"); - request.setBuyer(buyer); + private static void buildRiskDecideRequest(RiskDecideRequest request) { + Order order = new Order(); + order.setReferenceOrderId("test_202310120914932421"); + Amount orderAmount = new Amount(); + orderAmount.setCurrency("BRL"); + orderAmount.setValue("30000"); + order.setOrderAmount(orderAmount); + order.setOrderDescription("Cappuccino #grande (Mika's coffee shop)"); + Merchant merchant = new Merchant(); + merchant.setReferenceMerchantId("SM_001"); + merchant.setMerchantEmail("12345678@foxmail.com"); + order.setMerchant(merchant); + Goods goods = new Goods(); + goods.setReferenceGoodsId("383382011_SGAMZ-904520356"); + goods.setGoodsName( + "[3 Boxes] Starbucks Cappuccino Milk Coffee Pods / Coffee Capsules by Nescafe Dolce Gusto"); + goods.setGoodsCategory("Digital Goods/Digital Vouchers/Food and Beverages"); + goods.setDeliveryMethodType("DIGITAL"); + goods.setGoodsQuantity("1"); + Amount goodsAmount = new Amount(); + goodsAmount.setValue("30000"); + goodsAmount.setCurrency("BRL"); + goods.setGoodsUnitAmount(goodsAmount); + order.setGoods(Collections.singletonList(goods)); + Shipping shipping = new Shipping(); + shipping.setShippingCarrier("FedEx"); + shipping.setShippingPhoneNo("12345678912"); + shipping.setShipToEmail("fenghoureject@163.com"); + UserName shippingName = new UserName(); + shippingName.setFirstName("Dehua"); + shippingName.setLastName("Liu"); + shippingName.setMiddleName("Skr"); + shippingName.setFullName("Dehua Skr Liu"); + shipping.setShippingName(shippingName); + Address shippingAddress = new Address(); + shippingAddress.setRegion("CN"); + shippingAddress.setState("Zhejiang"); + shippingAddress.setCity("Hangzhou"); + shippingAddress.setAddress1("Wuchang road"); + shippingAddress.setAddress2("Xihu"); + shippingAddress.setZipCode("310000"); + shipping.setShippingAddress(shippingAddress); + order.setShipping(shipping); + request.setOrders(Collections.singletonList(order)); - Amount actualPaymentAmount = new Amount(); - actualPaymentAmount.setCurrency("BRL"); - actualPaymentAmount.setValue("300000"); - request.setActualPaymentAmount(actualPaymentAmount); + Buyer buyer = new Buyer(); + buyer.setReferenceBuyerId("test12345678"); + buyer.setBuyerPhoneNo("12345678912"); + buyer.setBuyerEmail("alipay@alipay.com"); + buyer.setIsAccountVerified(true); + buyer.setSuccessfulOrderCount(100); + UserName buyerName = new UserName(); + buyerName.setFirstName("Dehua"); + buyerName.setLastName("Liu"); + buyerName.setMiddleName("Skr"); + buyerName.setFullName("Dehua Skr Liu"); + buyer.setBuyerName(buyerName); + buyer.setBuyerRegistrationTime("2023-01-01T12:08:56+08:00"); + request.setBuyer(buyer); - PaymentDetail paymentDetail = new PaymentDetail(); - Amount paymentAmount = new Amount(); - paymentAmount.setCurrency("BRL"); - paymentAmount.setValue("300000"); - paymentDetail.setAmount(paymentAmount); - PaymentMethod paymentMethod = new PaymentMethod(); - paymentMethod.setPaymentMethodId("0656XXXXXXX0001"); - paymentMethod.setPaymentMethodType("CARD"); - PaymentMethodMetaData paymentMethodMetaData = new PaymentMethodMetaData(); - paymentMethodMetaData.setCpf("02987654320"); - paymentMethodMetaData.setExpiryMonth("12"); - paymentMethodMetaData.setExpiryYear("29"); - paymentMethodMetaData.setCardNo("4117347806156383"); - UserName cardHolderName = new UserName(); - cardHolderName.setFirstName("Tom"); - cardHolderName.setLastName("Jay"); - paymentMethodMetaData.setCardHolderName(cardHolderName); - Address billingAddress = new Address(); - billingAddress.setRegion("CN"); - billingAddress.setState("Zhejiang"); - billingAddress.setCity("Hangzhou"); - billingAddress.setAddress1("test_address1"); - billingAddress.setAddress2("test_address2"); - billingAddress.setZipCode("310000"); - paymentMethodMetaData.setBillingAddress(billingAddress); - paymentMethod.setPaymentMethodMetaData(paymentMethodMetaData); - paymentDetail.setPaymentMethod(paymentMethod); - request.setPaymentDetails(Collections.singletonList(paymentDetail)); + Amount actualPaymentAmount = new Amount(); + actualPaymentAmount.setCurrency("BRL"); + actualPaymentAmount.setValue("300000"); + request.setActualPaymentAmount(actualPaymentAmount); - Env env = new Env(); - env.setTerminalType(TerminalType.APP); - env.setClientIp("00.00.00.00"); - env.setOsType(OsType.IOS); - env.setDeviceLanguage("zh_CN"); - env.setDeviceId("test_deviceId"); - request.setEnv(env); + PaymentDetail paymentDetail = new PaymentDetail(); + Amount paymentAmount = new Amount(); + paymentAmount.setCurrency("BRL"); + paymentAmount.setValue("300000"); + paymentDetail.setAmount(paymentAmount); + PaymentMethod paymentMethod = new PaymentMethod(); + paymentMethod.setPaymentMethodId("0656XXXXXXX0001"); + paymentMethod.setPaymentMethodType("CARD"); + PaymentMethodMetaData paymentMethodMetaData = new PaymentMethodMetaData(); + paymentMethodMetaData.setCpf("02987654320"); + paymentMethodMetaData.setExpiryMonth("12"); + paymentMethodMetaData.setExpiryYear("29"); + paymentMethodMetaData.setCardNo("4117347806156383"); + UserName cardHolderName = new UserName(); + cardHolderName.setFirstName("Tom"); + cardHolderName.setLastName("Jay"); + paymentMethodMetaData.setCardHolderName(cardHolderName); + Address billingAddress = new Address(); + billingAddress.setRegion("CN"); + billingAddress.setState("Zhejiang"); + billingAddress.setCity("Hangzhou"); + billingAddress.setAddress1("test_address1"); + billingAddress.setAddress2("test_address2"); + billingAddress.setZipCode("310000"); + paymentMethodMetaData.setBillingAddress(billingAddress); + paymentMethod.setPaymentMethodMetaData(paymentMethodMetaData); + paymentDetail.setPaymentMethod(paymentMethod); + request.setPaymentDetails(Collections.singletonList(paymentDetail)); - Amount discountAmount = new Amount(); - discountAmount.setCurrency("BRL"); - discountAmount.setValue("0"); - request.setDiscountAmount(discountAmount); - } + Env env = new Env(); + env.setTerminalType(TerminalType.APP); + env.setClientIp("00.00.00.00"); + env.setOsType(OsType.IOS); + env.setDeviceLanguage("zh_CN"); + env.setDeviceId("test_deviceId"); + request.setEnv(env); -} \ No newline at end of file + Amount discountAmount = new Amount(); + discountAmount.setCurrency("BRL"); + discountAmount.setValue("0"); + request.setDiscountAmount(discountAmount); + } +} diff --git a/src/main/java/com/alipay/global/api/example/SubscriptionDemoCode.java b/src/main/java/com/alipay/global/api/example/SubscriptionDemoCode.java index 2cf9573..ba43b90 100644 --- a/src/main/java/com/alipay/global/api/example/SubscriptionDemoCode.java +++ b/src/main/java/com/alipay/global/api/example/SubscriptionDemoCode.java @@ -8,88 +8,85 @@ import com.alipay.global.api.model.constants.EndPointConstants; import com.alipay.global.api.request.ams.subscription.AlipaySubscriptionCreateRequest; import com.alipay.global.api.response.ams.subscription.AlipaySubscriptionCreateResponse; - import java.util.UUID; public class SubscriptionDemoCode { - /** - * replace with your client id. - * find your client id here: quickStart - */ - public static final String CLIENT_ID = ""; - - /** - * replace with your antom public key (used to verify signature). - * find your antom public key here: quickStart - */ - public static final String ANTOM_PUBLIC_KEY = ""; - - /** - * replace with your private key (used to sign). - * please ensure the secure storage of your private key to prevent leakage - */ - public static final String MERCHANT_PRIVATE_KEY = ""; - - /** - * please replace with your endpoint. - * find your endpoint here: quickStart - */ - private final static AlipayClient CLIENT = new DefaultAlipayClient( - EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); - - public static void main(String[] args) { - createSubscription(); - } - - public static void createSubscription() { - AlipaySubscriptionCreateRequest alipaySubscriptionCreateRequest = new AlipaySubscriptionCreateRequest(); - - String subscriptionRequestId = UUID.randomUUID().toString(); - alipaySubscriptionCreateRequest.setSubscriptionRequestId(subscriptionRequestId); - alipaySubscriptionCreateRequest.setSubscriptionDescription("desc"); - alipaySubscriptionCreateRequest.setSubscriptionStartTime("2024-03-19T12:01:01+08:00"); - alipaySubscriptionCreateRequest.setSubscriptionEndTime("2024-06-27T12:01:01+08:00"); - // The duration of subscription preparation process should be less than 48 hours - alipaySubscriptionCreateRequest.setSubscriptionExpiryTime("2024-03-20T18:20:06+08:00"); - - PeriodRule periodRule = PeriodRule.builder().periodType("MONTH").periodCount(1).build(); - alipaySubscriptionCreateRequest.setPeriodRule(periodRule); - - PaymentMethod paymentMethod = PaymentMethod.builder().paymentMethodType("GCASH").build(); - alipaySubscriptionCreateRequest.setPaymentMethod(paymentMethod); - - OrderInfo orderInfo = new OrderInfo(); - alipaySubscriptionCreateRequest.setOrderInfo(orderInfo); - - Amount amount = Amount.builder().value("5000").currency("PHP").build(); - orderInfo.setOrderAmount(amount); - - alipaySubscriptionCreateRequest.setPaymentAmount(amount); - - alipaySubscriptionCreateRequest - .setSubscriptionRedirectUrl("https://www.yourRedirectUrl.com"); - alipaySubscriptionCreateRequest - .setSubscriptionNotificationUrl("https://www.yourNotify.com"); - alipaySubscriptionCreateRequest.setPaymentNotificationUrl("https://www.yourNotify.com"); - - Env env = Env.builder().terminalType(TerminalType.APP).osType(OsType.ANDROID).build(); - alipaySubscriptionCreateRequest.setEnv(env); - - AlipaySubscriptionCreateResponse alipaySubscriptionCreateResponse = null; - - System.out.println(JSON.toJSON(alipaySubscriptionCreateRequest)); - - try { - alipaySubscriptionCreateResponse = CLIENT.execute(alipaySubscriptionCreateRequest); - } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - System.out.println(e); - // handle error condition - } - - System.out.println(JSON.toJSON(alipaySubscriptionCreateResponse)); - + /** + * replace with your client id. find your client id here: quickStart + */ + public static final String CLIENT_ID = ""; + + /** + * replace with your antom public key (used to verify signature). find your antom public key here: + * quickStart + */ + public static final String ANTOM_PUBLIC_KEY = ""; + + /** + * replace with your private key (used to sign). please ensure the secure storage of your private + * key to prevent leakage + */ + public static final String MERCHANT_PRIVATE_KEY = ""; + + /** + * please replace with your endpoint. find your endpoint here: quickStart + */ + private static final AlipayClient CLIENT = + new DefaultAlipayClient( + EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); + + public static void main(String[] args) { + createSubscription(); + } + + public static void createSubscription() { + AlipaySubscriptionCreateRequest alipaySubscriptionCreateRequest = + new AlipaySubscriptionCreateRequest(); + + String subscriptionRequestId = UUID.randomUUID().toString(); + alipaySubscriptionCreateRequest.setSubscriptionRequestId(subscriptionRequestId); + alipaySubscriptionCreateRequest.setSubscriptionDescription("desc"); + alipaySubscriptionCreateRequest.setSubscriptionStartTime("2024-03-19T12:01:01+08:00"); + alipaySubscriptionCreateRequest.setSubscriptionEndTime("2024-06-27T12:01:01+08:00"); + // The duration of subscription preparation process should be less than 48 hours + alipaySubscriptionCreateRequest.setSubscriptionExpiryTime("2024-03-20T18:20:06+08:00"); + + PeriodRule periodRule = PeriodRule.builder().periodType("MONTH").periodCount(1).build(); + alipaySubscriptionCreateRequest.setPeriodRule(periodRule); + + PaymentMethod paymentMethod = PaymentMethod.builder().paymentMethodType("GCASH").build(); + alipaySubscriptionCreateRequest.setPaymentMethod(paymentMethod); + + OrderInfo orderInfo = new OrderInfo(); + alipaySubscriptionCreateRequest.setOrderInfo(orderInfo); + + Amount amount = Amount.builder().value("5000").currency("PHP").build(); + orderInfo.setOrderAmount(amount); + + alipaySubscriptionCreateRequest.setPaymentAmount(amount); + + alipaySubscriptionCreateRequest.setSubscriptionRedirectUrl("https://www.yourRedirectUrl.com"); + alipaySubscriptionCreateRequest.setSubscriptionNotificationUrl("https://www.yourNotify.com"); + alipaySubscriptionCreateRequest.setPaymentNotificationUrl("https://www.yourNotify.com"); + + Env env = Env.builder().terminalType(TerminalType.APP).osType(OsType.ANDROID).build(); + alipaySubscriptionCreateRequest.setEnv(env); + + AlipaySubscriptionCreateResponse alipaySubscriptionCreateResponse = null; + + System.out.println(JSON.toJSON(alipaySubscriptionCreateRequest)); + + try { + alipaySubscriptionCreateResponse = CLIENT.execute(alipaySubscriptionCreateRequest); + } catch (AlipayApiException e) { + String errorMsg = e.getMessage(); + System.out.println(e); + // handle error condition } + System.out.println(JSON.toJSON(alipaySubscriptionCreateResponse)); + } } diff --git a/src/main/java/com/alipay/global/api/example/legacy/AgreementPayDemoCode.java b/src/main/java/com/alipay/global/api/example/legacy/AgreementPayDemoCode.java index 22c0b7a..5d21ac6 100644 --- a/src/main/java/com/alipay/global/api/example/legacy/AgreementPayDemoCode.java +++ b/src/main/java/com/alipay/global/api/example/legacy/AgreementPayDemoCode.java @@ -20,399 +20,399 @@ import com.alipay.global.api.response.ams.pay.AlipayPayCancelResponse; import com.alipay.global.api.response.ams.pay.AlipayPayQueryResponse; import com.alipay.global.api.response.ams.pay.AlipayPayResponse; - import java.util.ArrayList; import java.util.Arrays; /** - * The demo Code mainly shows the correct use of API, - * and the specific implementation needs to be implemented by merchants + * The demo Code mainly shows the correct use of API, and the specific implementation needs to be + * implemented by merchants */ public class AgreementPayDemoCode { - private static final Integer TIMEOUT_RETRY_COUNT = 3; - private static final Integer CANCEL_RETRY_COUNT = 3; - private static final Integer PAY_RETRY_COUNT = 3; - private static final String GATE_WAY_URL = ""; - private static final String MERCHANT_PRIVATE_KEY = ""; - private static final String ANTOM_PUBLIC_KEY = ""; - private static final String CLIENT_ID = ""; - private static final String PAYMENT_REQUEST_ID = ""; - private final static AlipayClient CLIENT = new DefaultAlipayClient( - EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); - - public static void main(String[] args) { - - // 1、/v1/authorizations/consult - String authUrl = authConsult(); - // TODO 2、redirect to authUrl - // TODO 3、user authorization - // TODO 4、redirect to merchantUrl - // TODO 5、receive authCode - String authCode = ""; - // 6、/v1/authorizations/applyToken - String accessToken = applyToken(authCode); - // 7、/v1/payments/pay - pay(accessToken); - - } - - public static void pay(final String accessToken) { - - RetryExecutor.execute(PAY_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { - final String paymentRequestId = PAYMENT_REQUEST_ID; - AlipayPayResponse alipayPayResponse = pay(accessToken, paymentRequestId); - if (alipayPayResponse == null) { - RetryExecutor.execute(CANCEL_RETRY_COUNT, new Callback() { - - @Override - public RetryResult doProcess() { - AlipayPayCancelResponse alipayPayCancelResponse = cancel( - paymentRequestId); - if (alipayPayCancelResponse == null) { - // TODO Cancel fail - return RetryResult.ofResult(false); - } - Result cancelResult = alipayPayCancelResponse.getResult(); - if (ResultStatusType.U.equals(cancelResult.getResultStatus())) { - // TODO Retry cancel - return RetryResult.ofResult(true); - } - if (ResultStatusType.S.equals(cancelResult.getResultStatus())) { - // TODO Cancel success - return RetryResult.ofResult(false); - } - if (ResultStatusType.F.equals(cancelResult.getResultStatus())) { - // TODO Cancel fail,contact tech support - return RetryResult.ofResult(false); - } - return RetryResult.ofResult(false); - } - }); + private static final Integer TIMEOUT_RETRY_COUNT = 3; + private static final Integer CANCEL_RETRY_COUNT = 3; + private static final Integer PAY_RETRY_COUNT = 3; + private static final String GATE_WAY_URL = ""; + private static final String MERCHANT_PRIVATE_KEY = ""; + private static final String ANTOM_PUBLIC_KEY = ""; + private static final String CLIENT_ID = ""; + private static final String PAYMENT_REQUEST_ID = ""; + private static final AlipayClient CLIENT = + new DefaultAlipayClient( + EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); + + public static void main(String[] args) { + + // 1、/v1/authorizations/consult + String authUrl = authConsult(); + // TODO 2、redirect to authUrl + // TODO 3、user authorization + // TODO 4、redirect to merchantUrl + // TODO 5、receive authCode + String authCode = ""; + // 6、/v1/authorizations/applyToken + String accessToken = applyToken(authCode); + // 7、/v1/payments/pay + pay(accessToken); + } + + public static void pay(final String accessToken) { + + RetryExecutor.execute( + PAY_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { + final String paymentRequestId = PAYMENT_REQUEST_ID; + AlipayPayResponse alipayPayResponse = pay(accessToken, paymentRequestId); + if (alipayPayResponse == null) { + RetryExecutor.execute( + CANCEL_RETRY_COUNT, + new Callback() { + + @Override + public RetryResult doProcess() { + AlipayPayCancelResponse alipayPayCancelResponse = cancel(paymentRequestId); + if (alipayPayCancelResponse == null) { + // TODO Cancel fail + return RetryResult.ofResult(false); + } + Result cancelResult = alipayPayCancelResponse.getResult(); + if (ResultStatusType.U.equals(cancelResult.getResultStatus())) { + // TODO Retry cancel + return RetryResult.ofResult(true); + } + if (ResultStatusType.S.equals(cancelResult.getResultStatus())) { + // TODO Cancel success + return RetryResult.ofResult(false); + } + if (ResultStatusType.F.equals(cancelResult.getResultStatus())) { + // TODO Cancel fail,contact tech support + return RetryResult.ofResult(false); + } + return RetryResult.ofResult(false); + } + }); - return RetryResult.ofResult(false); + return RetryResult.ofResult(false); + } + Result payResult = alipayPayResponse.getResult(); + /** If payment is successful,proceed with other logic. */ + if (ResultStatusType.S.equals(payResult.getResultStatus())) { + return RetryResult.ofResult(false); + } + /** If payment is failed,terminate this transaction. */ + if (ResultStatusType.F.equals(payResult.getResultStatus())) { + return RetryResult.ofResult(false); + } + if (ResultStatusType.U.equals(payResult.getResultStatus())) { + if (!ResultCode.PAYMENT_IN_PROCESS.name().equals(payResult.getResultCode())) { + return RetryResult.ofResult(true); + } + TransactionStatusType paymentStatus = null; + /** Pause interval when the state is PROCESSING */ + ArrayList pauseInterval = + (ArrayList) Arrays.asList(2, 4, 8, 16, 32); + /** Number of retries when the state is U */ + Integer QUERY_RETRY_COUNT = 10; + + boolean isContinue = true; + AlipayPayQueryResponse alipayPayQueryResponse = null; + while (isContinue) { + alipayPayQueryResponse = inquiryPayment(paymentRequestId); + if (alipayPayQueryResponse == null) { + break; } - Result payResult = alipayPayResponse.getResult(); - /** - * If payment is successful,proceed with other logic. - */ - if (ResultStatusType.S.equals(payResult.getResultStatus())) { - return RetryResult.ofResult(false); + Result payQueryResult = alipayPayQueryResponse.getResult(); + if (ResultStatusType.F.equals(payQueryResult.getResultStatus())) { + // TODO Contact tech support + return RetryResult.ofResult(false); } - /** - * If payment is failed,terminate this transaction. - */ - if (ResultStatusType.F.equals(payResult.getResultStatus())) { - return RetryResult.ofResult(false); + if (ResultStatusType.U.equals(payQueryResult.getResultStatus())) { + --QUERY_RETRY_COUNT; + if (QUERY_RETRY_COUNT > 0) { + continue; + } else { + isContinue = false; + continue; + } } - if (ResultStatusType.U.equals(payResult.getResultStatus())) { - if (!ResultCode.PAYMENT_IN_PROCESS.name().equals(payResult.getResultCode())) { - return RetryResult.ofResult(true); - } - TransactionStatusType paymentStatus = null; - /** - * Pause interval when the state is PROCESSING - */ - ArrayList pauseInterval = (ArrayList) Arrays.asList(2, 4, 8, - 16, 32); - /** - * Number of retries when the state is U - */ - Integer QUERY_RETRY_COUNT = 10; - - boolean isContinue = true; - AlipayPayQueryResponse alipayPayQueryResponse = null; - while (isContinue) { - alipayPayQueryResponse = inquiryPayment(paymentRequestId); - if (alipayPayQueryResponse == null) { - break; + paymentStatus = alipayPayQueryResponse.getPaymentStatus(); + if (TransactionStatusType.PROCESSING.equals(paymentStatus)) { + if (!pauseInterval.isEmpty()) { + long sleepTime = pauseInterval.remove(0); + // TODO to wait sleepTime + } + isContinue = false; + continue; + } else { + isContinue = false; + } + } + /** If the result is still unavailable after retry, cancel the payment. */ + if (alipayPayQueryResponse == null + || TransactionStatusType.PROCESSING.equals(paymentStatus)) { + + RetryExecutor.execute( + CANCEL_RETRY_COUNT, + new Callback() { + + @Override + public RetryResult doProcess() { + AlipayPayCancelResponse alipayPayCancelResponse = cancel(paymentRequestId); + if (alipayPayCancelResponse == null) { + // TODO Cancel fail + return RetryResult.ofResult(false); } - Result payQueryResult = alipayPayQueryResponse.getResult(); - if (ResultStatusType.F.equals(payQueryResult.getResultStatus())) { - // TODO Contact tech support - return RetryResult.ofResult(false); + Result cancelResult = alipayPayCancelResponse.getResult(); + if (ResultStatusType.U.equals(cancelResult.getResultStatus())) { + // TODO Retry cancel + return RetryResult.ofResult(true); } - if (ResultStatusType.U.equals(payQueryResult.getResultStatus())) { - --QUERY_RETRY_COUNT; - if (QUERY_RETRY_COUNT > 0) { - continue; - } else { - isContinue = false; - continue; - } + if (ResultStatusType.S.equals(cancelResult.getResultStatus())) { + // TODO Cancel success + return RetryResult.ofResult(false); } - paymentStatus = alipayPayQueryResponse.getPaymentStatus(); - if (TransactionStatusType.PROCESSING.equals(paymentStatus)) { - if (!pauseInterval.isEmpty()) { - long sleepTime = pauseInterval.remove(0); - // TODO to wait sleepTime - } - isContinue = false; - continue; - } else { - isContinue = false; + if (ResultStatusType.F.equals(cancelResult.getResultStatus())) { + // TODO Cancel fail,contact tech support + return RetryResult.ofResult(false); } - } - /** - * If the result is still unavailable after retry, cancel the payment. - */ - if (alipayPayQueryResponse == null - || TransactionStatusType.PROCESSING.equals(paymentStatus)) { - - RetryExecutor.execute(CANCEL_RETRY_COUNT, new Callback() { - - @Override - public RetryResult doProcess() { - AlipayPayCancelResponse alipayPayCancelResponse = cancel( - paymentRequestId); - if (alipayPayCancelResponse == null) { - // TODO Cancel fail - return RetryResult.ofResult(false); - } - Result cancelResult = alipayPayCancelResponse.getResult(); - if (ResultStatusType.U.equals(cancelResult.getResultStatus())) { - // TODO Retry cancel - return RetryResult.ofResult(true); - } - if (ResultStatusType.S.equals(cancelResult.getResultStatus())) { - // TODO Cancel success - return RetryResult.ofResult(false); - } - if (ResultStatusType.F.equals(cancelResult.getResultStatus())) { - // TODO Cancel fail,contact tech support - return RetryResult.ofResult(false); - } - return RetryResult.ofResult(false); - } - }); - - return RetryResult.ofResult(false); - } - /** - * The transaction failed,terminate this transaction. - */ - if (TransactionStatusType.FAIL.equals(paymentStatus)) { - // TODO Payment fail return RetryResult.ofResult(false); - } - /** - * The transaction cancelled,terminate this transaction. - */ - if (TransactionStatusType.CANCELLED.equals(paymentStatus)) { - // TODO Payment cancel - return RetryResult.ofResult(false); - } - /** - * The transaction succeeded,proceed with the other logic. - */ - if (TransactionStatusType.SUCCESS.equals(paymentStatus)) { - // TODO Payment success - return RetryResult.ofResult(false); - } - } + } + }); return RetryResult.ofResult(false); + } + /** The transaction failed,terminate this transaction. */ + if (TransactionStatusType.FAIL.equals(paymentStatus)) { + // TODO Payment fail + return RetryResult.ofResult(false); + } + /** The transaction cancelled,terminate this transaction. */ + if (TransactionStatusType.CANCELLED.equals(paymentStatus)) { + // TODO Payment cancel + return RetryResult.ofResult(false); + } + /** The transaction succeeded,proceed with the other logic. */ + if (TransactionStatusType.SUCCESS.equals(paymentStatus)) { + // TODO Payment success + return RetryResult.ofResult(false); + } } - }); - - } - - public static AlipayPayResponse pay(String accessToken, String paymentRequestId) { - - final AlipayPayRequest alipayPayRequest = new AlipayPayRequest(); - alipayPayRequest.setProductCode(ProductCodeType.AGREEMENT_PAYMENT); - alipayPayRequest.setPaymentRequestId(paymentRequestId); - - Amount paymentAmount = new Amount(); - paymentAmount.setCurrency("PHP"); - paymentAmount.setValue("30000"); - alipayPayRequest.setPaymentAmount(paymentAmount); - - Order order = new Order(); - order.setReferenceOrderId("102775765075669"); - order.setOrderDescription( - "Mi Band 3 Wrist Strap Metal Screwless Stainless Steel For Xiaomi Mi Band 3"); - - Merchant merchant = new Merchant(); - merchant.setMerchantMCC("Test"); - merchant.setReferenceMerchantId("MXDTXSETGLKJASELKJG"); - order.setMerchant(merchant); - - Amount orderAmount = new Amount(); - orderAmount.setCurrency("PHP"); - orderAmount.setValue("30000"); - order.setOrderAmount(orderAmount); - alipayPayRequest.setOrder(order); - - PaymentMethod paymentMethod = new PaymentMethod(); - paymentMethod.setPaymentMethodType(WalletPaymentMethodType.GCASH.name()); - paymentMethod.setPaymentMethodId(accessToken); - alipayPayRequest.setPaymentMethod(paymentMethod); - - Env env = new Env(); - env.setTerminalType(TerminalType.APP); - env.setOsType(OsType.IOS); - - order.setEnv(env); - - alipayPayRequest.setPaymentNotifyUrl("https://www.gcash.com/notify"); - alipayPayRequest.setPaymentRedirectUrl("https://www.gcash.com?param1=sl"); - - SettlementStrategy settlementStrategy = new SettlementStrategy(); - settlementStrategy.setSettlementCurrency("USD"); - alipayPayRequest.setSettlementStrategy(settlementStrategy); - Object obj = RetryExecutor.execute(TIMEOUT_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + return RetryResult.ofResult(false); + } + }); + } + + public static AlipayPayResponse pay(String accessToken, String paymentRequestId) { + + final AlipayPayRequest alipayPayRequest = new AlipayPayRequest(); + alipayPayRequest.setProductCode(ProductCodeType.AGREEMENT_PAYMENT); + alipayPayRequest.setPaymentRequestId(paymentRequestId); + + Amount paymentAmount = new Amount(); + paymentAmount.setCurrency("PHP"); + paymentAmount.setValue("30000"); + alipayPayRequest.setPaymentAmount(paymentAmount); + + Order order = new Order(); + order.setReferenceOrderId("102775765075669"); + order.setOrderDescription( + "Mi Band 3 Wrist Strap Metal Screwless Stainless Steel For Xiaomi Mi Band 3"); + + Merchant merchant = new Merchant(); + merchant.setMerchantMCC("Test"); + merchant.setReferenceMerchantId("MXDTXSETGLKJASELKJG"); + order.setMerchant(merchant); + + Amount orderAmount = new Amount(); + orderAmount.setCurrency("PHP"); + orderAmount.setValue("30000"); + order.setOrderAmount(orderAmount); + alipayPayRequest.setOrder(order); + + PaymentMethod paymentMethod = new PaymentMethod(); + paymentMethod.setPaymentMethodType(WalletPaymentMethodType.GCASH.name()); + paymentMethod.setPaymentMethodId(accessToken); + alipayPayRequest.setPaymentMethod(paymentMethod); + + Env env = new Env(); + env.setTerminalType(TerminalType.APP); + env.setOsType(OsType.IOS); + + order.setEnv(env); + + alipayPayRequest.setPaymentNotifyUrl("https://www.gcash.com/notify"); + alipayPayRequest.setPaymentRedirectUrl("https://www.gcash.com?param1=sl"); + + SettlementStrategy settlementStrategy = new SettlementStrategy(); + settlementStrategy.setSettlementCurrency("USD"); + alipayPayRequest.setSettlementStrategy(settlementStrategy); + + Object obj = + RetryExecutor.execute( + TIMEOUT_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayPayResponse alipayPayResponse = null; try { - alipayPayResponse = CLIENT.execute(alipayPayRequest); + alipayPayResponse = CLIENT.execute(alipayPayRequest); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, alipayPayResponse); - } - }); - - return obj == null ? null : (AlipayPayResponse) obj; - } - - public static AlipayPayQueryResponse inquiryPayment(String paymentRequestId) { - final AlipayPayQueryRequest alipayPayQueryRequest = new AlipayPayQueryRequest(); - alipayPayQueryRequest.setPaymentRequestId(paymentRequestId); - - Object obj = RetryExecutor.execute(TIMEOUT_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + } + }); + + return obj == null ? null : (AlipayPayResponse) obj; + } + + public static AlipayPayQueryResponse inquiryPayment(String paymentRequestId) { + final AlipayPayQueryRequest alipayPayQueryRequest = new AlipayPayQueryRequest(); + alipayPayQueryRequest.setPaymentRequestId(paymentRequestId); + + Object obj = + RetryExecutor.execute( + TIMEOUT_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayPayQueryResponse alipayPayQueryResponse = null; try { - alipayPayQueryResponse = CLIENT.execute(alipayPayQueryRequest); + alipayPayQueryResponse = CLIENT.execute(alipayPayQueryRequest); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, alipayPayQueryResponse); - } - }); - - return obj == null ? null : (AlipayPayQueryResponse) obj; - } - - public static AlipayPayCancelResponse cancel(String paymentRequestId) { - final AlipayPayCancelRequest alipayPayCancelRequest = new AlipayPayCancelRequest(); - alipayPayCancelRequest.setPaymentRequestId(paymentRequestId); - - Object obj = RetryExecutor.execute(TIMEOUT_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + } + }); + + return obj == null ? null : (AlipayPayQueryResponse) obj; + } + + public static AlipayPayCancelResponse cancel(String paymentRequestId) { + final AlipayPayCancelRequest alipayPayCancelRequest = new AlipayPayCancelRequest(); + alipayPayCancelRequest.setPaymentRequestId(paymentRequestId); + + Object obj = + RetryExecutor.execute( + TIMEOUT_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayPayCancelResponse alipayPayCancelResponse = null; try { - alipayPayCancelResponse = CLIENT.execute(alipayPayCancelRequest); + alipayPayCancelResponse = CLIENT.execute(alipayPayCancelRequest); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, alipayPayCancelResponse); - } - }); - - return obj == null ? null : (AlipayPayCancelResponse) obj; - } - - public static String applyToken(String authCode) { - - final AlipayAuthApplyTokenRequest applyTokenRequest = new AlipayAuthApplyTokenRequest(); - applyTokenRequest.setGrantType(GrantType.AUTHORIZATION_CODE); - applyTokenRequest.setCustomerBelongsTo(CustomerBelongsTo.BKASH); - applyTokenRequest.setAuthCode(authCode); - applyTokenRequest.setMerchantRegion("US"); - - Object obj = RetryExecutor.execute(TIMEOUT_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + } + }); + + return obj == null ? null : (AlipayPayCancelResponse) obj; + } + + public static String applyToken(String authCode) { + + final AlipayAuthApplyTokenRequest applyTokenRequest = new AlipayAuthApplyTokenRequest(); + applyTokenRequest.setGrantType(GrantType.AUTHORIZATION_CODE); + applyTokenRequest.setCustomerBelongsTo(CustomerBelongsTo.BKASH); + applyTokenRequest.setAuthCode(authCode); + applyTokenRequest.setMerchantRegion("US"); + + Object obj = + RetryExecutor.execute( + TIMEOUT_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayAuthApplyTokenResponse alipayAuthApplyTokenResponse = null; try { - alipayAuthApplyTokenResponse = CLIENT.execute(applyTokenRequest); + alipayAuthApplyTokenResponse = CLIENT.execute(applyTokenRequest); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, alipayAuthApplyTokenResponse); - } - }); - - // TODO alipayAuthApplyTokenResponse insert DB - return obj == null ? null : ((AlipayAuthApplyTokenResponse) obj).getAccessToken(); - } - - public static String authConsult() { - final AlipayAuthConsultRequest authConsultRequest = new AlipayAuthConsultRequest(); - authConsultRequest.setAuthRedirectUrl("https://www.taobao.com/?param1=567¶m2=123"); - authConsultRequest.setAuthState("663A8FA9D83656EE8AA1dd6F6F682ff989DC7"); - authConsultRequest.setCustomerBelongsTo(CustomerBelongsTo.GCASH); - authConsultRequest.setOsType(OsType.ANDROID); - authConsultRequest.setOsVersion("6.6.6"); - ScopeType[] scopes = {ScopeType.USER_LOGIN_ID}; - authConsultRequest.setScopes(scopes); - authConsultRequest.setTerminalType(TerminalType.APP); - authConsultRequest.setMerchantRegion("US"); - - Object obj = RetryExecutor.execute(TIMEOUT_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + } + }); + + // TODO alipayAuthApplyTokenResponse insert DB + return obj == null ? null : ((AlipayAuthApplyTokenResponse) obj).getAccessToken(); + } + + public static String authConsult() { + final AlipayAuthConsultRequest authConsultRequest = new AlipayAuthConsultRequest(); + authConsultRequest.setAuthRedirectUrl("https://www.taobao.com/?param1=567¶m2=123"); + authConsultRequest.setAuthState("663A8FA9D83656EE8AA1dd6F6F682ff989DC7"); + authConsultRequest.setCustomerBelongsTo(CustomerBelongsTo.GCASH); + authConsultRequest.setOsType(OsType.ANDROID); + authConsultRequest.setOsVersion("6.6.6"); + ScopeType[] scopes = {ScopeType.USER_LOGIN_ID}; + authConsultRequest.setScopes(scopes); + authConsultRequest.setTerminalType(TerminalType.APP); + authConsultRequest.setMerchantRegion("US"); + + Object obj = + RetryExecutor.execute( + TIMEOUT_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayAuthConsultResponse alipayAuthConsultResponse = null; try { - alipayAuthConsultResponse = CLIENT.execute(authConsultRequest); + alipayAuthConsultResponse = CLIENT.execute(authConsultRequest); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, alipayAuthConsultResponse); - } - }); - - if (obj != null) { - AlipayAuthConsultResponse alipayAuthConsultResponse = (AlipayAuthConsultResponse) obj; - String authUrl = alipayAuthConsultResponse.getAuthUrl(); + } + }); - return authUrl; - } + if (obj != null) { + AlipayAuthConsultResponse alipayAuthConsultResponse = (AlipayAuthConsultResponse) obj; + String authUrl = alipayAuthConsultResponse.getAuthUrl(); - return null; + return authUrl; } + return null; + } } diff --git a/src/main/java/com/alipay/global/api/example/legacy/CashierPayDemoCode.java b/src/main/java/com/alipay/global/api/example/legacy/CashierPayDemoCode.java index fa91a5e..5c2b4e5 100644 --- a/src/main/java/com/alipay/global/api/example/legacy/CashierPayDemoCode.java +++ b/src/main/java/com/alipay/global/api/example/legacy/CashierPayDemoCode.java @@ -16,323 +16,321 @@ import com.alipay.global.api.response.ams.pay.AlipayPayCancelResponse; import com.alipay.global.api.response.ams.pay.AlipayPayQueryResponse; import com.alipay.global.api.response.ams.pay.AlipayPayResponse; - import java.util.Arrays; import java.util.List; /** - * The demo code mainly shows how to use the API correctly and the specific implementation needs to be performed by merchants. + * The demo code mainly shows how to use the API correctly and the specific implementation needs to + * be performed by merchants. */ public class CashierPayDemoCode { - private static final Integer TIMEOUT_RETRY_COUNT = 3; - private static final Integer CANCEL_RETRY_COUNT = 3; - private static final Integer PAY_RETRY_COUNT = 3; - private static final String GATE_WAY_URL = ""; - private static final String MERCHANT_PRIVATE_KEY = ""; - private static final String ANTOM_PUBLIC_KEY = ""; - private static final String CLIENT_ID = ""; - private static final String PAYMENT_REQUEST_ID = ""; - private final static AlipayClient CLIENT = new DefaultAlipayClient( - EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); - - public static void main(String[] args) { - - RetryExecutor.execute(PAY_RETRY_COUNT, new Callback() { - - @Override - public RetryResult doProcess() { - final String paymentRequestId = PAYMENT_REQUEST_ID; - AlipayPayResponse alipayPayResponse = pay(paymentRequestId); - if (alipayPayResponse == null) { - - RetryExecutor.execute(CANCEL_RETRY_COUNT, new Callback() { - - @Override - public RetryResult doProcess() { - AlipayPayCancelResponse alipayPayCancelResponse = cancel( - paymentRequestId); - if (alipayPayCancelResponse == null) { - // TODO Cancel fail - return RetryResult.ofResult(false); - } - Result cancelResult = alipayPayCancelResponse.getResult(); - if (ResultStatusType.U.equals(cancelResult.getResultStatus())) { - // TODO check times, retry cancel - return RetryResult.ofResult(true); - } - if (ResultStatusType.S.equals(cancelResult.getResultStatus())) { - // TODO Cancel success - return RetryResult.ofResult(false); - } - if (ResultStatusType.F.equals(cancelResult.getResultStatus())) { - // TODO Cancel fail,Contact tech support - return RetryResult.ofResult(false); - } - return RetryResult.ofResult(false); - } - }); - - return RetryResult.ofResult(false); - } - Result payResult = alipayPayResponse.getResult(); - /** - * If payment failed,terminate this transaction. - */ - if (ResultStatusType.F.equals(payResult.getResultStatus())) { - // TODO Payment fail - return RetryResult.ofResult(false); - } - if (ResultStatusType.U.equals(payResult.getResultStatus())) { - if (!ResultCode.PAYMENT_IN_PROCESS.name().equals(payResult.getResultCode())) { - return RetryResult.ofResult(true); - } - RedirectActionForm redirectActionForm = alipayPayResponse - .getRedirectActionForm(); - String redirectUrl = redirectActionForm.getRedirectUrl(); - String method = redirectActionForm.getMethod(); - String parameters = redirectActionForm.getParameters(); - // TODO 1、Jump to the checkout page - // TODO 2、Wait notify,eg: PayNotifyListener - // TODO 3、Start the asynchronous task to query the payment results - asyncQueryTask(paymentRequestId); - } - return RetryResult.ofResult(false); - } - }); - - } - - public static void asyncQueryTask(final String paymentRequestId) { - // 1、TODO Wait 3 minutes for execution - - String orderStatus = TransactionStatusType.PROCESSING.name(); - // 2、TODO Get order status from merchant's DB - - /** - * Is it in process? - */ - if (!TransactionStatusType.PROCESSING.name().equals(orderStatus)) { - return; - } - /** - * Pause interval when the state is PROCESSING - */ - List pauseInterval = Arrays.asList(2, 4, 8, 16, 32, 64, 128, 256, 512); - boolean isContinue = true; - Integer QUERY_RETRY_COUNT = 10; - TransactionStatusType paymentStatus = null; - AlipayPayQueryResponse alipayPayQueryResponse = null; - while (isContinue) { - alipayPayQueryResponse = inquiryPayment(paymentRequestId); - if (alipayPayQueryResponse == null) { - return; - } - Result payQueryResult = alipayPayQueryResponse.getResult(); - if (ResultStatusType.F.equals(payQueryResult.getResultStatus())) { - // TODO Contact tech support - return; - } - if (ResultStatusType.U.equals(payQueryResult.getResultStatus())) { - // TODO retry queryPay - --QUERY_RETRY_COUNT; - if (QUERY_RETRY_COUNT > 0) { - continue; - } else { - isContinue = false; - continue; - } - } - paymentStatus = alipayPayQueryResponse.getPaymentStatus(); - if (paymentStatus != null) { - if (TransactionStatusType.PROCESSING.equals(paymentStatus)) { - if (!pauseInterval.isEmpty()) { - long sleepTime = pauseInterval.remove(0); - // TODO to wait sleepTime - continue; - } - isContinue = false; - } else { - isContinue = false; - } - } - } - - if (alipayPayQueryResponse == null - || TransactionStatusType.PROCESSING.equals(paymentStatus)) { - RetryExecutor.execute(CANCEL_RETRY_COUNT, new Callback() { - - @Override - public RetryResult doProcess() { - AlipayPayCancelResponse alipayPayCancelResponse = cancel(paymentRequestId); - if (alipayPayCancelResponse == null) { + private static final Integer TIMEOUT_RETRY_COUNT = 3; + private static final Integer CANCEL_RETRY_COUNT = 3; + private static final Integer PAY_RETRY_COUNT = 3; + private static final String GATE_WAY_URL = ""; + private static final String MERCHANT_PRIVATE_KEY = ""; + private static final String ANTOM_PUBLIC_KEY = ""; + private static final String CLIENT_ID = ""; + private static final String PAYMENT_REQUEST_ID = ""; + private static final AlipayClient CLIENT = + new DefaultAlipayClient( + EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); + + public static void main(String[] args) { + + RetryExecutor.execute( + PAY_RETRY_COUNT, + new Callback() { + + @Override + public RetryResult doProcess() { + final String paymentRequestId = PAYMENT_REQUEST_ID; + AlipayPayResponse alipayPayResponse = pay(paymentRequestId); + if (alipayPayResponse == null) { + + RetryExecutor.execute( + CANCEL_RETRY_COUNT, + new Callback() { + + @Override + public RetryResult doProcess() { + AlipayPayCancelResponse alipayPayCancelResponse = cancel(paymentRequestId); + if (alipayPayCancelResponse == null) { // TODO Cancel fail return RetryResult.ofResult(false); - } - Result cancelResult = alipayPayCancelResponse.getResult(); - if (ResultStatusType.U.equals(cancelResult.getResultStatus())) { + } + Result cancelResult = alipayPayCancelResponse.getResult(); + if (ResultStatusType.U.equals(cancelResult.getResultStatus())) { // TODO check times, retry cancel return RetryResult.ofResult(true); - } - if (ResultStatusType.S.equals(cancelResult.getResultStatus())) { + } + if (ResultStatusType.S.equals(cancelResult.getResultStatus())) { // TODO Cancel success return RetryResult.ofResult(false); - } - if (ResultStatusType.F.equals(cancelResult.getResultStatus())) { - // TODO Cancel fail,contact tech support + } + if (ResultStatusType.F.equals(cancelResult.getResultStatus())) { + // TODO Cancel fail,Contact tech support return RetryResult.ofResult(false); + } + return RetryResult.ofResult(false); } - return RetryResult.ofResult(false); - } - }); - return; - } - /** - * The transaction failed,terminate this transaction. - */ - if (TransactionStatusType.FAIL.equals(paymentStatus)) { - // TODO Payment FAIL - return; - } - /** - * The transaction cancelled,terminate this transaction. - */ - if (TransactionStatusType.CANCELLED.equals(paymentStatus)) { - // TODO Payment CANCELLED - return; + }); + + return RetryResult.ofResult(false); + } + Result payResult = alipayPayResponse.getResult(); + /** If payment failed,terminate this transaction. */ + if (ResultStatusType.F.equals(payResult.getResultStatus())) { + // TODO Payment fail + return RetryResult.ofResult(false); + } + if (ResultStatusType.U.equals(payResult.getResultStatus())) { + if (!ResultCode.PAYMENT_IN_PROCESS.name().equals(payResult.getResultCode())) { + return RetryResult.ofResult(true); + } + RedirectActionForm redirectActionForm = alipayPayResponse.getRedirectActionForm(); + String redirectUrl = redirectActionForm.getRedirectUrl(); + String method = redirectActionForm.getMethod(); + String parameters = redirectActionForm.getParameters(); + // TODO 1、Jump to the checkout page + // TODO 2、Wait notify,eg: PayNotifyListener + // TODO 3、Start the asynchronous task to query the payment results + asyncQueryTask(paymentRequestId); + } + return RetryResult.ofResult(false); + } + }); + } + + public static void asyncQueryTask(final String paymentRequestId) { + // 1、TODO Wait 3 minutes for execution + + String orderStatus = TransactionStatusType.PROCESSING.name(); + // 2、TODO Get order status from merchant's DB + + /** Is it in process? */ + if (!TransactionStatusType.PROCESSING.name().equals(orderStatus)) { + return; + } + /** Pause interval when the state is PROCESSING */ + List pauseInterval = Arrays.asList(2, 4, 8, 16, 32, 64, 128, 256, 512); + boolean isContinue = true; + Integer QUERY_RETRY_COUNT = 10; + TransactionStatusType paymentStatus = null; + AlipayPayQueryResponse alipayPayQueryResponse = null; + while (isContinue) { + alipayPayQueryResponse = inquiryPayment(paymentRequestId); + if (alipayPayQueryResponse == null) { + return; + } + Result payQueryResult = alipayPayQueryResponse.getResult(); + if (ResultStatusType.F.equals(payQueryResult.getResultStatus())) { + // TODO Contact tech support + return; + } + if (ResultStatusType.U.equals(payQueryResult.getResultStatus())) { + // TODO retry queryPay + --QUERY_RETRY_COUNT; + if (QUERY_RETRY_COUNT > 0) { + continue; + } else { + isContinue = false; + continue; } - /** - * The transaction succeeded,proceed with other logic. - */ - if (TransactionStatusType.SUCCESS.equals(paymentStatus)) { - // TODO Payment SUCCESS - return; + } + paymentStatus = alipayPayQueryResponse.getPaymentStatus(); + if (paymentStatus != null) { + if (TransactionStatusType.PROCESSING.equals(paymentStatus)) { + if (!pauseInterval.isEmpty()) { + long sleepTime = pauseInterval.remove(0); + // TODO to wait sleepTime + continue; + } + isContinue = false; + } else { + isContinue = false; } + } + } + + if (alipayPayQueryResponse == null || TransactionStatusType.PROCESSING.equals(paymentStatus)) { + RetryExecutor.execute( + CANCEL_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { + AlipayPayCancelResponse alipayPayCancelResponse = cancel(paymentRequestId); + if (alipayPayCancelResponse == null) { + // TODO Cancel fail + return RetryResult.ofResult(false); + } + Result cancelResult = alipayPayCancelResponse.getResult(); + if (ResultStatusType.U.equals(cancelResult.getResultStatus())) { + // TODO check times, retry cancel + return RetryResult.ofResult(true); + } + if (ResultStatusType.S.equals(cancelResult.getResultStatus())) { + // TODO Cancel success + return RetryResult.ofResult(false); + } + if (ResultStatusType.F.equals(cancelResult.getResultStatus())) { + // TODO Cancel fail,contact tech support + return RetryResult.ofResult(false); + } + return RetryResult.ofResult(false); + } + }); + return; } + /** The transaction failed,terminate this transaction. */ + if (TransactionStatusType.FAIL.equals(paymentStatus)) { + // TODO Payment FAIL + return; + } + /** The transaction cancelled,terminate this transaction. */ + if (TransactionStatusType.CANCELLED.equals(paymentStatus)) { + // TODO Payment CANCELLED + return; + } + /** The transaction succeeded,proceed with other logic. */ + if (TransactionStatusType.SUCCESS.equals(paymentStatus)) { + // TODO Payment SUCCESS + return; + } + } - public static AlipayPayResponse pay(String paymentRequestId) { + public static AlipayPayResponse pay(String paymentRequestId) { - final AlipayPayRequest alipayPayRequest = new AlipayPayRequest(); - alipayPayRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); - alipayPayRequest.setPaymentRequestId(paymentRequestId); + final AlipayPayRequest alipayPayRequest = new AlipayPayRequest(); + alipayPayRequest.setProductCode(ProductCodeType.CASHIER_PAYMENT); + alipayPayRequest.setPaymentRequestId(paymentRequestId); - Amount paymentAmount = new Amount(); - paymentAmount.setCurrency("PHP"); - paymentAmount.setValue("30000"); - alipayPayRequest.setPaymentAmount(paymentAmount); + Amount paymentAmount = new Amount(); + paymentAmount.setCurrency("PHP"); + paymentAmount.setValue("30000"); + alipayPayRequest.setPaymentAmount(paymentAmount); - Order order = new Order(); - order.setReferenceOrderId("102775765075669"); - order.setOrderDescription( - "Mi Band 3 Wrist Strap Metal Screwless Stainless Steel For Xiaomi Mi Band 3"); + Order order = new Order(); + order.setReferenceOrderId("102775765075669"); + order.setOrderDescription( + "Mi Band 3 Wrist Strap Metal Screwless Stainless Steel For Xiaomi Mi Band 3"); - Merchant merchant = new Merchant(); - merchant.setMerchantMCC("Test"); - merchant.setReferenceMerchantId("MXDTXSETGLKJASELKJG"); - order.setMerchant(merchant); + Merchant merchant = new Merchant(); + merchant.setMerchantMCC("Test"); + merchant.setReferenceMerchantId("MXDTXSETGLKJASELKJG"); + order.setMerchant(merchant); - Amount orderAmount = new Amount(); - orderAmount.setCurrency("PHP"); - orderAmount.setValue("30000"); - order.setOrderAmount(orderAmount); - alipayPayRequest.setOrder(order); + Amount orderAmount = new Amount(); + orderAmount.setCurrency("PHP"); + orderAmount.setValue("30000"); + order.setOrderAmount(orderAmount); + alipayPayRequest.setOrder(order); - PaymentMethod paymentMethod = new PaymentMethod(); - paymentMethod.setPaymentMethodType(WalletPaymentMethodType.GCASH.name()); - alipayPayRequest.setPaymentMethod(paymentMethod); + PaymentMethod paymentMethod = new PaymentMethod(); + paymentMethod.setPaymentMethodType(WalletPaymentMethodType.GCASH.name()); + alipayPayRequest.setPaymentMethod(paymentMethod); - Env env = new Env(); - env.setTerminalType(TerminalType.APP); - env.setOsType(OsType.IOS); + Env env = new Env(); + env.setTerminalType(TerminalType.APP); + env.setOsType(OsType.IOS); - order.setEnv(env); + order.setEnv(env); - alipayPayRequest.setPaymentNotifyUrl("https://www.gcash.com/notify"); - alipayPayRequest.setPaymentRedirectUrl("https://www.gcash.com?param1=sl"); + alipayPayRequest.setPaymentNotifyUrl("https://www.gcash.com/notify"); + alipayPayRequest.setPaymentRedirectUrl("https://www.gcash.com?param1=sl"); - SettlementStrategy settlementStrategy = new SettlementStrategy(); - settlementStrategy.setSettlementCurrency("USD"); - alipayPayRequest.setSettlementStrategy(settlementStrategy); + SettlementStrategy settlementStrategy = new SettlementStrategy(); + settlementStrategy.setSettlementCurrency("USD"); + alipayPayRequest.setSettlementStrategy(settlementStrategy); - alipayPayRequest.setMerchantRegion("US"); - alipayPayRequest.setAppId("312a74651aa74586be847a0c672243a9"); + alipayPayRequest.setMerchantRegion("US"); + alipayPayRequest.setAppId("312a74651aa74586be847a0c672243a9"); - Object obj = RetryExecutor.execute(TIMEOUT_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + Object obj = + RetryExecutor.execute( + TIMEOUT_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayPayResponse alipayPayResponse = null; try { - alipayPayResponse = CLIENT.execute(alipayPayRequest); + alipayPayResponse = CLIENT.execute(alipayPayRequest); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, alipayPayResponse); - } - }); + } + }); - return obj == null ? null : (AlipayPayResponse) obj; - } + return obj == null ? null : (AlipayPayResponse) obj; + } - public static AlipayPayQueryResponse inquiryPayment(String paymentRequestId) { - final AlipayPayQueryRequest alipayPayQueryRequest = new AlipayPayQueryRequest(); - alipayPayQueryRequest.setPaymentRequestId(paymentRequestId); + public static AlipayPayQueryResponse inquiryPayment(String paymentRequestId) { + final AlipayPayQueryRequest alipayPayQueryRequest = new AlipayPayQueryRequest(); + alipayPayQueryRequest.setPaymentRequestId(paymentRequestId); - Object obj = RetryExecutor.execute(TIMEOUT_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + Object obj = + RetryExecutor.execute( + TIMEOUT_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayPayQueryResponse alipayPayQueryResponse = null; try { - alipayPayQueryResponse = CLIENT.execute(alipayPayQueryRequest); + alipayPayQueryResponse = CLIENT.execute(alipayPayQueryRequest); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, alipayPayQueryResponse); - } - }); + } + }); - return obj == null ? null : (AlipayPayQueryResponse) obj; - } + return obj == null ? null : (AlipayPayQueryResponse) obj; + } - public static AlipayPayCancelResponse cancel(String paymentRequestId) { - final AlipayPayCancelRequest alipayPayCancelRequest = new AlipayPayCancelRequest(); - alipayPayCancelRequest.setPaymentRequestId(paymentRequestId); + public static AlipayPayCancelResponse cancel(String paymentRequestId) { + final AlipayPayCancelRequest alipayPayCancelRequest = new AlipayPayCancelRequest(); + alipayPayCancelRequest.setPaymentRequestId(paymentRequestId); - Object obj = RetryExecutor.execute(TIMEOUT_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + Object obj = + RetryExecutor.execute( + TIMEOUT_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayPayCancelResponse alipayPayCancelResponse = null; try { - alipayPayCancelResponse = CLIENT.execute(alipayPayCancelRequest); + alipayPayCancelResponse = CLIENT.execute(alipayPayCancelRequest); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, alipayPayCancelResponse); - } - }); - - return obj == null ? null : (AlipayPayCancelResponse) obj; - } + } + }); -} \ No newline at end of file + return obj == null ? null : (AlipayPayCancelResponse) obj; + } +} diff --git a/src/main/java/com/alipay/global/api/example/legacy/CustomsDemoCode.java b/src/main/java/com/alipay/global/api/example/legacy/CustomsDemoCode.java index f0317b0..3e17c02 100644 --- a/src/main/java/com/alipay/global/api/example/legacy/CustomsDemoCode.java +++ b/src/main/java/com/alipay/global/api/example/legacy/CustomsDemoCode.java @@ -13,144 +13,149 @@ import com.alipay.global.api.request.ams.customs.AlipayCustomsQueryRequest; import com.alipay.global.api.response.ams.customs.AlipayCustomsDeclareResponse; import com.alipay.global.api.response.ams.customs.AlipayCustomsQueryResponse; - import java.util.ArrayList; import java.util.List; public class CustomsDemoCode { - private static final Integer TIMEOUT_RETRY_COUNT = 3; - private static final Integer QUERY_DECLARE_RETRY_COUNT = 3; - private static final Integer DECLARE_RETRY_COUNT = 3; - //TODO build your clientId - private static final String GATE_WAY_URL = ""; - private static final String MERCHANT_PRIVATE_KEY = ""; - private static final String ANTOM_PUBLIC_KEY = ""; - private static final String CLIENT_ID = ""; - private final static AlipayClient CLIENT = new DefaultAlipayClient( - EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); - - public static void main(String[] args) { - //step.1 finish a payment. Because transmit information to customs need a paymentId; - //TODO build your paymentId - final String paymentId = ""; - - //step.2 declare - AlipayCustomsDeclareRequest declareRequest = buildAlipayCustomsDeclareRequest(paymentId); - AlipayCustomsDeclareResponse response = declare(declareRequest); - if (response != null) { - Result result = response.getResult(); - if (ResultStatusType.F.equals(result.getResultStatus())) { - //TODO declare fail - return; - } - //step.3 query customs declaration status - if (ResultStatusType.S.equals(result.getResultStatus())) { - List requestIds = new ArrayList(); - requestIds.add(declareRequest.getDeclarationRequestId()); - AlipayCustomsQueryResponse customsQueryResponse = queryCustomsDeclare( - buildAlipayCustomsQueryRequest(requestIds)); - if (customsQueryResponse != null) { - Result statusResult = customsQueryResponse.getResult(); - if (ResultStatusType.F.equals(statusResult.getResultStatus())) { - //TODO query declare info fail - return; - } - } - } + private static final Integer TIMEOUT_RETRY_COUNT = 3; + private static final Integer QUERY_DECLARE_RETRY_COUNT = 3; + private static final Integer DECLARE_RETRY_COUNT = 3; + // TODO build your clientId + private static final String GATE_WAY_URL = ""; + private static final String MERCHANT_PRIVATE_KEY = ""; + private static final String ANTOM_PUBLIC_KEY = ""; + private static final String CLIENT_ID = ""; + private static final AlipayClient CLIENT = + new DefaultAlipayClient( + EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); + + public static void main(String[] args) { + // step.1 finish a payment. Because transmit information to customs need a paymentId; + // TODO build your paymentId + final String paymentId = ""; + + // step.2 declare + AlipayCustomsDeclareRequest declareRequest = buildAlipayCustomsDeclareRequest(paymentId); + AlipayCustomsDeclareResponse response = declare(declareRequest); + if (response != null) { + Result result = response.getResult(); + if (ResultStatusType.F.equals(result.getResultStatus())) { + // TODO declare fail + return; + } + // step.3 query customs declaration status + if (ResultStatusType.S.equals(result.getResultStatus())) { + List requestIds = new ArrayList(); + requestIds.add(declareRequest.getDeclarationRequestId()); + AlipayCustomsQueryResponse customsQueryResponse = + queryCustomsDeclare(buildAlipayCustomsQueryRequest(requestIds)); + if (customsQueryResponse != null) { + Result statusResult = customsQueryResponse.getResult(); + if (ResultStatusType.F.equals(statusResult.getResultStatus())) { + // TODO query declare info fail + return; + } } - - } - - public static AlipayCustomsDeclareRequest buildAlipayCustomsDeclareRequest(String paymentId) { - final AlipayCustomsDeclareRequest request = new AlipayCustomsDeclareRequest(); - - Certificate buyerCertificate = new Certificate(); - buyerCertificate.setCertificateNo("3412228959867522116"); - buyerCertificate.setCertificateType(CertificateType.ID_CARD); - - UserName userName = new UserName(); - userName.setFullName("李小二"); - userName.setFirstName("李"); - userName.setMiddleName("小"); - userName.setLastName("二"); - buyerCertificate.setHolderName(userName); - - request.setBuyerCertificate(buyerCertificate); - CustomsInfo customsInfo = new CustomsInfo(); - customsInfo.setRegion("CN"); - customsInfo.setCustomsCode("zongshu"); - request.setCustoms(customsInfo); - - //TODO build your amount depend on your finished payment - Amount declarationAmount = new Amount(); - declarationAmount.setCurrency("CNY"); - declarationAmount.setValue("1"); - request.setDeclarationAmount(declarationAmount); - - request.setPaymentId(paymentId); - MerchantCustomsInfo merchantCustomsInfo = new MerchantCustomsInfo(); - merchantCustomsInfo.setMerchantCustomsName("guangzhou_zongshu"); - merchantCustomsInfo.setMerchantCustomsCode("jwyhanguo_card11"); - request.setMerchantCustomsInfo(merchantCustomsInfo); - - request.setSplitOrder(false); - request.setSubOrderId("11111111"); - //TODO build your requestId - request.setDeclarationRequestId("1234567890"); - return request; + } } - - public static AlipayCustomsDeclareResponse declare(final AlipayCustomsDeclareRequest request) { - Object obj = RetryExecutor.execute(DECLARE_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + } + + public static AlipayCustomsDeclareRequest buildAlipayCustomsDeclareRequest(String paymentId) { + final AlipayCustomsDeclareRequest request = new AlipayCustomsDeclareRequest(); + + Certificate buyerCertificate = new Certificate(); + buyerCertificate.setCertificateNo("3412228959867522116"); + buyerCertificate.setCertificateType(CertificateType.ID_CARD); + + UserName userName = new UserName(); + userName.setFullName("李小二"); + userName.setFirstName("李"); + userName.setMiddleName("小"); + userName.setLastName("二"); + buyerCertificate.setHolderName(userName); + + request.setBuyerCertificate(buyerCertificate); + CustomsInfo customsInfo = new CustomsInfo(); + customsInfo.setRegion("CN"); + customsInfo.setCustomsCode("zongshu"); + request.setCustoms(customsInfo); + + // TODO build your amount depend on your finished payment + Amount declarationAmount = new Amount(); + declarationAmount.setCurrency("CNY"); + declarationAmount.setValue("1"); + request.setDeclarationAmount(declarationAmount); + + request.setPaymentId(paymentId); + MerchantCustomsInfo merchantCustomsInfo = new MerchantCustomsInfo(); + merchantCustomsInfo.setMerchantCustomsName("guangzhou_zongshu"); + merchantCustomsInfo.setMerchantCustomsCode("jwyhanguo_card11"); + request.setMerchantCustomsInfo(merchantCustomsInfo); + + request.setSplitOrder(false); + request.setSubOrderId("11111111"); + // TODO build your requestId + request.setDeclarationRequestId("1234567890"); + return request; + } + + public static AlipayCustomsDeclareResponse declare(final AlipayCustomsDeclareRequest request) { + Object obj = + RetryExecutor.execute( + DECLARE_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayCustomsDeclareResponse response = null; try { - response = CLIENT.execute(request); + response = CLIENT.execute(request); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, response); - } - }); - return obj != null ? (AlipayCustomsDeclareResponse) obj : null; - } - - public static AlipayCustomsQueryRequest buildAlipayCustomsQueryRequest(List requestIds) { - final AlipayCustomsQueryRequest request = new AlipayCustomsQueryRequest(); - request.setDeclarationRequestIds(requestIds); - return request; - } - - public static AlipayCustomsQueryResponse queryCustomsDeclare(final AlipayCustomsQueryRequest request) { - Object obj = RetryExecutor.execute(QUERY_DECLARE_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + } + }); + return obj != null ? (AlipayCustomsDeclareResponse) obj : null; + } + + public static AlipayCustomsQueryRequest buildAlipayCustomsQueryRequest(List requestIds) { + final AlipayCustomsQueryRequest request = new AlipayCustomsQueryRequest(); + request.setDeclarationRequestIds(requestIds); + return request; + } + + public static AlipayCustomsQueryResponse queryCustomsDeclare( + final AlipayCustomsQueryRequest request) { + Object obj = + RetryExecutor.execute( + QUERY_DECLARE_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayCustomsQueryResponse response = null; try { - response = CLIENT.execute(request); + response = CLIENT.execute(request); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, response); - } - }); - return obj != null ? (AlipayCustomsQueryResponse) obj : null; - } - + } + }); + return obj != null ? (AlipayCustomsQueryResponse) obj : null; + } } diff --git a/src/main/java/com/alipay/global/api/example/legacy/PayNotifyListener.java b/src/main/java/com/alipay/global/api/example/legacy/PayNotifyListener.java index 2fb6766..76be702 100644 --- a/src/main/java/com/alipay/global/api/example/legacy/PayNotifyListener.java +++ b/src/main/java/com/alipay/global/api/example/legacy/PayNotifyListener.java @@ -4,56 +4,54 @@ import com.alipay.global.api.example.model.*; import com.alipay.global.api.model.Result; import com.alipay.global.api.model.ResultStatusType; - import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; public class PayNotifyListener { - public void acceptNotify(HttpRequest request, HttpResponse response) { - - InputStream inputStream = request.getInputStream(); - String reqBody = read(inputStream); - - PayNotifyRequest payNotifyRequest = JSON.parseObject(reqBody, PayNotifyRequest.class); - - if (!PaymentNotifyType.PAYMENT_RESULT.equals(payNotifyRequest.getNotifyType())) { - return; - } - Result resultInfo = payNotifyRequest.getResultInfo(); - String paymentRequestId = payNotifyRequest.getPaymentRequestId(); - ResultStatusType resultStatus = resultInfo.getResultStatus(); - - boolean isAcceptSuccess = false; - if (ResultStatusType.S.equals(resultStatus)) { - // TODO Update the record status to success by paymentRequestId - isAcceptSuccess = true; - } else if (ResultStatusType.F.equals(resultStatus)) { - // TODO Update the record status to fail by paymentRequestId - isAcceptSuccess = true; - } else { - // TODO Notify exception, contact tech support - return; - } - - Result result = new Result("SUCCESS", ResultStatusType.S, "success"); - if (!isAcceptSuccess) { - result = new Result("PROCESS_FAIL", ResultStatusType.F, "failure"); - } - try { - PayNotifyResponse payNotifyResponse = new PayNotifyResponse(); - payNotifyResponse.setResult(result); - response.getOutputStream() - .write(JSON.toJSONString(payNotifyResponse).getBytes(Charset.forName("UTF-8"))); - } catch (IOException e) { - } + public void acceptNotify(HttpRequest request, HttpResponse response) { - } + InputStream inputStream = request.getInputStream(); + String reqBody = read(inputStream); - public String read(InputStream inputStream) { + PayNotifyRequest payNotifyRequest = JSON.parseObject(reqBody, PayNotifyRequest.class); - return null; + if (!PaymentNotifyType.PAYMENT_RESULT.equals(payNotifyRequest.getNotifyType())) { + return; } + Result resultInfo = payNotifyRequest.getResultInfo(); + String paymentRequestId = payNotifyRequest.getPaymentRequestId(); + ResultStatusType resultStatus = resultInfo.getResultStatus(); + + boolean isAcceptSuccess = false; + if (ResultStatusType.S.equals(resultStatus)) { + // TODO Update the record status to success by paymentRequestId + isAcceptSuccess = true; + } else if (ResultStatusType.F.equals(resultStatus)) { + // TODO Update the record status to fail by paymentRequestId + isAcceptSuccess = true; + } else { + // TODO Notify exception, contact tech support + return; + } + + Result result = new Result("SUCCESS", ResultStatusType.S, "success"); + if (!isAcceptSuccess) { + result = new Result("PROCESS_FAIL", ResultStatusType.F, "failure"); + } + try { + PayNotifyResponse payNotifyResponse = new PayNotifyResponse(); + payNotifyResponse.setResult(result); + response + .getOutputStream() + .write(JSON.toJSONString(payNotifyResponse).getBytes(Charset.forName("UTF-8"))); + } catch (IOException e) { + } + } + + public String read(InputStream inputStream) { -} \ No newline at end of file + return null; + } +} diff --git a/src/main/java/com/alipay/global/api/example/legacy/RegistrationDemoCode.java b/src/main/java/com/alipay/global/api/example/legacy/RegistrationDemoCode.java index 5f347f8..26ef64e 100644 --- a/src/main/java/com/alipay/global/api/example/legacy/RegistrationDemoCode.java +++ b/src/main/java/com/alipay/global/api/example/legacy/RegistrationDemoCode.java @@ -16,209 +16,223 @@ import com.alipay.global.api.response.ams.merchant.AlipayMerchantRegistrationInfoQueryResponse; import com.alipay.global.api.response.ams.merchant.AlipayMerchantRegistrationResponse; import com.alipay.global.api.response.ams.merchant.AlipayMerchantRegistrationStatusQueryResponse; - import java.util.ArrayList; import java.util.Collections; import java.util.List; public class RegistrationDemoCode { - private static final Integer TIMEOUT_RETRY_COUNT = 3; - private static final Integer REGISTER_RETRY_COUNT = 3; - private static final String GATE_WAY_URL = ""; - private static final String MERCHANT_PRIVATE_KEY = ""; - private static final String ANTOM_PUBLIC_KEY = ""; - private static final String CLIENT_ID = ""; - private static final String PAYMENT_REQUEST_ID = ""; - private static final String registrationRequestId = ""; - private static final String referenceMerchantId = ""; - private final static AlipayClient CLIENT = new DefaultAlipayClient( - EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); - - public static void main(String[] args) { - //step1 register merchant info - AlipayMerchantRegistrationResponse response = registerMerchant(buildRegisterRequest()); - if (response != null) { - Result result = response.getResult(); - if (ResultStatusType.F.equals(result.getResultStatus())) { - //TODO register fail - return; - } - //step2. query registration status. - if (ResultStatusType.S.equals(result.getResultStatus())) { - AlipayMerchantRegistrationStatusQueryResponse statusResponse = queryRegistrationStatus( - buildAlipayMerchantRegistrationStatusQueryRequest()); - if (statusResponse != null) { - Result statusResult = statusResponse.getResult(); - if (ResultStatusType.F.equals(statusResult.getResultStatus())) { - //TODO query register status fail - return; - } - } - //step3. query registration info. - AlipayMerchantRegistrationInfoQueryResponse infoResponse = queryRegistrationInfo( - buildAlipayMerchantRegistrationInfoQueryRequest()); - if (infoResponse != null) { - Result infoResult = infoResponse.getResult(); - if (ResultStatusType.F.equals(infoResult.getResultStatus())) { - //TODO query register info fail - return; - } - } - } - + private static final Integer TIMEOUT_RETRY_COUNT = 3; + private static final Integer REGISTER_RETRY_COUNT = 3; + private static final String GATE_WAY_URL = ""; + private static final String MERCHANT_PRIVATE_KEY = ""; + private static final String ANTOM_PUBLIC_KEY = ""; + private static final String CLIENT_ID = ""; + private static final String PAYMENT_REQUEST_ID = ""; + private static final String registrationRequestId = ""; + private static final String referenceMerchantId = ""; + private static final AlipayClient CLIENT = + new DefaultAlipayClient( + EndPointConstants.SG, MERCHANT_PRIVATE_KEY, ANTOM_PUBLIC_KEY, CLIENT_ID); + + public static void main(String[] args) { + // step1 register merchant info + AlipayMerchantRegistrationResponse response = registerMerchant(buildRegisterRequest()); + if (response != null) { + Result result = response.getResult(); + if (ResultStatusType.F.equals(result.getResultStatus())) { + // TODO register fail + return; + } + // step2. query registration status. + if (ResultStatusType.S.equals(result.getResultStatus())) { + AlipayMerchantRegistrationStatusQueryResponse statusResponse = + queryRegistrationStatus(buildAlipayMerchantRegistrationStatusQueryRequest()); + if (statusResponse != null) { + Result statusResult = statusResponse.getResult(); + if (ResultStatusType.F.equals(statusResult.getResultStatus())) { + // TODO query register status fail + return; + } } - - } - - public static AlipayMerchantRegistrationRequest buildRegisterRequest() { - final AlipayMerchantRegistrationRequest request = new AlipayMerchantRegistrationRequest(); - - //TODO build your merchant info request - request.setRegistrationRequestId(registrationRequestId); - - request.setProductCodes(Collections.singletonList(ProductCodeType.CASHIER_PAYMENT)); - request.setPassThroughInfo("{\"extraInfo\":\"extra\"}"); - request.setRegistrationNotifyURL("https://merchant/example"); - - MerchantRegistrationInfo merchant = new MerchantRegistrationInfo(); - Logo logo = new Logo(); - logo.setLogoName("expLogo"); - logo.setLogoUrl("http://www.logo.com"); - merchant.setLogo(logo); - - Address address = new Address(); - address.setAddress1("38 Leighton Road, ****"); - address.setAddress2("40 Leighton Road, ****"); - address.setCity("hong kong"); - address.setRegion("HK"); - address.setState("HK"); - address.setZipCode("zipCode"); - address.setLabel("label"); - merchant.setMerchantAddress(address); - - merchant.setMerchantDisplayName("Example Merchant Name"); - merchant.setMerchantMCC("5812"); - - RegistrationDetail detail = new RegistrationDetail(); - detail.setLegalName("Example Legal Name"); - detail.setRegistrationNo("registration*****"); - detail.setRegistrationType("ENTERPRISE_REGISTRATION_NO"); - List attachments = new ArrayList(); - Attachment attachment = new Attachment(); - attachment.setAttachmentName("attachmentTestName"); - attachment.setAttachmentType("ARTICLES_OF_ASSOCIATION"); - attachment.setFile("testFile"); - attachments.add(attachment); - detail.setAttachments(attachments); - - List contactInfos = new ArrayList(); - ContactInfo contactInfo = new ContactInfo(); - contactInfo.setContactNo("contactNo123"); - contactInfo.setContactType("MOBILE_PHONE"); - contactInfos.add(contactInfo); - detail.setContactInfo(contactInfos); - - Address registrationAddress = new Address(); - registrationAddress.setRegion("HK"); - detail.setRegistrationAddress(registrationAddress); - detail.setBusinessType("ENTERPRISE"); - merchant.setRegistrationDetail(detail); - - List webSites = new ArrayList(); - WebSite webSite = new WebSite(); - webSite.setUrl("http://www.webSite.com"); - webSite.setDesc("this is webSite desc"); - webSite.setName("webName"); - webSites.add(webSite); - merchant.setWebsites(webSites); - - merchant.setReferenceMerchantId(referenceMerchantId); - request.setMerchantInfo(merchant); - - return request; - } - - public static AlipayMerchantRegistrationInfoQueryRequest buildAlipayMerchantRegistrationInfoQueryRequest() { - final AlipayMerchantRegistrationInfoQueryRequest request = new AlipayMerchantRegistrationInfoQueryRequest(); - request.setReferenceMerchantId(referenceMerchantId); - return request; + // step3. query registration info. + AlipayMerchantRegistrationInfoQueryResponse infoResponse = + queryRegistrationInfo(buildAlipayMerchantRegistrationInfoQueryRequest()); + if (infoResponse != null) { + Result infoResult = infoResponse.getResult(); + if (ResultStatusType.F.equals(infoResult.getResultStatus())) { + // TODO query register info fail + return; + } + } + } } - - public static AlipayMerchantRegistrationInfoQueryResponse queryRegistrationInfo(final AlipayMerchantRegistrationInfoQueryRequest request) { - Object obj = RetryExecutor.execute(REGISTER_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + } + + public static AlipayMerchantRegistrationRequest buildRegisterRequest() { + final AlipayMerchantRegistrationRequest request = new AlipayMerchantRegistrationRequest(); + + // TODO build your merchant info request + request.setRegistrationRequestId(registrationRequestId); + + request.setProductCodes(Collections.singletonList(ProductCodeType.CASHIER_PAYMENT)); + request.setPassThroughInfo("{\"extraInfo\":\"extra\"}"); + request.setRegistrationNotifyURL("https://merchant/example"); + + MerchantRegistrationInfo merchant = new MerchantRegistrationInfo(); + Logo logo = new Logo(); + logo.setLogoName("expLogo"); + logo.setLogoUrl("http://www.logo.com"); + merchant.setLogo(logo); + + Address address = new Address(); + address.setAddress1("38 Leighton Road, ****"); + address.setAddress2("40 Leighton Road, ****"); + address.setCity("hong kong"); + address.setRegion("HK"); + address.setState("HK"); + address.setZipCode("zipCode"); + address.setLabel("label"); + merchant.setMerchantAddress(address); + + merchant.setMerchantDisplayName("Example Merchant Name"); + merchant.setMerchantMCC("5812"); + + RegistrationDetail detail = new RegistrationDetail(); + detail.setLegalName("Example Legal Name"); + detail.setRegistrationNo("registration*****"); + detail.setRegistrationType("ENTERPRISE_REGISTRATION_NO"); + List attachments = new ArrayList(); + Attachment attachment = new Attachment(); + attachment.setAttachmentName("attachmentTestName"); + attachment.setAttachmentType("ARTICLES_OF_ASSOCIATION"); + attachment.setFile("testFile"); + attachments.add(attachment); + detail.setAttachments(attachments); + + List contactInfos = new ArrayList(); + ContactInfo contactInfo = new ContactInfo(); + contactInfo.setContactNo("contactNo123"); + contactInfo.setContactType("MOBILE_PHONE"); + contactInfos.add(contactInfo); + detail.setContactInfo(contactInfos); + + Address registrationAddress = new Address(); + registrationAddress.setRegion("HK"); + detail.setRegistrationAddress(registrationAddress); + detail.setBusinessType("ENTERPRISE"); + merchant.setRegistrationDetail(detail); + + List webSites = new ArrayList(); + WebSite webSite = new WebSite(); + webSite.setUrl("http://www.webSite.com"); + webSite.setDesc("this is webSite desc"); + webSite.setName("webName"); + webSites.add(webSite); + merchant.setWebsites(webSites); + + merchant.setReferenceMerchantId(referenceMerchantId); + request.setMerchantInfo(merchant); + + return request; + } + + public static AlipayMerchantRegistrationInfoQueryRequest + buildAlipayMerchantRegistrationInfoQueryRequest() { + final AlipayMerchantRegistrationInfoQueryRequest request = + new AlipayMerchantRegistrationInfoQueryRequest(); + request.setReferenceMerchantId(referenceMerchantId); + return request; + } + + public static AlipayMerchantRegistrationInfoQueryResponse queryRegistrationInfo( + final AlipayMerchantRegistrationInfoQueryRequest request) { + Object obj = + RetryExecutor.execute( + REGISTER_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayMerchantRegistrationInfoQueryResponse response = null; try { - response = CLIENT.execute(request); + response = CLIENT.execute(request); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, response); - } - }); - return obj != null ? (AlipayMerchantRegistrationInfoQueryResponse) obj : null; - } - - public static AlipayMerchantRegistrationStatusQueryRequest buildAlipayMerchantRegistrationStatusQueryRequest() { - final AlipayMerchantRegistrationStatusQueryRequest request = new AlipayMerchantRegistrationStatusQueryRequest(); - request.setReferenceMerchantId(referenceMerchantId); - //request.setRegistrationRequestId(registrationRequestId); - return request; - } - - public static AlipayMerchantRegistrationStatusQueryResponse queryRegistrationStatus(final AlipayMerchantRegistrationStatusQueryRequest request) { - Object obj = RetryExecutor.execute(REGISTER_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + } + }); + return obj != null ? (AlipayMerchantRegistrationInfoQueryResponse) obj : null; + } + + public static AlipayMerchantRegistrationStatusQueryRequest + buildAlipayMerchantRegistrationStatusQueryRequest() { + final AlipayMerchantRegistrationStatusQueryRequest request = + new AlipayMerchantRegistrationStatusQueryRequest(); + request.setReferenceMerchantId(referenceMerchantId); + // request.setRegistrationRequestId(registrationRequestId); + return request; + } + + public static AlipayMerchantRegistrationStatusQueryResponse queryRegistrationStatus( + final AlipayMerchantRegistrationStatusQueryRequest request) { + Object obj = + RetryExecutor.execute( + REGISTER_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayMerchantRegistrationStatusQueryResponse response = null; try { - response = CLIENT.execute(request); + response = CLIENT.execute(request); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, response); - } - }); - return obj != null ? (AlipayMerchantRegistrationStatusQueryResponse) obj : null; - } - - public static AlipayMerchantRegistrationResponse registerMerchant(final AlipayMerchantRegistrationRequest request) { - - Object obj = RetryExecutor.execute(REGISTER_RETRY_COUNT, new Callback() { - @Override - public RetryResult doProcess() { + } + }); + return obj != null ? (AlipayMerchantRegistrationStatusQueryResponse) obj : null; + } + + public static AlipayMerchantRegistrationResponse registerMerchant( + final AlipayMerchantRegistrationRequest request) { + + Object obj = + RetryExecutor.execute( + REGISTER_RETRY_COUNT, + new Callback() { + @Override + public RetryResult doProcess() { AlipayMerchantRegistrationResponse response = null; try { - response = CLIENT.execute(request); + response = CLIENT.execute(request); } catch (AlipayApiException e) { - String errorMsg = e.getMessage(); - if (errorMsg.indexOf("SocketTimeoutException") > 0) { - // TODO timeout retry and log - return RetryResult.ofResult(true); - } else { - // TODO Handle AlipayApiException and log - return RetryResult.ofResult(false); - } + String errorMsg = e.getMessage(); + if (errorMsg.indexOf("SocketTimeoutException") > 0) { + // TODO timeout retry and log + return RetryResult.ofResult(true); + } else { + // TODO Handle AlipayApiException and log + return RetryResult.ofResult(false); + } } return RetryResult.ofResult(false, response); - } - }); - return obj != null ? (AlipayMerchantRegistrationResponse) obj : null; - } + } + }); + return obj != null ? (AlipayMerchantRegistrationResponse) obj : null; + } } diff --git a/src/main/java/com/alipay/global/api/example/legacy/RetryExecutor.java b/src/main/java/com/alipay/global/api/example/legacy/RetryExecutor.java index 5b2f3af..1da3b48 100644 --- a/src/main/java/com/alipay/global/api/example/legacy/RetryExecutor.java +++ b/src/main/java/com/alipay/global/api/example/legacy/RetryExecutor.java @@ -4,16 +4,15 @@ public class RetryExecutor { - public static Object execute(int retryCount, Callback callback) { - // TODO To simulate the retry - // for(int curPayRetryCount = 0; curPayRetryCount < retryCount; curPayRetryCount++){ - // RetryResult retryResult = callback.doProcess(); - // if(retryResult.isRetry()){ - // continue; - // } - // return retryResult.getObj(); - // } - return null; - } - + public static Object execute(int retryCount, Callback callback) { + // TODO To simulate the retry + // for(int curPayRetryCount = 0; curPayRetryCount < retryCount; curPayRetryCount++){ + // RetryResult retryResult = callback.doProcess(); + // if(retryResult.isRetry()){ + // continue; + // } + // return retryResult.getObj(); + // } + return null; + } } diff --git a/src/main/java/com/alipay/global/api/example/model/Callback.java b/src/main/java/com/alipay/global/api/example/model/Callback.java index b9fc9d6..afb3aae 100644 --- a/src/main/java/com/alipay/global/api/example/model/Callback.java +++ b/src/main/java/com/alipay/global/api/example/model/Callback.java @@ -1,5 +1,5 @@ package com.alipay.global.api.example.model; public abstract class Callback { - public abstract RetryResult doProcess(); + public abstract RetryResult doProcess(); } diff --git a/src/main/java/com/alipay/global/api/example/model/HttpRequest.java b/src/main/java/com/alipay/global/api/example/model/HttpRequest.java index 63908fd..437e069 100644 --- a/src/main/java/com/alipay/global/api/example/model/HttpRequest.java +++ b/src/main/java/com/alipay/global/api/example/model/HttpRequest.java @@ -4,8 +4,7 @@ public interface HttpRequest { - String getHeader(String name); - - InputStream getInputStream(); + String getHeader(String name); + InputStream getInputStream(); } diff --git a/src/main/java/com/alipay/global/api/example/model/HttpResponse.java b/src/main/java/com/alipay/global/api/example/model/HttpResponse.java index 8bc2527..fbc1a5f 100644 --- a/src/main/java/com/alipay/global/api/example/model/HttpResponse.java +++ b/src/main/java/com/alipay/global/api/example/model/HttpResponse.java @@ -4,6 +4,5 @@ public interface HttpResponse { - OutputStream getOutputStream(); - + OutputStream getOutputStream(); } diff --git a/src/main/java/com/alipay/global/api/example/model/PayNotifyRequest.java b/src/main/java/com/alipay/global/api/example/model/PayNotifyRequest.java index a765fcf..01246cf 100644 --- a/src/main/java/com/alipay/global/api/example/model/PayNotifyRequest.java +++ b/src/main/java/com/alipay/global/api/example/model/PayNotifyRequest.java @@ -4,33 +4,32 @@ public class PayNotifyRequest { - private PaymentNotifyType notifyType; - private Result resultInfo; - private String paymentRequestId; - // TODO other field - - public PaymentNotifyType getNotifyType() { - return notifyType; - } - - public void setNotifyType(PaymentNotifyType notifyType) { - this.notifyType = notifyType; - } - - public Result getResultInfo() { - return resultInfo; - } - - public void setResultInfo(Result resultInfo) { - this.resultInfo = resultInfo; - } - - public String getPaymentRequestId() { - return paymentRequestId; - } - - public void setPaymentRequestId(String paymentRequestId) { - this.paymentRequestId = paymentRequestId; - } - + private PaymentNotifyType notifyType; + private Result resultInfo; + private String paymentRequestId; + // TODO other field + + public PaymentNotifyType getNotifyType() { + return notifyType; + } + + public void setNotifyType(PaymentNotifyType notifyType) { + this.notifyType = notifyType; + } + + public Result getResultInfo() { + return resultInfo; + } + + public void setResultInfo(Result resultInfo) { + this.resultInfo = resultInfo; + } + + public String getPaymentRequestId() { + return paymentRequestId; + } + + public void setPaymentRequestId(String paymentRequestId) { + this.paymentRequestId = paymentRequestId; + } } diff --git a/src/main/java/com/alipay/global/api/example/model/PayNotifyResponse.java b/src/main/java/com/alipay/global/api/example/model/PayNotifyResponse.java index f6d6b25..277bf7b 100644 --- a/src/main/java/com/alipay/global/api/example/model/PayNotifyResponse.java +++ b/src/main/java/com/alipay/global/api/example/model/PayNotifyResponse.java @@ -4,14 +4,13 @@ public class PayNotifyResponse { - private Result result; + private Result result; - public Result getResult() { - return result; - } - - public void setResult(Result result) { - this.result = result; - } + public Result getResult() { + return result; + } + public void setResult(Result result) { + this.result = result; + } } diff --git a/src/main/java/com/alipay/global/api/example/model/PaymentNotifyType.java b/src/main/java/com/alipay/global/api/example/model/PaymentNotifyType.java index d36162b..1ff41c5 100644 --- a/src/main/java/com/alipay/global/api/example/model/PaymentNotifyType.java +++ b/src/main/java/com/alipay/global/api/example/model/PaymentNotifyType.java @@ -1,5 +1,6 @@ package com.alipay.global.api.example.model; public enum PaymentNotifyType { - PAYMENT_RESULT, PAYMENT_PENDING; + PAYMENT_RESULT, + PAYMENT_PENDING; } diff --git a/src/main/java/com/alipay/global/api/example/model/ResultCode.java b/src/main/java/com/alipay/global/api/example/model/ResultCode.java index 5ed143b..7fddd43 100644 --- a/src/main/java/com/alipay/global/api/example/model/ResultCode.java +++ b/src/main/java/com/alipay/global/api/example/model/ResultCode.java @@ -1,7 +1,5 @@ package com.alipay.global.api.example.model; public enum ResultCode { - - PAYMENT_IN_PROCESS; - -} \ No newline at end of file + PAYMENT_IN_PROCESS; +} diff --git a/src/main/java/com/alipay/global/api/example/model/RetryResult.java b/src/main/java/com/alipay/global/api/example/model/RetryResult.java index 6b04b01..2548628 100644 --- a/src/main/java/com/alipay/global/api/example/model/RetryResult.java +++ b/src/main/java/com/alipay/global/api/example/model/RetryResult.java @@ -2,28 +2,27 @@ public class RetryResult { - private Boolean isRetry; - private Object obj; + private Boolean isRetry; + private Object obj; - private RetryResult(Boolean isRetry, Object obj) { - this.isRetry = isRetry; - this.obj = obj; - } + private RetryResult(Boolean isRetry, Object obj) { + this.isRetry = isRetry; + this.obj = obj; + } - public static RetryResult ofResult(Boolean isRetry, Object obj) { - return new RetryResult(isRetry, obj); - } + public static RetryResult ofResult(Boolean isRetry, Object obj) { + return new RetryResult(isRetry, obj); + } - public static RetryResult ofResult(Boolean isRetry) { - return new RetryResult(isRetry, null); - } + public static RetryResult ofResult(Boolean isRetry) { + return new RetryResult(isRetry, null); + } - public Boolean isRetry() { - return isRetry; - } - - public Object getObj() { - return obj; - } + public Boolean isRetry() { + return isRetry; + } + public Object getObj() { + return obj; + } } diff --git a/src/main/java/com/alipay/global/api/exception/AlipayApiException.java b/src/main/java/com/alipay/global/api/exception/AlipayApiException.java index 9304047..42681fb 100644 --- a/src/main/java/com/alipay/global/api/exception/AlipayApiException.java +++ b/src/main/java/com/alipay/global/api/exception/AlipayApiException.java @@ -2,39 +2,38 @@ public class AlipayApiException extends Exception { - private static final long serialVersionUID = 6341441272448887609L; + private static final long serialVersionUID = 6341441272448887609L; - private String errCode; - private String errMsg; + private String errCode; + private String errMsg; - public AlipayApiException() { - super(); - } + public AlipayApiException() { + super(); + } - public AlipayApiException(String message, Throwable cause) { - super(message, cause); - } + public AlipayApiException(String message, Throwable cause) { + super(message, cause); + } - public AlipayApiException(String message) { - super(message); - } + public AlipayApiException(String message) { + super(message); + } - public AlipayApiException(Throwable cause) { - super(cause); - } + public AlipayApiException(Throwable cause) { + super(cause); + } - public AlipayApiException(String errCode, String errMsg) { - super(errCode + ":" + errMsg); - this.errCode = errCode; - this.errMsg = errMsg; - } + public AlipayApiException(String errCode, String errMsg) { + super(errCode + ":" + errMsg); + this.errCode = errCode; + this.errMsg = errMsg; + } - public String getErrCode() { - return this.errCode; - } - - public String getErrMsg() { - return this.errMsg; - } + public String getErrCode() { + return this.errCode; + } + public String getErrMsg() { + return this.errMsg; + } } diff --git a/src/main/java/com/alipay/global/api/model/Result.java b/src/main/java/com/alipay/global/api/model/Result.java index bc19c90..dd2b737 100644 --- a/src/main/java/com/alipay/global/api/model/Result.java +++ b/src/main/java/com/alipay/global/api/model/Result.java @@ -11,8 +11,7 @@ @AllArgsConstructor public class Result { - private String resultCode; - private ResultStatusType resultStatus; - private String resultMessage; - + private String resultCode; + private ResultStatusType resultStatus; + private String resultMessage; } diff --git a/src/main/java/com/alipay/global/api/model/ResultStatusType.java b/src/main/java/com/alipay/global/api/model/ResultStatusType.java index 5250413..66ba3f2 100644 --- a/src/main/java/com/alipay/global/api/model/ResultStatusType.java +++ b/src/main/java/com/alipay/global/api/model/ResultStatusType.java @@ -1,7 +1,7 @@ package com.alipay.global.api.model; public enum ResultStatusType { - - S, F, U; - + S, + F, + U; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AbstractOpenApiSchema.java b/src/main/java/com/alipay/global/api/model/ams/AbstractOpenApiSchema.java new file mode 100644 index 0000000..e69de29 diff --git a/src/main/java/com/alipay/global/api/model/ams/AccountBalance.java b/src/main/java/com/alipay/global/api/model/ams/AccountBalance.java index a5fb27f..8147b34 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AccountBalance.java +++ b/src/main/java/com/alipay/global/api/model/ams/AccountBalance.java @@ -1,18 +1,39 @@ +/* + * marketplace_inquireBalance + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** AccountBalance */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class AccountBalance { - private String accountNo; - private String currency; - private Amount availableBalance; - private Amount frozenBalance; - private Amount totalBalance; + + /** The balance account number. More information: Maximum length: 32 characters */ + private String accountNo; + + /** + * The currency associated with the balance account. The value of this parameter is a 3-letter + * currency code that follows the ISO 4217 standard. More information: Maximum length: 3 + * characters + */ + private String currency; + + private Amount availableBalance; + + private Amount frozenBalance; + + private Amount totalBalance; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AccountHolderType.java b/src/main/java/com/alipay/global/api/model/ams/AccountHolderType.java index 206eeb4..caadaef 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AccountHolderType.java +++ b/src/main/java/com/alipay/global/api/model/ams/AccountHolderType.java @@ -1,6 +1,50 @@ +/* + * marketplace_update + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets AccountHolderType */ public enum AccountHolderType { - INDIVIDUAL, - ENTERPRISE + INDIVIDUAL("INDIVIDUAL"), + + ENTERPRISE("ENTERPRISE"); + + private String value; + + AccountHolderType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AccountHolderType fromValue(String value) { + for (AccountHolderType b : AccountHolderType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/AccountType.java b/src/main/java/com/alipay/global/api/model/ams/AccountType.java index bfcab66..6b8b8da 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AccountType.java +++ b/src/main/java/com/alipay/global/api/model/ams/AccountType.java @@ -1,6 +1,50 @@ +/* + * marketplace_update + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets AccountType */ public enum AccountType { - CHECKING, - FIXED_DEPOSIT, + CHECKING("CHECKING"), + + FIXED_DEPOSIT("FIXED_DEPOSIT"); + + private String value; + + AccountType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AccountType fromValue(String value) { + for (AccountType b : AccountType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/AcquirerInfo.java b/src/main/java/com/alipay/global/api/model/ams/AcquirerInfo.java index 1efb770..33cad7d 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AcquirerInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/AcquirerInfo.java @@ -1,30 +1,61 @@ /* - * Ant Group - * Copyright (c) 2004-2023 All Rights Reserved. + * payments_refund + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** AcquirerInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class AcquirerInfo { - private String acquirerName; - - private String referenceRequestId; - - private String acquirerTransactionId; - - private String acquirerMerchantId; - - private String acquirerResultCode; - - private String acquirerResultMessage; - -} \ No newline at end of file + /** + * The name of the acquirer. Note: This parameter is returned if you integrate the APO product. + * More information: Maximum length: 64 characters + */ + private String acquirerName; + + /** + * The unique ID that is assigned by APO to identify a payment request sent to the acquirer. Note: + * This parameter is returned if you integrate the APO product. More information: Maximum length: + * 64 characters + */ + private String referenceRequestId; + + /** + * The unique ID that is assigned by the acquirer to identify a transaction. Note: This parameter + * is returned if you integrate the APO product. More information: Maximum length: 64 characters + */ + private String acquirerTransactionId; + + /** + * The unique ID that is assigned by the acquirer to identify a merchant. Note: This parameter is + * returned if you integrate the APO product. More information: Maximum length: 64 characters + */ + private String acquirerMerchantId; + + /** + * The acquirer's result code that indicates the transaction process result. Note: This + * parameter is returned if you integrate the APO product. More information: Maximum length: 64 + * characters + */ + private String acquirerResultCode; + + /** + * The result message that describes acquirerResultCode in detail. Note: This parameter is + * returned if you integrate the APO product. More information: Maximum length: 64 characters + */ + private String acquirerResultMessage; +} diff --git a/src/main/java/com/alipay/global/api/model/ams/Address.java b/src/main/java/com/alipay/global/api/model/ams/Address.java index dacbde5..99ec057 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Address.java +++ b/src/main/java/com/alipay/global/api/model/ams/Address.java @@ -1,22 +1,37 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Address */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Address { - private String region; - private String state; - private String city; - private String address1; - private String address2; - private String zipCode; - private String label; + private String region; + + private String state; + + private String city; + + private String address1; + + private String address2; + + private String zipCode; + private String label; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AdjustableQuantity.java b/src/main/java/com/alipay/global/api/model/ams/AdjustableQuantity.java index 5003485..67f4963 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AdjustableQuantity.java +++ b/src/main/java/com/alipay/global/api/model/ams/AdjustableQuantity.java @@ -5,15 +5,13 @@ import lombok.Data; import lombok.NoArgsConstructor; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class AdjustableQuantity { - private Integer maximum; - - private int minimum; + private Integer maximum; + private int minimum; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AgreementInfo.java b/src/main/java/com/alipay/global/api/model/ams/AgreementInfo.java index c5fd3a3..2058e86 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AgreementInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/AgreementInfo.java @@ -1,34 +1,35 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** AgreementInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class AgreementInfo { - /** - * The unique ID generated by the merchant to initiate an Easy Pay authorization - */ - private String authState; - - /** - * The login ID that the user used to register in the wallet - */ - private String userLoginId; + /** The unique ID generated by the merchant to initiate an Easy Pay authorization */ + private String authState; - /** - * The login Type - */ - private String userLoginType; + /** The login ID that the user used to register in the wallet */ + private String userLoginId; - /** - * The login ID that use to display - */ - private String displayUserLoginId; + /** The login Type */ + private String userLoginType; + /** The login ID that use to display */ + private String displayUserLoginId; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Amount.java b/src/main/java/com/alipay/global/api/model/ams/Amount.java index 9c3fd71..9d10bb9 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Amount.java +++ b/src/main/java/com/alipay/global/api/model/ams/Amount.java @@ -1,17 +1,27 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Amount */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Amount { - private String currency; - private String value; + private String currency; + private String value; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AmountLimit.java b/src/main/java/com/alipay/global/api/model/ams/AmountLimit.java index e563c79..c9a4871 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AmountLimit.java +++ b/src/main/java/com/alipay/global/api/model/ams/AmountLimit.java @@ -1,18 +1,29 @@ +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** AmountLimit */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class AmountLimit { - private Amount maxAmount; - private Amount minAmount; - private Amount remainAmount; + private String maxAmount; + + private String minAmount; + private String remainAmount; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AmountLimitInfo.java b/src/main/java/com/alipay/global/api/model/ams/AmountLimitInfo.java index 65eb3ae..eaeec25 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AmountLimitInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/AmountLimitInfo.java @@ -11,8 +11,7 @@ @AllArgsConstructor public class AmountLimitInfo { - private AmountLimit singleLimit; - private AmountLimit dayLimit; - private AmountLimit monthLimit; - + private AmountLimit singleLimit; + private AmountLimit dayLimit; + private AmountLimit monthLimit; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AncillaryData.java b/src/main/java/com/alipay/global/api/model/ams/AncillaryData.java index 32f4ddf..ee673b3 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AncillaryData.java +++ b/src/main/java/com/alipay/global/api/model/ams/AncillaryData.java @@ -1,17 +1,16 @@ package com.alipay.global.api.model.ams; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import java.util.List; - @AllArgsConstructor @NoArgsConstructor @Getter @Setter public class AncillaryData { - private List services; - private String connectedTicketNumber; + private List services; + private String connectedTicketNumber; } diff --git a/src/main/java/com/alipay/global/api/model/ams/ApplePayConfiguration.java b/src/main/java/com/alipay/global/api/model/ams/ApplePayConfiguration.java index 70172cc..015793d 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ApplePayConfiguration.java +++ b/src/main/java/com/alipay/global/api/model/ams/ApplePayConfiguration.java @@ -1,20 +1,18 @@ package com.alipay.global.api.model.ams; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import java.util.List; - @AllArgsConstructor @NoArgsConstructor @Getter @Setter public class ApplePayConfiguration { - private List requiredBillingContactFields; - private List requiredShippingContactFields; - private Boolean buttonsBundled; - private String applePayToken; - + private List requiredBillingContactFields; + private List requiredShippingContactFields; + private Boolean buttonsBundled; + private String applePayToken; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AssociationType.java b/src/main/java/com/alipay/global/api/model/ams/AssociationType.java index ea129cc..dfa4ab5 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AssociationType.java +++ b/src/main/java/com/alipay/global/api/model/ams/AssociationType.java @@ -1,11 +1,58 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets AssociationType */ public enum AssociationType { - LEGAL_REPRESENTATIVE, - UBO, - CONTACT, - DIRECTOR, - AUTHORIZER, - BOARD_MEMBER, - ; + LEGAL_REPRESENTATIVE("LEGAL_REPRESENTATIVE"), + + UBO("UBO"), + + CONTACT("CONTACT"), + + DIRECTOR("DIRECTOR"), + + AUTHORIZER("AUTHORIZER"), + + BOARD_MEMBER("BOARD_MEMBER"); + + private String value; + + AssociationType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssociationType fromValue(String value) { + for (AssociationType b : AssociationType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/Attachment.java b/src/main/java/com/alipay/global/api/model/ams/Attachment.java index f0c23cc..a043d88 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Attachment.java +++ b/src/main/java/com/alipay/global/api/model/ams/Attachment.java @@ -1,19 +1,48 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Attachment */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Attachment { - private String attachmentType; - private String file; - private String attachmentName; - private String fileKey; + /** + * The type of attachment. Valid values are: SIGNATURE_AUTHORIZATION_LETTER: indicates a document + * that allows someone to sign on behalf of an individual or a company. ARTICLES_OF_ASSOCIATION: + * indicates the regulations and rules of a company. LOGO: indicates the merchant's logo. + * Specify attachmentType as LOGO when the value of paymentMethodType is TRUEMONEY. More + * information: Maximum length: 64 characters + */ + private String attachmentType; + + private String file; + + /** + * The name of the attachment file, including the file extension, such as XXX.jpg or XXX.png. More + * information: Maximum length: 256 characters + */ + private String attachmentName; + /** + * The unique key value of the attachment file. Maximum file size: 32MB. The value of this + * parameter is obtained from the attachmentKey parameter in the submitAttachment API. Prior + * attachment submission using the submitAttachment API is required. More information: Maximum + * length: 256 characters + */ + private String fileKey; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AttachmentType.java b/src/main/java/com/alipay/global/api/model/ams/AttachmentType.java index da1d295..0d90a57 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AttachmentType.java +++ b/src/main/java/com/alipay/global/api/model/ams/AttachmentType.java @@ -1,24 +1,78 @@ +/* + * marketplace_submitAttachment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets AttachmentType */ public enum AttachmentType { + SIGNATURE_AUTHORIZATION_LETTER("SIGNATURE_AUTHORIZATION_LETTER"), + + ARTICLES_OF_ASSOCIATION("ARTICLES_OF_ASSOCIATION"), + + LOGO("LOGO"), + + AUTHORIZER_SIGNATURE_CONFIRMATION_LETTER("AUTHORIZER_SIGNATURE_CONFIRMATION_LETTER"), + + ASSOCIATION_ARTICLE("ASSOCIATION_ARTICLE"), + + FINANCIAL_REPORT("FINANCIAL_REPORT"), + + OWNERSHIP_STRUCTURE_PIC("OWNERSHIP_STRUCTURE_PIC"), + + ADDRESS_PROOF("ADDRESS_PROOF"), + + UBO_PROVE("UBO_PROVE"), + + ENTERPRISE_REGISTRATION("ENTERPRISE_REGISTRATION"), + + LICENSE_INFO("LICENSE_INFO"), + + ID_CARD("ID_CARD"), + + PASSPORT("PASSPORT"), + + DRIVING_LICENSE("DRIVING_LICENSE"), + + CPF("CPF"), + + CNPJ("CNPJ"); + + private String value; + + AttachmentType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } - SIGNATURE_AUTHORIZATION_LETTER, - ARTICLES_OF_ASSOCIATION, - LOGO, - - AUTHORIZER_SIGNATURE_CONFIRMATION_LETTER, - ASSOCIATION_ARTICLE, - FINANCIAL_REPORT, - OWNERSHIP_STRUCTURE_PIC, - ADDRESS_PROOF, - UBO_PROVE, - ENTERPRISE_REGISTRATION, - LICENSE_INFO, - ID_CARD, - PASSPORT, - DRIVING_LICENSE, - CPF, - CNPJ, - ; + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static AttachmentType fromValue(String value) { + for (AttachmentType b : AttachmentType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/AuthCodeForm.java b/src/main/java/com/alipay/global/api/model/ams/AuthCodeForm.java index 181ee6e..ebd8d86 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AuthCodeForm.java +++ b/src/main/java/com/alipay/global/api/model/ams/AuthCodeForm.java @@ -1,17 +1,27 @@ -package com.alipay.global.api.model.ams; +/* + * authorizations_consult + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** AuthCodeForm */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class AuthCodeForm { - private List codeDetails; + /** A list of QR code information. */ + private List codeDetails; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AuthMetaData.java b/src/main/java/com/alipay/global/api/model/ams/AuthMetaData.java index 34d543a..86c2421 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AuthMetaData.java +++ b/src/main/java/com/alipay/global/api/model/ams/AuthMetaData.java @@ -1,15 +1,27 @@ +/* + * authorizations_consult + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** AuthMetaData */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class AuthMetaData { - private String accountHolderName; - private String accountHolderCertNo; + + private String accountHolderName; + + private String accountHolderCertNo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AuthenticationChannelType.java b/src/main/java/com/alipay/global/api/model/ams/AuthenticationChannelType.java index ac2e60c..49bb8c3 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AuthenticationChannelType.java +++ b/src/main/java/com/alipay/global/api/model/ams/AuthenticationChannelType.java @@ -1,7 +1,6 @@ package com.alipay.global.api.model.ams; public enum AuthenticationChannelType { - - EMAIL, SMS; - + EMAIL, + SMS; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AuthenticationType.java b/src/main/java/com/alipay/global/api/model/ams/AuthenticationType.java index 13cc945..ef2a581 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AuthenticationType.java +++ b/src/main/java/com/alipay/global/api/model/ams/AuthenticationType.java @@ -1,8 +1,6 @@ package com.alipay.global.api.model.ams; public enum AuthenticationType { - OTP, - - ; - + OTP, + ; } diff --git a/src/main/java/com/alipay/global/api/model/ams/AvailablePaymentMethod.java b/src/main/java/com/alipay/global/api/model/ams/AvailablePaymentMethod.java index 4b2bf4e..202a172 100644 --- a/src/main/java/com/alipay/global/api/model/ams/AvailablePaymentMethod.java +++ b/src/main/java/com/alipay/global/api/model/ams/AvailablePaymentMethod.java @@ -1,16 +1,26 @@ -package com.alipay.global.api.model.ams; +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; -import java.util.Map; +import lombok.*; +/** AvailablePaymentMethod */ @Data +@Builder @NoArgsConstructor @AllArgsConstructor public class AvailablePaymentMethod { - private List paymentMethodTypeList; - private Map paymentMethodMetaData; + + private List paymentMethodTypeList; } diff --git a/src/main/java/com/alipay/global/api/model/ams/BrowserInfo.java b/src/main/java/com/alipay/global/api/model/ams/BrowserInfo.java index 2ca801c..ce5f589 100644 --- a/src/main/java/com/alipay/global/api/model/ams/BrowserInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/BrowserInfo.java @@ -1,39 +1,38 @@ +/* + * vaults_vaultPaymentMethod + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** BrowserInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class BrowserInfo { - /** - * The accept header of the user's browser - */ - private String acceptHeader; - - /** - * Indicates whether the user's browser is able to run Java - */ - private Boolean javaEnabled; + /** The accept header of the user's browser */ + private String acceptHeader; - /** - * Indicates whether the user's browser is able to run Java - */ - private Boolean javaScriptEnabled; + /** Indicates whether the user's browser is able to run Java */ + private Boolean javaEnabled; - /** - * The language of the user's browser - */ - private String language; + /** Indicates whether the user's browser is able to run Java */ + private Boolean javaScriptEnabled; - /** - * The user agent of the user's browser - */ - private String userAgent; + /** The language of the user's browser */ + private String language; + /** The user agent of the user's browser */ + private String userAgent; } diff --git a/src/main/java/com/alipay/global/api/model/ams/BusinessInfo.java b/src/main/java/com/alipay/global/api/model/ams/BusinessInfo.java index 0bafdb1..3365748 100644 --- a/src/main/java/com/alipay/global/api/model/ams/BusinessInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/BusinessInfo.java @@ -1,23 +1,71 @@ -package com.alipay.global.api.model.ams; +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** BusinessInfo */ @Data @Builder -@AllArgsConstructor @NoArgsConstructor +@AllArgsConstructor public class BusinessInfo { - private String mcc; - private List websites; - private String englishName; - private String doingBusinessAs; - private String mainSalesCountry; - private String appName; - private String serviceDescription; + /** + * mcc String The merchant category code (MCC). See MCC list to check valid values. More + * information: Maximum length: 32 characters + */ + private String mcc; + + /** + * The list of merchant websites. The information is used to verify the company's legal status + * and ensure the company complies with regulatory requirements. Specify this parameter when the + * value of merchantInfo.company.registeredAddress.region is BR. More information: Maximum size: + * 10 elements + */ + private List websites; + + /** + * The English name of the company. Specify this parameter when the value of + * merchantInfo.company.registeredAddress.region is JP. More information: Maximum length: 256 + * characters + */ + private String englishName; + + /** + * The customer-facing business name. Consider user interface limitations when choosing this name. + * More information: Maximum length: 256 characters + */ + private String doingBusinessAs; + + /** + * The country where your primary sales activities take place. The value of this parameter is a + * 2-letter country or region code based on the ISO 3166 Country Codes standard. Specify this + * parameter when the value of merchantInfo.company.registeredAddress.region is US. More + * information: Maximum length: 2 characters + */ + private String mainSalesCountry; + + /** + * The App name. Specify this parameter when the value of paymentMethodType is TRUEMONEY. More + * information: Maximum length: 256 characters + */ + private String appName; + + /** + * A clear and detailed description of the product or service. Specify this parameter when the + * value of paymentMethodType is TRUEMONEY. More information: Maximum length: 256 characters + */ + private String serviceDescription; } diff --git a/src/main/java/com/alipay/global/api/model/ams/BusinessType.java b/src/main/java/com/alipay/global/api/model/ams/BusinessType.java index 2adfa95..64272b7 100644 --- a/src/main/java/com/alipay/global/api/model/ams/BusinessType.java +++ b/src/main/java/com/alipay/global/api/model/ams/BusinessType.java @@ -2,10 +2,9 @@ public class BusinessType { - public static final String HOTEL = "1"; - public static final String AIR_FLIGHT = "2"; - public static final String STUDAY_ABROAD = "3"; - public static final String TRADE = "4"; - public static final String OTHER = "5"; - + public static final String HOTEL = "1"; + public static final String AIR_FLIGHT = "2"; + public static final String STUDAY_ABROAD = "3"; + public static final String TRADE = "4"; + public static final String OTHER = "5"; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Buyer.java b/src/main/java/com/alipay/global/api/model/ams/Buyer.java index cef4bc6..ee23ca8 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Buyer.java +++ b/src/main/java/com/alipay/global/api/model/ams/Buyer.java @@ -1,24 +1,62 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Buyer */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Buyer { - private String referenceBuyerId; - private UserName buyerName; - private String buyerPhoneNo; - private String buyerEmail; - private String buyerRegistrationTime; + /** + * The unique ID to identify the buyer. Specify this parameter: When you require risk control. + * When the value of paymentMethodType is CARD. Providing this information helps to increase the + * accuracy of anti-money laundering and fraud detection, and increase payment success rates. More + * information: Maximum length: 64 characters + */ + private String referenceBuyerId; + + private UserName buyerName; + + /** + * The mobile phone number of the buyer. Specify this parameter when one of the following + * conditions is met: You require risk control. The value of paymentMethodType is CARD. Providing + * this information helps to increase the accuracy of anti-money laundering and fraud detection, + * and increase payment success rates. More information: Maximum length: 24 characters + */ + private String buyerPhoneNo; + + /** + * The email of the buyer. Specify this parameter: When you require risk control. When the value + * of paymentMethodType is CARD. Providing this information helps to increase the accuracy of + * anti-money laundering and fraud detection, and increase payment success rates. More + * information: Maximum length: 64 characters + */ + private String buyerEmail; - private Boolean isAccountVerified; + /** + * The time when the buyer registered your account. Specify this parameter if you require risk + * control. Providing this information helps to increase the accuracy of anti-money laundering and + * fraud detection, and increase payment success rates. More information: Maximum length: 64 + * characters The value follows the ISO 8601 standard format. For example, + * \"2019-11-27T12:01:01+08:00\". + */ + private String buyerRegistrationTime; - private Integer successfulOrderCount; + private Boolean isAccountVerified; + private Integer successfulOrderCount; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CancellationType.java b/src/main/java/com/alipay/global/api/model/ams/CancellationType.java index e3159c8..ac6c76d 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CancellationType.java +++ b/src/main/java/com/alipay/global/api/model/ams/CancellationType.java @@ -1,6 +1,6 @@ package com.alipay.global.api.model.ams; public enum CancellationType { - CANCEL, - TERMINATE + CANCEL, + TERMINATE } diff --git a/src/main/java/com/alipay/global/api/model/ams/CaptureModeType.java b/src/main/java/com/alipay/global/api/model/ams/CaptureModeType.java index e33974c..18fc622 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CaptureModeType.java +++ b/src/main/java/com/alipay/global/api/model/ams/CaptureModeType.java @@ -1,9 +1,11 @@ package com.alipay.global.api.model.ams; public enum CaptureModeType { - /** - * AUTOMATIC: indicates that Alipay+ automatically captures the funds after the authorization. The same applies when the value is empty or you do not pass in this parameter. - * MANUAL: indicates that you manually capture the funds by calling the capture API. - */ - AUTOMATIC, MANUAL; + /** + * AUTOMATIC: indicates that Alipay+ automatically captures the funds after the authorization. The + * same applies when the value is empty or you do not pass in this parameter. MANUAL: indicates + * that you manually capture the funds by calling the capture API. + */ + AUTOMATIC, + MANUAL; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CardBrand.java b/src/main/java/com/alipay/global/api/model/ams/CardBrand.java index de43575..524cbd1 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CardBrand.java +++ b/src/main/java/com/alipay/global/api/model/ams/CardBrand.java @@ -1,65 +1,70 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets CardBrand */ public enum CardBrand { + VISA("VISA"), + + MASTERCARD("MASTERCARD"), + + MAESTRO("MAESTRO"), + + AMEX("AMEX"), + + JCB("JCB"), + + DINERS("DINERS"), + + DISCOVER("DISCOVER"), + + CUP("CUP"), + + MIR("MIR"), + + ELO("ELO"), + + HIPERCARD("HIPERCARD"), + + TROY("TROY"); + + private String value; + + CardBrand(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } - /** - * 维萨卡 - */ - VISA, - - /** - * 万事达卡 - */ - MASTERCARD, - - /** - * 万事达借记卡 - */ - MAESTRO, - - /** - * AMEX - */ - AMEX, - - /** - * JCB - */ - JCB, - - /** - * DINERS - */ - DINERS, - - /** - * DISCOVER - */ - DISCOVER, - - /** - * 银联 - */ - CUP, - - /** - * MIR - */ - MIR, - - /** - * ELO - */ - ELO, - - /** - * HIPERCARD - */ - HIPERCARD, - - /** - * TROY - */ - TROY; + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static CardBrand fromValue(String value) { + for (CardBrand b : CardBrand.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/CardBrandType.java b/src/main/java/com/alipay/global/api/model/ams/CardBrandType.java index a4ba28e..eb92454 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CardBrandType.java +++ b/src/main/java/com/alipay/global/api/model/ams/CardBrandType.java @@ -1,9 +1,9 @@ package com.alipay.global.api.model.ams; public enum CardBrandType { - VISA, - MASTERCARD, - AMEX, - HIPERCARD, - ELO; + VISA, + MASTERCARD, + AMEX, + HIPERCARD, + ELO; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CardInfo.java b/src/main/java/com/alipay/global/api/model/ams/CardInfo.java index 498bde7..4185cd1 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CardInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/CardInfo.java @@ -1,49 +1,46 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** CardInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class CardInfo { - /** - * The masked card number, which just shows part of the card number and can be used to display to the user - */ - private String cardNo; - - /** - * The card brand - */ - private String cardBrand; - - /** - * The token of the card - */ - private String cardToken; - - /** - * The issuing country of the card - */ - private String issuingCountry; - - /** - * The funding type of the card - */ - private String funding; - - /** - * The region code that represents the country or region of the payment method - */ - private String paymentMethodRegion; - - /** - * The result of 3D Secure authentication - */ - private ThreeDSResult threeDSResult; + /** + * The masked card number, which just shows part of the card number and can be used to display to + * the user + */ + private String cardNo; + + /** The card brand */ + private String cardBrand; + + /** The token of the card */ + private String cardToken; + + /** The issuing country of the card */ + private String issuingCountry; + + /** The funding type of the card */ + private String funding; + + /** The region code that represents the country or region of the payment method */ + private String paymentMethodRegion; + private ThreeDSResult threeDSResult; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CardPaymentMethodDetail.java b/src/main/java/com/alipay/global/api/model/ams/CardPaymentMethodDetail.java index f29ffc0..bb1addb 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CardPaymentMethodDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/CardPaymentMethodDetail.java @@ -1,75 +1,108 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** CardPaymentMethodDetail */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class CardPaymentMethodDetail { - private String cardToken; - private String cardNo; - private CardBrand brand; - private CardBrand selectedCardBrand; - private String cardIssuer; - private String countryIssue; - private UserName instUserName; - private String expiryYear; - private String expiryMonth; - private Address billingAddress; - private String mask; - private String last4; - private String paymentMethodDetailMetadata; + /** + * The token of the card. The value of this parameter is used by paymentMethodId in the pay + * (Checkout Payment) API when initiating payments. More information: Maximum length: 2048 + * characters + */ + private String cardToken; + + private String cardNo; + + private CardBrand brand; + + private CardBrand selectedCardBrand; + + private String cardIssuer; + + private String countryIssue; + + private UserName instUserName; + + private String expiryYear; + + private String expiryMonth; + + private Address billingAddress; + + private String mask; - private String maskedCardNo; + private String last4; - private String fingerprint; + private String paymentMethodDetailMetadata; - private String authenticationFlow; + /** + * The masked card number, showing only a few digits and hiding the rest. More information: + * Maximum length: 64 characters + */ + private String maskedCardNo; - private String funding; + private String fingerprint; - private String avsResultRaw; + private String authenticationFlow; - private String cvvResultRaw; + private String funding; - private String bin; + private String avsResultRaw; - private String issuerName; + private String cvvResultRaw; - private String issuingCountry; + private String bin; - private String lastFour; + private String issuerName; - private UserName cardholderName; + private String issuingCountry; - private String cvv; + private String lastFour; - private String dateOfBirth; + private UserName cardholderName; - private String businessNo; + private String cvv; - private String cardPasswordDigest; + private String dateOfBirth; - private String cpf; + private String businessNo; - private String payerEmail; + private String cardPasswordDigest; - private String networkTransactionId; + private String cpf; - private Boolean is3DSAuthentication; + private String payerEmail; - private String request3DS; + /** + * The unique ID assigned by the card scheme to identify a transaction. More information: Maximum + * length: 256 characters + */ + private String networkTransactionId; - private String scaExemptionIndicator; + private Boolean is3DSAuthentication; - private String enableAuthenticationUpgrade; + private String request3DS; - private MpiData mpiData; + private String scaExemptionIndicator; + private String enableAuthenticationUpgrade; + private MpiData mpiData; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CardVerificationResult.java b/src/main/java/com/alipay/global/api/model/ams/CardVerificationResult.java index acdd7d5..6e69f65 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CardVerificationResult.java +++ b/src/main/java/com/alipay/global/api/model/ams/CardVerificationResult.java @@ -1,43 +1,43 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** CardVerificationResult */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class CardVerificationResult { - /** - * Authentication type - */ - private String authenticationType; - - /** - * The authentication method that a merchant uses for a card payment - */ - private String authenticationMethod; - - /** - * The verification result of the card verification value (CVV) - */ - private String cvvResult; - - /** - * The address verification result. - */ - private String avsResult; - - /** - * The authorization code granted by the payment method provider for a successful 3D authentication. - */ - private String authorizationCode; - - /** - * The result of 3D Secure authentication. - */ - private RiskThreeDSResult threeDSResult; - -} \ No newline at end of file + + /** Authentication type */ + private String authenticationType; + + /** The authentication method that a merchant uses for a card payment */ + private String authenticationMethod; + + /** The verification result of the card verification value (CVV) */ + private String cvvResult; + + /** The address verification result. */ + private String avsResult; + + /** + * The authorization code granted by the payment method provider for a successful 3D + * authentication. + */ + private String authorizationCode; + + private RiskThreeDSResult threeDSResult; +} diff --git a/src/main/java/com/alipay/global/api/model/ams/Certificate.java b/src/main/java/com/alipay/global/api/model/ams/Certificate.java index fbb57e0..dd76578 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Certificate.java +++ b/src/main/java/com/alipay/global/api/model/ams/Certificate.java @@ -1,22 +1,53 @@ -package com.alipay.global.api.model.ams; +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** Certificate */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Certificate { - private CertificateType certificateType; - private String certificateNo; - private UserName holderName; - private List fileKeys; - private String certificateAuthority; + private CertificateType certificateType; + + /** + * The unique identification number of the certificate. More information: Maximum length: 64 + * characters + */ + private String certificateNo; + + private UserName holderName; + + /** + * A list of the unique key values of attachment files. Maximum file size: 32MB. The value of this + * parameter is obtained from the attachmentKey parameter in the submitAttachment API. Prior + * attachment submission using the submitAttachment API is required. Specify this parameter when + * the value of merchantInfo.company.certificates.certificateType is ENTERPRISE_REGISTRATION and + * the value of merchantInfo.company.registeredAddress.region is AU, SG, HK, GB, MY, US or the + * company's registered region belongs to the European Union. More information: Maximum size: + * 10 elements + */ + private List fileKeys; + /** + * The country that authorizes the certificate. The value of this parameter is a 2-letter country + * or region code based on the ISO 3166 Country Codes standard. Specify this parameter when the + * value of merchantInfo.company.registeredAddress.region is US. More information: Maximum length: + * 64 characters + */ + private String certificateAuthority; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CertificateType.java b/src/main/java/com/alipay/global/api/model/ams/CertificateType.java index 1a79181..7cb12a9 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CertificateType.java +++ b/src/main/java/com/alipay/global/api/model/ams/CertificateType.java @@ -1,12 +1,60 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets CertificateType */ public enum CertificateType { - ENTERPRISE_REGISTRATION, - LICENSE_INFO, - ID_CARD, - PASSPORT, - DRIVING_LICENSE, - CPF, - CNPJ, + ENTERPRISE_REGISTRATION("ENTERPRISE_REGISTRATION"), + + LICENSE_INFO("LICENSE_INFO"), + + ID_CARD("ID_CARD"), + + PASSPORT("PASSPORT"), + + DRIVING_LICENSE("DRIVING_LICENSE"), + + CPF("CPF"), + + CNPJ("CNPJ"); + + private String value; + + CertificateType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static CertificateType fromValue(String value) { + for (CertificateType b : CertificateType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/ChallengeActionForm.java b/src/main/java/com/alipay/global/api/model/ams/ChallengeActionForm.java index a2061bd..0ad1ac4 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ChallengeActionForm.java +++ b/src/main/java/com/alipay/global/api/model/ams/ChallengeActionForm.java @@ -1,19 +1,31 @@ +/* + * payments_pay + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** ChallengeActionForm */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class ChallengeActionForm { - private ChallengeType challengeType; - private String challengeRenderValue; - private ChallengeTriggerSourceType triggerSource; - private String extendInfo; + private ChallengeType challengeType; + + private String challengeRenderValue; + + private ChallengeTriggerSourceType triggerSource; + private String extendInfo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/ChallengeTriggerSourceType.java b/src/main/java/com/alipay/global/api/model/ams/ChallengeTriggerSourceType.java index 09c70a4..b3f4c40 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ChallengeTriggerSourceType.java +++ b/src/main/java/com/alipay/global/api/model/ams/ChallengeTriggerSourceType.java @@ -1,5 +1,50 @@ +/* + * payments_pay + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets ChallengeTriggerSourceType */ public enum ChallengeTriggerSourceType { - AMS, CHANNEL; + AMS("AMS"), + + CHANNEL("CHANNEL"); + + private String value; + + ChallengeTriggerSourceType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ChallengeTriggerSourceType fromValue(String value) { + for (ChallengeTriggerSourceType b : ChallengeTriggerSourceType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/ChallengeType.java b/src/main/java/com/alipay/global/api/model/ams/ChallengeType.java index 2e7b10e..ddd88de 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ChallengeType.java +++ b/src/main/java/com/alipay/global/api/model/ams/ChallengeType.java @@ -1,5 +1,52 @@ +/* + * payments_pay + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets ChallengeType */ public enum ChallengeType { - SMS_OTP, PLAINTEXT_CARD_NO, CARD_EXPIRE_DATE; + SMS_OTP("SMS_OTP"), + + PLAINTEXT_CARD_NO("PLAINTEXT_CARD_NO"), + + CARD_EXPIRE_DATE("CARD_EXPIRE_DATE"); + + private String value; + + ChallengeType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ChallengeType fromValue(String value) { + for (ChallengeType b : ChallengeType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/ChinaExtraTransInfo.java b/src/main/java/com/alipay/global/api/model/ams/ChinaExtraTransInfo.java index f486940..0702fdc 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ChinaExtraTransInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/ChinaExtraTransInfo.java @@ -11,18 +11,16 @@ @AllArgsConstructor public class ChinaExtraTransInfo { - /** - * value of BusinessType - */ - private String businessType; - private String flightNumber; - private String departureTime; - private String hotelName; - private String checkinTime; - private String checkoutTime; - private String admissionNoticeUrl; - private String totalQuantity; - private String goodsInfo; - private String otherBusinessType; + /** value of BusinessType */ + private String businessType; + private String flightNumber; + private String departureTime; + private String hotelName; + private String checkinTime; + private String checkoutTime; + private String admissionNoticeUrl; + private String totalQuantity; + private String goodsInfo; + private String otherBusinessType; } diff --git a/src/main/java/com/alipay/global/api/model/ams/ClassType.java b/src/main/java/com/alipay/global/api/model/ams/ClassType.java index aeb69d7..7501de3 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ClassType.java +++ b/src/main/java/com/alipay/global/api/model/ams/ClassType.java @@ -1,10 +1,52 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets ClassType */ public enum ClassType { + FIRSTLEVEL("FIRSTLEVEL"), + + SECONDLEVEL("SECONDLEVEL"), + + THIRDLEVEL("THIRDLEVEL"); + + private String value; + + ClassType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } - FIRSTLEVEL, - SECONDLEVEL, - THIRDLEVEL, + @Override + public String toString() { + return String.valueOf(value); + } - ; + @JsonCreator + public static ClassType fromValue(String value) { + for (ClassType b : ClassType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/ClearingChannel.java b/src/main/java/com/alipay/global/api/model/ams/ClearingChannel.java index c076129..786c94f 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ClearingChannel.java +++ b/src/main/java/com/alipay/global/api/model/ams/ClearingChannel.java @@ -1,6 +1,7 @@ package com.alipay.global.api.model.ams; public enum ClearingChannel { - - CUP, NUCC, OTHER; + CUP, + NUCC, + OTHER; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CodeDetail.java b/src/main/java/com/alipay/global/api/model/ams/CodeDetail.java index 56eb40d..758bda6 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CodeDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/CodeDetail.java @@ -1,18 +1,35 @@ +/* + * payments_pay + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** CodeDetail */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class CodeDetail { - private CodeValueType codeValueType; - private String codeValue; - private DisplayType displayType; + private CodeValueType codeValueType; + + /** + * The value of the code. If the value of displayType is set toSMALLIMAGE, MIDDLEIMAGE, or + * BIGIMAGE, this parameter indicates a plain or Base64-encoded image URL. If the value of + * displayType is set to TEXT, this parameter indicates a text string. More information: Maximum + * length: 2048 characters + */ + private String codeValue; + private DisplayType displayType; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CodeValueType.java b/src/main/java/com/alipay/global/api/model/ams/CodeValueType.java index d4b2cbc..270b1ca 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CodeValueType.java +++ b/src/main/java/com/alipay/global/api/model/ams/CodeValueType.java @@ -1,7 +1,50 @@ +/* + * payments_pay + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets CodeValueType */ public enum CodeValueType { + BARCODE("BARCODE"), + + QRCODE("QRCODE"); + + private String value; + + CodeValueType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } - BARCODE, QRCODE; + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static CodeValueType fromValue(String value) { + for (CodeValueType b : CodeValueType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/Company.java b/src/main/java/com/alipay/global/api/model/ams/Company.java index d6488eb..443f214 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Company.java +++ b/src/main/java/com/alipay/global/api/model/ams/Company.java @@ -1,26 +1,69 @@ -package com.alipay.global.api.model.ams; +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** Company */ @Data @Builder -@AllArgsConstructor @NoArgsConstructor +@AllArgsConstructor public class Company { - private String legalName; - private CompanyType companyType; - private Address registeredAddress; - private Address operatingAddress; - private String incorporationDate; - private StockInfo stockInfo; - private Certificate certificates; - private List attachments; - private CompanyUnitType companyUnit; - private List contacts; - private String vatNo; + + /** The legal name of the company. More information: Maximum size: 256 elements */ + private String legalName; + + private CompanyType companyType; + + private Address registeredAddress; + + private Address operatingAddress; + + /** + * The date when the company was officially registered and incorporated with the government. The + * value of this parameter is in the format of YYYY-MM-DD, such as 2023-06-25. Specify this + * parameter when the value of merchantInfo.company.registeredAddress.region is AU, SG, HK, US, + * GB, MY, or the company's registered region belongs to the European Union. More information: + * Maximum length: 32 characters + */ + private String incorporationDate; + + private StockInfo stockInfo; + + private Certificate certificates; + + /** + * The list of attachment information. The information is used to verify the company's legal + * status and ensure the company complies with regulatory requirements. Specify this parameter + * when the value of merchantInfo.company.registeredAddress.region is BR, AU, SG, HK, GB, MY, or + * belongs to the European Union. More information: Maximum size: 10 elements + */ + private List attachments; + + private CompanyUnitType companyUnit; + + /** + * A list of contact information. Specify this parameter when the value of + * merchantInfo.company.registeredAddress.region is JP. + */ + private List contacts; + + /** + * The Value Added Tax (VAT) number of the company. Specify this parameter when the value of + * merchantInfo.company.registeredAddress.region is GB or the company's registered region + * belongs to the European Union. More information: Maximum length: 64 characters + */ + private String vatNo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CompanyType.java b/src/main/java/com/alipay/global/api/model/ams/CompanyType.java index 949c1c7..ec5e7c8 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CompanyType.java +++ b/src/main/java/com/alipay/global/api/model/ams/CompanyType.java @@ -1,17 +1,70 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets CompanyType */ public enum CompanyType { - ENTERPRISE, - PARTNERSHIP, - SOLE_PROPRIETORSHIP, - STATE_OWNED_BUSINESS, - PRIVATELY_OWNED_BUSINESS, - PUBLICLY_LISTED_BUSINESS, - LTDA, - SA, - EIRELI, - BOFC, - MEI, - EI, + ENTERPRISE("ENTERPRISE"), + + PARTNERSHIP("PARTNERSHIP"), + + SOLE_PROPRIETORSHIP("SOLE_PROPRIETORSHIP"), + + STATE_OWNED_BUSINESS("STATE_OWNED_BUSINESS"), + + PRIVATELY_OWNED_BUSINESS("PRIVATELY_OWNED_BUSINESS"), + + PUBLICLY_LISTED_BUSINESS("PUBLICLY_LISTED_BUSINESS"), + + LTDA("LTDA"), + + SA("SA"), + + EIRELI("EIRELI"), + + BOFC("BOFC"), + + MEI("MEI"), + + EI("EI"); + + private String value; + + CompanyType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static CompanyType fromValue(String value) { + for (CompanyType b : CompanyType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/CompanyUnitType.java b/src/main/java/com/alipay/global/api/model/ams/CompanyUnitType.java index 9c828fb..64ef5d6 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CompanyUnitType.java +++ b/src/main/java/com/alipay/global/api/model/ams/CompanyUnitType.java @@ -1,7 +1,50 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets CompanyUnitType */ public enum CompanyUnitType { - HEADQUARTER, - BRANCH, - ; + HEADQUARTER("HEADQUARTER"), + + BRANCH("BRANCH"); + + private String value; + + CompanyUnitType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CompanyUnitType fromValue(String value) { + for (CompanyUnitType b : CompanyUnitType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/Contact.java b/src/main/java/com/alipay/global/api/model/ams/Contact.java index 0865f25..3f09e95 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Contact.java +++ b/src/main/java/com/alipay/global/api/model/ams/Contact.java @@ -1,18 +1,37 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Contact */ @Data @Builder -@AllArgsConstructor @NoArgsConstructor +@AllArgsConstructor public class Contact { - private ContactType type; - private String info; - private String home; - private String work; - private String mobile; + + private ContactType type; + + /** + * The contact details of a specific contact type. More information: Maximum length: 256 + * characters + */ + private String info; + + private String home; + + private String work; + + private String mobile; } diff --git a/src/main/java/com/alipay/global/api/model/ams/ContactInfo.java b/src/main/java/com/alipay/global/api/model/ams/ContactInfo.java index f4344b3..688bd12 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ContactInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/ContactInfo.java @@ -10,7 +10,6 @@ @NoArgsConstructor @AllArgsConstructor public class ContactInfo { - private String contactNo; - private String contactType; - + private String contactNo; + private String contactType; } diff --git a/src/main/java/com/alipay/global/api/model/ams/ContactType.java b/src/main/java/com/alipay/global/api/model/ams/ContactType.java index 49b7730..f490005 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ContactType.java +++ b/src/main/java/com/alipay/global/api/model/ams/ContactType.java @@ -1,9 +1,52 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets ContactType */ public enum ContactType { - EMAIL, - PHONE_NO, - COMMERCIAL_PHONE_NO, + EMAIL("EMAIL"), + + PHONE_NO("PHONE_NO"), + + COMMERCIAL_PHONE_NO("COMMERCIAL_PHONE_NO"); + + private String value; + + ContactType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } - ; + @JsonCreator + public static ContactType fromValue(String value) { + for (ContactType b : ContactType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/CouponPaymentMethodDetail.java b/src/main/java/com/alipay/global/api/model/ams/CouponPaymentMethodDetail.java index fe56051..e4d0f75 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CouponPaymentMethodDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/CouponPaymentMethodDetail.java @@ -1,21 +1,35 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** CouponPaymentMethodDetail */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class CouponPaymentMethodDetail { - private String couponId; - private Amount availableAmount; - private String couponName; - private String couponDescription; - private String couponExpireTime; - private String paymentMethodDetailMetadata; + private String couponId; + + private Amount availableAmount; + + private String couponName; + + private String couponDescription; + + private String couponExpireTime; + private String paymentMethodDetailMetadata; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CreditPayFeeType.java b/src/main/java/com/alipay/global/api/model/ams/CreditPayFeeType.java index d8baa0c..f9fff33 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CreditPayFeeType.java +++ b/src/main/java/com/alipay/global/api/model/ams/CreditPayFeeType.java @@ -1,7 +1,48 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets CreditPayFeeType */ public enum CreditPayFeeType { + PERCENTAGE("PERCENTAGE"); + + private String value; + + CreditPayFeeType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } - PERCENTAGE + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static CreditPayFeeType fromValue(String value) { + for (CreditPayFeeType b : CreditPayFeeType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/CreditPayPlan.java b/src/main/java/com/alipay/global/api/model/ams/CreditPayPlan.java index 6a3efb7..7c2ce1b 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CreditPayPlan.java +++ b/src/main/java/com/alipay/global/api/model/ams/CreditPayPlan.java @@ -1,19 +1,40 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** CreditPayPlan */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class CreditPayPlan { - private int installmentNum; - private String interval; - private CreditPayFeeType creditPayFeeType; - private int feePercentage; + /** + * The number of installments. The valid value is from 2 to 12. More information: Maximum length: + * 8 characters + */ + private Integer installmentNum; + + private String interval; + + private CreditPayFeeType creditPayFeeType; + /** + * This field is determined by the sellers' liability. For example, 0 indicates the seller is + * not liable for any fee. 100 indicates the seller pays 100% of the fee. Note: Specify this field + * when the value of creditPayFeeType is PERCENTAGE. More information: Value range: 0 - 100 + */ + private Integer feePercentage; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CustomerBelongsTo.java b/src/main/java/com/alipay/global/api/model/ams/CustomerBelongsTo.java index 3eeb786..0fb9abe 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CustomerBelongsTo.java +++ b/src/main/java/com/alipay/global/api/model/ams/CustomerBelongsTo.java @@ -1,56 +1,98 @@ +/* + * authorizations_consult + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets CustomerBelongsTo */ public enum CustomerBelongsTo { + RABBIT_LINE_PAY("RABBIT_LINE_PAY"), + + TRUEMONEY("TRUEMONEY"), + + ALIPAY_HK("ALIPAY_HK"), + + TNG("TNG"), + + ALIPAY_CN("ALIPAY_CN"), - RABBIT_LINE_PAY, + GCASH("GCASH"), - TRUEMONEY, + DANA("DANA"), - ALIPAY_HK, + KAKAOPAY("KAKAOPAY"), - TNG, + BKASH("BKASH"), - ALIPAY_CN, + EASYPAISA("EASYPAISA"), - GCASH, + PAYPAY("PAYPAY"), - DANA, + BOOST("BOOST"), - KAKAOPAY, + GRABPAY_MY("GRABPAY_MY"), - BKASH, + MAYA("MAYA"), - EASYPAISA, + GRABPAY_PH("GRABPAY_PH"), - PAYPAY, + GRABPAY_SG("GRABPAY_SG"), - BOOST, + NAVERPAY("NAVERPAY"), - GRABPAY_MY, + JKOPAY("JKOPAY"), - MAYA, + KPLUS("KPLUS"), - GRABPAY_PH, + DIRECT_DEBIT_SIAMCOMMERCIALBANK("DIRECT_DEBIT_SIAMCOMMERCIALBANK"), - GRABPAY_SG, + DIRECT_DEBIT_KRUNGTHAIBANK("DIRECT_DEBIT_KRUNGTHAIBANK"), - NAVERPAY, + ZALOPAY("ZALOPAY"), - JKOPAY, + DIRECTDEBIT_YAPILY("DIRECTDEBIT_YAPILY"), - KPLUS, + TOSSPAY("TOSSPAY"), - DIRECT_DEBIT_SIAMCOMMERCIALBANK, + MOMO("MOMO"), - DIRECT_DEBIT_KRUNGTHAIBANK, + ANTOM_BIZ_ACCOUNT("ANTOM_BIZ_ACCOUNT"); - ZALOPAY, + private String value; - DIRECTDEBIT_YAPILY, + CustomerBelongsTo(String value) { + this.value = value; + } - TOSSPAY, + @JsonValue + public String getValue() { + return value; + } - MOMO, + @Override + public String toString() { + return String.valueOf(value); + } - ANTOM_BIZ_ACCOUNT; + @JsonCreator + public static CustomerBelongsTo fromValue(String value) { + for (CustomerBelongsTo b : CustomerBelongsTo.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/CustomerIdType.java b/src/main/java/com/alipay/global/api/model/ams/CustomerIdType.java index 9dbb942..58ecb35 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CustomerIdType.java +++ b/src/main/java/com/alipay/global/api/model/ams/CustomerIdType.java @@ -1,5 +1,8 @@ package com.alipay.global.api.model.ams; public enum CustomerIdType { - EMAIL, USER_ID, MOBILE_NO, AUTH_CODE; + EMAIL, + USER_ID, + MOBILE_NO, + AUTH_CODE; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CustomizedInfo.java b/src/main/java/com/alipay/global/api/model/ams/CustomizedInfo.java index 08de55b..384d7e6 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CustomizedInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/CustomizedInfo.java @@ -1,19 +1,33 @@ +/* + * vaults_vaultPaymentMethod + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** CustomizedInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class CustomizedInfo { - private String customizedField1; - private String customizedField2; - private String customizedField3; - private String customizedField4; - private String customizedField5; + private String customizedField1; + + private String customizedField2; + + private String customizedField3; + + private String customizedField4; + + private String customizedField5; } diff --git a/src/main/java/com/alipay/global/api/model/ams/CustomsInfo.java b/src/main/java/com/alipay/global/api/model/ams/CustomsInfo.java index b30953d..c52d8a6 100644 --- a/src/main/java/com/alipay/global/api/model/ams/CustomsInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/CustomsInfo.java @@ -11,7 +11,6 @@ @AllArgsConstructor public class CustomsInfo { - private String customsCode; - private String region; - + private String customsCode; + private String region; } diff --git a/src/main/java/com/alipay/global/api/model/ams/DecisionType.java b/src/main/java/com/alipay/global/api/model/ams/DecisionType.java index aa26047..8b4496c 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DecisionType.java +++ b/src/main/java/com/alipay/global/api/model/ams/DecisionType.java @@ -1,5 +1,6 @@ package com.alipay.global.api.model.ams; public enum DecisionType { - ACCEPT, REJECT; + ACCEPT, + REJECT; } diff --git a/src/main/java/com/alipay/global/api/model/ams/DeclarationRecord.java b/src/main/java/com/alipay/global/api/model/ams/DeclarationRecord.java index 46729c3..9db8e80 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DeclarationRecord.java +++ b/src/main/java/com/alipay/global/api/model/ams/DeclarationRecord.java @@ -11,17 +11,16 @@ @AllArgsConstructor public class DeclarationRecord { - private String declarationRequestId; - private String customsPaymentId; - private String customsOrderId; - private CustomsInfo customs; - private MerchantCustomsInfo merchantCustomsInfo; - private Amount declarationAmount; - private Boolean splitOrder; - private String declarationRequestStatus; - private String lastModifiedTime; - private String customsDeclarationResultCode; - private String customsDeclarationResultDesc; - private String customsDeclarationReturnTime; - + private String declarationRequestId; + private String customsPaymentId; + private String customsOrderId; + private CustomsInfo customs; + private MerchantCustomsInfo merchantCustomsInfo; + private Amount declarationAmount; + private Boolean splitOrder; + private String declarationRequestStatus; + private String lastModifiedTime; + private String customsDeclarationResultCode; + private String customsDeclarationResultDesc; + private String customsDeclarationReturnTime; } diff --git a/src/main/java/com/alipay/global/api/model/ams/DeliveryEstimate.java b/src/main/java/com/alipay/global/api/model/ams/DeliveryEstimate.java index 26542e6..833f059 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DeliveryEstimate.java +++ b/src/main/java/com/alipay/global/api/model/ams/DeliveryEstimate.java @@ -1,18 +1,27 @@ -package com.alipay.global.api.model.ams; +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; +import lombok.*; +/** DeliveryEstimate */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class DeliveryEstimate { - private DeliveryEstimateInfo minimum; + private DeliveryEstimateInfo minimum; - private DeliveryEstimateInfo maximum; + private DeliveryEstimateInfo maximum; } diff --git a/src/main/java/com/alipay/global/api/model/ams/DeliveryEstimateInfo.java b/src/main/java/com/alipay/global/api/model/ams/DeliveryEstimateInfo.java index c591be2..e23e6ca 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DeliveryEstimateInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/DeliveryEstimateInfo.java @@ -1,20 +1,41 @@ -package com.alipay.global.api.model.ams; +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; +import lombok.*; +/** DeliveryEstimateInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class DeliveryEstimateInfo { - private String unit; - - private Integer value; - + /** + * Units for the longest shipping time of logistics services. The valid values include: YEAR: + * Indicates that the shortest shipping time unit for logistics services is in years. MONTH: + * Indicates that the shortest shipping time unit for logistics services is in months. DAY: + * Indicates that the shortest shipping time unit for logistics services is in days. HOUR: + * Indicates that the shortest shipping time unit for logistics services is in hours. MINUTE: + * Indicates that the shortest shipping time unit for logistics services is in minutes. SECOND: + * Indicates that the shortest shipping time unit for logistics services is in seconds. More + * information: Maximum length: 16 characters + */ + private String unit; + /** + * Estimated value for the longest shipping time of logistics services. More information: Value + * range: [0, +∞) + */ + private Integer value; } diff --git a/src/main/java/com/alipay/global/api/model/ams/DeliveryMethodType.java b/src/main/java/com/alipay/global/api/model/ams/DeliveryMethodType.java index 1064c7a..768139c 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DeliveryMethodType.java +++ b/src/main/java/com/alipay/global/api/model/ams/DeliveryMethodType.java @@ -1,5 +1,6 @@ package com.alipay.global.api.model.ams; public enum DeliveryMethodType { - PHYSICAL, DIGITAL; + PHYSICAL, + DIGITAL; } diff --git a/src/main/java/com/alipay/global/api/model/ams/DisableReasonType.java b/src/main/java/com/alipay/global/api/model/ams/DisableReasonType.java index c198f81..003aa21 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DisableReasonType.java +++ b/src/main/java/com/alipay/global/api/model/ams/DisableReasonType.java @@ -1,15 +1,14 @@ package com.alipay.global.api.model.ams; public enum DisableReasonType { - - PAYMENT_ACCOUNT_NOT_AVAILABLE, - EXCEED_CHANNEL_LIMIT_RULE, - SERVICE_DEGRADE, - CHANNEL_NOT_SUPPORT_CURRENCY, - CHANNEL_DISABLE, - CHANNEL_NOT_IN_SERVICE_TIME, - QUERY_IPP_INFO_FAILED, - LIMIT_CENTER_ACCESS_FAIL, - CURRENT_CHANNEL_NOT_EXIST, - ; + PAYMENT_ACCOUNT_NOT_AVAILABLE, + EXCEED_CHANNEL_LIMIT_RULE, + SERVICE_DEGRADE, + CHANNEL_NOT_SUPPORT_CURRENCY, + CHANNEL_DISABLE, + CHANNEL_NOT_IN_SERVICE_TIME, + QUERY_IPP_INFO_FAILED, + LIMIT_CENTER_ACCESS_FAIL, + CURRENT_CHANNEL_NOT_EXIST, + ; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Discount.java b/src/main/java/com/alipay/global/api/model/ams/Discount.java index fbd4699..e11f6bb 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Discount.java +++ b/src/main/java/com/alipay/global/api/model/ams/Discount.java @@ -1,20 +1,35 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Discount */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Discount { - private String discountTag; - private String discountName; - private Amount savingsAmount; - private Amount estimateSavingsAmount; - private String promotionCode; + private String discountTag; + + /** + * The discount name displayed in the default language. More information: Maximum length: 128 + * characters + */ + private String discountName; + + private Amount savingsAmount; + private Amount estimateSavingsAmount; } diff --git a/src/main/java/com/alipay/global/api/model/ams/DiscountPaymentMethodDetail.java b/src/main/java/com/alipay/global/api/model/ams/DiscountPaymentMethodDetail.java index 4a5af1d..12f60cf 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DiscountPaymentMethodDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/DiscountPaymentMethodDetail.java @@ -1,20 +1,33 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** DiscountPaymentMethodDetail */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class DiscountPaymentMethodDetail { - private String discountId; - private Amount availableAmount; - private String discountName; - private String discountDescription; - private String paymentMethodDetailMetadata; + private String discountId; + + private Amount availableAmount; + + private String discountName; + + private String discountDescription; + private String paymentMethodDetailMetadata; } diff --git a/src/main/java/com/alipay/global/api/model/ams/DisplayType.java b/src/main/java/com/alipay/global/api/model/ams/DisplayType.java index f8ecd8e..054c280 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DisplayType.java +++ b/src/main/java/com/alipay/global/api/model/ams/DisplayType.java @@ -1,5 +1,56 @@ +/* + * payments_pay + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets DisplayType */ public enum DisplayType { - TEXT, MIDDLEIMAGE, SMALLIMAGE, BIGIMAGE, IMAGE; + TEXT("TEXT"), + + MIDDLEIMAGE("MIDDLEIMAGE"), + + SMALLIMAGE("SMALLIMAGE"), + + BIGIMAGE("BIGIMAGE"), + + IMAGE("IMAGE"); + + private String value; + + DisplayType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DisplayType fromValue(String value) { + for (DisplayType b : DisplayType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/DisputeAcceptReasonType.java b/src/main/java/com/alipay/global/api/model/ams/DisputeAcceptReasonType.java index b72949d..72a51a9 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DisputeAcceptReasonType.java +++ b/src/main/java/com/alipay/global/api/model/ams/DisputeAcceptReasonType.java @@ -1,5 +1,7 @@ package com.alipay.global.api.model.ams; public enum DisputeAcceptReasonType { - MERCHANT_ACCEPTED, TIMEOUT, MANUAL_PROCESSING_ACCEPTED + MERCHANT_ACCEPTED, + TIMEOUT, + MANUAL_PROCESSING_ACCEPTED } diff --git a/src/main/java/com/alipay/global/api/model/ams/DisputeEvidenceFormatType.java b/src/main/java/com/alipay/global/api/model/ams/DisputeEvidenceFormatType.java index 8f19c91..e66de35 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DisputeEvidenceFormatType.java +++ b/src/main/java/com/alipay/global/api/model/ams/DisputeEvidenceFormatType.java @@ -1,11 +1,50 @@ +/* + * payments_downloadDisputeEvidence + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets DisputeEvidenceFormatType */ public enum DisputeEvidenceFormatType { + PDF("PDF"), + + WORD("WORD"); + + private String value; + + DisputeEvidenceFormatType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } - PDF, - WORD, - ZIP, - JPG, + @Override + public String toString() { + return String.valueOf(value); + } - ; + @JsonCreator + public static DisputeEvidenceFormatType fromValue(String value) { + for (DisputeEvidenceFormatType b : DisputeEvidenceFormatType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/DisputeEvidenceType.java b/src/main/java/com/alipay/global/api/model/ams/DisputeEvidenceType.java index fd7b2df..d5a348c 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DisputeEvidenceType.java +++ b/src/main/java/com/alipay/global/api/model/ams/DisputeEvidenceType.java @@ -1,6 +1,50 @@ +/* + * payments_downloadDisputeEvidence + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets DisputeEvidenceType */ public enum DisputeEvidenceType { - DISPUTE_EVIDENCE_TEMPLATE, - DISPUTE_EVIDENCE_FILE, + TEMPLATE("DISPUTE_EVIDENCE_TEMPLATE"), + + FILE("DISPUTE_EVIDENCE_FILE"); + + private String value; + + DisputeEvidenceType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DisputeEvidenceType fromValue(String value) { + for (DisputeEvidenceType b : DisputeEvidenceType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/DisputeJudgedResult.java b/src/main/java/com/alipay/global/api/model/ams/DisputeJudgedResult.java index 99b532e..0af1fb0 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DisputeJudgedResult.java +++ b/src/main/java/com/alipay/global/api/model/ams/DisputeJudgedResult.java @@ -1,5 +1,8 @@ package com.alipay.global.api.model.ams; public enum DisputeJudgedResult { - ACCEPT_BY_CUSTOMER,ACCEPT_BY_MERCHANT,VALIDATE_SUCCESS,VALIDATE_FAIL; + ACCEPT_BY_CUSTOMER, + ACCEPT_BY_MERCHANT, + VALIDATE_SUCCESS, + VALIDATE_FAIL; } diff --git a/src/main/java/com/alipay/global/api/model/ams/DisputeNotificationType.java b/src/main/java/com/alipay/global/api/model/ams/DisputeNotificationType.java index 3c6f238..d2eb980 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DisputeNotificationType.java +++ b/src/main/java/com/alipay/global/api/model/ams/DisputeNotificationType.java @@ -1,5 +1,11 @@ package com.alipay.global.api.model.ams; public enum DisputeNotificationType { - DISPUTE_CREATED, DISPUTE_JUDGED, DISPUTE_CANCELLED, DEFENSE_SUPPLIED, DEFENSE_DUE_ALERT, DISPUTE_ACCEPTED, RDR_RESOLVED; + DISPUTE_CREATED, + DISPUTE_JUDGED, + DISPUTE_CANCELLED, + DEFENSE_SUPPLIED, + DEFENSE_DUE_ALERT, + DISPUTE_ACCEPTED, + RDR_RESOLVED; } diff --git a/src/main/java/com/alipay/global/api/model/ams/DisputeType.java b/src/main/java/com/alipay/global/api/model/ams/DisputeType.java index 7bb0be8..0add059 100644 --- a/src/main/java/com/alipay/global/api/model/ams/DisputeType.java +++ b/src/main/java/com/alipay/global/api/model/ams/DisputeType.java @@ -1,7 +1,7 @@ package com.alipay.global.api.model.ams; public enum DisputeType { - CHARGEBACK, - RETRIEVAL_REQUEST, - COMPLIANCE_REQUEST, + CHARGEBACK, + RETRIEVAL_REQUEST, + COMPLIANCE_REQUEST, } diff --git a/src/main/java/com/alipay/global/api/model/ams/EntityAssociations.java b/src/main/java/com/alipay/global/api/model/ams/EntityAssociations.java index f47d67e..6f2ee8b 100644 --- a/src/main/java/com/alipay/global/api/model/ams/EntityAssociations.java +++ b/src/main/java/com/alipay/global/api/model/ams/EntityAssociations.java @@ -1,18 +1,42 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** EntityAssociations */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class EntityAssociations { - private AssociationType associationType; - private LegalEntityType legalEntityType; - private Company company; - private Individual individual; - private String shareholdingRatio; + + private AssociationType associationType; + + private LegalEntityType legalEntityType; + + private Company company; + + private Individual individual; + + /** + * The shareholding ratio of the associated legal entity. The value of this parameter is from 0 to + * 100. For example, 10.5 represents that the shareholding ratio is 10.5%. The information is used + * to verify the company's legal status and ensure the company complies with regulatory + * requirements. Specify this parameter when the value of + * merchantInfo.company.registeredAddress.region is BR, AU, SG, HK, US, GB, MY, or the + * company's registered region belongs to the European Union. More information: Maximum + * length: 16 characters + */ + private String shareholdingRatio; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Env.java b/src/main/java/com/alipay/global/api/model/ams/Env.java index 9524fa2..f070d56 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Env.java +++ b/src/main/java/com/alipay/global/api/model/ams/Env.java @@ -1,33 +1,113 @@ +/* + * vaults_vaultPaymentMethod + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Env */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Env { - private TerminalType terminalType; - private OsType osType; - private String userAgent; - private String deviceTokenId; - private String clientIp; - private String cookieId; - private String extendInfo; - private String storeTerminalId; - private String storeTerminalRequestTime; - private BrowserInfo browserInfo; - private String colorDepth; - private String screenHeight; - private String screenWidth; - private Integer timeZoneOffset; - private String deviceBrand; - private String deviceModel; - private String deviceLanguage; - private String deviceId; + private TerminalType terminalType; + + private OsType osType; + + private String userAgent; + + /** + * The token identifier of the device. Note: Specify this parameter if you integrate with the + * Antom Device Fingerprint client, which is an SDK or JavaScript library that is used to collect + * device-related information, such as osType, deviceLanguage, deviceId, websiteLanguage, and + * userAgent. The device-related information helps to increase the accuracy of anti-money + * laundering and fraud detection, and increase payment success rates. For more information about + * the Antom Device Fingerprint client, contact Antom Technical Support. More information: Maximum + * length: 64 characters + */ + private String deviceTokenId; + + /** Client IP address of the device. */ + private String clientIp; + + private String cookieId; + + /** + * Extended information. Specify this field if you need to use the extended information. More + * information: Maximum length: 2048 characters + */ + private String extendInfo; + + private String storeTerminalId; + + private String storeTerminalRequestTime; + + private BrowserInfo browserInfo; + + /** + * The color depth of the user's browser in bits per pixel. The value is obtained by using the + * browser's screen.colorDepth property. Valid values are 1, 4, 8, 15, 16, 24, 30, 32, or 48. + * For example, 8 means 8-bit color depth. More information: Value range: 0 - unlimited + */ + private String colorDepth; + + /** + * The screen height of the user's device in pixels. Note: Specify this parameter if you + * require risk control. Providing this information helps to increase the accuracy of anti-money + * laundering and fraud detection, and increase payment success rates. More information: Value + * range: 1 - unlimited + */ + private String screenHeight; + + /** + * The screen width of the user's device in pixels. Note: Specify this parameter if you + * require risk control. Providing this information helps to increase the accuracy of anti-money + * laundering and fraud detection, and increase payment success rates. More information: Value + * range: 1 - unlimited + */ + private String screenWidth; + + /** + * The time difference between UTC time and the local time of the user's browser, in minutes. + * The value is obtained by using the getTimezoneOffset() property. For example, if the local time + * of the user's browser is UTC+2, the value of this parameter is -120. Note: Specify this + * parameter if you require risk control. Providing this information helps to increase the + * accuracy of anti-money laundering and fraud detection, and increase payment success rates. More + * information: Value range: -720 - 720 + */ + private Integer timeZoneOffset; + + /** + * The brand of the user's device. Note: Specify this parameter if you require risk control. + * Providing this information helps to increase the accuracy of anti-money laundering and fraud + * detection, and increase payment success rates. More information: Maximum length: 64 characters + */ + private String deviceBrand; + + /** + * The model of the user's device. Note: Specify this parameter if you require risk control. + * Providing this information helps to increase the accuracy of anti-money laundering and fraud + * detection, and increase payment success rates. More information: Maximum length: 128 characters + */ + private String deviceModel; + + /** Device language of the user. */ + private String deviceLanguage; + + /** Device ID of the user. */ + private String deviceId; + /** */ + private String envType; } diff --git a/src/main/java/com/alipay/global/api/model/ams/ExtendInfo.java b/src/main/java/com/alipay/global/api/model/ams/ExtendInfo.java index e208125..395a5c3 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ExtendInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/ExtendInfo.java @@ -11,6 +11,5 @@ @AllArgsConstructor public class ExtendInfo { - private ChinaExtraTransInfo chinaExtraTransInfo; - + private ChinaExtraTransInfo chinaExtraTransInfo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/ExternalPaymentMethodDetail.java b/src/main/java/com/alipay/global/api/model/ams/ExternalPaymentMethodDetail.java index 0da0d27..7e5b39d 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ExternalPaymentMethodDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/ExternalPaymentMethodDetail.java @@ -1,19 +1,31 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** ExternalPaymentMethodDetail */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class ExternalPaymentMethodDetail { - private String assetToken; - private String accountDisplayName; - private String disableReason; - private String paymentMethodDetailMetadata; + private String assetToken; + + private String accountDisplayName; + + private String disableReason; + private String paymentMethodDetailMetadata; } diff --git a/src/main/java/com/alipay/global/api/model/ams/FundingType.java b/src/main/java/com/alipay/global/api/model/ams/FundingType.java index a99b31d..e9ecc13 100644 --- a/src/main/java/com/alipay/global/api/model/ams/FundingType.java +++ b/src/main/java/com/alipay/global/api/model/ams/FundingType.java @@ -1,12 +1,13 @@ package com.alipay.global.api.model.ams; public enum FundingType { - /** - * CREDIT: indicates a credit card. - * DEBIT: indicates a debit card. - * PREPAID: indicates a prepaid card - * CHARGE: indicates a charge card - * DEFERRED_DEBIT: indicates a deferred debit card - */ - CREDIT, DEBIT, PREPAID, CHARGE, DEFERRED_DEBIT; + /** + * CREDIT: indicates a credit card. DEBIT: indicates a debit card. PREPAID: indicates a prepaid + * card CHARGE: indicates a charge card DEFERRED_DEBIT: indicates a deferred debit card + */ + CREDIT, + DEBIT, + PREPAID, + CHARGE, + DEFERRED_DEBIT; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Gaming.java b/src/main/java/com/alipay/global/api/model/ams/Gaming.java index d10fac9..daebf45 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Gaming.java +++ b/src/main/java/com/alipay/global/api/model/ams/Gaming.java @@ -1,18 +1,38 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Gaming */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Gaming { - private String gameName; - private String toppedUpUser; - private String toppedUpEmail; - private String toppedUpPhoneNo; + /** Game name. More information: Maximum length: 128 characters */ + private String gameName; + + /** + * Name or ID of the user whose gaming account is topped up. More information: Maximum length: 128 + * characters + */ + private String toppedUpUser; + + /** More information: Maximum length: 64 characters */ + private String toppedUpEmail; + + /** More information: Maximum length: 32 characters */ + private String toppedUpPhoneNo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Goods.java b/src/main/java/com/alipay/global/api/model/ams/Goods.java index 1611f6d..dc322de 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Goods.java +++ b/src/main/java/com/alipay/global/api/model/ams/Goods.java @@ -1,28 +1,76 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Goods */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Goods { - private String referenceGoodsId; - private String goodsName; - private String goodsCategory; - private String goodsBrand; - private Amount goodsUnitAmount; - private String goodsQuantity; - private String goodsSkuName; - private String goodsUrl; - private String deliveryMethodType; - - private String goodsImageUrl; - private String priceId; - private Amount goodsDiscountAmount; - private Goods crossSell; + /** The unique ID to identify the goods. More information: Maximum length: 64 characters */ + private String referenceGoodsId; + + /** Goods name. More information: Maximum length: 256 characters */ + private String goodsName; + + /** + * The category of the goods. If the goods have multiple layers for categorization, use slashes + * between different categories and write the parent category before the subcategory, such as + * Digital Goods/Digital Vouchers/Food and Beverages. Note: Specify this parameter if you require + * risk control. Providing this information helps to increase the accuracy of anti-money + * laundering and fraud detection, and increase payment success rates. More information: Maximum + * length: 64 characters + */ + private String goodsCategory; + + private String goodsBrand; + + private Amount goodsUnitAmount; + + /** + * Quantity of goods. Specify this parameter if you require risk control. Providing this + * information helps to increase the accuracy of anti-money laundering and fraud detection, and + * increase payment success rates. More information: Value range: 1 - unlimited + */ + private String goodsQuantity; + + private String goodsSkuName; + + /** + * The URL of the website where the user places an order. Specify this parameter if you require + * risk control. Providing this information helps to identify black-market behavior. More + * information: Maximum length: 2048 characters + */ + private String goodsUrl; + + /** + * The delivery method of the goods. Valid values are: PHYSICAL: indicates that the delivery + * method is physical delivery. DIGITAL: indicates that the delivery method is digital delivery. + * Specify this parameter if you require risk control. Providing this information helps to + * increase the accuracy of anti-money laundering and fraud detection, and increase payment + * success rates. More information: Maximum length: 32 characters + */ + private String deliveryMethodType; + + private String goodsImageUrl; + + /** + * The ID of the Price object. One of ​priceId​ or ​referenceGoodsId​ is required. More + * information: Maximum length: 64 characters + */ + private String priceId; } diff --git a/src/main/java/com/alipay/global/api/model/ams/GrantType.java b/src/main/java/com/alipay/global/api/model/ams/GrantType.java index 4a80702..395be5d 100644 --- a/src/main/java/com/alipay/global/api/model/ams/GrantType.java +++ b/src/main/java/com/alipay/global/api/model/ams/GrantType.java @@ -1,5 +1,50 @@ +/* + * authorizations_applyToken + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets GrantType */ public enum GrantType { - AUTHORIZATION_CODE, REFRESH_TOKEN; + AUTHORIZATION_CODE("AUTHORIZATION_CODE"), + + REFRESH_TOKEN("REFRESH_TOKEN"); + + private String value; + + GrantType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static GrantType fromValue(String value) { + for (GrantType b : GrantType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/Home.java b/src/main/java/com/alipay/global/api/model/ams/Home.java index 339a9fb..d17035d 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Home.java +++ b/src/main/java/com/alipay/global/api/model/ams/Home.java @@ -10,6 +10,6 @@ @NoArgsConstructor @AllArgsConstructor public class Home { - private String regionCode; - private String phoneNo; + private String regionCode; + private String phoneNo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/IdentityCheckResult.java b/src/main/java/com/alipay/global/api/model/ams/IdentityCheckResult.java index 7cfa03b..f3d0806 100644 --- a/src/main/java/com/alipay/global/api/model/ams/IdentityCheckResult.java +++ b/src/main/java/com/alipay/global/api/model/ams/IdentityCheckResult.java @@ -1,6 +1,6 @@ package com.alipay.global.api.model.ams; public enum IdentityCheckResult { - - CHECK_PASSED, CHECK_NOT_PASSED; + CHECK_PASSED, + CHECK_NOT_PASSED; } diff --git a/src/main/java/com/alipay/global/api/model/ams/InStorePaymentScenario.java b/src/main/java/com/alipay/global/api/model/ams/InStorePaymentScenario.java index 0aa43e8..7cd2e8a 100644 --- a/src/main/java/com/alipay/global/api/model/ams/InStorePaymentScenario.java +++ b/src/main/java/com/alipay/global/api/model/ams/InStorePaymentScenario.java @@ -1,17 +1,52 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets InStorePaymentScenario */ public enum InStorePaymentScenario { - /** - * User can use paymentcode to pay - */ - PaymentCode, - /** - * User can use orderCode to finish pay - */ - OrderCode, - - /** - * The third party code - */ - EntryCode; + PAYMENTCODE("PaymentCode"), + + ORDERCODE("OrderCode"), + + ENTRYCODE("EntryCode"); + + private String value; + + InStorePaymentScenario(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static InStorePaymentScenario fromValue(String value) { + for (InStorePaymentScenario b : InStorePaymentScenario.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/Individual.java b/src/main/java/com/alipay/global/api/model/ams/Individual.java index 5a8a785..91b57f5 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Individual.java +++ b/src/main/java/com/alipay/global/api/model/ams/Individual.java @@ -1,24 +1,62 @@ -package com.alipay.global.api.model.ams; +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** Individual */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Individual { - private UserName name; - private UserName englishName; - private String dateOfBirth; - private Address placeOfBirth; - private List certificates; - private String nationality; - private List contacts; + private UserName name; + + private UserName englishName; + + /** + * The individual's date of birth. The information is used to verify the company's legal + * status and ensure the company complies with regulatory requirements. Specify this parameter + * when the value of merchantInfo.company.registeredAddress.region is BR. More information: + * Maximum length: 32 characters + */ + private String dateOfBirth; + + private Address placeOfBirth; + + /** + * The list of certificate information of the individual. The information is used to verify the + * company's legal status and ensure the company complies with regulatory requirements. + * Specify this parameter when the value of merchantInfo.company.registeredAddress.region is BR or + * US. + */ + private List certificates; + + /** + * The nationality of the individual. The value of this parameter is a 2-letter country or region + * code based on the ISO 3166 Country Codes standard. Specify this parameter when the value of + * merchantInfo.company.registeredAddress.region is EU, GB, MY, US, or BR. More information: + * Maximum length: 2 characters + */ + private String nationality; + /** + * A list of contact information. Specify this parameter when the value of + * merchantInfo.company.registeredAddress.region is JP and the value of + * merchantInfo.entityAssociations.associationType is LEGAL_REPRESENTATIVE. More information: + * Maximum size: 10 elements + */ + private List contacts; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Installment.java b/src/main/java/com/alipay/global/api/model/ams/Installment.java index 4ac213b..3b736c7 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Installment.java +++ b/src/main/java/com/alipay/global/api/model/ams/Installment.java @@ -1,19 +1,33 @@ -package com.alipay.global.api.model.ams; +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** Installment */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Installment { - private List supportCardBrands; + /** + * The list of card brands that support the installment plans. This parameter is returned when the + * value of paymentMethodType is CARD. + */ + private List supportCardBrands; - private List plans; + /** The list of installment plans for payment methods that support installments. */ + private List plans; } diff --git a/src/main/java/com/alipay/global/api/model/ams/InstallmentBank.java b/src/main/java/com/alipay/global/api/model/ams/InstallmentBank.java index a60ab95..acf0fcf 100644 --- a/src/main/java/com/alipay/global/api/model/ams/InstallmentBank.java +++ b/src/main/java/com/alipay/global/api/model/ams/InstallmentBank.java @@ -1,24 +1,21 @@ package com.alipay.global.api.model.ams; - +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.List; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class InstallmentBank { - private Logo logo; - private String bankName; - private String bankShortName; - private String bankTerms; - private String bankPromoUrl; - private List bins; - private List plans; - + private Logo logo; + private String bankName; + private String bankShortName; + private String bankTerms; + private String bankPromoUrl; + private List bins; + private List plans; } diff --git a/src/main/java/com/alipay/global/api/model/ams/InteractionType.java b/src/main/java/com/alipay/global/api/model/ams/InteractionType.java index ddb3edf..ea2860a 100644 --- a/src/main/java/com/alipay/global/api/model/ams/InteractionType.java +++ b/src/main/java/com/alipay/global/api/model/ams/InteractionType.java @@ -1,14 +1,13 @@ package com.alipay.global.api.model.ams; -import com.sun.org.apache.bcel.internal.generic.PUSH; public enum InteractionType { - QR, - REDIRECT, - PUSH, - ATM, - IBANKING, - BANKCOUNTER, - OTC, - ; + QR, + REDIRECT, + PUSH, + ATM, + IBANKING, + BANKCOUNTER, + OTC, + ; } diff --git a/src/main/java/com/alipay/global/api/model/ams/InterestFree.java b/src/main/java/com/alipay/global/api/model/ams/InterestFree.java index a7a7d43..d147959 100644 --- a/src/main/java/com/alipay/global/api/model/ams/InterestFree.java +++ b/src/main/java/com/alipay/global/api/model/ams/InterestFree.java @@ -1,28 +1,49 @@ -package com.alipay.global.api.model.ams; +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** InterestFree */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class InterestFree { - private String provider; - - private String expireTime; + /** + * Issuing banks or financial institutions that offer interest-free installment plans. More + * information: Maximum length: 128 characters + */ + private String provider; - private List installmentFreeNums; + /** + * The promotion expiration time. More information: The value follows the ISO 8601 standard + * format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String expireTime; - private Amount minPaymentAmount; + /** The number of interest-free installments. More information: Value range: 2-unlimited */ + private List installmentFreeNums; - private Amount maxPaymentAmount; + private Amount minPaymentAmount; - private Integer freePercentage; + private Amount maxPaymentAmount; + /** + * The interest-free percentage. A value of 0 indicates no interest-free, 100% indicates the buyer + * is completely interest-free, while the value between 0-100% indicates partial interest-free. + */ + private Integer freePercentage; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Leg.java b/src/main/java/com/alipay/global/api/model/ams/Leg.java index f30338a..363b2d9 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Leg.java +++ b/src/main/java/com/alipay/global/api/model/ams/Leg.java @@ -1,25 +1,64 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Leg */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Leg { - private String departureTime; - private String arrivalTime; - private Address departureAddress; - private Address arrivalAddress; - private String carrierName; - private String carrierNo; - private String fareBasis; - private String couponNumber; - private String flightNumber; - private ClassType classType; - private String departureAirportCode; - private String arrivalAirportCode; + + /** + * Time of departure for this leg of the trip. More information: The value follows the ISO 8601 + * standard format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String departureTime; + + /** + * Time of arrival for this leg of the trip. More information: The value follows the ISO 8601 + * standard format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String arrivalTime; + + private Address departureAddress; + + private Address arrivalAddress; + + /** + * Company name of the transportation service provider for this leg of the trip. More information: + * Maximum length: 128 characters + */ + private String carrierName; + + /** + * Code for the carrier for this leg of the trip. More information: Maximum length: 64 characters + */ + private String carrierNo; + + private ClassType classType; + + /** + * IATA code for the originating airport for this leg of the trip. More information: Maximum + * length: 8 characters + */ + private String departureAirportCode; + + /** + * IATA code for the destination airport for this leg of the trip. More information: Maximum + * length: 8 characters + */ + private String arrivalAirportCode; } diff --git a/src/main/java/com/alipay/global/api/model/ams/LegalEntityType.java b/src/main/java/com/alipay/global/api/model/ams/LegalEntityType.java index 7389b98..4765640 100644 --- a/src/main/java/com/alipay/global/api/model/ams/LegalEntityType.java +++ b/src/main/java/com/alipay/global/api/model/ams/LegalEntityType.java @@ -1,5 +1,50 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets LegalEntityType */ public enum LegalEntityType { - COMPANY, INDIVIDUAL + COMPANY("COMPANY"), + + INDIVIDUAL("INDIVIDUAL"); + + private String value; + + LegalEntityType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalEntityType fromValue(String value) { + for (LegalEntityType b : LegalEntityType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/Lodging.java b/src/main/java/com/alipay/global/api/model/ams/Lodging.java index 8c6b3b6..02e51b6 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Lodging.java +++ b/src/main/java/com/alipay/global/api/model/ams/Lodging.java @@ -1,23 +1,54 @@ -package com.alipay.global.api.model.ams; +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; -import java.util.Date; import java.util.List; +import lombok.*; +/** Lodging */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Lodging { - private String hotelName; - private Address hotelAddress; - private Date checkInDate; - private Date checkOutDate; - private Integer numberOfNights; - private Integer numberOfRooms; - private List guestNames; + + /** Hotel name. More information: Maximum length: 128 characters */ + private String hotelName; + + private Address hotelAddress; + + /** + * Date on which the guest checked in. In the case of a no-show or a reservation, the scheduled + * arrival date. More information: The value follows the ISO 8601 standard format. For example, + * \"2019-11-27T12:01:01+08:00\". + */ + private String checkInDate; + + /** + * Date on which the guest checked out. More information: The value follows the ISO 8601 standard + * format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String checkOutDate; + + /** Number of rooms booked by the payer. More information: Value range: 1 - unlimited */ + private Integer numberOfNights; + + /** Number of nights booked by the payer. More information: Value range: 1 - unlimited */ + private Integer numberOfRooms; + + /** + * Name of the guest under which the room is reserved. More information: Maximum size: 100 + * elements + */ + private List guestNames; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Logo.java b/src/main/java/com/alipay/global/api/model/ams/Logo.java index fe27d34..3670353 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Logo.java +++ b/src/main/java/com/alipay/global/api/model/ams/Logo.java @@ -1,18 +1,32 @@ +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Logo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Logo { - private String logoName; - - private String logoUrl; + /** + * The logo name of the card brand. See the Card brands to check the valid values. More + * information: Maximum length: 12 characters + */ + private String logoName; + /** The logo URL of the card brand. More information: Maximum length: 2048 characters */ + private String logoUrl; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Merchant.java b/src/main/java/com/alipay/global/api/model/ams/Merchant.java index e64ed4e..2e4aa99 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Merchant.java +++ b/src/main/java/com/alipay/global/api/model/ams/Merchant.java @@ -1,22 +1,39 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Merchant */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Merchant { - private String referenceMerchantId; - private String merchantMCC; - private String merchantName; - private String merchantDisplayName; - private Address merchantAddress; - private String merchantRegisterDate; - private Store store; - private MerchantType merchantType; + private String referenceMerchantId; + + private String merchantMCC; + + private String merchantName; + + private String merchantDisplayName; + + private Address merchantAddress; + + private String merchantRegisterDate; + + private Store store; + + private MerchantType merchantType; } diff --git a/src/main/java/com/alipay/global/api/model/ams/MerchantCustomsInfo.java b/src/main/java/com/alipay/global/api/model/ams/MerchantCustomsInfo.java index d1b72d2..0aa38b6 100644 --- a/src/main/java/com/alipay/global/api/model/ams/MerchantCustomsInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/MerchantCustomsInfo.java @@ -11,8 +11,7 @@ @AllArgsConstructor public class MerchantCustomsInfo { - private String merchantCustomsCode; - - private String merchantCustomsName; + private String merchantCustomsCode; + private String merchantCustomsName; } diff --git a/src/main/java/com/alipay/global/api/model/ams/MerchantInfo.java b/src/main/java/com/alipay/global/api/model/ams/MerchantInfo.java index 1193860..afdc86b 100644 --- a/src/main/java/com/alipay/global/api/model/ams/MerchantInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/MerchantInfo.java @@ -1,22 +1,53 @@ -package com.alipay.global.api.model.ams; +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** MerchantInfo */ @Data @Builder -@AllArgsConstructor @NoArgsConstructor +@AllArgsConstructor public class MerchantInfo { - private String referenceMerchantId; - private String loginId; - private LegalEntityType legalEntityType; - private Company company; - private BusinessInfo businessInfo; - private List entityAssociations; + /** + * The unique ID that is assigned by the marketplace to identify the sub-merchant. + * referenceMerchantId that fails to register the sub-merchant can be used again. More + * information: Maximum length: 64 characters + */ + private String referenceMerchantId; + + /** + * The sub-merchant's login ID to the marketplace platform. The value of this parameter is an + * email. The email that is successfully used to register with Alipay cannot be used again. More + * information: Maximum length: 64 characters + */ + private String loginId; + + private LegalEntityType legalEntityType; + + private Company company; + + private BusinessInfo businessInfo; + + /** + * The list of legal entities that are associated with the sub-merchant. The information is used + * to verify the company's legal status and ensure the company complies with regulatory + * requirements. Specify this parameter when the value of + * merchantInfo.company.registeredAddress.region is BR, AU, SG, HK, GB, MY, US, or belongs to the + * European Union. More information: Maximum size: 100 elements + */ + private List entityAssociations; } diff --git a/src/main/java/com/alipay/global/api/model/ams/MerchantRegistrationInfo.java b/src/main/java/com/alipay/global/api/model/ams/MerchantRegistrationInfo.java index 7fffc67..d4b87ae 100644 --- a/src/main/java/com/alipay/global/api/model/ams/MerchantRegistrationInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/MerchantRegistrationInfo.java @@ -1,24 +1,22 @@ package com.alipay.global.api.model.ams; import com.alipay.global.api.model.aps.Logo; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.List; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class MerchantRegistrationInfo { - private String referenceMerchantId; - private String merchantDisplayName; - private String merchantMCC; - private Logo logo; - private List websites; - private Address merchantAddress; - private RegistrationDetail registrationDetail; - + private String referenceMerchantId; + private String merchantDisplayName; + private String merchantMCC; + private Logo logo; + private List websites; + private Address merchantAddress; + private RegistrationDetail registrationDetail; } diff --git a/src/main/java/com/alipay/global/api/model/ams/MerchantType.java b/src/main/java/com/alipay/global/api/model/ams/MerchantType.java index 9ed4b40..65c996b 100644 --- a/src/main/java/com/alipay/global/api/model/ams/MerchantType.java +++ b/src/main/java/com/alipay/global/api/model/ams/MerchantType.java @@ -1,7 +1,50 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets MerchantType */ public enum MerchantType { + INDIVIDUAL("INDIVIDUAL"), + + ENTERPRISE("ENTERPRISE"); + + private String value; + + MerchantType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } - INDIVIDUAL(), ENTERPRISE(); + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static MerchantType fromValue(String value) { + for (MerchantType b : MerchantType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/MethodType.java b/src/main/java/com/alipay/global/api/model/ams/MethodType.java index f980aa0..db14a01 100644 --- a/src/main/java/com/alipay/global/api/model/ams/MethodType.java +++ b/src/main/java/com/alipay/global/api/model/ams/MethodType.java @@ -1,9 +1,9 @@ package com.alipay.global.api.model.ams; public enum MethodType { - GET, - POST, - PUT, - DELETE, - PATCH; + GET, + POST, + PUT, + DELETE, + PATCH; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Mobile.java b/src/main/java/com/alipay/global/api/model/ams/Mobile.java index 2cc03ca..3c89999 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Mobile.java +++ b/src/main/java/com/alipay/global/api/model/ams/Mobile.java @@ -10,6 +10,6 @@ @NoArgsConstructor @AllArgsConstructor public class Mobile { - private String regionCode; - private String phoneNo; + private String regionCode; + private String phoneNo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/MpiData.java b/src/main/java/com/alipay/global/api/model/ams/MpiData.java index fecbcb1..e9683a6 100644 --- a/src/main/java/com/alipay/global/api/model/ams/MpiData.java +++ b/src/main/java/com/alipay/global/api/model/ams/MpiData.java @@ -1,17 +1,31 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** MpiData */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class MpiData { - private String threeDSVersion; - private String eci; - private String cavv; - private String dsTransactionId; + + private String threeDSVersion; + + private String eci; + + private String cavv; + + private String dsTransactionId; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Order.java b/src/main/java/com/alipay/global/api/model/ams/Order.java index 5959348..a419219 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Order.java +++ b/src/main/java/com/alipay/global/api/model/ams/Order.java @@ -1,33 +1,69 @@ -package com.alipay.global.api.model.ams; - +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** Order */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Order { - private String referenceOrderId; - private String orderDescription; - private Amount orderAmount; - private Merchant merchant; - private List goods; - private Shipping shipping; - private Buyer buyer; - private Env env; - private String extendInfo; - private Transit transit; - private Lodging lodging; - private Gaming gaming; - private Boolean needDeclaration; - private Amount orderDiscountAmount; - private Amount subTotalOrderAmount; + /** + * The unique ID to identify the order on the merchant side, which is assigned by the merchant + * that provides services or goods directly to the customer. This field is used for user + * consumption records display and other further actions such as disputes track or handling of + * customer complaints. More information: Maximum length: 64 characters + */ + private String referenceOrderId; + + /** + * Summary description of the order, which is used for user consumption records display or other + * further actions. More information: Maximum length: 256 characters + */ + private String orderDescription; + + private Amount orderAmount; + + private Merchant merchant; + + /** + * Goods information, including the ID, name, price, and quantity of the goods in the order. Note: + * Specify this parameter if you require risk control. Providing this information helps to + * increase the accuracy of anti-money laundering and fraud detection, and increase payment + * success rates. More information: Maximum size: 100 elements + */ + private List goods; + + private Shipping shipping; + + private Buyer buyer; + + private Env env; + + private String extendInfo; + + private Transit transit; + + private Lodging lodging; + + private Gaming gaming; + + private Boolean needDeclaration; + /** test */ + private String orderType; } diff --git a/src/main/java/com/alipay/global/api/model/ams/OrderCodeForm.java b/src/main/java/com/alipay/global/api/model/ams/OrderCodeForm.java index ade49f5..1628900 100644 --- a/src/main/java/com/alipay/global/api/model/ams/OrderCodeForm.java +++ b/src/main/java/com/alipay/global/api/model/ams/OrderCodeForm.java @@ -1,21 +1,41 @@ -package com.alipay.global.api.model.ams; +/* + * payments_pay + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** OrderCodeForm */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class OrderCodeForm { - private String paymentMethodType; - private String expireTime; - private List codeDetails; - private String extendInfo; + private String paymentMethodType; + + /** + * Expiry time of the order code information. More information: The value follows the ISO 8601 + * standard format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String expireTime; + + /** Details about the code. More information: Maximum size: 4 elements */ + private List codeDetails; + /** + * Extended information. Note: This field is returned when extended information exists. More + * information: Maximum length: 2048 characters + */ + private String extendInfo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/OrderInfo.java b/src/main/java/com/alipay/global/api/model/ams/OrderInfo.java index 517214e..da61355 100644 --- a/src/main/java/com/alipay/global/api/model/ams/OrderInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/OrderInfo.java @@ -1,16 +1,25 @@ +/* + * subscriptions_update + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** OrderInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class OrderInfo { - private Amount orderAmount; - + private Amount orderAmount; } diff --git a/src/main/java/com/alipay/global/api/model/ams/OsType.java b/src/main/java/com/alipay/global/api/model/ams/OsType.java index c1d04c5..56dc04d 100644 --- a/src/main/java/com/alipay/global/api/model/ams/OsType.java +++ b/src/main/java/com/alipay/global/api/model/ams/OsType.java @@ -1,6 +1,50 @@ +/* + * vaults_vaultPaymentMethod + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets OsType */ public enum OsType { - IOS, ANDROID; + IOS("IOS"), + + ANDROID("ANDROID"); + + private String value; + + OsType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static OsType fromValue(String value) { + for (OsType b : OsType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/PSPRegistrationResult.java b/src/main/java/com/alipay/global/api/model/ams/PSPRegistrationResult.java index b38fd96..592ccc1 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PSPRegistrationResult.java +++ b/src/main/java/com/alipay/global/api/model/ams/PSPRegistrationResult.java @@ -11,7 +11,6 @@ @AllArgsConstructor public class PSPRegistrationResult { - private RegistrationResult registrationResult; - private String pspName; - + private RegistrationResult registrationResult; + private String pspName; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Passenger.java b/src/main/java/com/alipay/global/api/model/ams/Passenger.java index 8948dcc..3269bfe 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Passenger.java +++ b/src/main/java/com/alipay/global/api/model/ams/Passenger.java @@ -1,18 +1,29 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Passenger */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Passenger { - private UserName passengerName; - private String passengerEmail; - private String passengerPhoneNo; - private String passengerId; - private PassengerIdType passengerIdType; + + private UserName passengerName; + + private String passengerEmail; + + private String passengerPhoneNo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PassengerIdType.java b/src/main/java/com/alipay/global/api/model/ams/PassengerIdType.java index 37454ca..df51b20 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PassengerIdType.java +++ b/src/main/java/com/alipay/global/api/model/ams/PassengerIdType.java @@ -1,5 +1,13 @@ package com.alipay.global.api.model.ams; public enum PassengerIdType { - PASSPORT, NATIONAL_ID_CARD, DRIVER_LICENSE, MILITARY_ID, GREEN_CARD, TRAVEL_DOCUMENT, ALIEN_REGISTRATION_CARD, BIRTH_CERTIFICATE, OTHERS + PASSPORT, + NATIONAL_ID_CARD, + DRIVER_LICENSE, + MILITARY_ID, + GREEN_CARD, + TRAVEL_DOCUMENT, + ALIEN_REGISTRATION_CARD, + BIRTH_CERTIFICATE, + OTHERS } diff --git a/src/main/java/com/alipay/global/api/model/ams/PayerFor3DS.java b/src/main/java/com/alipay/global/api/model/ams/PayerFor3DS.java index b371433..f411e80 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PayerFor3DS.java +++ b/src/main/java/com/alipay/global/api/model/ams/PayerFor3DS.java @@ -1,6 +1,5 @@ package com.alipay.global.api.model.ams; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -11,22 +10,21 @@ @NoArgsConstructor @AllArgsConstructor public class PayerFor3DS { - private String accountCreateDate; - private String accountAgeIndicator; - private String accountChangeDate; - private String accountChangeIndicator; - private String accountPasswordChangeDate; - private String accountPasswordChangeIndicator; - private String paymentAccountCreateDate; - private String paymentAccountAgeIndicator; - private String suspiciousAccountActivity; - private String purchaseCountLast6Months; - private String transactionCountLast24Hours; - private String transactionCountLastYear; - private String provisionAttemptCountLast24Hours; - private String shippingAddressCreateDate; - private String shippingAddressAgeIndicator; - private String shippingNameIndicator; - private Contact contact; - + private String accountCreateDate; + private String accountAgeIndicator; + private String accountChangeDate; + private String accountChangeIndicator; + private String accountPasswordChangeDate; + private String accountPasswordChangeIndicator; + private String paymentAccountCreateDate; + private String paymentAccountAgeIndicator; + private String suspiciousAccountActivity; + private String purchaseCountLast6Months; + private String transactionCountLast24Hours; + private String transactionCountLastYear; + private String provisionAttemptCountLast24Hours; + private String shippingAddressCreateDate; + private String shippingAddressAgeIndicator; + private String shippingNameIndicator; + private Contact contact; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentFactor.java b/src/main/java/com/alipay/global/api/model/ams/PaymentFactor.java index 19c32a5..ac45c98 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentFactor.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentFactor.java @@ -1,24 +1,49 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** PaymentFactor */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PaymentFactor { - private Boolean isPaymentEvaluation; - - private InStorePaymentScenario inStorePaymentScenario; - - private PresentmentMode presentmentMode; - - private String captureMode; - - private Boolean isAuthorization; - + private Boolean isPaymentEvaluation; + + private InStorePaymentScenario inStorePaymentScenario; + + private PresentmentMode presentmentMode; + + /** + * Indicates the method for capturing funds after the user authorizes the payment. Valid values + * are: AUTOMATIC: indicates that Antom automatically captures the funds after the authorization. + * The same applies when the value is empty or you do not pass in this parameter. MANUAL: + * indicates that you manually capture the funds by calling the capture (Checkout Payment) API. + * Specify this parameter if you want to designate the capture mode of the payment. More + * information: Maximum length: 64 characters + */ + private String captureMode; + + /** + * Indicates whether the payment scenario is authorization. Specify this parameter when the value + * of paymentMethodType is CARD and you integrate the client-side SDK. Valid values of this + * parameter are: true: indicates that the payment scenario is authorization. false: indicates + * that the payment scenario is a regular payment without authorization. Under the authorization + * scenario, the payment funds are guaranteed and held on the payment method side. You can use the + * capture (Checkout Payment) API to deduct the payment funds. + */ + private Boolean isAuthorization; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentMethod.java b/src/main/java/com/alipay/global/api/model/ams/PaymentMethod.java index 1d948fc..d5885d8 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentMethod.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentMethod.java @@ -1,22 +1,46 @@ -package com.alipay.global.api.model.ams; +/* + * subscriptions_create + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.Map; +import lombok.*; +/** PaymentMethod */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PaymentMethod { - private String paymentMethodType; - private String paymentMethodId; - private Map paymentMethodMetaData; - private String customerId; - private String extendInfo; - private Boolean requireIssuerAuthentication; + /** + * The payment method that is used to accept the subscription payment. See Payment methods to + * check the valid values. Note: Card payment method is not currently supported when you work with + * Antom as your acquirer. More information: Maximum length: 64 characters + */ + private String paymentMethodType; + + /** + * The unique ID that is used to identify a payment method. Pass the corresponding token to this + * field when the user has a bound payment method. More information: Maximum length: 128 + * characters + */ + private String paymentMethodId; + + private Map paymentMethodMetaData; + + private String customerId; + + private String extendInfo; + + private Boolean requireIssuerAuthentication; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodCategoryType.java b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodCategoryType.java index 0e3d6e9..432bf0b 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodCategoryType.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodCategoryType.java @@ -1,7 +1,60 @@ +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets PaymentMethodCategoryType */ public enum PaymentMethodCategoryType { + ALIPAY_PLUS("ALIPAY_PLUS"), + + WALLET("WALLET"), + + MOBILE_BANKING_APP("MOBILE_BANKING_APP"), + + BANK_TRANSFER("BANK_TRANSFER"), + + ONLINE_BANKING("ONLINE_BANKING"), + + CARD("CARD"), + + OTC("OTC"); + + private String value; + + PaymentMethodCategoryType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } - ALIPAY_PLUS, WALLET, MOBILE_BANKING_APP, BANK_TRANSFER, ONLINE_BANKING, CARD, OTC,BNPL; + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static PaymentMethodCategoryType fromValue(String value) { + for (PaymentMethodCategoryType b : PaymentMethodCategoryType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodDetail.java b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodDetail.java index f22f124..0cd67bb 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodDetail.java @@ -1,33 +1,45 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** PaymentMethodDetail */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PaymentMethodDetail { - private PaymentMethodDetailType paymentMethodDetailType; - private CardPaymentMethodDetail card; - private ExternalPaymentMethodDetail externalAccount; - private DiscountPaymentMethodDetail discount; - private CouponPaymentMethodDetail coupon; + private PaymentMethodDetailType paymentMethodDetailType; + + private CardPaymentMethodDetail card; + + private ExternalPaymentMethodDetail externalAccount; + + private DiscountPaymentMethodDetail discount; + + private CouponPaymentMethodDetail coupon; - /** - * The type of payment method to be vaulted. Valid values are: - * - * CARD: the card used to be vaulted - * WALLET: the wallet used to be vaulted - */ - private String paymentMethodType; - private String extendInfo; + /** + * The type of payment method to be vaulted. The value of this parameter is fixed to CARD. More + * information: Maximum length: 64 characters + */ + private String paymentMethodType; - private Wallet wallet; + private String extendInfo; - private String interactionType; + private Wallet wallet; + private String interactionType; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodDetailType.java b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodDetailType.java index b928310..cf78696 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodDetailType.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodDetailType.java @@ -1,7 +1,54 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets PaymentMethodDetailType */ public enum PaymentMethodDetailType { + CARD("CARD"), + + EXTERNALACCOUNT("EXTERNALACCOUNT"), + + COUPON("COUPON"), + + DISCOUNT("DISCOUNT"); + + private String value; + + PaymentMethodDetailType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } - CARD, EXTERNALACCOUNT, COUPON, DISCOUNT; + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static PaymentMethodDetailType fromValue(String value) { + for (PaymentMethodDetailType b : PaymentMethodDetailType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodInfo.java b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodInfo.java index 77acff1..e11a68c 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodInfo.java @@ -1,20 +1,33 @@ +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** PaymentMethodInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PaymentMethodInfo { - private String paymentMethodType; - private String paymentMethodDetail; - private boolean enabled; - private boolean preferred; - private String extendInfo; + private String paymentMethodType; + + private String paymentMethodDetail; + + private Boolean enabled; + + private Boolean preferred; + private String extendInfo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodType.java b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodType.java index 5ce8856..e918b7b 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodType.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodType.java @@ -1,5 +1,11 @@ package com.alipay.global.api.model.ams; public enum PaymentMethodType { - DISCOUNT, INTEREST_FREE, BALANCE_ACCOUNT, SETTLEMENT_CARD,APPLEPAY,UPI,ONLINEBANKING_NETBANKING; + DISCOUNT, + INTEREST_FREE, + BALANCE_ACCOUNT, + SETTLEMENT_CARD, + APPLEPAY, + UPI, + ONLINEBANKING_NETBANKING; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodTypeItem.java b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodTypeItem.java index 3882d5a..23c1493 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentMethodTypeItem.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentMethodTypeItem.java @@ -1,14 +1,45 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** PaymentMethodTypeItem */ @Data +@Builder @NoArgsConstructor @AllArgsConstructor public class PaymentMethodTypeItem { - private String paymentMethodType; - private int paymentMethodOrder; - private boolean expressCheckout; + + /** + * The payment method type that is included in payment method options. See Payment methods to + * check the valid values. More information: Value range: 64 + */ + private String paymentMethodType; + + /** + * The priority order of the payment methods configured by the user is indicated by numerical + * values, with smaller numbers representing higher priority. If the user does not specify a + * setting, Antom will apply a default sorting method. More information: Value range: [1, +∞) + */ + private String paymentMethodOrder; + + /** + * Indicates whether the payment method selected by the user is displayed as a quick payment + * method. The currently supported quick payment methods include ALIPAY_CN, APPLEPAY, and + * GOOGLAPAY. The valid values include: true: The payment method selected by the user is displayed + * as a quick payment method. false: The payment method selected by the user is not displayed as a + * quick payment method. + */ + private String expressCheckout; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentOption.java b/src/main/java/com/alipay/global/api/model/ams/PaymentOption.java index 40881d3..fce66b6 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentOption.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentOption.java @@ -1,37 +1,78 @@ -package com.alipay.global.api.model.ams; +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import com.alipay.global.api.model.aps.Logo; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; import java.util.Map; +import lombok.*; +/** PaymentOption */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PaymentOption { - private String paymentMethodType; - private PaymentMethodCategoryType paymentMethodCategory; - private List paymentMethodRegion; - private boolean enabled; - private boolean preferred; - private String disableReason; - private Map amountLimitInfoMap; - private List supportedCurrencies; - private PaymentOptionDetail paymentOptionDetail; - private String extendInfo; - private Logo logo; - private List promoNames; - - private Installment installment; - private List promotionInfos; - - private InteractionType interactionType; - private String bankIdentifierCode; + /** + * The payment method type. See Payment methods to check the valid values. More information: + * Maximum length: 64 characters + */ + private String paymentMethodType; + + private PaymentMethodCategoryType paymentMethodCategory; + + /** + * A list of region codes that represent the countries or regions of payment methods. The value of + * this parameter is a 2-letter ISO country code or GLOBAL. More information: Maximum length: 6 + * characters + */ + private List paymentMethodRegion; + + /** Indicates whether the payment method is available. */ + private Boolean enabled; + + private Boolean preferred; + + /** + * The reason why the payment method is not available. Valid values are: + * PAYMENT_ACCOUNT_NOT_AVAILABLE EXCEED_CHANNEL_LIMIT_RULE SERVICE_DEGRADE + * CHANNEL_NOT_SUPPORT_CURRENCY CHANNEL_DISABLE CHANNEL_NOT_IN_SERVICE_TIME QUERY_IPP_INFO_FAILED + * LIMIT_CENTER_ACCESS_FAIL CURRENT_CHANNEL_NOT_EXIST + */ + private String disableReason; + + private Map amountLimitInfoMap; + + private List supportedCurrencies; + + private PaymentOptionDetail paymentOptionDetail; + + private String extendInfo; + + private Logo logo; + + /** + * The list of the promotion names. In JSON format. The keys are returned as a language and a + * country code, connected by an underscore, such as zh_CN, while the value is the promotion name, + * such as RM1 Voucher. More information: Maximum length: 512 characters + */ + private List promoNames; + + private Installment installment; + /** + * Promotion information. This parameter is returned when the payment method offers a promotion to + * the buyer. + */ + private List promotionInfos; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentOptionDetail.java b/src/main/java/com/alipay/global/api/model/ams/PaymentOptionDetail.java index 72f18d7..94334ca 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentOptionDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentOptionDetail.java @@ -1,22 +1,45 @@ -package com.alipay.global.api.model.ams; +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** PaymentOptionDetail */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PaymentOptionDetail { - private List supportCardBrands; - - private List funding; + /** + * The list of supported card brands. Note: This parameter is returned when the value of + * paymentMethodType is ​CARD​. + */ + private List supportCardBrands; - private List supportBanks; + /** + * The funding type of the card. Valid values are: CREDIT: indicates a credit card. DEBIT: + * indicates a debit card. PREPAID: indicates a prepaid card CHARGE: indicates a charge card + * DEFERRED_DEBIT: indicates a deferred debit card This parameter is returned when all the + * following conditions are met: The value of paymentMethodType is CARD. The value of cardNo is + * valid. The information is available in the Antom card database. + */ + private List funding; + /** + * The list of supported banks. This parameter is returned when the value of paymentMethodType is + * ​P24​ or ONLINEBANKING_FPX. + */ + private List supportBanks; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentResultInfo.java b/src/main/java/com/alipay/global/api/model/ams/PaymentResultInfo.java index 36aa001..03656fe 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentResultInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentResultInfo.java @@ -1,81 +1,112 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** PaymentResultInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PaymentResultInfo { - /** - * The masked card number, which just shows part of the card number and can be used to display to the user - */ - private String cardNo; - - /** - * The card brand, which can be used to display to the user - */ - private String cardBrand; - - /** - * The token of the card, the value of this parameter is used by paymentMethodId in the pay - */ - private String cardToken; - - /** - * The issuing country of the card - */ - private String issuingCountry; - - /** - * The funding type of the card. - */ - private String funding; - - /** - * The region code that represents the country or region of the payment method - */ - private String paymentMethodRegion; - - /** - * The result of 3D Secure authentication - */ - private ThreeDSResult threeDSResult; - - /** - * The raw AVS result. See AVS result codes to check the valid values - */ - private String avsResultRaw; - - /** - * The raw Card Verification Value (CVV), Card Security Code (CSC), or Card Verification Code (CVC) result - */ - private String cvvResultRaw; - - /** - * The unique ID assigned by the card scheme to identify a transaction. The value of this parameter is used by the same parameter of pay (Cashier Payment) request in subsequent payments - */ - private String networkTransactionId; - - /** - * The installment plan information for an installment payment - */ - private CreditPayPlan creditPayPlan; - - private String cardholderName; - - private String cardBin; - - private String lastFour; - - private String expiryMonth; - - private String expiryYear; - - private String accountNo; - + /** 卡支付失败且渠道返回时的原始错误码 */ + private String refusalCodeRaw; + + /** 卡支付失败且渠道返回时的原始拒付原因 */ + private String refusalReasonRaw; + + /** 支付结果的商户建议码 */ + private String merchantAdviceCode; + + private AcquirerInfo acquirerInfo; + + /** + * The masked card number, which just shows part of the card number and can be used to display to + * the user + */ + private String cardNo; + + /** The card brand, which can be used to display to the user */ + private String cardBrand; + + /** The token of the card, the value of this parameter is used by paymentMethodId in the pay */ + private String cardToken; + + /** The issuing country of the card */ + private String issuingCountry; + + /** The funding type of the card. */ + private String funding; + + /** The region code that represents the country or region of the payment method */ + private String paymentMethodRegion; + + private ThreeDSResult threeDSResult; + + /** The raw AVS result. See AVS result codes to check the valid values */ + private String avsResultRaw; + + /** + * The raw Card Verification Value (CVV), Card Security Code (CSC), or Card Verification Code + * (CVC) result + */ + private String cvvResultRaw; + + /** + * The unique ID assigned by the card scheme to identify a transaction. The value of this + * parameter is used by the same parameter of pay (Cashier Payment) request in subsequent payments + */ + private String networkTransactionId; + + private CreditPayPlan creditPayPlan; + + /** + * The cardholder's name. Note: This parameter is returned when the value of paymentMethodType + * in the pay (Checkout Payment) API is CARD for specific merchants in specific regions. More + * information: Maximum length: 64 characters + */ + private String cardholderName; + + /** + * The first six digits of the bank card number, used to identify the issuing bank and card type + * of the bank card. Note: This parameter is returned when the value of paymentMethodType in the + * pay (Checkout Payment) API is CARD for specific merchants in specific regions. More + * information: Maximum length: 8 characters + */ + private String cardBin; + + /** + * Last 4 digits of the card number. Note: This parameter is returned when the value of + * paymentMethodType in the pay (Checkout Payment) API is CARD for specific merchants in specific + * regions. More information: Maximum length: 4 characters + */ + private String lastFour; + + /** + * The month the card expires. Pass in two digits representing the month. For example, if the + * expiry month is February, the value of this parameter is 02. Note: This parameter is returned + * when the value of paymentMethodType in the pay (Checkout Payment) API is CARD for specific + * merchants in specific regions. More information: Maximum length: 2 characters + */ + private String expiryMonth; + + /** + * The year the card expires. Pass in the last two digits of the year number. For example, if the + * expiry year is 2025, the value of this parameter is 25. Note: This parameter is returned when + * the value of paymentMethodType in the pay (Checkout Payment) API is CARD for specific merchants + * in specific regions. More information: Maximum length: 2 characters + */ + private String expiryYear; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentStatus.java b/src/main/java/com/alipay/global/api/model/ams/PaymentStatus.java index 8d749e6..5e5266c 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentStatus.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentStatus.java @@ -1,12 +1,12 @@ package com.alipay.global.api.model.ams; public enum PaymentStatus { - SUCCESS, - FAIL, - PROCESSING, - CANCELLED, - REDIRECTED, - PENDING, - UNKNOWN, - ; + SUCCESS, + FAIL, + PROCESSING, + CANCELLED, + REDIRECTED, + PENDING, + UNKNOWN, + ; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PaymentVerificationData.java b/src/main/java/com/alipay/global/api/model/ams/PaymentVerificationData.java index b617517..d81ffed 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PaymentVerificationData.java +++ b/src/main/java/com/alipay/global/api/model/ams/PaymentVerificationData.java @@ -1,16 +1,27 @@ +/* + * payments_pay + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** PaymentVerificationData */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PaymentVerificationData { - private String verifyRequestId; - private String authenticationCode; + private String verifyRequestId; + + private String authenticationCode; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PeriodRule.java b/src/main/java/com/alipay/global/api/model/ams/PeriodRule.java index cfa0e62..5d928ad 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PeriodRule.java +++ b/src/main/java/com/alipay/global/api/model/ams/PeriodRule.java @@ -1,18 +1,38 @@ +/* + * subscriptions_update + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** PeriodRule */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PeriodRule { - private String periodType; - - private Integer periodCount; + /** + * The subscription period type. Valid values are: YEAR: indicates that the subscription period is + * measured in years. MONTH: indicates that the subscription period is measured in months. WEEK: + * indicates that the subscription period is measured in weeks. DAY: indicates that the + * subscription period is measured in days. More information: Maximum length: 20 characters + */ + private String periodType; + /** + * The number of period types within one subscription period. For example, if the value of + * periodType is MONTH and the value of periodCount is 2, it means that the subscription period is + * two months. More information: Value range: [1, +∞) + */ + private Integer periodCount; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PeriodType.java b/src/main/java/com/alipay/global/api/model/ams/PeriodType.java index 5fb6f17..61bc21a 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PeriodType.java +++ b/src/main/java/com/alipay/global/api/model/ams/PeriodType.java @@ -1,9 +1,8 @@ package com.alipay.global.api.model.ams; public enum PeriodType { - - DAY, - WEEK, - MONTH, - YEAR + DAY, + WEEK, + MONTH, + YEAR } diff --git a/src/main/java/com/alipay/global/api/model/ams/Plan.java b/src/main/java/com/alipay/global/api/model/ams/Plan.java index b386661..99e0231 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Plan.java +++ b/src/main/java/com/alipay/global/api/model/ams/Plan.java @@ -1,26 +1,48 @@ +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Plan */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Plan { - private String interestRate; - - private Amount minInstallmentAmount; + /** + * The interest rate the customer is charged on the installments. More information: Maximum + * length: 8 characters + */ + private String interestRate; - private Amount maxInstallmentAmount; + private Amount minInstallmentAmount; - private String installmentNum; + private Amount maxInstallmentAmount; - private String interval; + /** + * The number of installment payments. The valid value is from 2 to 12. More information: Maximum + * length: 8 characters + */ + private String installmentNum; - private boolean enabled; + /** + * The interval of each installment payment. The valid value is MONTH. More information: Maximum + * length: 16 characters + */ + private String interval; + /** Indicates whether the installment payment is available. */ + private Boolean enabled; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PresentmentMode.java b/src/main/java/com/alipay/global/api/model/ams/PresentmentMode.java index f54675c..9ac383a 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PresentmentMode.java +++ b/src/main/java/com/alipay/global/api/model/ams/PresentmentMode.java @@ -1,5 +1,52 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets PresentmentMode */ public enum PresentmentMode { - BUNDLE, TILE, UNIFIED; + BUNDLE("BUNDLE"), + + TILE("TILE"), + + UNIFIED("UNIFIED"); + + private String value; + + PresentmentMode(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PresentmentMode fromValue(String value) { + for (PresentmentMode b : PresentmentMode.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/ProductCodeType.java b/src/main/java/com/alipay/global/api/model/ams/ProductCodeType.java index 9e1003b..b3dfda8 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ProductCodeType.java +++ b/src/main/java/com/alipay/global/api/model/ams/ProductCodeType.java @@ -1,5 +1,52 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets ProductCodeType */ public enum ProductCodeType { - AGREEMENT_PAYMENT, IN_STORE_PAYMENT, CASHIER_PAYMENT; + CASHIER_PAYMENT("CASHIER_PAYMENT"), + + AGREEMENT_PAYMENT("AGREEMENT_PAYMENT"), + + IN_STORE_PAYMENT("IN_STORE_PAYMENT"); + + private String value; + + ProductCodeType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProductCodeType fromValue(String value) { + for (ProductCodeType b : ProductCodeType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/PromotionInfo.java b/src/main/java/com/alipay/global/api/model/ams/PromotionInfo.java index ac810c8..4377dbb 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PromotionInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/PromotionInfo.java @@ -1,20 +1,29 @@ +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** PromotionInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PromotionInfo { - private PromotionType promotionType; - - private Discount discount; + private PromotionType promotionType; - private InterestFree interestFree; + private Discount discount; + private InterestFree interestFree; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PromotionResult.java b/src/main/java/com/alipay/global/api/model/ams/PromotionResult.java index 2d53d78..d522315 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PromotionResult.java +++ b/src/main/java/com/alipay/global/api/model/ams/PromotionResult.java @@ -1,16 +1,27 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** PromotionResult */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PromotionResult { - private PromotionType promotionType; - private Discount discount; + private PromotionType promotionType; + + private Discount discount; } diff --git a/src/main/java/com/alipay/global/api/model/ams/PromotionType.java b/src/main/java/com/alipay/global/api/model/ams/PromotionType.java index 3b0059d..2b566d2 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PromotionType.java +++ b/src/main/java/com/alipay/global/api/model/ams/PromotionType.java @@ -1,5 +1,50 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets PromotionType */ public enum PromotionType { - DISCOUNT, INTEREST_FREE; + DISCOUNT("DISCOUNT"), + + INTEREST_FREE("INTEREST_FREE"); + + private String value; + + PromotionType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PromotionType fromValue(String value) { + for (PromotionType b : PromotionType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/PspCustomerInfo.java b/src/main/java/com/alipay/global/api/model/ams/PspCustomerInfo.java index ff94b0b..f457576 100644 --- a/src/main/java/com/alipay/global/api/model/ams/PspCustomerInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/PspCustomerInfo.java @@ -1,19 +1,49 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** PspCustomerInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PspCustomerInfo { - private String pspName; - private String pspCustomerId; - private String displayCustomerId; - private String displayCustomerName; - private String customer2088Id; - private String extendInfo; + + /** + * The name of Alipay+ payment methods. Note: This field is returned when the Alipay+ payment + * methods can provide the related information. More information: Maximum length: 64 characters + */ + private String pspName; + + /** + * The customer ID of Alipay+ payment methods. Note: This field is returned when the Alipay+ + * payment methods can provide the related information. More information: Maximum length: 64 + * characters + */ + private String pspCustomerId; + + /** + * The customer ID used for display. For example, loginId. Note: This field is returned when the + * Alipay+ payment methods can provide the related information. More information: Maximum length: + * 64 characters + */ + private String displayCustomerId; + + private String displayCustomerName; + + private String customer2088Id; + + private String extendInfo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Quote.java b/src/main/java/com/alipay/global/api/model/ams/Quote.java index 6954977..8a6ef87 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Quote.java +++ b/src/main/java/com/alipay/global/api/model/ams/Quote.java @@ -1,23 +1,58 @@ -package com.alipay.global.api.model.ams; +/* + * payments_refund + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.math.BigDecimal; +import lombok.*; +/** Quote */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Quote { - private String quoteId; - private String quoteCurrencyPair; - private BigDecimal quotePrice; - private String quoteStartTime; - private String quoteExpiryTime; - private Boolean guaranteed; + /** + * The unique ID that is assigned by Alipay to identify an exchange rate. More information: + * Maximum length: 64 characters + */ + private String quoteId; + + /** + * The exchange rate between settlement currency and transaction currency. Two currencies are + * separated with a slash and use the 3-letter ISO-4217 currency code. More information: Maximum + * length: 16 characters + */ + private String quoteCurrencyPair; + + /** + * The exchange rate used when a currency conversion between settlement currency and transaction + * currency occurs. More information: Value range: 1 - unlimited + */ + private BigDecimal quotePrice; + + /** + * Effective time of the exchange rate. More information: The value follows the ISO 8601 standard + * format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String quoteStartTime; + + /** + * Expiration time of the exchange rate. More information: The value follows the ISO 8601 standard + * format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String quoteExpiryTime; + /** Guaranteed exchange rate available for payment. */ + private Boolean guaranteed; } diff --git a/src/main/java/com/alipay/global/api/model/ams/RedirectActionForm.java b/src/main/java/com/alipay/global/api/model/ams/RedirectActionForm.java index 4f48b5f..6a9507d 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RedirectActionForm.java +++ b/src/main/java/com/alipay/global/api/model/ams/RedirectActionForm.java @@ -1,20 +1,43 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** RedirectActionForm */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RedirectActionForm { - private String method; - private String parameters; - private String redirectUrl; + /** + * The HTTP method to be used when the merchant initiates a redirection to the redirection URL. + * Valid values are: POST: Indicates that the request that is sent to the redirection address + * needs to be a POST request. GET: Indicates that the request that is sent to the redirection + * address needs to be a GET request. + */ + private String method; + + /** + * Parameters required for the HTTP method in the key-value pair. Note: This field is returned + * only when the method is POST. More information: Maximum length: 2048 characters + */ + private String parameters; - private String actionFormType; + /** The URL where the user is redirected to. More information: Maximum length: 2048 characters */ + private String redirectUrl; + /** The value is fixed as RedirectActionForm. More information: Maximum length: 32 characters */ + private String actionFormType; } diff --git a/src/main/java/com/alipay/global/api/model/ams/RefundDetail.java b/src/main/java/com/alipay/global/api/model/ams/RefundDetail.java index a5ccccf..0c45e8f 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RefundDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/RefundDetail.java @@ -1,17 +1,27 @@ +/* + * payments_refund + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** RefundDetail */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RefundDetail { - private Amount refundAmount; - private RefundFromType refundFrom; + private Amount refundAmount; + private RefundFromType refundFrom; } diff --git a/src/main/java/com/alipay/global/api/model/ams/RefundFromType.java b/src/main/java/com/alipay/global/api/model/ams/RefundFromType.java index 21fd2e9..c0940e2 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RefundFromType.java +++ b/src/main/java/com/alipay/global/api/model/ams/RefundFromType.java @@ -1,8 +1,52 @@ +/* + * payments_refund + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets RefundFromType */ public enum RefundFromType { + SELLER("SELLER"), + + MARKETPLACE("MARKETPLACE"), + + UNSETTLED_FUNDS("UNSETTLED_FUNDS"); + + private String value; + + RefundFromType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } - SELLER, - MARKETPLACE, - UNSETTLED_FUNDS; + @JsonCreator + public static RefundFromType fromValue(String value) { + for (RefundFromType b : RefundFromType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/RefundToBankInfo.java b/src/main/java/com/alipay/global/api/model/ams/RefundToBankInfo.java index 41a6ee7..c6c1cb9 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RefundToBankInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/RefundToBankInfo.java @@ -10,7 +10,7 @@ @NoArgsConstructor @AllArgsConstructor public class RefundToBankInfo { - private String bankCode; - private UserName accountHolderName; - private String accountNo; + private String bankCode; + private UserName accountHolderName; + private String accountNo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/RegistrationDetail.java b/src/main/java/com/alipay/global/api/model/ams/RegistrationDetail.java index 68a6bc4..a696049 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RegistrationDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/RegistrationDetail.java @@ -1,27 +1,25 @@ package com.alipay.global.api.model.ams; +import java.util.Date; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.Date; -import java.util.List; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RegistrationDetail { - private String legalName; - private List attachments; - private List contactInfo; - private String registrationType; - private String registrationNo; - private Address registrationAddress; - private String businessType; - private Date registrationEffectiveDate; - private Date registrationExpireDate; - + private String legalName; + private List attachments; + private List contactInfo; + private String registrationType; + private String registrationNo; + private Address registrationAddress; + private String businessType; + private Date registrationEffectiveDate; + private Date registrationExpireDate; } diff --git a/src/main/java/com/alipay/global/api/model/ams/RegistrationResult.java b/src/main/java/com/alipay/global/api/model/ams/RegistrationResult.java index c9a3df9..d219313 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RegistrationResult.java +++ b/src/main/java/com/alipay/global/api/model/ams/RegistrationResult.java @@ -11,7 +11,6 @@ @AllArgsConstructor public class RegistrationResult { - private String registrationStatus; - private String rejectReasons; - + private String registrationStatus; + private String rejectReasons; } diff --git a/src/main/java/com/alipay/global/api/model/ams/ResultStatusType.java b/src/main/java/com/alipay/global/api/model/ams/ResultStatusType.java new file mode 100644 index 0000000..ef9fded --- /dev/null +++ b/src/main/java/com/alipay/global/api/model/ams/ResultStatusType.java @@ -0,0 +1,52 @@ +/* + * vaults_createVaultingSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets ResultStatusType */ +public enum ResultStatusType { + S("S"), + + F("F"), + + U("U"); + + private String value; + + ResultStatusType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResultStatusType fromValue(String value) { + for (ResultStatusType b : ResultStatusType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/src/main/java/com/alipay/global/api/model/ams/RiskAddress.java b/src/main/java/com/alipay/global/api/model/ams/RiskAddress.java index 35a1a80..49add6c 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RiskAddress.java +++ b/src/main/java/com/alipay/global/api/model/ams/RiskAddress.java @@ -1,38 +1,41 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** RiskAddress */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RiskAddress { - /** - * The type of the receiver's phone number - */ - private String shippingPhoneType; - - /** - * Indicates whether the billing state is the same as the shipping state - */ - private Boolean isBillShipStateSame; - - /** - * Indicates whether a previous billing state is the same as the shipping state - */ - private Boolean isPreviousStateSame; - - /** - * The distance in meters between the buyer's location and their shipping address. - */ - private Integer locToShipDistance; - - /** - * The minimum distance in meters between the buyer's previous shipping address and their billing address. - */ - private Integer minPreviousShipToBillDistance; - -} \ No newline at end of file + + /** The type of the receiver's phone number */ + private String shippingPhoneType; + + /** Indicates whether the billing state is the same as the shipping state */ + private Boolean isBillShipStateSame; + + /** Indicates whether a previous billing state is the same as the shipping state */ + private Boolean isPreviousStateSame; + + /** The distance in meters between the buyer's location and their shipping address. */ + private Integer locToShipDistance; + + /** + * The minimum distance in meters between the buyer's previous shipping address and their + * billing address. + */ + private Integer minPreviousShipToBillDistance; +} diff --git a/src/main/java/com/alipay/global/api/model/ams/RiskBuyer.java b/src/main/java/com/alipay/global/api/model/ams/RiskBuyer.java index 2090268..4ab4b38 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RiskBuyer.java +++ b/src/main/java/com/alipay/global/api/model/ams/RiskBuyer.java @@ -1,33 +1,35 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** RiskBuyer */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RiskBuyer { - /** - * The buyer's note to a merchant. - */ - private String noteToMerchant; - /** - * The buyer's note to a deliveryman or a take-out rider. - */ - private String noteToShipping; + /** The buyer's note to a merchant. */ + private String noteToMerchant; - /** - * The successful orders the buyer made within the last one hour. - */ - private Integer orderCountIn1H; + /** The buyer's note to a deliveryman or a take-out rider. */ + private String noteToShipping; - /** - * The successful orders the buyer made within the last 24 hour. - */ - private Integer orderCountIn24H; + /** The successful orders the buyer made within the last one hour. */ + private Integer orderCountIn1H; -} \ No newline at end of file + /** The successful orders the buyer made within the last 24 hour. */ + private Integer orderCountIn24H; +} diff --git a/src/main/java/com/alipay/global/api/model/ams/RiskData.java b/src/main/java/com/alipay/global/api/model/ams/RiskData.java index aad4e5e..f4c3440 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RiskData.java +++ b/src/main/java/com/alipay/global/api/model/ams/RiskData.java @@ -1,43 +1,35 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** RiskData */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RiskData { - /** - * The order information used for risk control purposes. - */ - private RiskOrder order; - - /** - * The buyer information used for risk control purposes. - */ - private RiskBuyer buyer; - - /** - * The environment information used for risk control purposes. - */ - private RiskEnv env; - - /** - * The information provided by a merchant to identify a risky transaction. - */ - private RiskSignal riskSignal; - - /** - * The address information used for risk control purposes. - */ - private RiskAddress address; - - /** - * The verification method that a merchant uses for a card payment. - */ - private CardVerificationResult cardVerificationResult; - -} \ No newline at end of file + + private RiskOrder order; + + private RiskBuyer buyer; + + private RiskEnv env; + + private RiskSignal riskSignal; + + private RiskAddress address; + + private CardVerificationResult cardVerificationResult; +} diff --git a/src/main/java/com/alipay/global/api/model/ams/RiskEnv.java b/src/main/java/com/alipay/global/api/model/ams/RiskEnv.java index 73844a4..1e35929 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RiskEnv.java +++ b/src/main/java/com/alipay/global/api/model/ams/RiskEnv.java @@ -1,18 +1,26 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** RiskEnv */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RiskEnv { - /** - * The type of an IP address - */ - private String ipAddressType; -} \ No newline at end of file + /** The type of an IP address */ + private String ipAddressType; +} diff --git a/src/main/java/com/alipay/global/api/model/ams/RiskOrder.java b/src/main/java/com/alipay/global/api/model/ams/RiskOrder.java index ab4a4e1..3208349 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RiskOrder.java +++ b/src/main/java/com/alipay/global/api/model/ams/RiskOrder.java @@ -1,23 +1,29 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** RiskOrder */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RiskOrder { - /** - * The order type - */ - private String orderType; - /** - * The webpage where the buyer accessed the merchant. - */ - private String referringSite; + /** The order type */ + private String orderType; -} \ No newline at end of file + /** The webpage where the buyer accessed the merchant. */ + private String referringSite; +} diff --git a/src/main/java/com/alipay/global/api/model/ams/RiskScoreDetail.java b/src/main/java/com/alipay/global/api/model/ams/RiskScoreDetail.java index 1337132..b23c07e 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RiskScoreDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/RiskScoreDetail.java @@ -11,7 +11,6 @@ @AllArgsConstructor public class RiskScoreDetail { - private String riskInfoCode; - private String riskInfoCodeResult; - + private String riskInfoCode; + private String riskInfoCodeResult; } diff --git a/src/main/java/com/alipay/global/api/model/ams/RiskScoreResult.java b/src/main/java/com/alipay/global/api/model/ams/RiskScoreResult.java index 7bad762..aeb6371 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RiskScoreResult.java +++ b/src/main/java/com/alipay/global/api/model/ams/RiskScoreResult.java @@ -1,21 +1,19 @@ package com.alipay.global.api.model.ams; +import java.math.BigDecimal; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.math.BigDecimal; -import java.util.List; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RiskScoreResult { - private RiskScoreType riskScoreType; - private BigDecimal riskScore; - private List riskScoreDetails; - + private RiskScoreType riskScoreType; + private BigDecimal riskScore; + private List riskScoreDetails; } diff --git a/src/main/java/com/alipay/global/api/model/ams/RiskScoreType.java b/src/main/java/com/alipay/global/api/model/ams/RiskScoreType.java index 9424edb..d363bba 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RiskScoreType.java +++ b/src/main/java/com/alipay/global/api/model/ams/RiskScoreType.java @@ -1,6 +1,6 @@ package com.alipay.global.api.model.ams; public enum RiskScoreType { - NSF_SCORE, FRAUD_SCORE; - + NSF_SCORE, + FRAUD_SCORE; } diff --git a/src/main/java/com/alipay/global/api/model/ams/RiskSignal.java b/src/main/java/com/alipay/global/api/model/ams/RiskSignal.java index 62d1c8c..d52beb8 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RiskSignal.java +++ b/src/main/java/com/alipay/global/api/model/ams/RiskSignal.java @@ -1,23 +1,29 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** RiskSignal */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RiskSignal { - /** - * The tag assigned by a merchant to a risky transaction. - */ - private String riskCode; - /** - * The reason why a transaction is identified as risky provided by a merchant. - */ - private String riskReason; + /** The tag assigned by a merchant to a risky transaction. */ + private String riskCode; -} \ No newline at end of file + /** The reason why a transaction is identified as risky provided by a merchant. */ + private String riskReason; +} diff --git a/src/main/java/com/alipay/global/api/model/ams/RiskThreeDSResult.java b/src/main/java/com/alipay/global/api/model/ams/RiskThreeDSResult.java index 2a7fb27..617d129 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RiskThreeDSResult.java +++ b/src/main/java/com/alipay/global/api/model/ams/RiskThreeDSResult.java @@ -1,34 +1,35 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** RiskThreeDSResult */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RiskThreeDSResult { - /** - * The version of 3D Secure protocol - */ - private String threeDSVersion; - - /** - * Indicates the type of user interactions during 3DS 2.0 authentication - */ - private String threeDSInteractionMode; + /** The version of 3D Secure protocol */ + private String threeDSVersion; - /** - * Electronic Commerce Indicator (ECI) that is returned by the card scheme - */ - private String eci; + /** Indicates the type of user interactions during 3DS 2.0 authentication */ + private String threeDSInteractionMode; - /** - * The cardholder authentication value - */ - private String cavv; + /** Electronic Commerce Indicator (ECI) that is returned by the card scheme */ + private String eci; -} \ No newline at end of file + /** The cardholder authentication value */ + private String cavv; +} diff --git a/src/main/java/com/alipay/global/api/model/ams/RiskType.java b/src/main/java/com/alipay/global/api/model/ams/RiskType.java index ceb15e1..c66b624 100644 --- a/src/main/java/com/alipay/global/api/model/ams/RiskType.java +++ b/src/main/java/com/alipay/global/api/model/ams/RiskType.java @@ -1,7 +1,7 @@ package com.alipay.global.api.model.ams; public enum RiskType { - SUSPICIOUS, - CHARGEBACK, - FRAUD; + SUSPICIOUS, + CHARGEBACK, + FRAUD; } diff --git a/src/main/java/com/alipay/global/api/model/ams/ScopeType.java b/src/main/java/com/alipay/global/api/model/ams/ScopeType.java index 67c22b8..f91f6d7 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ScopeType.java +++ b/src/main/java/com/alipay/global/api/model/ams/ScopeType.java @@ -1,5 +1,60 @@ +/* + * authorizations_consult + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets ScopeType */ public enum ScopeType { - BASE_USER_INFO, AGREEMENT_PAY, USER_INFO, USER_LOGIN_ID, HASH_LOGIN_ID, SEND_OTP, TAOBAO_REBIND; + BASE_USER_INFO("BASE_USER_INFO"), + + AGREEMENT_PAY("AGREEMENT_PAY"), + + USER_INFO("USER_INFO"), + + USER_LOGIN_ID("USER_LOGIN_ID"), + + HASH_LOGIN_ID("HASH_LOGIN_ID"), + + SEND_OTP("SEND_OTP"), + + TAOBAO_REBIND("TAOBAO_REBIND"); + + private String value; + + ScopeType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ScopeType fromValue(String value) { + for (ScopeType b : ScopeType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/Service.java b/src/main/java/com/alipay/global/api/model/ams/Service.java index a133d8c..efff373 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Service.java +++ b/src/main/java/com/alipay/global/api/model/ams/Service.java @@ -10,6 +10,6 @@ @Getter @Setter public class Service { - private String categoryCode; - private String subCategoryCode; + private String categoryCode; + private String subCategoryCode; } diff --git a/src/main/java/com/alipay/global/api/model/ams/SettleToType.java b/src/main/java/com/alipay/global/api/model/ams/SettleToType.java index 10dc6b7..78b3239 100644 --- a/src/main/java/com/alipay/global/api/model/ams/SettleToType.java +++ b/src/main/java/com/alipay/global/api/model/ams/SettleToType.java @@ -1,7 +1,50 @@ +/* + * marketplace_settle + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets SettleToType */ public enum SettleToType { + SELLER("SELLER"), + + MARKETPLACE("MARKETPLACE"); + + private String value; + + SettleToType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } - SELLER, - MARKETPLACE, + @JsonCreator + public static SettleToType fromValue(String value) { + for (SettleToType b : SettleToType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/SettlementBankAccount.java b/src/main/java/com/alipay/global/api/model/ams/SettlementBankAccount.java index 5c208c4..c6c71c6 100644 --- a/src/main/java/com/alipay/global/api/model/ams/SettlementBankAccount.java +++ b/src/main/java/com/alipay/global/api/model/ams/SettlementBankAccount.java @@ -1,27 +1,88 @@ +/* + * marketplace_update + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** SettlementBankAccount */ @Data @Builder -@AllArgsConstructor @NoArgsConstructor +@AllArgsConstructor public class SettlementBankAccount { - private String bankAccountNo; - private String accountHolderName; - private String swiftCode; - private String bankRegion; - private AccountHolderType accountHolderType; - private String routingNumber; - private String branchCode; - private String accountHolderTIN; - private AccountType accountType; - private String bankName; - private Address accountHolderAddress; - private String iban; + /** + * The international bank account number. The standardized formats in different areas are: Brazil: + * ^[0-9]{0,20}$ such as 123456789 More information: Maximum length: 64 characters + */ + private String bankAccountNo; + + /** + * The full name of the account holder. The standardized formats in different areas are: Brazil: + * ^[A-Za-z0-9/() .,\\-?:'+]{0,50}$ More information: Maximum length: 64 characters + */ + private String accountHolderName; + + /** + * The eight-character or eleven-character BIC or SWIFT code of the bank. Specify this parameter + * when the bank card issuing country is Brazil. More information: Maximum length: 11 characters + */ + private String swiftCode; + + /** + * The region where the bank is located. The value of this parameter is a 2-letter region or + * country code that follows the ISO 3166 Country Codes standard. More information: Maximum + * length: 2 characters + */ + private String bankRegion; + + private AccountHolderType accountHolderType; + + /** + * The routing number. See Bank routing number for valid values. Specify this parameter when the + * issuing bank is in Brazil. More information: Maximum length: 9 characters + */ + private String routingNumber; + + /** + * The branch code of the bank. See Bank branch code for valid value s. Specify this parameter + * when the issuing bank is in Brazil. More information: Maximum length: 32 characters + */ + private String branchCode; + + /** + * The tax identification number (TIN) of the account holder. For the account holder in Brazil: If + * the account holder is an individual, the value of this parameter is an eleven-character tax ID + * known as CPF. If the account holder is a legal entity, the value of this parameter is a + * fourteen-character tax ID known as CNPJ. Specify this parameter when the issuing bank is in + * Brazil. More information: Maximum length: 32 characters + */ + private String accountHolderTIN; + + private AccountType accountType; + + /** + * The name of the bank. Specify this parameter when the card issuing country is the United + * States. More information: Maximum length: 256 characters + */ + private String bankName; + + private Address accountHolderAddress; + /** + * The International Bank Account Number (IBAN) used to identify a bank account. Specify this + * parameter when the card issuing country is the United Kingdom or belongs to the European Union. + * More information: Maximum length: 34 characters + */ + private String iban; } diff --git a/src/main/java/com/alipay/global/api/model/ams/SettlementDetail.java b/src/main/java/com/alipay/global/api/model/ams/SettlementDetail.java index 81dd9fd..824cdcd 100644 --- a/src/main/java/com/alipay/global/api/model/ams/SettlementDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/SettlementDetail.java @@ -1,16 +1,27 @@ +/* + * marketplace_settle + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** SettlementDetail */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class SettlementDetail { - private SettleToType settleTo; - private Amount settlementAmount; + private SettleToType settleTo; + + private Amount settlementAmount; } diff --git a/src/main/java/com/alipay/global/api/model/ams/SettlementInfo.java b/src/main/java/com/alipay/global/api/model/ams/SettlementInfo.java index d850e27..5b61084 100644 --- a/src/main/java/com/alipay/global/api/model/ams/SettlementInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/SettlementInfo.java @@ -1,18 +1,32 @@ -package com.alipay.global.api.model.ams; +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** SettlementInfo */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class SettlementInfo { - private String settlementCurrency; - private SettlementBankAccount settlementBankAccount; + /** + * The sub-merchant's settlement currency that is specified in the settlement contract. The + * value of this parameter is a 3-letter currency code that follows the ISO 4217 standard. More + * information: Maximum length: 3 characters + */ + private String settlementCurrency; + private SettlementBankAccount settlementBankAccount; } diff --git a/src/main/java/com/alipay/global/api/model/ams/SettlementStrategy.java b/src/main/java/com/alipay/global/api/model/ams/SettlementStrategy.java index d42fc42..246fbf1 100644 --- a/src/main/java/com/alipay/global/api/model/ams/SettlementStrategy.java +++ b/src/main/java/com/alipay/global/api/model/ams/SettlementStrategy.java @@ -1,16 +1,30 @@ +/* + * subscriptions_create + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** SettlementStrategy */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class SettlementStrategy { - private String settlementCurrency; - + /** + * The ISO currency code of the currency that the merchant wants to be settled against. The field + * is required if the merchant signed up for multiple currencies to settle. More information: + * Maximum length: 3 characters + */ + private String settlementCurrency; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Shipping.java b/src/main/java/com/alipay/global/api/model/ams/Shipping.java index 4f19c1e..8c9bd10 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Shipping.java +++ b/src/main/java/com/alipay/global/api/model/ams/Shipping.java @@ -1,25 +1,67 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Shipping */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Shipping { - private UserName shippingName; - private Address shippingAddress; - private String shippingCarrier; - private String shippingPhoneNo; - private String shippingNumber; - private String shipToEmail; - private String notes; - private String shippingFeeId; - private Amount shippingFee; - private String shippingDescription; - private DeliveryEstimate deliveryEstimate; + private UserName shippingName; + + private Address shippingAddress; + + /** + * The delivery service provider for shipping a physical product, such as FedEx, UPS, or USPS. + * Specify this parameter if you require risk control. Providing this information helps to + * increase the accuracy of anti-money laundering and fraud detection, and increase payment + * success rates. More information: Maximum length: 128 characters + */ + private String shippingCarrier; + + /** + * The phone number of a recipient (including extension). Specify this parameter when you require + * risk control. Providing this information helps to increase the accuracy of anti-money + * laundering and fraud detection, and increase payment success rates. More information: Maximum + * length: 16 characters + */ + private String shippingPhoneNo; + + /** + * The email address where virtual goods are sent. Specify this parameter when one of the + * following conditions is met: if you require risk control. if you are a digital and + * entertainment merchant. Providing this information helps to increase fraud and identity theft + * detection. More information: Maximum length: 64 characters + */ + private String shipToEmail; + + /** + * The ID of the shipping fee used for identifying the shipping option. More information: Maximum + * length: 64 characters + */ + private String shippingFeeId; + + private Amount shippingFee; + + /** + * Extended information about logistics-related services, including shipping time, logistics + * companies, etc. More information: Maximum length: 64 characters + */ + private String shippingDescription; + + private DeliveryEstimate deliveryEstimate; } diff --git a/src/main/java/com/alipay/global/api/model/ams/StockInfo.java b/src/main/java/com/alipay/global/api/model/ams/StockInfo.java index b54f280..38bf70a 100644 --- a/src/main/java/com/alipay/global/api/model/ams/StockInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/StockInfo.java @@ -1,15 +1,36 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** StockInfo */ @Data @Builder -@AllArgsConstructor @NoArgsConstructor +@AllArgsConstructor public class StockInfo { - private String listedRegion; - private String tickerSymbol; + + /** + * The region or country where the company is listed. More information: Maximum length: 2 + * characters + */ + private String listedRegion; + + /** + * The ticker symbol of the stock. Specify this parameter when the value of + * merchantInfo.company.registeredAddress.region is US. More information: Maximum length: 32 + * characters + */ + private String tickerSymbol; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Store.java b/src/main/java/com/alipay/global/api/model/ams/Store.java index d1b1ea8..b9a0839 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Store.java +++ b/src/main/java/com/alipay/global/api/model/ams/Store.java @@ -1,23 +1,39 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Store */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Store { - private String referenceStoreId; - private String storeName; - private String storeMCC; - private String storeDisplayName; - private String storeTerminalId; - private String storeOperatorId; - private Address storeAddress; - private String storePhoneNo; + private String referenceStoreId; + + private String storeName; + + private String storeMCC; + + private String storeDisplayName; + + private String storeTerminalId; + + private String storeOperatorId; + + private Address storeAddress; + private String storePhoneNo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/SubscriptionInfo.java b/src/main/java/com/alipay/global/api/model/ams/SubscriptionInfo.java index 9250ccd..2583588 100644 --- a/src/main/java/com/alipay/global/api/model/ams/SubscriptionInfo.java +++ b/src/main/java/com/alipay/global/api/model/ams/SubscriptionInfo.java @@ -1,23 +1,21 @@ package com.alipay.global.api.model.ams; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.List; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class SubscriptionInfo { - private String subscriptionDescription; - private String subscriptionStartTime; - private String subscriptionEndTime; - private PeriodRule periodRule; - private List trials; - private String subscriptionNotifyUrl; - private String subscriptionExpiryTime; - + private String subscriptionDescription; + private String subscriptionStartTime; + private String subscriptionEndTime; + private PeriodRule periodRule; + private List trials; + private String subscriptionNotifyUrl; + private String subscriptionExpiryTime; } diff --git a/src/main/java/com/alipay/global/api/model/ams/SubscriptionNotificationType.java b/src/main/java/com/alipay/global/api/model/ams/SubscriptionNotificationType.java index aa243d7..bdfa6a2 100644 --- a/src/main/java/com/alipay/global/api/model/ams/SubscriptionNotificationType.java +++ b/src/main/java/com/alipay/global/api/model/ams/SubscriptionNotificationType.java @@ -1,6 +1,8 @@ package com.alipay.global.api.model.ams; public enum SubscriptionNotificationType { - CREATE,CHANGE,CANCEL,TERMINATE - ; + CREATE, + CHANGE, + CANCEL, + TERMINATE; } diff --git a/src/main/java/com/alipay/global/api/model/ams/SubscriptionPlan.java b/src/main/java/com/alipay/global/api/model/ams/SubscriptionPlan.java index 34ea686..d105b1b 100644 --- a/src/main/java/com/alipay/global/api/model/ams/SubscriptionPlan.java +++ b/src/main/java/com/alipay/global/api/model/ams/SubscriptionPlan.java @@ -11,10 +11,9 @@ @NoArgsConstructor public class SubscriptionPlan { - private Boolean allowAccumulate; - private Amount maxAccumulateAmount; - private PeriodRule periodRule; - private String subscriptionStartTime; - private String subscriptionNotificationUrl; - + private Boolean allowAccumulate; + private Amount maxAccumulateAmount; + private PeriodRule periodRule; + private String subscriptionStartTime; + private String subscriptionNotificationUrl; } diff --git a/src/main/java/com/alipay/global/api/model/ams/SubscriptionStatus.java b/src/main/java/com/alipay/global/api/model/ams/SubscriptionStatus.java index daedfd5..2018cfc 100644 --- a/src/main/java/com/alipay/global/api/model/ams/SubscriptionStatus.java +++ b/src/main/java/com/alipay/global/api/model/ams/SubscriptionStatus.java @@ -1,6 +1,6 @@ package com.alipay.global.api.model.ams; public enum SubscriptionStatus { - ACTIVE,TERMINATED - ; + ACTIVE, + TERMINATED; } diff --git a/src/main/java/com/alipay/global/api/model/ams/SupportBank.java b/src/main/java/com/alipay/global/api/model/ams/SupportBank.java index 04381ce..7f10241 100644 --- a/src/main/java/com/alipay/global/api/model/ams/SupportBank.java +++ b/src/main/java/com/alipay/global/api/model/ams/SupportBank.java @@ -1,20 +1,34 @@ +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** SupportBank */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class SupportBank { - private String bankIdentifierCode; - - private String bankShortName; + /** The unique code of the bank. See the Bank list to check the valid values. */ + private String bankIdentifierCode; - private Logo bankLogo; + /** + * The short name of the bank. The unique code of the bank. See the Bank list to check the valid + * values. + */ + private String bankShortName; + private Logo bankLogo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/SupportCardBrand.java b/src/main/java/com/alipay/global/api/model/ams/SupportCardBrand.java index 28a91f6..594d4e8 100644 --- a/src/main/java/com/alipay/global/api/model/ams/SupportCardBrand.java +++ b/src/main/java/com/alipay/global/api/model/ams/SupportCardBrand.java @@ -1,18 +1,32 @@ +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** SupportCardBrand */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class SupportCardBrand { - private String cardBrand; - - private Logo logo; + /** + * The name of the card brand. Valid values are: VISA: indicates Visa. MASTERCARD: indicates + * Mastercard. AMEX: indicates American Express (Amex). HIPERCARD: indicates Hipercard. ELO: + * indicates Elo. + */ + private String cardBrand; + private Logo logo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/TerminalType.java b/src/main/java/com/alipay/global/api/model/ams/TerminalType.java index 54e09b4..25f2179 100644 --- a/src/main/java/com/alipay/global/api/model/ams/TerminalType.java +++ b/src/main/java/com/alipay/global/api/model/ams/TerminalType.java @@ -1,13 +1,54 @@ +/* + * vaults_vaultPaymentMethod + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets TerminalType */ public enum TerminalType { + WEB("WEB"), + + WAP("WAP"), + + APP("APP"), + + MINI_APP("MINI_APP"); - WEB, + private String value; - WAP, + TerminalType(String value) { + this.value = value; + } - APP, + @JsonValue + public String getValue() { + return value; + } - MINI_APP; + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static TerminalType fromValue(String value) { + for (TerminalType b : TerminalType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/ThreeDS2Params.java b/src/main/java/com/alipay/global/api/model/ams/ThreeDS2Params.java index c7fa5a1..dd2b813 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ThreeDS2Params.java +++ b/src/main/java/com/alipay/global/api/model/ams/ThreeDS2Params.java @@ -10,5 +10,5 @@ @NoArgsConstructor @AllArgsConstructor public class ThreeDS2Params { - private PayerFor3DS payerFor3DS; + private PayerFor3DS payerFor3DS; } diff --git a/src/main/java/com/alipay/global/api/model/ams/ThreeDSInteractionMode.java b/src/main/java/com/alipay/global/api/model/ams/ThreeDSInteractionMode.java index 940cb93..ef10dfd 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ThreeDSInteractionMode.java +++ b/src/main/java/com/alipay/global/api/model/ams/ThreeDSInteractionMode.java @@ -1,5 +1,6 @@ package com.alipay.global.api.model.ams; public enum ThreeDSInteractionMode { - FRICTIONLESS, CHALLENGE; + FRICTIONLESS, + CHALLENGE; } diff --git a/src/main/java/com/alipay/global/api/model/ams/ThreeDSResult.java b/src/main/java/com/alipay/global/api/model/ams/ThreeDSResult.java index bc27e72..e3ed742 100644 --- a/src/main/java/com/alipay/global/api/model/ams/ThreeDSResult.java +++ b/src/main/java/com/alipay/global/api/model/ams/ThreeDSResult.java @@ -1,39 +1,41 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** ThreeDSResult */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class ThreeDSResult { - /** - * The version of 3D Secure protocol - */ - private String threeDSVersion; - - /** - * Electronic Commerce Indicator (ECI) that is returned by the card scheme - */ - private String eci; + /** The version of 3D Secure protocol */ + private String threeDSVersion; - /** - * The cardholder authentication value - */ - private String cavv; + /** Electronic Commerce Indicator (ECI) that is returned by the card scheme */ + private String eci; - /** - * dsTransactionId - */ - private String dsTransactionId; + /** The cardholder authentication value */ + private String cavv; - /** - * The unique transaction identifier assigned by the Directory Server (DS) for 3D Secure authentication - */ - private String xid; + /** dsTransactionId */ + private String dsTransactionId; + /** + * The unique transaction identifier assigned by the Directory Server (DS) for 3D Secure + * authentication + */ + private String xid; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Transaction.java b/src/main/java/com/alipay/global/api/model/ams/Transaction.java index c75af6f..52148cd 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Transaction.java +++ b/src/main/java/com/alipay/global/api/model/ams/Transaction.java @@ -1,25 +1,52 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; import com.alipay.global.api.model.Result; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Transaction */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Transaction { - private Result transactionResult; - private String transactionId; - private TransactionType transactionType; - private TransactionStatusType transactionStatus; - private Amount transactionAmount; - private String transactionRequestId; - private String transactionTime; + private Result transactionResult; + + /** + * The unique ID that is assigned by Antom to identify a transaction. When the transaction type is + * REFUND, the value of this parameter is identical to refundId. When the transaction type is + * CAPTURE, the value of this parameter is identical to captureId. More information: Maximum + * length: 64 characters + */ + private String transactionId; + + private TransactionType transactionType; + + private TransactionStatusType transactionStatus; + + private Amount transactionAmount; + + /** + * The unique ID that is assigned by the merchant to identify the transaction request. When the + * transaction type is REFUND, the value of this parameter is identical to refundRequestId. When + * the transaction type is CAPTURE, the value of this parameter is identical to captureRequestId. + * More information: Maximum length: 64 characters + */ + private String transactionRequestId; - private AcquirerInfo acquirerInfo; + private String transactionTime; + private AcquirerInfo acquirerInfo; } diff --git a/src/main/java/com/alipay/global/api/model/ams/TransactionStatusType.java b/src/main/java/com/alipay/global/api/model/ams/TransactionStatusType.java index 2252e8f..cccad60 100644 --- a/src/main/java/com/alipay/global/api/model/ams/TransactionStatusType.java +++ b/src/main/java/com/alipay/global/api/model/ams/TransactionStatusType.java @@ -1,6 +1,56 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets TransactionStatusType */ public enum TransactionStatusType { - SUCCESS, FAIL, PROCESSING, CANCELLED, PENDING; + SUCCESS("SUCCESS"), + + FAIL("FAIL"), + + PROCESSING("PROCESSING"), + + CANCELLED("CANCELLED"), + + PENDING("PENDING"); + + private String value; + + TransactionStatusType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static TransactionStatusType fromValue(String value) { + for (TransactionStatusType b : TransactionStatusType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/TransactionType.java b/src/main/java/com/alipay/global/api/model/ams/TransactionType.java index b25144b..b459ece 100644 --- a/src/main/java/com/alipay/global/api/model/ams/TransactionType.java +++ b/src/main/java/com/alipay/global/api/model/ams/TransactionType.java @@ -1,30 +1,58 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets TransactionType */ public enum TransactionType { + PAYMENT("PAYMENT"), + + REFUND("REFUND"), + + CAPTURE("CAPTURE"), + + CANCEL("CANCEL"), + + AUTHORIZATION("AUTHORIZATION"), + + VOID("VOID"); + + private String value; + + TransactionType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } - /** - * PAYMENT - */ - PAYMENT, - /** - * REFUND - */ - REFUND, - /** - * CAPTURE - */ - CAPTURE, - /** - * CANCEL - */ - CANCEL, - /** - * AUTH - */ - AUTHORIZATION, - /** - * VOID - */ - VOID; + @Override + public String toString() { + return String.valueOf(value); + } + @JsonCreator + public static TransactionType fromValue(String value) { + for (TransactionType b : TransactionType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/TransferFromDetail.java b/src/main/java/com/alipay/global/api/model/ams/TransferFromDetail.java index ea61dbe..8896fbd 100644 --- a/src/main/java/com/alipay/global/api/model/ams/TransferFromDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/TransferFromDetail.java @@ -1,16 +1,27 @@ +/* + * marketplace_createTransfer + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** TransferFromDetail */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class TransferFromDetail { - private PaymentMethod transferFromMethod; - private Amount transferFromAmount; + private PaymentMethod transferFromMethod; + + private Amount transferFromAmount; } diff --git a/src/main/java/com/alipay/global/api/model/ams/TransferToDetail.java b/src/main/java/com/alipay/global/api/model/ams/TransferToDetail.java index fc62fcb..b12407a 100644 --- a/src/main/java/com/alipay/global/api/model/ams/TransferToDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/TransferToDetail.java @@ -1,25 +1,57 @@ +/* + * marketplace_createTransfer + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** TransferToDetail */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class TransferToDetail { - private PaymentMethod transferToMethod; - private String transferToCurrency; - private Amount feeAmount; - private Amount actualTransferToAmount; - /** - * Defines the purpose of the payout. - * The value of this parameter is fixed to GSD, which means goods bought or sold. - */ - private String purposeCode; - private String transferNotifyUrl; - private String transferRemark; + private PaymentMethod transferToMethod; + + /** + * A 3-character ISO-4217 currency code representing the currency that the beneficiary collects. + * More information: Maximum length: 3 characters + */ + private String transferToCurrency; + + private Amount feeAmount; + + private Amount actualTransferToAmount; + + /** + * Defines the purpose of the transfer. The value of this parameter is fixed to GSD, which means + * goods bought or sold. More information: Maximum length: 3 characters + */ + private String purposeCode; + + /** + * If you specify this parameter, Antom will send the transfer result notification to this URL. + * The URL must be either specified in the request or set in Antom Dashboard. Specify this + * parameter if you want to receive an asynchronous notification of the transfer result. If this + * URL is specified in both the request and Antom Dashboard, the value specified in the request + * takes precedence. More information: Maximum length: 2048 characters + */ + private String transferNotifyUrl; + + /** + * Remark information for the transfer. Specify this parameter if you want to provide additional + * remarks or relevant information regarding the payout. More information: Maximum length: 1024 + * characters + */ + private String transferRemark; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Transit.java b/src/main/java/com/alipay/global/api/model/ams/Transit.java index 64db0c5..5ebef56 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Transit.java +++ b/src/main/java/com/alipay/global/api/model/ams/Transit.java @@ -1,25 +1,39 @@ -package com.alipay.global.api.model.ams; - +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +package com.alipay.global.api.model.ams; import java.util.List; +import lombok.*; +/** Transit */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Transit { - private TransitType transitType; - private String agentCode; - private String agentName; - private String ticketNumber; - private String ticketIssuerCode; - private String restrictedTicketIndicator; - private List legs; - private List passengers; - private AncillaryData ancillaryData; + + private TransitType transitType; + + /** + * Information about sections of the trip, including departure time, arrival time, departure + * address, arrival address, transportation company name, carrier code and service type. More + * information: Maximum size: 10 elements + */ + private List legs; + + /** + * Information about the passenger of the trip, including the passenger names, passenger email and + * phone number. More information: Maximum size: 100 elements + */ + private List passengers; } diff --git a/src/main/java/com/alipay/global/api/model/ams/TransitType.java b/src/main/java/com/alipay/global/api/model/ams/TransitType.java index 1b6e604..2ecb0ca 100644 --- a/src/main/java/com/alipay/global/api/model/ams/TransitType.java +++ b/src/main/java/com/alipay/global/api/model/ams/TransitType.java @@ -1,10 +1,54 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; + +/** Gets or Sets TransitType */ public enum TransitType { - FLIGHT, // indicates that the trip mode is by plane. - TRAIN, // indicates that the trip mode is by train. - CRUISE, // indicates that the trip mode is by cruise. - COACH, // indicates that the trip mode is by coach. + FLIGHT("FLIGHT"), + + TRAIN("TRAIN"), + + CRUISE("CRUISE"), + + COACH("COACH"); + + private String value; + + TransitType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } - ; + @JsonCreator + public static TransitType fromValue(String value) { + for (TransitType b : TransitType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } } diff --git a/src/main/java/com/alipay/global/api/model/ams/Trial.java b/src/main/java/com/alipay/global/api/model/ams/Trial.java index 627e4c0..5ee5d70 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Trial.java +++ b/src/main/java/com/alipay/global/api/model/ams/Trial.java @@ -1,20 +1,40 @@ +/* + * subscriptions_create + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Trial */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Trial { - private Integer trialStartPeriod; - - private Amount trialAmount; + /** + * The start subscription period of the trial. For example, if the trial starts from the first + * subscription period, specify this parameter as 1. More information: Value range: 1 - unlimited + */ + private Integer trialStartPeriod; - private Integer trialEndPeriod; + private Amount trialAmount; + /** + * The end subscription period of the trial. For example, if the trial ends at the third + * subscription period, specify this parameter as 3. Note: Specify this parameter if the end + * subscription period is different from the start subscription period. If you leave this + * parameter empty, the default value of this parameter is the same as the value of + * trialStartPeriod. More information: Value range: 1 - unlimited + */ + private Integer trialEndPeriod; } diff --git a/src/main/java/com/alipay/global/api/model/ams/UserIdentityType.java b/src/main/java/com/alipay/global/api/model/ams/UserIdentityType.java index 70cbf96..4c68de4 100644 --- a/src/main/java/com/alipay/global/api/model/ams/UserIdentityType.java +++ b/src/main/java/com/alipay/global/api/model/ams/UserIdentityType.java @@ -1,7 +1,5 @@ package com.alipay.global.api.model.ams; public enum UserIdentityType { - - WALLET_TOKEN; - + WALLET_TOKEN; } diff --git a/src/main/java/com/alipay/global/api/model/ams/UserName.java b/src/main/java/com/alipay/global/api/model/ams/UserName.java index e855b02..bce1ad1 100644 --- a/src/main/java/com/alipay/global/api/model/ams/UserName.java +++ b/src/main/java/com/alipay/global/api/model/ams/UserName.java @@ -1,19 +1,31 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** UserName */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class UserName { - private String firstName; - private String middleName; - private String lastName; - private String fullName; + private String firstName; + + private String middleName; + + private String lastName; + private String fullName; } diff --git a/src/main/java/com/alipay/global/api/model/ams/VaultingCard.java b/src/main/java/com/alipay/global/api/model/ams/VaultingCard.java index bfdc9e8..020d7cf 100644 --- a/src/main/java/com/alipay/global/api/model/ams/VaultingCard.java +++ b/src/main/java/com/alipay/global/api/model/ams/VaultingCard.java @@ -1,14 +1,8 @@ package com.alipay.global.api.model.ams; import lombok.AllArgsConstructor; -import lombok.Builder; import lombok.Data; -import lombok.NoArgsConstructor; @Data @AllArgsConstructor -public class VaultingCard extends CardPaymentMethodDetail { - - - -} +public class VaultingCard extends CardPaymentMethodDetail {} diff --git a/src/main/java/com/alipay/global/api/model/ams/VaultingPaymentMethodDetail.java b/src/main/java/com/alipay/global/api/model/ams/VaultingPaymentMethodDetail.java index 04a7857..6ab23a9 100644 --- a/src/main/java/com/alipay/global/api/model/ams/VaultingPaymentMethodDetail.java +++ b/src/main/java/com/alipay/global/api/model/ams/VaultingPaymentMethodDetail.java @@ -10,7 +10,7 @@ @NoArgsConstructor @AllArgsConstructor public class VaultingPaymentMethodDetail { - private String paymentMethodType; - private VaultingCard card; - private Wallet wallet; -} \ No newline at end of file + private String paymentMethodType; + private VaultingCard card; + private Wallet wallet; +} diff --git a/src/main/java/com/alipay/global/api/model/ams/VaultingStatus.java b/src/main/java/com/alipay/global/api/model/ams/VaultingStatus.java index c499139..f65e1a2 100644 --- a/src/main/java/com/alipay/global/api/model/ams/VaultingStatus.java +++ b/src/main/java/com/alipay/global/api/model/ams/VaultingStatus.java @@ -1,8 +1,8 @@ package com.alipay.global.api.model.ams; public enum VaultingStatus { - SUCCESS, - FAIL, - PROCESSING, - ; + SUCCESS, + FAIL, + PROCESSING, + ; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Wallet.java b/src/main/java/com/alipay/global/api/model/ams/Wallet.java index ed2176b..36bb275 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Wallet.java +++ b/src/main/java/com/alipay/global/api/model/ams/Wallet.java @@ -1,20 +1,33 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** Wallet */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Wallet { - private String accountNo; - private UserName accountHolderName; - private String phoneNo; - private String email; - private Address billingAddress; - private String token; - private String tokenExpiryTime; + + private String accountNo; + + private UserName accountHolderName; + + private String phoneNo; + + private String email; + + private Address billingAddress; } diff --git a/src/main/java/com/alipay/global/api/model/ams/WalletPaymentMethodType.java b/src/main/java/com/alipay/global/api/model/ams/WalletPaymentMethodType.java index 29aea07..72ebaad 100644 --- a/src/main/java/com/alipay/global/api/model/ams/WalletPaymentMethodType.java +++ b/src/main/java/com/alipay/global/api/model/ams/WalletPaymentMethodType.java @@ -1,84 +1,82 @@ package com.alipay.global.api.model.ams; public enum WalletPaymentMethodType { - - CONNECT_WALLET, - CARD, - EPS, - BANCONTACT, - PIX, - MERCADOPAGO_BR, - PAGALEVE, - MERCADOPAGO_CL, - ALIPAY_CN, - JKOPAY, - ALIPAY_HK, - BANCOMATPAY, - DANA, - KREDIVO_ID, - OVO, - GOPAY_ID, - BANKTRANSFER_MAYBANK, - BANKTRANSFER_BNI, - BANKTRANSFER_PERMATA, - CIMBNIAGA, - BANKTRANSFER_BSI, - ATMTRANSFER_ID, - QRIS, - SHOPEEPAY_ID, - PAYPAY, - KONBINI, - SEVENELEVEN, - ONLINEBANKING_PAYEASY, - BOOST, - TNG, - GRABPAY_MY, - ONLINEBANKING_FPX, - SHOPEEPAY_MY, - MERCADOPAGO_MX, - IDEAL, - MERCADOPAGO_PE, - BPI, - GCASH, - BILLEASE, - MAYA, - ONLINEBANKING_UBP, - SHOPEEPAY_PH, - GRABPAY_PH, - PAYU, - P24, - BLIK, - GRABPAY_SG, - PAYNOW, - SHOPEEPAY_SG, - KAKAOPAY, - NAVERPAY, - TOSSPAY, - BANKTRANSFER_QUICKPAY, - RABBIT_LINE_PAY, - TRUEMONEY, - ONLINEBANKING_KRUNGTHAIBANK, - ONLINEBANKING_SIAMCOMMERCIALBANK, - ONLINEBANKING_BANGKOKBANK, - ONLINEBANKING_BANKOFAYUDHYA, - ONLINEBANKING_KASIKORNBANK, - BANKTRANSFER_BANGKOKBANK, - BANKTRANSFER_SIAMCOMMERCIALBANK, - BANKTRANSFER_BANKOFAYUDHYA, - BANKTRANSFER_KRUNGTHAIBANK, - BANKTRANSFER_KASIKORNBANK, - BANKTRANSFER_GOVERNMENTSAVINGSBANK, - PROMPTPAY, - BANKAPP_BANGKOKBANK, - BANKAPP_SIAMCOMMERCIALBANK, - BANKAPP_BANKOFAYUDHYA, - BANKAPP_KRUNGTHAIBANK, - SHOPEEPAY_TH, - KPLUS, - ZALOPAY, - MOMO, - ONLINEBANKING_YAPILY, - DIDI_PAY_LATER, - ; - + CONNECT_WALLET, + CARD, + EPS, + BANCONTACT, + PIX, + MERCADOPAGO_BR, + PAGALEVE, + MERCADOPAGO_CL, + ALIPAY_CN, + JKOPAY, + ALIPAY_HK, + BANCOMATPAY, + DANA, + KREDIVO_ID, + OVO, + GOPAY_ID, + BANKTRANSFER_MAYBANK, + BANKTRANSFER_BNI, + BANKTRANSFER_PERMATA, + CIMBNIAGA, + BANKTRANSFER_BSI, + ATMTRANSFER_ID, + QRIS, + SHOPEEPAY_ID, + PAYPAY, + KONBINI, + SEVENELEVEN, + ONLINEBANKING_PAYEASY, + BOOST, + TNG, + GRABPAY_MY, + ONLINEBANKING_FPX, + SHOPEEPAY_MY, + MERCADOPAGO_MX, + IDEAL, + MERCADOPAGO_PE, + BPI, + GCASH, + BILLEASE, + MAYA, + ONLINEBANKING_UBP, + SHOPEEPAY_PH, + GRABPAY_PH, + PAYU, + P24, + BLIK, + GRABPAY_SG, + PAYNOW, + SHOPEEPAY_SG, + KAKAOPAY, + NAVERPAY, + TOSSPAY, + BANKTRANSFER_QUICKPAY, + RABBIT_LINE_PAY, + TRUEMONEY, + ONLINEBANKING_KRUNGTHAIBANK, + ONLINEBANKING_SIAMCOMMERCIALBANK, + ONLINEBANKING_BANGKOKBANK, + ONLINEBANKING_BANKOFAYUDHYA, + ONLINEBANKING_KASIKORNBANK, + BANKTRANSFER_BANGKOKBANK, + BANKTRANSFER_SIAMCOMMERCIALBANK, + BANKTRANSFER_BANKOFAYUDHYA, + BANKTRANSFER_KRUNGTHAIBANK, + BANKTRANSFER_KASIKORNBANK, + BANKTRANSFER_GOVERNMENTSAVINGSBANK, + PROMPTPAY, + BANKAPP_BANGKOKBANK, + BANKAPP_SIAMCOMMERCIALBANK, + BANKAPP_BANKOFAYUDHYA, + BANKAPP_KRUNGTHAIBANK, + SHOPEEPAY_TH, + KPLUS, + ZALOPAY, + MOMO, + ONLINEBANKING_YAPILY, + DIDI_PAY_LATER, + ; } diff --git a/src/main/java/com/alipay/global/api/model/ams/WebSite.java b/src/main/java/com/alipay/global/api/model/ams/WebSite.java index f799f94..8dbeafe 100644 --- a/src/main/java/com/alipay/global/api/model/ams/WebSite.java +++ b/src/main/java/com/alipay/global/api/model/ams/WebSite.java @@ -1,19 +1,38 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.model.ams; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; +/** WebSite */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class WebSite { - private String name; - private String url; - private String desc; - private String type; + private String name; + + /** The URL of the merchant website. More information: Maximum length: 2048 characters */ + private String url; + + private String desc; + /** + * Website type. Valid values are: COMPANY_INTRODUCE: the website that introduces company + * information. Specify websites.type as COMPANY_INTRODUCE when the value of paymentMethodType is + * TRUEMONEY. TRADING: the trading website. The same applies when the value is empty or you do not + * specify this parameter. More information: Maximum length: 32 characters + */ + private String type; } diff --git a/src/main/java/com/alipay/global/api/model/ams/WebSiteType.java b/src/main/java/com/alipay/global/api/model/ams/WebSiteType.java index 6deac58..b592690 100644 --- a/src/main/java/com/alipay/global/api/model/ams/WebSiteType.java +++ b/src/main/java/com/alipay/global/api/model/ams/WebSiteType.java @@ -1,8 +1,7 @@ package com.alipay.global.api.model.ams; public enum WebSiteType { - COMPANY_INTRODUCE, - TRADING, - - ; + COMPANY_INTRODUCE, + TRADING, + ; } diff --git a/src/main/java/com/alipay/global/api/model/ams/Work.java b/src/main/java/com/alipay/global/api/model/ams/Work.java index 44ddadb..1a9a5c1 100644 --- a/src/main/java/com/alipay/global/api/model/ams/Work.java +++ b/src/main/java/com/alipay/global/api/model/ams/Work.java @@ -10,6 +10,6 @@ @NoArgsConstructor @AllArgsConstructor public class Work { - private String regionCode; - private String phoneNo; + private String regionCode; + private String phoneNo; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Address.java b/src/main/java/com/alipay/global/api/model/aps/Address.java index 3df8862..b5789d5 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Address.java +++ b/src/main/java/com/alipay/global/api/model/aps/Address.java @@ -11,11 +11,10 @@ @AllArgsConstructor public class Address { - private String region; - private String state; - private String city; - private String address1; - private String address2; - private String zipCode; - + private String region; + private String state; + private String city; + private String address1; + private String address2; + private String zipCode; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Amount.java b/src/main/java/com/alipay/global/api/model/aps/Amount.java index 3200046..60f1ed6 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Amount.java +++ b/src/main/java/com/alipay/global/api/model/aps/Amount.java @@ -11,7 +11,6 @@ @AllArgsConstructor public class Amount { - private String currency; - private String value; - + private String currency; + private String value; } diff --git a/src/main/java/com/alipay/global/api/model/aps/AmountLimit.java b/src/main/java/com/alipay/global/api/model/aps/AmountLimit.java index 6f57928..50f2f65 100644 --- a/src/main/java/com/alipay/global/api/model/aps/AmountLimit.java +++ b/src/main/java/com/alipay/global/api/model/aps/AmountLimit.java @@ -11,8 +11,7 @@ @AllArgsConstructor public class AmountLimit { - private Amount maxAmount; - private Amount minAmount; - private Amount remainAmount; - + private Amount maxAmount; + private Amount minAmount; + private Amount remainAmount; } diff --git a/src/main/java/com/alipay/global/api/model/aps/AmountLimitInfo.java b/src/main/java/com/alipay/global/api/model/aps/AmountLimitInfo.java index 5726adf..6742f93 100644 --- a/src/main/java/com/alipay/global/api/model/aps/AmountLimitInfo.java +++ b/src/main/java/com/alipay/global/api/model/aps/AmountLimitInfo.java @@ -11,8 +11,7 @@ @AllArgsConstructor public class AmountLimitInfo { - private AmountLimit singleLimit; - private AmountLimit dayLimit; - private AmountLimit monthLimit; - + private AmountLimit singleLimit; + private AmountLimit dayLimit; + private AmountLimit monthLimit; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Buyer.java b/src/main/java/com/alipay/global/api/model/aps/Buyer.java index 51708ae..c3a3ef4 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Buyer.java +++ b/src/main/java/com/alipay/global/api/model/aps/Buyer.java @@ -12,9 +12,8 @@ @AllArgsConstructor public class Buyer { - private String referenceBuyerId; - private UserName buyerName; - private String buyerPhoneNo; - private String buyerEmail; - + private String referenceBuyerId; + private UserName buyerName; + private String buyerPhoneNo; + private String buyerEmail; } diff --git a/src/main/java/com/alipay/global/api/model/aps/CodeDetail.java b/src/main/java/com/alipay/global/api/model/aps/CodeDetail.java index 6719d79..c0a6b04 100644 --- a/src/main/java/com/alipay/global/api/model/aps/CodeDetail.java +++ b/src/main/java/com/alipay/global/api/model/aps/CodeDetail.java @@ -11,8 +11,7 @@ @AllArgsConstructor public class CodeDetail { - private CodeValueType codeValueType; - private String codeValue; - private DisplayType displayType; - + private CodeValueType codeValueType; + private String codeValue; + private DisplayType displayType; } diff --git a/src/main/java/com/alipay/global/api/model/aps/CodeType.java b/src/main/java/com/alipay/global/api/model/aps/CodeType.java index 5ae34dd..b91fbbf 100644 --- a/src/main/java/com/alipay/global/api/model/aps/CodeType.java +++ b/src/main/java/com/alipay/global/api/model/aps/CodeType.java @@ -1,7 +1,6 @@ package com.alipay.global.api.model.aps; public enum CodeType { - - ORDER_CODE, STORE_CODE; - + ORDER_CODE, + STORE_CODE; } diff --git a/src/main/java/com/alipay/global/api/model/aps/CodeValueType.java b/src/main/java/com/alipay/global/api/model/aps/CodeValueType.java index 1775c42..69d0239 100644 --- a/src/main/java/com/alipay/global/api/model/aps/CodeValueType.java +++ b/src/main/java/com/alipay/global/api/model/aps/CodeValueType.java @@ -1,7 +1,6 @@ package com.alipay.global.api.model.aps; public enum CodeValueType { - - BARCODE, QRCODE; - + BARCODE, + QRCODE; } diff --git a/src/main/java/com/alipay/global/api/model/aps/DisplayType.java b/src/main/java/com/alipay/global/api/model/aps/DisplayType.java index 3d20b72..05efe1a 100644 --- a/src/main/java/com/alipay/global/api/model/aps/DisplayType.java +++ b/src/main/java/com/alipay/global/api/model/aps/DisplayType.java @@ -1,7 +1,8 @@ package com.alipay.global.api.model.aps; public enum DisplayType { - - TEXT, MIDDLEIMAGE, SMALLIMAGE, BIGIMAGE; - + TEXT, + MIDDLEIMAGE, + SMALLIMAGE, + BIGIMAGE; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Env.java b/src/main/java/com/alipay/global/api/model/aps/Env.java index 0f44a02..bc04e3e 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Env.java +++ b/src/main/java/com/alipay/global/api/model/aps/Env.java @@ -11,13 +11,12 @@ @AllArgsConstructor public class Env { - private TerminalType terminalType; - private OsType osType; - private String userAgent; - private String deviceTokenId; - private String clientIp; - private String storeTerminalId; - private String cookieId; - private String storeTerminalRequestTime; - + private TerminalType terminalType; + private OsType osType; + private String userAgent; + private String deviceTokenId; + private String clientIp; + private String storeTerminalId; + private String cookieId; + private String storeTerminalRequestTime; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Goods.java b/src/main/java/com/alipay/global/api/model/aps/Goods.java index e68b916..3a2c1f5 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Goods.java +++ b/src/main/java/com/alipay/global/api/model/aps/Goods.java @@ -11,11 +11,10 @@ @AllArgsConstructor public class Goods { - private String referenceGoodsId; - private String goodsName; - private String goodsCategory; - private String goodsBrand; - private Amount goodsUnitAmount; - private String goodsQuantity; - + private String referenceGoodsId; + private String goodsName; + private String goodsCategory; + private String goodsBrand; + private Amount goodsUnitAmount; + private String goodsQuantity; } diff --git a/src/main/java/com/alipay/global/api/model/aps/InStorePaymentScenario.java b/src/main/java/com/alipay/global/api/model/aps/InStorePaymentScenario.java index f723496..0eb3bf2 100644 --- a/src/main/java/com/alipay/global/api/model/aps/InStorePaymentScenario.java +++ b/src/main/java/com/alipay/global/api/model/aps/InStorePaymentScenario.java @@ -2,18 +2,11 @@ public enum InStorePaymentScenario { - /** - * User uses a payment code to pay. - */ - PaymentCode, - /** - * User scans an order code to pay. - */ - OrderCode, - - /** - * User scans an entry code to pay. - */ - EntryCode; + /** User uses a payment code to pay. */ + PaymentCode, + /** User scans an order code to pay. */ + OrderCode, + /** User scans an entry code to pay. */ + EntryCode; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Logo.java b/src/main/java/com/alipay/global/api/model/aps/Logo.java index 0e1ef61..bb0d2b9 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Logo.java +++ b/src/main/java/com/alipay/global/api/model/aps/Logo.java @@ -11,7 +11,6 @@ @AllArgsConstructor public class Logo { - private String logoName; - private String logoUrl; - + private String logoName; + private String logoUrl; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Merchant.java b/src/main/java/com/alipay/global/api/model/aps/Merchant.java index 8f6cccc..ab4fa68 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Merchant.java +++ b/src/main/java/com/alipay/global/api/model/aps/Merchant.java @@ -11,12 +11,11 @@ @AllArgsConstructor public class Merchant { - private String referenceMerchantId; - private String merchantMCC; - private String merchantName; - private Address merchantAddress; - private String merchantDisplayName; - private String merchantRegisterDate; - private Store store; - + private String referenceMerchantId; + private String merchantMCC; + private String merchantName; + private Address merchantAddress; + private String merchantDisplayName; + private String merchantRegisterDate; + private Store store; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Order.java b/src/main/java/com/alipay/global/api/model/aps/Order.java index 5fbb679..1811abd 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Order.java +++ b/src/main/java/com/alipay/global/api/model/aps/Order.java @@ -1,25 +1,23 @@ package com.alipay.global.api.model.aps; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.List; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Order { - private String referenceOrderId; - private String orderDescription; - private Amount orderAmount; - private Merchant merchant; - private List goods; - private Shipping shipping; - private Buyer buyer; - private Env env; - + private String referenceOrderId; + private String orderDescription; + private Amount orderAmount; + private Merchant merchant; + private List goods; + private Shipping shipping; + private Buyer buyer; + private Env env; } diff --git a/src/main/java/com/alipay/global/api/model/aps/OrderCodeForm.java b/src/main/java/com/alipay/global/api/model/aps/OrderCodeForm.java index 426e229..ce3cab2 100644 --- a/src/main/java/com/alipay/global/api/model/aps/OrderCodeForm.java +++ b/src/main/java/com/alipay/global/api/model/aps/OrderCodeForm.java @@ -1,22 +1,20 @@ package com.alipay.global.api.model.aps; import com.alipay.global.api.model.ams.CodeDetail; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.List; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class OrderCodeForm { - private String paymentMethodType; - private String expireTime; - private List codeDetails; - private String extendInfo; - + private String paymentMethodType; + private String expireTime; + private List codeDetails; + private String extendInfo; } diff --git a/src/main/java/com/alipay/global/api/model/aps/OsType.java b/src/main/java/com/alipay/global/api/model/aps/OsType.java index a69380b..7372173 100644 --- a/src/main/java/com/alipay/global/api/model/aps/OsType.java +++ b/src/main/java/com/alipay/global/api/model/aps/OsType.java @@ -1,7 +1,6 @@ package com.alipay.global.api.model.aps; public enum OsType { - - IOS, ANDROID; - + IOS, + ANDROID; } diff --git a/src/main/java/com/alipay/global/api/model/aps/PaymentFactor.java b/src/main/java/com/alipay/global/api/model/aps/PaymentFactor.java index 7dd778a..b8f2db0 100644 --- a/src/main/java/com/alipay/global/api/model/aps/PaymentFactor.java +++ b/src/main/java/com/alipay/global/api/model/aps/PaymentFactor.java @@ -11,9 +11,8 @@ @AllArgsConstructor public class PaymentFactor { - private Boolean isInStorePayment; - private Boolean isCashierPayment; - private PresentmentMode presentmentMode; - private InStorePaymentScenario inStorePaymentScenario; - + private Boolean isInStorePayment; + private Boolean isCashierPayment; + private PresentmentMode presentmentMode; + private InStorePaymentScenario inStorePaymentScenario; } diff --git a/src/main/java/com/alipay/global/api/model/aps/PaymentMethod.java b/src/main/java/com/alipay/global/api/model/aps/PaymentMethod.java index aa2e59c..bbc7d33 100644 --- a/src/main/java/com/alipay/global/api/model/aps/PaymentMethod.java +++ b/src/main/java/com/alipay/global/api/model/aps/PaymentMethod.java @@ -11,9 +11,8 @@ @AllArgsConstructor public class PaymentMethod { - private String paymentMethodType; - private String paymentMethodId; - private String customerId; - private PaymentMethodMetaData paymentMethodMetaData; - + private String paymentMethodType; + private String paymentMethodId; + private String customerId; + private PaymentMethodMetaData paymentMethodMetaData; } diff --git a/src/main/java/com/alipay/global/api/model/aps/PaymentMethodCategoryType.java b/src/main/java/com/alipay/global/api/model/aps/PaymentMethodCategoryType.java index 75fc01b..f2d2996 100644 --- a/src/main/java/com/alipay/global/api/model/aps/PaymentMethodCategoryType.java +++ b/src/main/java/com/alipay/global/api/model/aps/PaymentMethodCategoryType.java @@ -1,7 +1,5 @@ package com.alipay.global.api.model.aps; public enum PaymentMethodCategoryType { - - WALLET; - + WALLET; } diff --git a/src/main/java/com/alipay/global/api/model/aps/PaymentMethodMetaData.java b/src/main/java/com/alipay/global/api/model/aps/PaymentMethodMetaData.java index 72e7ada..6936236 100644 --- a/src/main/java/com/alipay/global/api/model/aps/PaymentMethodMetaData.java +++ b/src/main/java/com/alipay/global/api/model/aps/PaymentMethodMetaData.java @@ -11,6 +11,5 @@ @AllArgsConstructor public class PaymentMethodMetaData { - private String authClientId; - + private String authClientId; } diff --git a/src/main/java/com/alipay/global/api/model/aps/PaymentOption.java b/src/main/java/com/alipay/global/api/model/aps/PaymentOption.java index 875900e..5600a49 100644 --- a/src/main/java/com/alipay/global/api/model/aps/PaymentOption.java +++ b/src/main/java/com/alipay/global/api/model/aps/PaymentOption.java @@ -11,12 +11,11 @@ @AllArgsConstructor public class PaymentOption { - private String paymentMethodType; - private PaymentMethodCategoryType paymentMethodCategory; - private boolean enabled; - private boolean preferred; - private String disableReason; - private Logo logo; - private PaymentOptionDetail paymentOptionDetail; - + private String paymentMethodType; + private PaymentMethodCategoryType paymentMethodCategory; + private boolean enabled; + private boolean preferred; + private String disableReason; + private Logo logo; + private PaymentOptionDetail paymentOptionDetail; } diff --git a/src/main/java/com/alipay/global/api/model/aps/PaymentOptionDetail.java b/src/main/java/com/alipay/global/api/model/aps/PaymentOptionDetail.java index 7b095ad..e374cb8 100644 --- a/src/main/java/com/alipay/global/api/model/aps/PaymentOptionDetail.java +++ b/src/main/java/com/alipay/global/api/model/aps/PaymentOptionDetail.java @@ -11,7 +11,6 @@ @AllArgsConstructor public class PaymentOptionDetail { - private PaymentOptionDetailType paymentOptionDetailType; - private WalletPaymentOptionDetail connectWallet; - + private PaymentOptionDetailType paymentOptionDetailType; + private WalletPaymentOptionDetail connectWallet; } diff --git a/src/main/java/com/alipay/global/api/model/aps/PaymentOptionDetailType.java b/src/main/java/com/alipay/global/api/model/aps/PaymentOptionDetailType.java index daf3bf5..d75e6a8 100644 --- a/src/main/java/com/alipay/global/api/model/aps/PaymentOptionDetailType.java +++ b/src/main/java/com/alipay/global/api/model/aps/PaymentOptionDetailType.java @@ -1,7 +1,5 @@ package com.alipay.global.api.model.aps; public enum PaymentOptionDetailType { - - CONNECT_WALLET; - + CONNECT_WALLET; } diff --git a/src/main/java/com/alipay/global/api/model/aps/PresentmentMode.java b/src/main/java/com/alipay/global/api/model/aps/PresentmentMode.java index 760eb39..6484dda 100644 --- a/src/main/java/com/alipay/global/api/model/aps/PresentmentMode.java +++ b/src/main/java/com/alipay/global/api/model/aps/PresentmentMode.java @@ -1,5 +1,5 @@ package com.alipay.global.api.model.aps; public enum PresentmentMode { - TILE; + TILE; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Quote.java b/src/main/java/com/alipay/global/api/model/aps/Quote.java index 0f56f86..3cd8682 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Quote.java +++ b/src/main/java/com/alipay/global/api/model/aps/Quote.java @@ -1,24 +1,22 @@ package com.alipay.global.api.model.aps; +import java.math.BigDecimal; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.math.BigDecimal; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Quote { - private String quoteId; - private String quoteCurrencyPair; - private BigDecimal quotePrice; - private String quoteStartTime; - private String quoteExpiryTime; - private String baseCurrency; - private String quoteUnit; - + private String quoteId; + private String quoteCurrencyPair; + private BigDecimal quotePrice; + private String quoteStartTime; + private String quoteExpiryTime; + private String baseCurrency; + private String quoteUnit; } diff --git a/src/main/java/com/alipay/global/api/model/aps/SettlementStrategy.java b/src/main/java/com/alipay/global/api/model/aps/SettlementStrategy.java index 302842c..4a35c6b 100644 --- a/src/main/java/com/alipay/global/api/model/aps/SettlementStrategy.java +++ b/src/main/java/com/alipay/global/api/model/aps/SettlementStrategy.java @@ -11,6 +11,5 @@ @AllArgsConstructor public class SettlementStrategy { - private String settlementCurrency; - + private String settlementCurrency; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Shipping.java b/src/main/java/com/alipay/global/api/model/aps/Shipping.java index e066766..ddc5a47 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Shipping.java +++ b/src/main/java/com/alipay/global/api/model/aps/Shipping.java @@ -11,9 +11,8 @@ @AllArgsConstructor public class Shipping { - private UserName shippingName; - private Address shippingAddress; - private String shippingCarrier; - private String shippingPhoneNo; - + private UserName shippingName; + private Address shippingAddress; + private String shippingCarrier; + private String shippingPhoneNo; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Store.java b/src/main/java/com/alipay/global/api/model/aps/Store.java index 236e761..0d2109a 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Store.java +++ b/src/main/java/com/alipay/global/api/model/aps/Store.java @@ -11,13 +11,12 @@ @AllArgsConstructor public class Store { - private String referenceStoreId; - private String storeName; - private String storeMCC; - private String storeDisplayName; - private String storeTerminalId; - private String storeOperatorId; - private String storePhoneNo; - private Address storeAddress; - + private String referenceStoreId; + private String storeName; + private String storeMCC; + private String storeDisplayName; + private String storeTerminalId; + private String storeOperatorId; + private String storePhoneNo; + private Address storeAddress; } diff --git a/src/main/java/com/alipay/global/api/model/aps/TerminalType.java b/src/main/java/com/alipay/global/api/model/aps/TerminalType.java index 053674d..21cc614 100644 --- a/src/main/java/com/alipay/global/api/model/aps/TerminalType.java +++ b/src/main/java/com/alipay/global/api/model/aps/TerminalType.java @@ -1,5 +1,8 @@ package com.alipay.global.api.model.aps; public enum TerminalType { - WEB, APP, WAP, MINI_APP; + WEB, + APP, + WAP, + MINI_APP; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Transaction.java b/src/main/java/com/alipay/global/api/model/aps/Transaction.java index 334840b..6f23d24 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Transaction.java +++ b/src/main/java/com/alipay/global/api/model/aps/Transaction.java @@ -12,12 +12,11 @@ @AllArgsConstructor public class Transaction { - private Result transactionResult; - private String transactionId; - private TransactionType transactionType; - private TransactionStatusType transactionStatus; - private Amount transactionAmount; - private String transactionRequestId; - private String transactionTime; - + private Result transactionResult; + private String transactionId; + private TransactionType transactionType; + private TransactionStatusType transactionStatus; + private Amount transactionAmount; + private String transactionRequestId; + private String transactionTime; } diff --git a/src/main/java/com/alipay/global/api/model/aps/TransactionStatusType.java b/src/main/java/com/alipay/global/api/model/aps/TransactionStatusType.java index b938d50..957e475 100644 --- a/src/main/java/com/alipay/global/api/model/aps/TransactionStatusType.java +++ b/src/main/java/com/alipay/global/api/model/aps/TransactionStatusType.java @@ -1,7 +1,8 @@ package com.alipay.global.api.model.aps; public enum TransactionStatusType { - - SUCCESS, FAIL, PROCESSING, CANCELLED; - + SUCCESS, + FAIL, + PROCESSING, + CANCELLED; } diff --git a/src/main/java/com/alipay/global/api/model/aps/TransactionType.java b/src/main/java/com/alipay/global/api/model/aps/TransactionType.java index c537b78..80d08ef 100644 --- a/src/main/java/com/alipay/global/api/model/aps/TransactionType.java +++ b/src/main/java/com/alipay/global/api/model/aps/TransactionType.java @@ -2,29 +2,16 @@ public enum TransactionType { - /** - * PAYMENT - */ - PAYMENT, - /** - * REFUND - */ - REFUND, - /** - * AUTH - */ - AUTHORIZATION, - /** - * CAPTURE - */ - CAPTURE, - /** - * CANCEL - */ - CANCEL, - /** - * VOID - */ - VOID; - + /** PAYMENT */ + PAYMENT, + /** REFUND */ + REFUND, + /** AUTH */ + AUTHORIZATION, + /** CAPTURE */ + CAPTURE, + /** CANCEL */ + CANCEL, + /** VOID */ + VOID; } diff --git a/src/main/java/com/alipay/global/api/model/aps/UserName.java b/src/main/java/com/alipay/global/api/model/aps/UserName.java index c15d9b2..2e8f164 100644 --- a/src/main/java/com/alipay/global/api/model/aps/UserName.java +++ b/src/main/java/com/alipay/global/api/model/aps/UserName.java @@ -11,9 +11,8 @@ @AllArgsConstructor public class UserName { - private String firstName; - private String middleName; - private String lastName; - private String fullName; - + private String firstName; + private String middleName; + private String lastName; + private String fullName; } diff --git a/src/main/java/com/alipay/global/api/model/aps/Wallet.java b/src/main/java/com/alipay/global/api/model/aps/Wallet.java index 155b229..7b25d7d 100644 --- a/src/main/java/com/alipay/global/api/model/aps/Wallet.java +++ b/src/main/java/com/alipay/global/api/model/aps/Wallet.java @@ -11,10 +11,9 @@ @AllArgsConstructor public class Wallet { - private String walletName; - private String walletBrandName; - private Logo walletLogo; - private String walletRegion; - private WalletFeature walletFeature; - + private String walletName; + private String walletBrandName; + private Logo walletLogo; + private String walletRegion; + private WalletFeature walletFeature; } diff --git a/src/main/java/com/alipay/global/api/model/aps/WalletFeature.java b/src/main/java/com/alipay/global/api/model/aps/WalletFeature.java index deb3a59..a7a0e0f 100644 --- a/src/main/java/com/alipay/global/api/model/aps/WalletFeature.java +++ b/src/main/java/com/alipay/global/api/model/aps/WalletFeature.java @@ -11,7 +11,6 @@ @AllArgsConstructor public class WalletFeature { - private Boolean supportCodeScan; - private Boolean supportCashierRedirection; - + private Boolean supportCodeScan; + private Boolean supportCashierRedirection; } diff --git a/src/main/java/com/alipay/global/api/model/aps/WalletPaymentOptionDetail.java b/src/main/java/com/alipay/global/api/model/aps/WalletPaymentOptionDetail.java index ab9b770..d4277b8 100644 --- a/src/main/java/com/alipay/global/api/model/aps/WalletPaymentOptionDetail.java +++ b/src/main/java/com/alipay/global/api/model/aps/WalletPaymentOptionDetail.java @@ -1,18 +1,16 @@ package com.alipay.global.api.model.aps; +import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.List; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class WalletPaymentOptionDetail { - private List supportWallets; - + private List supportWallets; } diff --git a/src/main/java/com/alipay/global/api/model/constants/AntomPathConstants.java b/src/main/java/com/alipay/global/api/model/constants/AntomPathConstants.java index 1ed9e6b..9768554 100644 --- a/src/main/java/com/alipay/global/api/model/constants/AntomPathConstants.java +++ b/src/main/java/com/alipay/global/api/model/constants/AntomPathConstants.java @@ -10,185 +10,154 @@ */ public class AntomPathConstants { - /** - * see auth consult - */ - public static final String AUTH_CONSULT_PATH = "/ams/api/v1/authorizations/consult"; - - /** - * see auth apply token - */ - public static final String AUTH_APPLY_TOKEN_PATH = "/ams/api/v1/authorizations/applyToken"; - - /** - * see auth revoke - */ - public static final String AUTH_REVOKE_PATH = "/ams/api/v1/authorizations/revoke"; - - - /** - * see create vaulting session - */ - public static final String CREATE_VAULTING_SESSION_PATH = "/ams/api/v1/vaults/createVaultingSession"; - - /** - * see vault payment method - */ - public static final String VAULT_PAYMENT_METHOD_PATH = "/ams/api/v1/vaults/vaultPaymentMethod"; - - /** - * see inquire vaulting - */ - public static final String INQUIRE_VAULTING_PATH = "/ams/api/v1/vaults/inquireVaulting"; - - /** - * see inquireToken vaulting - */ - public static final String INQUIRE_TOKEN_VAULTING_PATH = "/ams/api/v1/vaults/inquireToken"; - - /** - * see updateToken vaulting - */ - public static final String UPDATE_TOKEN_VAULTING_PATH = "/ams/api/v1/vaults/updateToken"; - - /** - * see deleteToken vaulting - */ - public static final String DELETE_TOKEN_VAULTING_PATH = "/ams/api/v1/vaults/deleteToken"; - - /** - * see consult - */ - public static final String CONSULT_PAYMENT_PATH = "/ams/api/v1/payments/consult"; - - /** - * see pay (Checkout Payment) or pay (Auto Debit) - */ - public static final String PAYMENT_PATH = "/ams/api/v1/payments/pay"; - - /** - * see fetchNonce - */ - public static final String PAYMENT_FETCH_NONCE_PATH = "/ams/api/v1/payments/fetchNonce"; - - /** - * see inquireInstallment - */ - public static final String PAYMENT_INQUIRE_INSTALLMENT_PATH = "/ams/api/v1/payments/inquireInstallment"; + /** see auth consult */ + public static final String AUTH_CONSULT_PATH = "/ams/api/v1/authorizations/consult"; - /** - * see inquireExchangeRate - */ - public static final String PAYMENT_INQUIRE_EXCHANGE_RATE_PATH = "/ams/api/v1/payments/inquireExchangeRate"; + /** see auth apply token */ + public static final String AUTH_APPLY_TOKEN_PATH = "/ams/api/v1/authorizations/applyToken"; - /** - * see create payment session or create payment session - */ - public static final String CREATE_SESSION_PATH = "/ams/api/v1/payments/createPaymentSession"; + /** see auth revoke */ + public static final String AUTH_REVOKE_PATH = "/ams/api/v1/authorizations/revoke"; - /** - * see capture - */ - public static final String CAPTURE_PATH = "/ams/api/v1/payments/capture"; + /** + * see create vaulting session + */ + public static final String CREATE_VAULTING_SESSION_PATH = + "/ams/api/v1/vaults/createVaultingSession"; - /** - * see inquiry payment - */ - public static final String INQUIRY_PAYMENT_PATH = "/ams/api/v1/payments/inquiryPayment"; + /** see vault payment method */ + public static final String VAULT_PAYMENT_METHOD_PATH = "/ams/api/v1/vaults/vaultPaymentMethod"; - /** - * see cancel - */ - public static final String CANCEL_PATH = "/ams/api/v1/payments/cancel"; + /** see inquire vaulting */ + public static final String INQUIRE_VAULTING_PATH = "/ams/api/v1/vaults/inquireVaulting"; - public static final String SYNC_ARREAR_PATH = "/ams/api/v1/payments/syncArrear"; + /** + * see inquireToken vaulting + */ + public static final String INQUIRE_TOKEN_VAULTING_PATH = "/ams/api/v1/vaults/inquireToken"; - public static final String CREATE_DEVICE_CERTIFICATE_PATH = "/ams/api/v1/payments/createDeviceCertificate"; + /** + * see updateToken vaulting + */ + public static final String UPDATE_TOKEN_VAULTING_PATH = "/ams/api/v1/vaults/updateToken"; + /** + * see deleteToken vaulting + */ + public static final String DELETE_TOKEN_VAULTING_PATH = "/ams/api/v1/vaults/deleteToken"; - /** - * see create subscription - */ - public static final String SUBSCRIPTION_CREATE_PATH = "/ams/api/v1/subscriptions/create"; + /** see consult */ + public static final String CONSULT_PAYMENT_PATH = "/ams/api/v1/payments/consult"; - /** - * see change subscription - */ - public static final String SUBSCRIPTION_CHANGE_PATH = "/ams/api/v1/subscriptions/change"; + /** + * see pay (Checkout Payment) + * or pay (Auto Debit) + */ + public static final String PAYMENT_PATH = "/ams/api/v1/payments/pay"; - /** - * see cancel subscription - */ - public static final String SUBSCRIPTION_CANCEL_PATH = "/ams/api/v1/subscriptions/cancel"; + /** see fetchNonce */ + public static final String PAYMENT_FETCH_NONCE_PATH = "/ams/api/v1/payments/fetchNonce"; - public static final String SUBSCRIPTION_UPDATE_PATH = "/ams/api/v1/subscriptions/update"; + /** + * see inquireInstallment + * + */ + public static final String PAYMENT_INQUIRE_INSTALLMENT_PATH = + "/ams/api/v1/payments/inquireInstallment"; - public static final String SUBSCRIPTION_INQUIRE_PATH = "/ams/api/v1/payments/inquire"; + /** + * see inquireExchangeRate + * + */ + public static final String PAYMENT_INQUIRE_EXCHANGE_RATE_PATH = + "/ams/api/v1/payments/inquireExchangeRate"; - /** - * see accept dispute - */ - public static final String ACCEPT_DISPUTE_PATH = "/ams/api/v1/payments/acceptDispute"; + /** + * see create payment session + * or create payment + * session + */ + public static final String CREATE_SESSION_PATH = "/ams/api/v1/payments/createPaymentSession"; - /** - * see supply defense document - */ - public static final String SUPPLY_DEFENCE_DOC_PATH = "/ams/api/v1/payments/supplyDefenseDocument"; + /** see capture */ + public static final String CAPTURE_PATH = "/ams/api/v1/payments/capture"; - /** - * see download dispute evidence - */ - public static final String DOWNLOAD_DISPUTE_EVIDENCE_PATH = "/ams/api/v1/payments/downloadDisputeEvidence"; + /** see inquiry payment */ + public static final String INQUIRY_PAYMENT_PATH = "/ams/api/v1/payments/inquiryPayment"; + /** see cancel */ + public static final String CANCEL_PATH = "/ams/api/v1/payments/cancel"; - /** - * see refund - */ - public static final String REFUND_PATH = "/ams/api/v1/payments/refund"; + public static final String SYNC_ARREAR_PATH = "/ams/api/v1/payments/syncArrear"; - /** - * see refund - */ - public static final String RETRIEVE_PATH = "/ams/api//v1/payments/retrievePaymentSession"; + public static final String CREATE_DEVICE_CERTIFICATE_PATH = + "/ams/api/v1/payments/createDeviceCertificate"; - /** - * see inquiry refund - */ - public static final String INQUIRY_REFUND_PATH = "/ams/api/v1/payments/inquiryRefund"; + /** see create subscription */ + public static final String SUBSCRIPTION_CREATE_PATH = "/ams/api/v1/subscriptions/create"; + /** see change subscription */ + public static final String SUBSCRIPTION_CHANGE_PATH = "/ams/api/v1/subscriptions/change"; - /** - * see declare - */ - public static final String DECLARE_PATH = "/ams/api/v1/customs/declare"; + /** see cancel subscription */ + public static final String SUBSCRIPTION_CANCEL_PATH = "/ams/api/v1/subscriptions/cancel"; - /** - * see inquiry declare - */ - public static final String INQUIRY_DECLARE_PATH = "/ams/api/v1/customs/inquiryDeclarationRequests"; + public static final String SUBSCRIPTION_UPDATE_PATH = "/ams/api/v1/subscriptions/update"; + public static final String SUBSCRIPTION_INQUIRE_PATH = "/ams/api/v1/payments/inquire"; - public static final String MARKETPLACE_SUBMITATTACHMENT_PATH = "/ams/api/open/openapiv2_file/v1/business/attachment/submitAttachment"; + /** see accept dispute */ + public static final String ACCEPT_DISPUTE_PATH = "/ams/api/v1/payments/acceptDispute"; - public static final String MARKETPLACE_REGISTER_PATH = "/ams/api/v1/merchants/register"; + /** + * see supply defense document + */ + public static final String SUPPLY_DEFENCE_DOC_PATH = "/ams/api/v1/payments/supplyDefenseDocument"; - public static final String MARKETPLACE_SETTLEMENTINFO_UPDATE_PATH = "/ams/api/v1/merchants/settlementInfo/update"; + /** see download dispute evidence */ + public static final String DOWNLOAD_DISPUTE_EVIDENCE_PATH = + "/ams/api/v1/payments/downloadDisputeEvidence"; - public static final String MARKETPLACE_INQUIREBALANCE_PATH = "/ams/api/v1/accounts/inquireBalance"; + /** see refund */ + public static final String REFUND_PATH = "/ams/api/v1/payments/refund"; - public static final String MARKETPLACE_SETTLE_PATH = "/ams/api/v1/payments/settle"; + /** see refund */ + public static final String RETRIEVE_PATH = "/ams/api//v1/payments/retrievePaymentSession"; - public static final String MARKETPLACE_CREATEPAYOUT_PATH = "/ams/api/v1/funds/createPayout"; + /** see inquiry refund */ + public static final String INQUIRY_REFUND_PATH = "/ams/api/v1/payments/inquiryRefund"; - public static final String MARKETPLACE_CREATETRANSFER_PATH = "/ams/api/v1/funds/createTransfer"; + /** see declare */ + public static final String DECLARE_PATH = "/ams/api/v1/customs/declare"; + /** see inquiry declare */ + public static final String INQUIRY_DECLARE_PATH = + "/ams/api/v1/customs/inquiryDeclarationRequests"; - public static final String RISK_DECIDE_PATH = "/ams/api/v1/risk/payments/decide"; + public static final String MARKETPLACE_SUBMITATTACHMENT_PATH = + "/ams/api/open/openapiv2_file/v1/business/attachment/submitAttachment"; - public static final String RISK_REPORT_PATH = "/ams/api/v1/risk/payments/reportRisk"; + public static final String MARKETPLACE_REGISTER_PATH = "/ams/api/v1/merchants/register"; - public static final String RISK_SEND_PAYMENT_RESULT_PATH = "/ams/api/v1/risk/payments/sendPaymentResult"; + public static final String MARKETPLACE_SETTLEMENTINFO_UPDATE_PATH = + "/ams/api/v1/merchants/settlementInfo/update"; - public static final String RISK_SEND_REFUND_RESULT_PATH = "/ams/api/v1/risk/payments/sendRefundResult"; + public static final String MARKETPLACE_INQUIREBALANCE_PATH = + "/ams/api/v1/accounts/inquireBalance"; -} \ No newline at end of file + public static final String MARKETPLACE_SETTLE_PATH = "/ams/api/v1/payments/settle"; + + public static final String MARKETPLACE_CREATEPAYOUT_PATH = "/ams/api/v1/funds/createPayout"; + + public static final String MARKETPLACE_CREATETRANSFER_PATH = "/ams/api/v1/funds/createTransfer"; + + public static final String RISK_DECIDE_PATH = "/ams/api/v1/risk/payments/decide"; + + public static final String RISK_REPORT_PATH = "/ams/api/v1/risk/payments/reportRisk"; + + public static final String RISK_SEND_PAYMENT_RESULT_PATH = + "/ams/api/v1/risk/payments/sendPaymentResult"; + + public static final String RISK_SEND_REFUND_RESULT_PATH = + "/ams/api/v1/risk/payments/sendRefundResult"; +} diff --git a/src/main/java/com/alipay/global/api/model/constants/EndPointConstants.java b/src/main/java/com/alipay/global/api/model/constants/EndPointConstants.java index 3824e73..01945e6 100644 --- a/src/main/java/com/alipay/global/api/model/constants/EndPointConstants.java +++ b/src/main/java/com/alipay/global/api/model/constants/EndPointConstants.java @@ -2,10 +2,9 @@ public class EndPointConstants { - public static final String SG = "https://open-sea-global.alipay.com"; + public static final String SG = "https://open-sea-global.alipay.com"; - public static final String US = "https://open-na-global.alipay.com"; - - public static final String DE = "https://open-de-global.alipay.com"; + public static final String US = "https://open-na-global.alipay.com"; + public static final String DE = "https://open-de-global.alipay.com"; } diff --git a/src/main/java/com/alipay/global/api/model/constants/PathConstants.java b/src/main/java/com/alipay/global/api/model/constants/PathConstants.java index c549ca2..54bfda0 100644 --- a/src/main/java/com/alipay/global/api/model/constants/PathConstants.java +++ b/src/main/java/com/alipay/global/api/model/constants/PathConstants.java @@ -3,33 +3,42 @@ @Deprecated public class PathConstants { - public static final String PAY_PROD_PATH = "/ams/api/v1/payments/pay"; - public static final String REFUND_PROD_PATH = "/ams/api/v1/payments/refund"; - public static final String INQUIRY_PROD_PATH = "/ams/api/v1/payments/inquiryPayment"; - public static final String CAPTURE_PROD_PATH = "/ams/api/v1/payments/capture"; - public static final String CREATE_SESSION_PROD_PATH = "/ams/api/v1/payments/createPaymentSession"; - public static final String CANCEL_PROD_PATH = "/ams/api/v1/payments/cancel"; - public static final String CONSULT_PROD_PATH = "/ams/api/v1/payments/consult"; - public static final String AUTH_CONSULT_PROD_PATH = "/ams/api/v1/authorizations/consult"; - public static final String AUTH_APPLY_TOKEN_PROD_PATH = "/ams/api/v1/authorizations/applyToken"; - public static final String VAULTING_SESSION_PROD_PATH = "/ams/api/v1/vaults/createVaultingSession"; - public static final String VAULT_PAYMENTMETHOD_PROD_PATH = "/ams/api/v1/vaults/createVaultingSession"; - public static final String SUBSCRIPTION_CREATE_PROD_PATH = "/ams/api/v1/subscriptions/create"; - public static final String SUBSCRIPTION_CANCEL_PROD_PATH = "/ams/api/v1/subscriptions/cancel"; - public static final String SUBSCRIPTION_CHANGE_PROD_PATH = "/ams/api/v1/subscriptions/change"; + public static final String PAY_PROD_PATH = "/ams/api/v1/payments/pay"; + public static final String REFUND_PROD_PATH = "/ams/api/v1/payments/refund"; + public static final String INQUIRY_PROD_PATH = "/ams/api/v1/payments/inquiryPayment"; + public static final String CAPTURE_PROD_PATH = "/ams/api/v1/payments/capture"; + public static final String CREATE_SESSION_PROD_PATH = "/ams/api/v1/payments/createPaymentSession"; + public static final String CANCEL_PROD_PATH = "/ams/api/v1/payments/cancel"; + public static final String CONSULT_PROD_PATH = "/ams/api/v1/payments/consult"; + public static final String AUTH_CONSULT_PROD_PATH = "/ams/api/v1/authorizations/consult"; + public static final String AUTH_APPLY_TOKEN_PROD_PATH = "/ams/api/v1/authorizations/applyToken"; + public static final String VAULTING_SESSION_PROD_PATH = + "/ams/api/v1/vaults/createVaultingSession"; + public static final String VAULT_PAYMENTMETHOD_PROD_PATH = + "/ams/api/v1/vaults/createVaultingSession"; + public static final String SUBSCRIPTION_CREATE_PROD_PATH = "/ams/api/v1/subscriptions/create"; + public static final String SUBSCRIPTION_CANCEL_PROD_PATH = "/ams/api/v1/subscriptions/cancel"; + public static final String SUBSCRIPTION_CHANGE_PROD_PATH = "/ams/api/v1/subscriptions/change"; - public static final String PAY_TEST_PATH = "/ams/sandbox/api/v1/payments/pay"; - public static final String REFUND_TEST_PATH = "/ams/sandbox/api/v1/payments/refund"; - public static final String INQUIRY_TEST_PATH = "/ams/sandbox/api/v1/payments/inquiryPayment"; - public static final String CAPTURE_TEST_PATH = "/ams/sandbox/api/v1/payments/capture"; - public static final String CREATE_SESSION_TEST_PATH = "/ams/sandbox/api/v1/payments/createPaymentSession"; - public static final String CANCEL_TEST_PATH = "/ams/sandbox/api/v1/payments/cancel"; - public static final String CONSULT_TEST_PATH = "/ams/sandbox/api/v1/payments/consult"; - public static final String AUTH_CONSULT_TEST_PATH = "/ams/sandbox/api/v1/authorizations/consult"; - public static final String AUTH_APPLY_TOKEN_TEST_PATH = "/ams/sandbox/api/v1/authorizations/applyToken"; - public static final String VAULTING_SESSION_TEST_PATH = "/ams/sandbox/api/v1/vaults/createVaultingSession"; - public static final String VAULT_PAYMENTMETHOD_TEST_PATH = "/ams/api/v1/vaults/vaultPaymentMethod"; - public static final String SUBSCRIPTION_CREATE_SANDBOX_PATH = "/ams/sandbox/api/v1/subscriptions/create"; - public static final String SUBSCRIPTION_CANCEL_SANDBOX_PATH = "/ams/sandbox/api/v1/subscriptions/cancel"; - public static final String SUBSCRIPTION_CHANGE_SANDBOX_PATH = "/ams/sandbox/api/v1/subscriptions/change"; + public static final String PAY_TEST_PATH = "/ams/sandbox/api/v1/payments/pay"; + public static final String REFUND_TEST_PATH = "/ams/sandbox/api/v1/payments/refund"; + public static final String INQUIRY_TEST_PATH = "/ams/sandbox/api/v1/payments/inquiryPayment"; + public static final String CAPTURE_TEST_PATH = "/ams/sandbox/api/v1/payments/capture"; + public static final String CREATE_SESSION_TEST_PATH = + "/ams/sandbox/api/v1/payments/createPaymentSession"; + public static final String CANCEL_TEST_PATH = "/ams/sandbox/api/v1/payments/cancel"; + public static final String CONSULT_TEST_PATH = "/ams/sandbox/api/v1/payments/consult"; + public static final String AUTH_CONSULT_TEST_PATH = "/ams/sandbox/api/v1/authorizations/consult"; + public static final String AUTH_APPLY_TOKEN_TEST_PATH = + "/ams/sandbox/api/v1/authorizations/applyToken"; + public static final String VAULTING_SESSION_TEST_PATH = + "/ams/sandbox/api/v1/vaults/createVaultingSession"; + public static final String VAULT_PAYMENTMETHOD_TEST_PATH = + "/ams/api/v1/vaults/vaultPaymentMethod"; + public static final String SUBSCRIPTION_CREATE_SANDBOX_PATH = + "/ams/sandbox/api/v1/subscriptions/create"; + public static final String SUBSCRIPTION_CANCEL_SANDBOX_PATH = + "/ams/sandbox/api/v1/subscriptions/cancel"; + public static final String SUBSCRIPTION_CHANGE_SANDBOX_PATH = + "/ams/sandbox/api/v1/subscriptions/change"; } diff --git a/src/main/java/com/alipay/global/api/model/constants/ProductSceneConstants.java b/src/main/java/com/alipay/global/api/model/constants/ProductSceneConstants.java index ba522f5..aae3e48 100644 --- a/src/main/java/com/alipay/global/api/model/constants/ProductSceneConstants.java +++ b/src/main/java/com/alipay/global/api/model/constants/ProductSceneConstants.java @@ -2,8 +2,7 @@ public class ProductSceneConstants { - public final static String EASY_PAY = "EASY_PAY"; - - public final static String CHECKOUT_PAYMENT = "CHECKOUT_PAYMENT"; + public static final String EASY_PAY = "EASY_PAY"; + public static final String CHECKOUT_PAYMENT = "CHECKOUT_PAYMENT"; } diff --git a/src/main/java/com/alipay/global/api/model/risk/AuthorizationError.java b/src/main/java/com/alipay/global/api/model/risk/AuthorizationError.java index b074d22..6908de9 100644 --- a/src/main/java/com/alipay/global/api/model/risk/AuthorizationError.java +++ b/src/main/java/com/alipay/global/api/model/risk/AuthorizationError.java @@ -14,15 +14,8 @@ @NoArgsConstructor @AllArgsConstructor public class AuthorizationError { - /** - * Authorization error code. - * 授权错误码 - */ - private String errorCode; - /** - * Description of the Authorization error code. - * 授权错误码的描述 - */ - private String errorMessage; - -} \ No newline at end of file + /** Authorization error code. 授权错误码 */ + private String errorCode; + /** Description of the Authorization error code. 授权错误码的描述 */ + private String errorMessage; +} diff --git a/src/main/java/com/alipay/global/api/model/risk/AuthorizationPhase.java b/src/main/java/com/alipay/global/api/model/risk/AuthorizationPhase.java index 1563d1b..2b38f4a 100644 --- a/src/main/java/com/alipay/global/api/model/risk/AuthorizationPhase.java +++ b/src/main/java/com/alipay/global/api/model/risk/AuthorizationPhase.java @@ -4,17 +4,10 @@ */ package com.alipay.global.api.model.risk; -/** - * The enumeration value of the API call phase - * 调用API阶段的枚举值 - */ +/** The enumeration value of the API call phase 调用API阶段的枚举值 */ public enum AuthorizationPhase { - /** - * Indicates that you initiated this call before the card payment was authorized. - */ - PRE_AUTHORIZATION, - /** - * Indicates that you initiated this call after the card payment was authorized - */ - POST_AUTHORIZATION; -} \ No newline at end of file + /** Indicates that you initiated this call before the card payment was authorized. */ + PRE_AUTHORIZATION, + /** Indicates that you initiated this call after the card payment was authorized */ + POST_AUTHORIZATION; +} diff --git a/src/main/java/com/alipay/global/api/model/risk/Merchant.java b/src/main/java/com/alipay/global/api/model/risk/Merchant.java index a6a689c..b04fb33 100644 --- a/src/main/java/com/alipay/global/api/model/risk/Merchant.java +++ b/src/main/java/com/alipay/global/api/model/risk/Merchant.java @@ -5,52 +5,32 @@ package com.alipay.global.api.model.risk; import com.alipay.global.api.model.ams.Address; +import java.util.Date; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.Date; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class Merchant { - /** - * The ID of the merchant that identifies the service or product that is provided directly to the customer. - * 用于标识直接向买家提供服务或商品的商户的 ID。 - */ - private String referenceMerchantId; - /** - * Secondary merchant category code - * 二级商户类别码 - */ - private String merchantMCC; - /** - * Merchant's name. - * 商户名称 - */ - private String merchantName; - /** - * Displays the name of the merchant used. - * 显示使用的商户名称 - */ - private String merchantDisplayName; - /** - * Merchant's address. - * 商户地址 - */ - private Address merchantAddress; - /** - * Merchant registration date - * 商户注册日期 - */ - private Date merchantRegistrationTime; - /** - * Merchant's email. - * 商户邮箱 - */ - private String merchantEmail; - -} \ No newline at end of file + /** + * The ID of the merchant that identifies the service or product that is provided directly to the + * customer. 用于标识直接向买家提供服务或商品的商户的 ID。 + */ + private String referenceMerchantId; + /** Secondary merchant category code 二级商户类别码 */ + private String merchantMCC; + /** Merchant's name. 商户名称 */ + private String merchantName; + /** Displays the name of the merchant used. 显示使用的商户名称 */ + private String merchantDisplayName; + /** Merchant's address. 商户地址 */ + private Address merchantAddress; + /** Merchant registration date 商户注册日期 */ + private Date merchantRegistrationTime; + /** Merchant's email. 商户邮箱 */ + private String merchantEmail; +} diff --git a/src/main/java/com/alipay/global/api/model/risk/Order.java b/src/main/java/com/alipay/global/api/model/risk/Order.java index 87f7111..476930c 100644 --- a/src/main/java/com/alipay/global/api/model/risk/Order.java +++ b/src/main/java/com/alipay/global/api/model/risk/Order.java @@ -4,11 +4,9 @@ */ package com.alipay.global.api.model.risk; +import com.alipay.global.api.model.ams.*; import java.util.Date; import java.util.List; - -import com.alipay.global.api.model.ams.*; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -19,65 +17,51 @@ @NoArgsConstructor @AllArgsConstructor public class Order { - /** - * A unique ID on the merchant's side that identifies the order and is assigned by the merchant who provides the service or product - * directly to the customer. - * 商户侧识别订单的唯一ID,由直接向买家提供服务或商品的商户分配。 - */ - private String referenceOrderId; - /** - * The amount of the merchant's order - * 商户侧订单金额 - */ - private Amount orderAmount; - /** - * Product information, including the ID, name, price, quantity, etc. of the items in the order. - * 商品信息,包括订单中商品的ID、名称、价格、数量等。 - */ - private List goods; - /** - * Shipping information, including consignee's information (name, phone number, email, and shipping address) and delivery service - * provider information. - * 送货信息,包括收货人的信息(姓名、电话号码、电子邮件和送货地址)和送货服务提供商的信息。 - */ - private Shipping shipping; - /** - * Secondary business information, if you are an acquirer with a second-tier merchant, pass this field. - * 二级商户信息,如果您是拥有二级商户的收单机构,请传入此字段。 - */ - private Merchant merchant; - /** - * A brief description of the order - * 订单的简要描述 - */ - private String orderDescription; - - /** - * Trip information, including trip modes, legs of trips and passenger information. - * 行程信息,包括行程模式、行程段和乘客信息。 - */ - private Transit transit; + /** + * A unique ID on the merchant's side that identifies the order and is assigned by the merchant + * who provides the service or product directly to the customer. 商户侧识别订单的唯一ID,由直接向买家提供服务或商品的商户分配。 + */ + private String referenceOrderId; + /** The amount of the merchant's order 商户侧订单金额 */ + private Amount orderAmount; + /** + * Product information, including the ID, name, price, quantity, etc. of the items in the order. + * 商品信息,包括订单中商品的ID、名称、价格、数量等。 + */ + private List goods; + /** + * Shipping information, including consignee's information (name, phone number, email, and + * shipping address) and delivery service provider information. + * 送货信息,包括收货人的信息(姓名、电话号码、电子邮件和送货地址)和送货服务提供商的信息。 + */ + private Shipping shipping; + /** + * Secondary business information, if you are an acquirer with a second-tier merchant, pass this + * field. 二级商户信息,如果您是拥有二级商户的收单机构,请传入此字段。 + */ + private Merchant merchant; + /** A brief description of the order 订单的简要描述 */ + private String orderDescription; - /** - * Information about lodging service that was purchased, - * including hotel name, hotel address, check-in date, check-out date, - * number of booked rooms, number of booked nights and guest names. - * 酒店信息,包括酒店名称、酒店地址、入住日期、离店日期、预订房间数、预订天数和入住人姓名。 - * - */ - private Lodging lodging; + /** + * Trip information, including trip modes, legs of trips and passenger information. + * 行程信息,包括行程模式、行程段和乘客信息。 + */ + private Transit transit; - /** - * Information about gaming top-up, including game name, - * the topped up username or ID, user email and user phone number. - * 游戏充值信息,包括游戏名称、充值用户姓名或ID、用户邮箱和用户电话号码。 - */ - private Gaming gaming; + /** + * Information about lodging service that was purchased, including hotel name, hotel address, + * check-in date, check-out date, number of booked rooms, number of booked nights and guest names. + * 酒店信息,包括酒店名称、酒店地址、入住日期、离店日期、预订房间数、预订天数和入住人姓名。 + */ + private Lodging lodging; - /** - * The time when the order is created. - * 订单创建时间 - */ - private Date orderCreatedTime; + /** + * Information about gaming top-up, including game name, the topped up username or ID, user email + * and user phone number. 游戏充值信息,包括游戏名称、充值用户姓名或ID、用户邮箱和用户电话号码。 + */ + private Gaming gaming; -} \ No newline at end of file + /** The time when the order is created. 订单创建时间 */ + private Date orderCreatedTime; +} diff --git a/src/main/java/com/alipay/global/api/model/risk/PaymentDetail.java b/src/main/java/com/alipay/global/api/model/risk/PaymentDetail.java index cc3c680..373192e 100644 --- a/src/main/java/com/alipay/global/api/model/risk/PaymentDetail.java +++ b/src/main/java/com/alipay/global/api/model/risk/PaymentDetail.java @@ -15,15 +15,10 @@ @NoArgsConstructor @AllArgsConstructor public class PaymentDetail { - /** - * The amount paid using this payment method. - * 使用此支付方式的支付金额 - */ - private Amount amount; - /** - * The payment method used by the merchant or acquirer to collect payments. - * 商户或收单机构用于收取款项的支付方式。 - */ - private PaymentMethod paymentMethod; - -} \ No newline at end of file + /** The amount paid using this payment method. 使用此支付方式的支付金额 */ + private Amount amount; + /** + * The payment method used by the merchant or acquirer to collect payments. 商户或收单机构用于收取款项的支付方式。 + */ + private PaymentMethod paymentMethod; +} diff --git a/src/main/java/com/alipay/global/api/model/risk/PaymentMethod.java b/src/main/java/com/alipay/global/api/model/risk/PaymentMethod.java index b49a078..780eff3 100644 --- a/src/main/java/com/alipay/global/api/model/risk/PaymentMethod.java +++ b/src/main/java/com/alipay/global/api/model/risk/PaymentMethod.java @@ -14,20 +14,10 @@ @NoArgsConstructor @AllArgsConstructor public class PaymentMethod { - /** - * The type of payment method included in the payment method options - * 支付方式选项中包含的支付方式类型 - */ - private String paymentMethodType; - /** - * A unique ID used to identify the payment method - * 用于识别支付方式的唯一ID - */ - private String paymentMethodId; - /** - * More information about the card. - * 有关该卡的详细信息。 - */ - private PaymentMethodMetaData paymentMethodMetaData; - -} \ No newline at end of file + /** The type of payment method included in the payment method options 支付方式选项中包含的支付方式类型 */ + private String paymentMethodType; + /** A unique ID used to identify the payment method 用于识别支付方式的唯一ID */ + private String paymentMethodId; + /** More information about the card. 有关该卡的详细信息。 */ + private PaymentMethodMetaData paymentMethodMetaData; +} diff --git a/src/main/java/com/alipay/global/api/model/risk/PaymentMethodMetaData.java b/src/main/java/com/alipay/global/api/model/risk/PaymentMethodMetaData.java index e92fee7..f68fbe9 100644 --- a/src/main/java/com/alipay/global/api/model/risk/PaymentMethodMetaData.java +++ b/src/main/java/com/alipay/global/api/model/risk/PaymentMethodMetaData.java @@ -17,94 +17,64 @@ @NoArgsConstructor @AllArgsConstructor public class PaymentMethodMetaData { - /** - * Card number, pass in this parameter when you have a PCI competency. - * 卡号,当您有PCI资质时传入该参数 - */ - private String cardNo; - /** - * The card bank identification number, which is used to identify the financial institution that issued the card. It is the first 6 or 8 - * digits of the card number. - * 卡银行识别号,用于识别发卡的金融机构。它是卡号的前 6 或 8 位数字。 - */ - private String cardBin; - /** - * The last 4 digits of the card number. - * 卡号后4位 - */ - private String lastFourDigits; - /** - * The year in which the card expires. Pass in the last two digits of the expiration year. For example, if the expiration year is - * 2025, the parameter has a value of 25. Pass in this parameter when you have a PCI competency. - * 该卡到期的年份。传入到期年份的最后两位数字。例如,如果到期年份是 2025 年,则该参数的值为 25。当您具有 PCI 资质时传入此参数。 - */ - private String expiryYear; - /** - * The month in which the card expires. The last two digits of the expiration month are passed in. For example, if the expiration - * month is February, the value of the parameter is 02. Pass in this parameter when you have a PCI competency. - * 该卡到期的月份。传入到期月份的最后两位数字。例如,如果到期月份是二月,则该参数的值为 02。当您具有 PCI 资质时传入此参数。 - */ - private String expiryMonth; - /** - * The cardholder's billing address. - * 持卡人的账单地址。 - */ - private Address billingAddress; - /** - * Whether the buyer's card payment information has been stored. - * 是否已存储买家卡支付信息 - */ - private Boolean isCardOnFile; - /** - * The cardholder's name. - * 持卡人姓名。 - */ - private UserName cardHolderName; - /** - * The sender's email address. - * 付款人的邮箱 - */ - private String payerEmail; - /** - * The type of funds of the card. Valid values are as follows: - * CREDIT: Indicates a credit card. - * DEBIT: Debit card. - * 卡的资金类型。有效值为: - * CREDIT: 表示信用卡。 - * DEBIT:表示借记卡。 - */ - private String funding; - /** - * Specifies whether the transaction authentication type is set to 3D authentication - * 交易认证类型是否指定为3D认证 - */ - private Boolean is3DSAuthentication; - /** - * Card brand name. - * 卡品牌 - */ - private String cardBrand; - /** - * Card issuer. - * 发卡行 - */ - private String cardIssuer; - /** - * The region where the card is issued. The value of this parameter is a 2-letter country code that follows the ISO 3166 Country Code - * standard(https://www.iso.org/obp/ui/#search). - * 卡的发行地区。此参数的值是遵循 ISO 3166 国家/地区代码 标准的 2 个字母的国家/地区代码。 - */ - private String issuingRegion; - /** - * The result of the verification of the card payment method. - * When authorizationPhase=POST_AUTHORIZATION, this parameter is passed after the card payment authorization is completed. - * 卡支付方式的验证结果。当authorizationPhase=POST_AUTHORIZATION即卡支付授权完成后传入该参数。 - */ - private CardVerificationResult cardVerificationResult; - /** - * Tax ID number of individual taxpayers in Brazil. - * 巴西个人纳税人的税号。 - */ - private String cpf; - -} \ No newline at end of file + /** Card number, pass in this parameter when you have a PCI competency. 卡号,当您有PCI资质时传入该参数 */ + private String cardNo; + /** + * The card bank identification number, which is used to identify the financial institution that + * issued the card. It is the first 6 or 8 digits of the card number. 卡银行识别号,用于识别发卡的金融机构。它是卡号的前 6 + * 或 8 位数字。 + */ + private String cardBin; + /** The last 4 digits of the card number. 卡号后4位 */ + private String lastFourDigits; + /** + * The year in which the card expires. Pass in the last two digits of the expiration year. For + * example, if the expiration year is 2025, the parameter has a value of 25. Pass in this + * parameter when you have a PCI competency. 该卡到期的年份。传入到期年份的最后两位数字。例如,如果到期年份是 2025 年,则该参数的值为 + * 25。当您具有 PCI 资质时传入此参数。 + */ + private String expiryYear; + /** + * The month in which the card expires. The last two digits of the expiration month are passed in. + * For example, if the expiration month is February, the value of the parameter is 02. Pass in + * this parameter when you have a PCI competency. 该卡到期的月份。传入到期月份的最后两位数字。例如,如果到期月份是二月,则该参数的值为 + * 02。当您具有 PCI 资质时传入此参数。 + */ + private String expiryMonth; + /** The cardholder's billing address. 持卡人的账单地址。 */ + private Address billingAddress; + /** Whether the buyer's card payment information has been stored. 是否已存储买家卡支付信息 */ + private Boolean isCardOnFile; + /** The cardholder's name. 持卡人姓名。 */ + private UserName cardHolderName; + /** The sender's email address. 付款人的邮箱 */ + private String payerEmail; + /** + * The type of funds of the card. Valid values are as follows: CREDIT: Indicates a credit card. + * DEBIT: Debit card. 卡的资金类型。有效值为: CREDIT: 表示信用卡。 DEBIT:表示借记卡。 + */ + private String funding; + /** + * Specifies whether the transaction authentication type is set to 3D authentication + * 交易认证类型是否指定为3D认证 + */ + private Boolean is3DSAuthentication; + /** Card brand name. 卡品牌 */ + private String cardBrand; + /** Card issuer. 发卡行 */ + private String cardIssuer; + /** + * The region where the card is issued. The value of this parameter is a 2-letter country code + * that follows the ISO 3166 Country Code standard(https://www.iso.org/obp/ui/#search). + * 卡的发行地区。此参数的值是遵循 ISO 3166 国家/地区代码 标准的 2 个字母的国家/地区代码。 + */ + private String issuingRegion; + /** + * The result of the verification of the card payment method. When + * authorizationPhase=POST_AUTHORIZATION, this parameter is passed after the card payment + * authorization is completed. 卡支付方式的验证结果。当authorizationPhase=POST_AUTHORIZATION即卡支付授权完成后传入该参数。 + */ + private CardVerificationResult cardVerificationResult; + /** Tax ID number of individual taxpayers in Brazil. 巴西个人纳税人的税号。 */ + private String cpf; +} diff --git a/src/main/java/com/alipay/global/api/model/risk/RefundRecord.java b/src/main/java/com/alipay/global/api/model/risk/RefundRecord.java index 4443ca0..469e007 100644 --- a/src/main/java/com/alipay/global/api/model/risk/RefundRecord.java +++ b/src/main/java/com/alipay/global/api/model/risk/RefundRecord.java @@ -5,43 +5,31 @@ package com.alipay.global.api.model.risk; import com.alipay.global.api.model.ams.Amount; +import java.util.Date; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import java.util.Date; - @Data @Builder @NoArgsConstructor @AllArgsConstructor public class RefundRecord { - /** - * A unique ID on the merchant's side that identifies the order and is assigned by the merchant who provides the service or product - * directly to the customer. - * 商户侧识别订单的唯一ID,由直接向买家提供服务或商品的商户分配。 - */ - private String referenceOrderId; - /** - * A unique ID that identifies the product. - * 识别商品的唯一 ID。 - */ - private String referenceGoodsId; - /** - * The amount of the refund for the item. - * 商品的退款金额。 - */ - private Amount amount; - /** - * Refund reason. - * 退款原因 - */ - private String refundReason; - /** - * The date and time when the refund reached the final state of success or failure. - * 退款达到成功或失败终态的日期和时间。 - */ - private Date refundTime; - -} \ No newline at end of file + /** + * A unique ID on the merchant's side that identifies the order and is assigned by the merchant + * who provides the service or product directly to the customer. 商户侧识别订单的唯一ID,由直接向买家提供服务或商品的商户分配。 + */ + private String referenceOrderId; + /** A unique ID that identifies the product. 识别商品的唯一 ID。 */ + private String referenceGoodsId; + /** The amount of the refund for the item. 商品的退款金额。 */ + private Amount amount; + /** Refund reason. 退款原因 */ + private String refundReason; + /** + * The date and time when the refund reached the final state of success or failure. + * 退款达到成功或失败终态的日期和时间。 + */ + private Date refundTime; +} diff --git a/src/main/java/com/alipay/global/api/net/DefaultHttpRPC.java b/src/main/java/com/alipay/global/api/net/DefaultHttpRPC.java index 0f80eff..b6488e1 100644 --- a/src/main/java/com/alipay/global/api/net/DefaultHttpRPC.java +++ b/src/main/java/com/alipay/global/api/net/DefaultHttpRPC.java @@ -4,9 +4,6 @@ import com.alipay.global.api.ssl.TrueHostnameVerifier; import com.alipay.global.api.ssl.X509TrustManagerImp; import com.alipay.global.api.tools.Constants; -import org.apache.commons.lang3.StringUtils; - -import javax.net.ssl.*; import java.io.*; import java.lang.reflect.Field; import java.net.HttpURLConnection; @@ -14,229 +11,234 @@ import java.security.SecureRandom; import java.util.Map; import java.util.Set; +import javax.net.ssl.*; +import org.apache.commons.lang3.StringUtils; public class DefaultHttpRPC { - private static int readTimeout = 15000; - private static int connectTimeout = 15000; - private static int keepAliveTimeout = 30; + private static int readTimeout = 15000; + private static int connectTimeout = 15000; + private static int keepAliveTimeout = 30; - private static SSLContext ctx = null; - private static HostnameVerifier verifier = null; - private static SSLSocketFactory sslSocketFactory = null; + private static SSLContext ctx = null; + private static HostnameVerifier verifier = null; + private static SSLSocketFactory sslSocketFactory = null; - static { + static { + try { + ctx = SSLContext.getInstance("TLS"); + ctx.init( + new KeyManager[0], new TrustManager[] {new X509TrustManagerImp()}, new SecureRandom()); - try { - ctx = SSLContext.getInstance("TLS"); - ctx.init(new KeyManager[0], new TrustManager[] {new X509TrustManagerImp()}, - new SecureRandom()); + ctx.getClientSessionContext().setSessionTimeout(15); + ctx.getClientSessionContext().setSessionCacheSize(1000); - ctx.getClientSessionContext().setSessionTimeout(15); - ctx.getClientSessionContext().setSessionCacheSize(1000); + sslSocketFactory = ctx.getSocketFactory(); + } catch (Exception e) { - sslSocketFactory = ctx.getSocketFactory(); - } catch (Exception e) { + } + verifier = new TrueHostnameVerifier(); + } + + public static HttpRpcResult doPost(String url, Map header, String reqBody) + throws IOException, AlipayApiException { + String ctype = "application/json;charset=" + Constants.DEFAULT_CHARSET; + byte[] content = reqBody.getBytes(Constants.DEFAULT_CHARSET); + + return doPost(url, ctype, header, content); + } + + private static HttpRpcResult doPost( + String url, String ctype, Map reqHeader, byte[] content) + throws IOException, AlipayApiException { + HttpsURLConnection conns = null; + OutputStream out = null; + HttpRpcResult httpRpcResult = new HttpRpcResult(); + + System.setProperty("sun.net.http.allowRestrictedHeaders", "true"); + System.setProperty("sun.net.http.retryPost", "false"); + System.setProperty("http.keepAlive", "true"); + + try { + try { + conns = getConnection(new URL(url), HttpMethod.POST.name(), ctype); + conns.setConnectTimeout(connectTimeout); + conns.setReadTimeout(readTimeout); + Set> headerEntry = reqHeader.entrySet(); + for (Map.Entry entry : headerEntry) { + String headerName = entry.getKey(); + String headerValue = entry.getValue(); + conns.setRequestProperty(headerName, headerValue); } - - verifier = new TrueHostnameVerifier(); - + } catch (IOException e) { + throw e; + } + + try { + conns.connect(); + + out = conns.getOutputStream(); + out.write(content); + + String rspSignValue = getResponseSignature(conns); + httpRpcResult.setRspSign(rspSignValue); + String responseTime = getResponseTime(conns); + httpRpcResult.setResponseTime(responseTime); + + // 设置keepAliveTimeout(一般服务端通过Keep-Alive头设置),这里一定要在解析header之后,否则会被覆盖为默认的5s或者服务端带回的Keep-Alive头的timeout值 + setConnKeepAliveTimeout(conns); + + int httpRespCode = conns.getResponseCode(); + httpRpcResult.setRspCode(httpRespCode); + String rspBody = getResponseAsString(conns); + httpRpcResult.setRspBody(rspBody); + + } catch (IOException e) { + throw e; + } + + } finally { + if (out != null) { + out.close(); + } + if (conns != null) { + conns.disconnect(); + } } - public static HttpRpcResult doPost(String url, Map header, String reqBody) throws IOException, AlipayApiException { - String ctype = "application/json;charset=" + Constants.DEFAULT_CHARSET; - byte[] content = reqBody.getBytes(Constants.DEFAULT_CHARSET); - - return doPost(url, ctype, header, content); + return httpRpcResult; + } + + private static HttpsURLConnection getConnection(URL url, String method, String ctype) + throws IOException, AlipayApiException { + HttpsURLConnection connHttps; + if (Constants.SCHEME.equalsIgnoreCase(url.getProtocol())) { + connHttps = (HttpsURLConnection) url.openConnection(); + connHttps.setSSLSocketFactory(sslSocketFactory); + connHttps.setHostnameVerifier(verifier); + } else { + throw new AlipayApiException("Only supports HTTPS."); } - private static HttpRpcResult doPost(String url, String ctype, Map reqHeader, byte[] content) throws IOException, AlipayApiException { - HttpsURLConnection conns = null; - OutputStream out = null; - HttpRpcResult httpRpcResult = new HttpRpcResult(); - - System.setProperty("sun.net.http.allowRestrictedHeaders", "true"); - System.setProperty("sun.net.http.retryPost", "false"); - System.setProperty("http.keepAlive", "true"); - - try { - try { - conns = getConnection(new URL(url), HttpMethod.POST.name(), ctype); - conns.setConnectTimeout(connectTimeout); - conns.setReadTimeout(readTimeout); - Set> headerEntry = reqHeader.entrySet(); - for(Map.Entry entry: headerEntry){ - String headerName = entry.getKey(); - String headerValue = entry.getValue(); - conns.setRequestProperty(headerName, headerValue); - } - } catch (IOException e) { - throw e; - } - - try { - conns.connect(); - - out = conns.getOutputStream(); - out.write(content); - - String rspSignValue = getResponseSignature(conns); - httpRpcResult.setRspSign(rspSignValue); - String responseTime = getResponseTime(conns); - httpRpcResult.setResponseTime(responseTime); - - // 设置keepAliveTimeout(一般服务端通过Keep-Alive头设置),这里一定要在解析header之后,否则会被覆盖为默认的5s或者服务端带回的Keep-Alive头的timeout值 - setConnKeepAliveTimeout(conns); - - int httpRespCode = conns.getResponseCode(); - httpRpcResult.setRspCode(httpRespCode); - String rspBody = getResponseAsString(conns); - httpRpcResult.setRspBody(rspBody); - - } catch (IOException e) { - throw e; - } - - } finally { - if (out != null) { - out.close(); - } - if (conns != null) { - conns.disconnect(); - } - } - - return httpRpcResult; + connHttps.setRequestMethod(method); + connHttps.setDoInput(true); + connHttps.setDoOutput(true); + connHttps.setRequestProperty( + Constants.ACCEPT_HEADER, "text/plain,text/xml,text/javascript,text/html"); + connHttps.setRequestProperty(Constants.USER_AGENT_HEADER, "global-sdk-java"); + connHttps.setRequestProperty(Constants.CONTENT_TYPE_HEADER, ctype); + connHttps.setRequestProperty(Constants.CONNECTION_HEADER, "keep-alive"); + return connHttps; + } + + public static String getResponseSignature(HttpsURLConnection conn) { + String signatureValue = conn.getHeaderField(Constants.RSP_SIGN_HEADER); + if (StringUtils.isBlank(signatureValue)) { + return null; } - private static HttpsURLConnection getConnection(URL url, String method, String ctype) throws IOException, AlipayApiException { - HttpsURLConnection connHttps; - if (Constants.SCHEME.equalsIgnoreCase(url.getProtocol())) { - connHttps = (HttpsURLConnection) url.openConnection(); - connHttps.setSSLSocketFactory(sslSocketFactory); - connHttps.setHostnameVerifier(verifier); - } else { - throw new AlipayApiException("Only supports HTTPS."); - } - - connHttps.setRequestMethod(method); - connHttps.setDoInput(true); - connHttps.setDoOutput(true); - connHttps.setRequestProperty(Constants.ACCEPT_HEADER, "text/plain,text/xml,text/javascript,text/html"); - connHttps.setRequestProperty(Constants.USER_AGENT_HEADER, "global-sdk-java"); - connHttps.setRequestProperty(Constants.CONTENT_TYPE_HEADER, ctype); - connHttps.setRequestProperty(Constants.CONNECTION_HEADER, "keep-alive"); - return connHttps; + String[] valueItem = signatureValue.split(","); + if (valueItem.length < 3) { + return null; } - public static String getResponseSignature(HttpsURLConnection conn) { - String signatureValue = conn.getHeaderField(Constants.RSP_SIGN_HEADER); - if(StringUtils.isBlank(signatureValue)){ - return null; - } - - String[] valueItem = signatureValue.split(","); - if(valueItem.length < 3){ - return null; - } - - String signatureItem = valueItem[2]; - String[] itemArr = signatureItem.split("="); - if(itemArr.length != 2){ - return null; - } - - return itemArr[1]; + String signatureItem = valueItem[2]; + String[] itemArr = signatureItem.split("="); + if (itemArr.length != 2) { + return null; } - public static String getResponseTime(HttpsURLConnection conn) { - - String responseTime = conn.getHeaderField(Constants.RSP_TIME_HEADER); + return itemArr[1]; + } - return responseTime; - } + public static String getResponseTime(HttpsURLConnection conn) { + String responseTime = conn.getHeaderField(Constants.RSP_TIME_HEADER); - public static String getResponseAsString(HttpsURLConnection conn) throws IOException { - String charset = getResponseCharset(conn.getContentType()); + return responseTime; + } + public static String getResponseAsString(HttpsURLConnection conn) throws IOException { + String charset = getResponseCharset(conn.getContentType()); - InputStream es = conn.getErrorStream(); - if (es == null) { - return getStreamAsString(conn.getInputStream(), charset); - } else { - String msg = getStreamAsString(es, charset); - if (StringUtils.isEmpty(msg)) { - throw new IOException(conn.getResponseCode() + ":" + conn.getResponseMessage()); - } else { - throw new IOException(msg); - } - } + InputStream es = conn.getErrorStream(); + if (es == null) { + return getStreamAsString(conn.getInputStream(), charset); + } else { + String msg = getStreamAsString(es, charset); + if (StringUtils.isEmpty(msg)) { + throw new IOException(conn.getResponseCode() + ":" + conn.getResponseMessage()); + } else { + throw new IOException(msg); + } } - - private static String getResponseCharset(String ctype) { - String charset = Constants.DEFAULT_CHARSET; - - if (!StringUtils.isEmpty(ctype)) { - String[] params = ctype.split(";"); - for (String param : params) { - param = param.trim(); - if (param.startsWith("charset")) { - String[] pair = param.split("=", 2); - if (pair.length == 2) { - if (!StringUtils.isEmpty(pair[1])) { - charset = pair[1].trim(); - } - } - break; - } + } + + private static String getResponseCharset(String ctype) { + String charset = Constants.DEFAULT_CHARSET; + + if (!StringUtils.isEmpty(ctype)) { + String[] params = ctype.split(";"); + for (String param : params) { + param = param.trim(); + if (param.startsWith("charset")) { + String[] pair = param.split("=", 2); + if (pair.length == 2) { + if (!StringUtils.isEmpty(pair[1])) { + charset = pair[1].trim(); } + } + break; } - - return charset; + } } - private static String getStreamAsString(InputStream stream, String charset) throws IOException { - try { - BufferedReader reader = new BufferedReader(new InputStreamReader(stream, charset)); - StringWriter writer = new StringWriter(); - - char[] chars = new char[256]; - int count = 0; - while ((count = reader.read(chars)) > 0) { - writer.write(chars, 0, count); - } - - return writer.toString(); - } finally { - if (stream != null) { - stream.close(); - } - } + return charset; + } + + private static String getStreamAsString(InputStream stream, String charset) throws IOException { + try { + BufferedReader reader = new BufferedReader(new InputStreamReader(stream, charset)); + StringWriter writer = new StringWriter(); + + char[] chars = new char[256]; + int count = 0; + while ((count = reader.read(chars)) > 0) { + writer.write(chars, 0, count); + } + + return writer.toString(); + } finally { + if (stream != null) { + stream.close(); + } } + } - private static void setConnKeepAliveTimeout(HttpURLConnection connection) { - if (keepAliveTimeout == 0) { - return; - } - try { + private static void setConnKeepAliveTimeout(HttpURLConnection connection) { + if (keepAliveTimeout == 0) { + return; + } + try { - Field delegateHttpsUrlConnectionField = Class.forName("sun.net.www.protocol.https.HttpsURLConnectionImpl").getDeclaredField( - "delegate"); - delegateHttpsUrlConnectionField.setAccessible(true); - Object delegateHttpsUrlConnection = delegateHttpsUrlConnectionField.get(connection); + Field delegateHttpsUrlConnectionField = + Class.forName("sun.net.www.protocol.https.HttpsURLConnectionImpl") + .getDeclaredField("delegate"); + delegateHttpsUrlConnectionField.setAccessible(true); + Object delegateHttpsUrlConnection = delegateHttpsUrlConnectionField.get(connection); - Field httpClientField = Class.forName("sun.net.www.protocol.http.HttpURLConnection").getDeclaredField("http"); - httpClientField.setAccessible(true); - Object httpClient = httpClientField.get(delegateHttpsUrlConnection); + Field httpClientField = + Class.forName("sun.net.www.protocol.http.HttpURLConnection").getDeclaredField("http"); + httpClientField.setAccessible(true); + Object httpClient = httpClientField.get(delegateHttpsUrlConnection); - Field keepAliveTimeoutField = Class.forName("sun.net.www.http.HttpClient").getDeclaredField("keepAliveTimeout"); - keepAliveTimeoutField.setAccessible(true); - keepAliveTimeoutField.setInt(httpClient, keepAliveTimeout); - } catch (Throwable ignored) { + Field keepAliveTimeoutField = + Class.forName("sun.net.www.http.HttpClient").getDeclaredField("keepAliveTimeout"); + keepAliveTimeoutField.setAccessible(true); + keepAliveTimeoutField.setInt(httpClient, keepAliveTimeout); + } catch (Throwable ignored) { - } } - + } } diff --git a/src/main/java/com/alipay/global/api/net/HttpMethod.java b/src/main/java/com/alipay/global/api/net/HttpMethod.java index 5b6f91a..f35bdfa 100644 --- a/src/main/java/com/alipay/global/api/net/HttpMethod.java +++ b/src/main/java/com/alipay/global/api/net/HttpMethod.java @@ -1,7 +1,6 @@ package com.alipay.global.api.net; public enum HttpMethod { - - POST,GET; - + POST, + GET; } diff --git a/src/main/java/com/alipay/global/api/net/HttpRpcResult.java b/src/main/java/com/alipay/global/api/net/HttpRpcResult.java index 5aede51..aec8a0e 100644 --- a/src/main/java/com/alipay/global/api/net/HttpRpcResult.java +++ b/src/main/java/com/alipay/global/api/net/HttpRpcResult.java @@ -2,41 +2,40 @@ public class HttpRpcResult { - private int rspCode; - private String rspBody; - private String rspSign; - private String responseTime; - - public int getRspCode() { - return rspCode; - } - - public void setRspCode(int rspCode) { - this.rspCode = rspCode; - } - - public String getRspBody() { - return rspBody; - } - - public void setRspBody(String rspBody) { - this.rspBody = rspBody; - } - - public String getRspSign() { - return rspSign; - } - - public void setRspSign(String rspSign) { - this.rspSign = rspSign; - } - - public String getResponseTime() { - return responseTime; - } - - public void setResponseTime(String responseTime) { - this.responseTime = responseTime; - } - + private int rspCode; + private String rspBody; + private String rspSign; + private String responseTime; + + public int getRspCode() { + return rspCode; + } + + public void setRspCode(int rspCode) { + this.rspCode = rspCode; + } + + public String getRspBody() { + return rspBody; + } + + public void setRspBody(String rspBody) { + this.rspBody = rspBody; + } + + public String getRspSign() { + return rspSign; + } + + public void setRspSign(String rspSign) { + this.rspSign = rspSign; + } + + public String getResponseTime() { + return responseTime; + } + + public void setResponseTime(String responseTime) { + this.responseTime = responseTime; + } } diff --git a/src/main/java/com/alipay/global/api/request/AlipayRequest.java b/src/main/java/com/alipay/global/api/request/AlipayRequest.java index a6a6604..6c9eb92 100644 --- a/src/main/java/com/alipay/global/api/request/AlipayRequest.java +++ b/src/main/java/com/alipay/global/api/request/AlipayRequest.java @@ -3,39 +3,39 @@ import com.alibaba.fastjson.annotation.JSONField; import com.alipay.global.api.net.HttpMethod; import com.alipay.global.api.response.AlipayResponse; - import lombok.Data; @Data public abstract class AlipayRequest { - /** - * client id - */ - @JSONField(serialize = false) - private String clientId; - @JSONField(serialize = false) - private String path; - @JSONField(serialize = false) - private Integer keyVersion; - @JSONField(serialize = false) - private Class responseClass; - @JSONField(serialize = false) - private String httpMethod = HttpMethod.POST.name(); - - /** - * 是否使用沙箱url - * - * @return true/false - */ - public boolean usingSandboxUrl() { - return true; - } - - /** - * 得到当前API的响应结果类型 - * - * @return 响应类型 - */ - public abstract Class getResponseClass(); + /** client id */ + @JSONField(serialize = false) + private String clientId; + + @JSONField(serialize = false) + private String path; + + @JSONField(serialize = false) + private Integer keyVersion; + + @JSONField(serialize = false) + private Class responseClass; + + @JSONField(serialize = false) + private String httpMethod = HttpMethod.POST.name(); + + /** + * 是否使用沙箱url + * + * @return true/false + */ + public boolean usingSandboxUrl() { + return true; + } + /** + * 得到当前API的响应结果类型 + * + * @return 响应类型 + */ + public abstract Class getResponseClass(); } diff --git a/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthApplyTokenRequest.java b/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthApplyTokenRequest.java index 5a1f55d..0a70897 100644 --- a/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthApplyTokenRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthApplyTokenRequest.java @@ -1,32 +1,64 @@ +/* + * authorizations_applyToken + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.auth; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.CustomerBelongsTo; import com.alipay.global.api.model.ams.GrantType; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.auth.AlipayAuthApplyTokenResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - +import lombok.*; -@Data +/** AlipayAuthApplyTokenRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayAuthApplyTokenRequest extends AlipayRequest { - private GrantType grantType; - private CustomerBelongsTo customerBelongsTo; - private String authCode; - private String refreshToken; - private String extendInfo; - private String merchantRegion; + private GrantType grantType; + + private CustomerBelongsTo customerBelongsTo; + + /** + * The authorization code, used for getting an access token. The value of this field is obtained + * from the reconstructed redirection URL returned by the wallet. Note: Specify this field when + * the value of grantType is AUTHORIZATION_CODE. More information: Maximum length: 128 characters + */ + private String authCode; + + /** + * The refresh token, used for getting a new access token when the access token is about to + * expire. The refresh token is obtained from the response of the successfully called applyToken + * API. Note: Specify this field when the value of grantType is REFRESH_TOKEN. More information: + * Maximum length: 128 characters + */ + private String refreshToken; + + private String extendInfo; - public AlipayAuthApplyTokenRequest() { - this.setPath(AntomPathConstants.AUTH_APPLY_TOKEN_PATH); - } + /** + * The country or region where the merchant or secondary merchant operates the business. The + * parameter is a 2-letter country/region code that follows ISO 3166 Country Codes standard. Only + * US, JP, PK, SG are supported now. Note: This field is required when you use the Global Acquirer + * Gateway (GAGW) product. More information: Maximum length: 2 characters + */ + private String merchantRegion; - @Override - public Class getResponseClass() { - return AlipayAuthApplyTokenResponse.class; - } + public AlipayAuthApplyTokenRequest() { + this.setPath("/ams/api/v1/authorizations/applyToken"); + } + @Override + public Class getResponseClass() { + return AlipayAuthApplyTokenResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthConsultRequest.java b/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthConsultRequest.java index 63c3881..5c4818c 100644 --- a/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthConsultRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthConsultRequest.java @@ -1,37 +1,103 @@ +/* + * authorizations_consult + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.auth; import com.alipay.global.api.model.ams.*; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.AuthMetaData; +import com.alipay.global.api.model.ams.CustomerBelongsTo; +import com.alipay.global.api.model.ams.OsType; +import com.alipay.global.api.model.ams.ScopeType; +import com.alipay.global.api.model.ams.TerminalType; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.auth.AlipayAuthConsultResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - +import java.util.List; +import lombok.*; -@Data +/** AlipayAuthConsultRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayAuthConsultRequest extends AlipayRequest { - private CustomerBelongsTo customerBelongsTo; - private String authClientId; - private String authRedirectUrl; - private ScopeType[] scopes; - private String authState; - private TerminalType terminalType; - private OsType osType; - private String osVersion; - private String extendInfo; - private String merchantRegion; - private Boolean recurringPayment; - private AuthMetaData authMetaData; - - public AlipayAuthConsultRequest() { - this.setPath(AntomPathConstants.AUTH_CONSULT_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayAuthConsultResponse.class; - } + private CustomerBelongsTo customerBelongsTo; + + /** + * The unique ID of the secondary merchant to which the user grants resource access permission. + * The value is specified by the acquirer and needs to be registered in Antom. Notes: Specify this + * field if you are an acquirer with secondary merchants. For an Alipay+ payment methods, the + * value of this field is the same as the value of the referenceMerchantId field in the pay (Auto + * Debit) interface. More information: Maximum length: 64 characters + */ + private String authClientId; + + /** + * The redirection URL that the user is redirected to after the user agrees to authorize. This + * value is provided by the merchant. More information: Maximum length: 1024 characters + */ + private String authRedirectUrl; + + /** + * The authorization scope. Valid values are: BASE_USER_INFO: Indicates that the unique user ID + * can be obtained. USER_INFO: Indicates that the complete user information can be obtained, for + * example, user name, avatar, and other user information. AGREEMENT_PAY: Indicates that the user + * agrees to authorize for auto debit so that the merchant can use the access token to + * automatically deduct money from the user's account. More information: Maximum size: 4 + * elements + */ + private List scopes; + + /** + * The unique ID generated by the merchant to represent the consult request. The consistency of + * this field and that in the redirection URL when the user agrees to authorize needs to be + * guaranteed. More information: Maximum length: 256 characters + */ + private String authState; + + private TerminalType terminalType; + + private OsType osType; + + /** + * The OS version. Note: Specify this parameter when the value of terminalType is APP or WAP and + * you have this information. Providing this information makes the user's payment experience + * better. More information: Maximum length: 16 characters + */ + private String osVersion; + + private String extendInfo; + + /** + * The country or region where the merchant or secondary merchant operates the business. The + * parameter is a 2-letter country/region code that follows ISO 3166 Country Codes standard. Only + * US, JP, PK, SG are supported now. Note: This field is required when you use the Global Acquirer + * Gateway (GAGW) product. More information: Maximum length: 2 characters + */ + private String merchantRegion; + + /** + * Indicates whether the auto debit is used for recurring payments. Valid values are: true: + * indicates the auto debit is for recurring payments. false: indicates the auto debit is not for + * recurring payments. Specify this parameter when the value of customerBelongsTo is PAYPAY. + */ + private Boolean recurringPayment; + + private AuthMetaData authMetaData; + + public AlipayAuthConsultRequest() { + this.setPath("/ams/api/v1/authorizations/consult"); + } + @Override + public Class getResponseClass() { + return AlipayAuthConsultResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthCreateSessionRequest.java b/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthCreateSessionRequest.java index 7a5d17b..074c59d 100644 --- a/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthCreateSessionRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthCreateSessionRequest.java @@ -14,20 +14,19 @@ @EqualsAndHashCode(callSuper = true) public class AlipayAuthCreateSessionRequest extends AlipayRequest { - private ProductCodeType productCode; - private AgreementInfo agreementInfo; - private ScopeType[] scopes; - private PaymentMethod paymentMethod; - private String paymentRedirectUrl; + private ProductCodeType productCode; + private AgreementInfo agreementInfo; + private ScopeType[] scopes; + private PaymentMethod paymentMethod; + private String paymentRedirectUrl; - public AlipayAuthCreateSessionRequest() { - this.setPath(AntomPathConstants.CREATE_SESSION_PATH); - this.setProductCode(ProductCodeType.AGREEMENT_PAYMENT); - } - - @Override - public Class getResponseClass() { - return AlipayAuthCreateSessionResponse.class; - } + public AlipayAuthCreateSessionRequest() { + this.setPath(AntomPathConstants.CREATE_SESSION_PATH); + this.setProductCode(ProductCodeType.AGREEMENT_PAYMENT); + } + @Override + public Class getResponseClass() { + return AlipayAuthCreateSessionResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthQueryTokenRequest.java b/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthQueryTokenRequest.java index c2f60a2..dae4f8d 100644 --- a/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthQueryTokenRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthQueryTokenRequest.java @@ -9,15 +9,14 @@ @EqualsAndHashCode(callSuper = true) public class AlipayAuthQueryTokenRequest extends AlipayRequest { - private String accessToken; + private String accessToken; - public AlipayAuthQueryTokenRequest() { - this.setPath("/ams/api/v1/authorizations/query"); - } - - @Override - public Class getResponseClass() { - return AlipayAuthQueryTokenResponse.class; - } + public AlipayAuthQueryTokenRequest() { + this.setPath("/ams/api/v1/authorizations/query"); + } + @Override + public Class getResponseClass() { + return AlipayAuthQueryTokenResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthRevokeTokenRequest.java b/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthRevokeTokenRequest.java index 8d24970..acc2836 100644 --- a/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthRevokeTokenRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/auth/AlipayAuthRevokeTokenRequest.java @@ -1,25 +1,41 @@ +/* + * authorizations_revoke + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.auth; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.auth.AlipayAuthRevokeTokenResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayAuthRevokeTokenRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayAuthRevokeTokenRequest extends AlipayRequest { - private String accessToken; - private String extendInfo; + /** + * The access token that is used to access the corresponding scope of the user resource. More + * information: Maximum length: 128 characters + */ + private String accessToken; - public AlipayAuthRevokeTokenRequest() { - this.setPath(AntomPathConstants.AUTH_REVOKE_PATH); - } + private String extendInfo; - @Override - public Class getResponseClass() { - return AlipayAuthRevokeTokenResponse.class; - } + public AlipayAuthRevokeTokenRequest() { + this.setPath("/ams/api/v1/authorizations/revoke"); + } + @Override + public Class getResponseClass() { + return AlipayAuthRevokeTokenResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/customs/AlipayCustomsDeclareRequest.java b/src/main/java/com/alipay/global/api/request/ams/customs/AlipayCustomsDeclareRequest.java index 90939cc..b5c84b4 100644 --- a/src/main/java/com/alipay/global/api/request/ams/customs/AlipayCustomsDeclareRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/customs/AlipayCustomsDeclareRequest.java @@ -14,22 +14,21 @@ @EqualsAndHashCode(callSuper = true) public class AlipayCustomsDeclareRequest extends AlipayRequest { - private String declarationRequestId; - private String paymentId; - private Amount declarationAmount; - private CustomsInfo customs; - private MerchantCustomsInfo merchantCustomsInfo; - private Boolean splitOrder; - private String subOrderId; - private Certificate buyerCertificate; + private String declarationRequestId; + private String paymentId; + private Amount declarationAmount; + private CustomsInfo customs; + private MerchantCustomsInfo merchantCustomsInfo; + private Boolean splitOrder; + private String subOrderId; + private Certificate buyerCertificate; - public AlipayCustomsDeclareRequest() { - this.setPath(AntomPathConstants.DECLARE_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayCustomsDeclareResponse.class; - } + public AlipayCustomsDeclareRequest() { + this.setPath(AntomPathConstants.DECLARE_PATH); + } + @Override + public Class getResponseClass() { + return AlipayCustomsDeclareResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/customs/AlipayCustomsQueryRequest.java b/src/main/java/com/alipay/global/api/request/ams/customs/AlipayCustomsQueryRequest.java index bc2cfe9..e8a8cac 100644 --- a/src/main/java/com/alipay/global/api/request/ams/customs/AlipayCustomsQueryRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/customs/AlipayCustomsQueryRequest.java @@ -3,24 +3,22 @@ import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.customs.AlipayCustomsQueryResponse; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - @Data @EqualsAndHashCode(callSuper = true) public class AlipayCustomsQueryRequest extends AlipayRequest { - private List declarationRequestIds; - - public AlipayCustomsQueryRequest() { - this.setPath(AntomPathConstants.INQUIRY_DECLARE_PATH); - } + private List declarationRequestIds; - @Override - public Class getResponseClass() { - return AlipayCustomsQueryResponse.class; - } + public AlipayCustomsQueryRequest() { + this.setPath(AntomPathConstants.INQUIRY_DECLARE_PATH); + } + @Override + public Class getResponseClass() { + return AlipayCustomsQueryResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/dispute/AlipayAcceptDisputeRequest.java b/src/main/java/com/alipay/global/api/request/ams/dispute/AlipayAcceptDisputeRequest.java index 62ff38b..fba2289 100644 --- a/src/main/java/com/alipay/global/api/request/ams/dispute/AlipayAcceptDisputeRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/dispute/AlipayAcceptDisputeRequest.java @@ -1,23 +1,39 @@ +/* + * payments_acceptDispute + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.dispute; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.dispute.AlipayAcceptDisputeResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayAcceptDisputeRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayAcceptDisputeRequest extends AlipayRequest { - private String disputeId; + /** + * The unique ID assigned by Antom to identify a dispute. More information: Maximum length: 64 + * characters + */ + private String disputeId; - public AlipayAcceptDisputeRequest() { - this.setPath(AntomPathConstants.ACCEPT_DISPUTE_PATH); - } + public AlipayAcceptDisputeRequest() { + this.setPath("/ams/api/v1/payments/acceptDispute"); + } - @Override - public Class getResponseClass() { - return AlipayAcceptDisputeResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayAcceptDisputeResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/dispute/AlipayDownloadDisputeEvidenceRequest.java b/src/main/java/com/alipay/global/api/request/ams/dispute/AlipayDownloadDisputeEvidenceRequest.java index 21fddc1..73a337d 100644 --- a/src/main/java/com/alipay/global/api/request/ams/dispute/AlipayDownloadDisputeEvidenceRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/dispute/AlipayDownloadDisputeEvidenceRequest.java @@ -1,26 +1,43 @@ +/* + * payments_downloadDisputeEvidence + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.dispute; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.DisputeEvidenceType; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.dispute.AlipayDownloadDisputeEvidenceResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayDownloadDisputeEvidenceRequest */ @EqualsAndHashCode(callSuper = true) -public class AlipayDownloadDisputeEvidenceRequest extends - AlipayRequest { +@Data +public class AlipayDownloadDisputeEvidenceRequest + extends AlipayRequest { + + /** + * The unique ID that is assigned by Antom to identify a dispute. More information: Maximum + * length: 64 characters + */ + private String disputeId; - private String disputeId; - private DisputeEvidenceType disputeEvidenceType; + private DisputeEvidenceType disputeEvidenceType; - public AlipayDownloadDisputeEvidenceRequest() { - this.setPath(AntomPathConstants.DOWNLOAD_DISPUTE_EVIDENCE_PATH); - } + public AlipayDownloadDisputeEvidenceRequest() { + this.setPath("/ams/api/v1/payments/downloadDisputeEvidence"); + } - @Override - public Class getResponseClass() { - return AlipayDownloadDisputeEvidenceResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayDownloadDisputeEvidenceResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/dispute/AlipaySupplyDefenseDocumentRequest.java b/src/main/java/com/alipay/global/api/request/ams/dispute/AlipaySupplyDefenseDocumentRequest.java index c4bc768..03258e5 100644 --- a/src/main/java/com/alipay/global/api/request/ams/dispute/AlipaySupplyDefenseDocumentRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/dispute/AlipaySupplyDefenseDocumentRequest.java @@ -1,26 +1,46 @@ +/* + * payments_supplyDefenseDocument + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.dispute; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.dispute.AlipaySupplyDefenseDocumentResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipaySupplyDefenseDocumentRequest */ @EqualsAndHashCode(callSuper = true) -public class AlipaySupplyDefenseDocumentRequest extends - AlipayRequest { +@Data +public class AlipaySupplyDefenseDocumentRequest + extends AlipayRequest { - private String disputeId; + /** + * The unique ID assigned by Antom to identify a dispute. More information: Maximum length: 64 + * characters + */ + private String disputeId; - private String disputeEvidence; + /** + * The dispute defense document that you prepare for defending the dispute, which is encoded in + * the Base64 format. More information: Maximum length: 1000000 characters + */ + private String disputeEvidence; - public AlipaySupplyDefenseDocumentRequest() { - this.setPath(AntomPathConstants.SUPPLY_DEFENCE_DOC_PATH); - } + public AlipaySupplyDefenseDocumentRequest() { + this.setPath("/ams/api/v1/payments/supplyDefenseDocument"); + } - @Override - public Class getResponseClass() { - return AlipaySupplyDefenseDocumentResponse.class; - } + @Override + public Class getResponseClass() { + return AlipaySupplyDefenseDocumentResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayCreatePayoutRequest.java b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayCreatePayoutRequest.java index e5f3b49..b2fd92e 100644 --- a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayCreatePayoutRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayCreatePayoutRequest.java @@ -1,28 +1,47 @@ +/* + * marketplace_createPayout + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.TransferFromDetail; import com.alipay.global.api.model.ams.TransferToDetail; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.marketplace.AlipayCreatePayoutResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayCreatePayoutRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayCreatePayoutRequest extends AlipayRequest { - private String transferRequestId; - private TransferFromDetail transferFromDetail; - private TransferToDetail transferToDetail; + /** + * The unique ID assigned by the marketplace to identify a payout request. More information: This + * field is an API idempotency field.For requests that are initiated with the same value of + * transferRequestId and reach a final status (S or F), the same result is to be returned for the + * request. Maximum length: 64 characters + */ + private String transferRequestId; + + private TransferFromDetail transferFromDetail; - public AlipayCreatePayoutRequest() { - this.setPath(AntomPathConstants.MARKETPLACE_CREATEPAYOUT_PATH); - } + private TransferToDetail transferToDetail; - @Override - public Class getResponseClass() { - return AlipayCreatePayoutResponse.class; - } + public AlipayCreatePayoutRequest() { + this.setPath("/ams/api/v1/funds/createPayout"); + } + @Override + public Class getResponseClass() { + return AlipayCreatePayoutResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayCreateTransferRequest.java b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayCreateTransferRequest.java index 169fbe7..4d778f1 100644 --- a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayCreateTransferRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayCreateTransferRequest.java @@ -1,27 +1,47 @@ +/* + * marketplace_createTransfer + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.TransferFromDetail; import com.alipay.global.api.model.ams.TransferToDetail; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.marketplace.AlipayCreateTransferResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayCreateTransferRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayCreateTransferRequest extends AlipayRequest { - private String transferRequestId; - private TransferFromDetail transferFromDetail; - private TransferToDetail transferToDetail; + /** + * The unique ID assigned by the marketplace to identify a transfer request. More information: + * This field is an API idempotency field.For requests that are initiated with the same value of + * transferRequestId and reach a final status (S or F), the same result is to be returned for the + * request. Maximum length: 64 characters + */ + private String transferRequestId; + + private TransferFromDetail transferFromDetail; + + private TransferToDetail transferToDetail; - public AlipayCreateTransferRequest() { - this.setPath(AntomPathConstants.MARKETPLACE_CREATETRANSFER_PATH); - } + public AlipayCreateTransferRequest() { + this.setPath("/ams/api/v1/funds/createTransfer"); + } - @Override - public Class getResponseClass() { - return AlipayCreateTransferResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayCreateTransferResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayInquireBalanceRequest.java b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayInquireBalanceRequest.java index 327ee33..2b3fba6 100644 --- a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayInquireBalanceRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayInquireBalanceRequest.java @@ -1,24 +1,41 @@ +/* + * marketplace_inquireBalance + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.marketplace; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.marketplace.AlipayInquireBalanceResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayInquireBalanceRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayInquireBalanceRequest extends AlipayRequest { - private String referenceMerchantId; - - public AlipayInquireBalanceRequest() { - this.setPath(AntomPathConstants.MARKETPLACE_INQUIREBALANCE_PATH); - } + /** + * The unique ID that is assigned by the marketplace to identify the sub-merchant. Specify this + * parameter if you inquire about the account balance of the sub-merchant. If you leave this + * parameter empty or do not specify this parameter, the default action is to inquire about the + * account balance of the marketplace. More information: Maximum length: 32 characters + */ + private String referenceMerchantId; - @Override - public Class getResponseClass() { - return AlipayInquireBalanceResponse.class; - } + public AlipayInquireBalanceRequest() { + this.setPath("/ams/api/v1/accounts/inquireBalance"); + } + @Override + public Class getResponseClass() { + return AlipayInquireBalanceResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayRegisterRequest.java b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayRegisterRequest.java index 13d4f84..5d60dc1 100644 --- a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayRegisterRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipayRegisterRequest.java @@ -1,32 +1,61 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.MerchantInfo; import com.alipay.global.api.model.ams.PaymentMethod; import com.alipay.global.api.model.ams.SettlementInfo; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.marketplace.AlipayRegisterResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.util.List; +import lombok.*; -@Data +/** AlipayRegisterRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayRegisterRequest extends AlipayRequest { - private String registrationRequestId; - private List settlementInfos; - private MerchantInfo merchantInfo; - private List paymentMethods; + /** + * The unique ID that is assigned by the marketplace to identify a registration request. Alipay + * uses this field for idempotence control. More information: This field is an API idempotency + * field.For registration requests that are initiated with the same value of registrationRequestId + * and reach a final status (resultStatus = S or F), the same result is to be returned for + * the request. Maximum length: 64 characters + */ + private String registrationRequestId; + + /** + * The list of sub-merchants' settlement information. One settlement currency corresponds to + * one settlement bank account. More information: Maximum size: 10 elements + */ + private List settlementInfos; + + private MerchantInfo merchantInfo; - public AlipayRegisterRequest() { - this.setPath(AntomPathConstants.MARKETPLACE_REGISTER_PATH); - } + /** + * The payment method that is used to collect the payment by the merchant or acquirer. The payment + * method must be already supportd by the platform merchant before they can be assigned for + * sub-merchants. More information: Maximum length: 100 characters + */ + private List paymentMethods; - @Override - public Class getResponseClass() { - return AlipayRegisterResponse.class; - } + public AlipayRegisterRequest() { + this.setPath("/ams/api/v1/merchants/register"); + } + @Override + public Class getResponseClass() { + return AlipayRegisterResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySettleRequest.java b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySettleRequest.java index b27d97c..769a55c 100644 --- a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySettleRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySettleRequest.java @@ -1,28 +1,54 @@ +/* + * marketplace_settle + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.SettlementDetail; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.marketplace.AlipaySettleResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.util.List; +import lombok.*; -@Data +/** AlipaySettleRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipaySettleRequest extends AlipayRequest { - private String settlementRequestId; - private String paymentId; - private List settlementDetails; + /** + * The unique ID that is assigned by the marketplace to identify a settlement request. Antom uses + * this field for idempotence control. More information: This field is an API idempotency + * field.For registration requests that are initiated with the same value of settlementRequestId + * and reach a final status (resultStatus = S or F), the same result is to be returned for + * the request. Maximum length: 64 characters + */ + private String settlementRequestId; + + /** + * The unique ID that is assigned by Antom to identify a payment. The value of this parameter is + * returned through the same parameter in the pay (Cashier Payment) API. More information: Maximum + * length: 64 characters + */ + private String paymentId; + + /** The settlement details for a payment. More information: Maximum length: 20 characters */ + private List settlementDetails; - public AlipaySettleRequest() { - this.setPath(AntomPathConstants.MARKETPLACE_SETTLE_PATH); - } + public AlipaySettleRequest() { + this.setPath("/ams/api/v1/payments/settle"); + } - @Override - public Class getResponseClass() { - return AlipaySettleResponse.class; - } + @Override + public Class getResponseClass() { + return AlipaySettleResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySettlementInfoUpdateRequest.java b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySettlementInfoUpdateRequest.java index 7f24f50..ef2d9ec 100644 --- a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySettlementInfoUpdateRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySettlementInfoUpdateRequest.java @@ -1,28 +1,59 @@ +/* + * marketplace_update + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.SettlementBankAccount; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.marketplace.AlipaySettlementInfoUpdateResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipaySettlementInfoUpdateRequest */ @EqualsAndHashCode(callSuper = true) -public class AlipaySettlementInfoUpdateRequest extends - AlipayRequest { - - private String updateRequestId; - private String referenceMerchantId; - private String settlementCurrency; - private SettlementBankAccount settlementBankAccount; - - public AlipaySettlementInfoUpdateRequest() { - this.setPath(AntomPathConstants.MARKETPLACE_SETTLEMENTINFO_UPDATE_PATH); - } - - @Override - public Class getResponseClass() { - return AlipaySettlementInfoUpdateResponse.class; - } +@Data +public class AlipaySettlementInfoUpdateRequest + extends AlipayRequest { + + /** + * The unique ID that is assigned by the marketplace to identify an update request for settlement + * information. Alipay uses this field for idempotence control. More information: This field is an + * API idempotency field.For registration requests that are initiated with the same value of + * registrationRequestId and reach a final status (resultStatus = S or F), the same result is + * to be returned for the request. Maximum length: 64 characters + */ + private String updateRequestId; + + /** + * The unique ID that is assigned by the marketplace to identify the seller. More information: + * Maximum length: 64 characters + */ + private String referenceMerchantId; + + /** + * The seller's settlement currency that is specified in the settlement contract. The value of + * this parameter is a 3-letter currency code that follows the ISO 4217 standard. More + * information: Maximum length: 3 characters + */ + private String settlementCurrency; + + private SettlementBankAccount settlementBankAccount; + + public AlipaySettlementInfoUpdateRequest() { + this.setPath("/ams/api/v1/merchants/settlementInfo/update"); + } + + @Override + public Class getResponseClass() { + return AlipaySettlementInfoUpdateResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySubmitAttachmentRequest.java b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySubmitAttachmentRequest.java index 6813c5d..65a6e7e 100644 --- a/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySubmitAttachmentRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/marketplace/AlipaySubmitAttachmentRequest.java @@ -1,44 +1,51 @@ +/* + * marketplace_submitAttachment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.AttachmentType; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.marketplace.AlipaySubmitAttachmentResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipaySubmitAttachmentRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipaySubmitAttachmentRequest extends AlipayRequest { - private String submitAttachmentRequestId; - - /** - * The type of the attachment that you submit. Valid values are: - *

- * AUTHORIZER_SIGNATURE_CONFIRMATION_LETTER: indicates that the attachment is a document that someone signs on behalf of an individual or a company. - * ASSOCIATION_ARTICLE: indicates that the attachment contains the rules and regulations of the company. - * FINANCIAL_REPORT: indicates that the attachment is the company's financial report. - * OWNERSHIP_STRUCTURE_PIC: indicates that the attachment is the company's ownership structure chart. - * ADDRESS_PROOF: indicates that the attachment serves as proof of the company member's residential address. - * UBO_PROVE: indicates that the attachment is the declaration of the company's UBO whose shareholding ratio is less than 25%. - * ENTERPRISE_REGISTRATION: indicates the enterprise registration certificate. - * LICENSE_INFO: indicates that the certificate is a business license. - * ID_CARD: indicates that the certificate is an identity card. - * PASSPORT: indicates that the certificate is a passport. - * DRIVING_LICENSE: indicates that the certificate is a driving license. - * CPF: indicates that the certificate is the Cadastro Pessoal de Pessoa Física (CPF) of the Brazilian individual taxpayer. - * CNPJ: indicates that the certificate is the Cadastro Nacional da Pessoa Jurídica (CNPJ), which is a federal identification number assigned to companies and businesses operating in Brazil. - */ - private AttachmentType attachmentType; - private String fileSha256; - - public AlipaySubmitAttachmentRequest() { - this.setPath(AntomPathConstants.MARKETPLACE_SUBMITATTACHMENT_PATH); - } - - @Override - public Class getResponseClass() { - return AlipaySubmitAttachmentResponse.class; - } + /** + * The unique ID assigned by the marketplace to identify an attachment submission request. More + * information: This field is an API idempotency field. For attachment submission requests that + * are initiated with the same value of attachmentSubmissionRequestId and reach a final status of + * S or F, the same result is to be returned for the request. Maximum length: 32 characters + */ + private String submitAttachmentRequestId; + + private AttachmentType attachmentType; + + /** + * The SHA-256 hash value of the file, used to uniquely identify and verify its integrity and + * authenticity. For more information, see How to calculate the SHA256 digest of a file. More + * information: Maximum length: 64 characters + */ + private String fileSha256; + + public AlipaySubmitAttachmentRequest() { + this.setPath("/ams/api/open/openapiv2_file/v1/business/attachment/submitAttachment"); + } + + @Override + public Class getResponseClass() { + return AlipaySubmitAttachmentResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationInfoQueryRequest.java b/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationInfoQueryRequest.java index cafc4cf..e59bf4a 100644 --- a/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationInfoQueryRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationInfoQueryRequest.java @@ -7,17 +7,17 @@ @Data @EqualsAndHashCode(callSuper = true) -public class AlipayMerchantRegistrationInfoQueryRequest extends - AlipayRequest { +public class AlipayMerchantRegistrationInfoQueryRequest + extends AlipayRequest { - private String referenceMerchantId; + private String referenceMerchantId; - public AlipayMerchantRegistrationInfoQueryRequest() { - this.setPath("/ams/api/v1/merchants/inquiryRegistrationInfo"); - } + public AlipayMerchantRegistrationInfoQueryRequest() { + this.setPath("/ams/api/v1/merchants/inquiryRegistrationInfo"); + } - @Override - public Class getResponseClass() { - return AlipayMerchantRegistrationInfoQueryResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayMerchantRegistrationInfoQueryResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationRequest.java b/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationRequest.java index c7d2a33..17dd4f9 100644 --- a/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationRequest.java @@ -4,28 +4,27 @@ import com.alipay.global.api.model.ams.ProductCodeType; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.merchant.AlipayMerchantRegistrationResponse; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - @Data @EqualsAndHashCode(callSuper = true) -public class AlipayMerchantRegistrationRequest extends - AlipayRequest { +public class AlipayMerchantRegistrationRequest + extends AlipayRequest { - private List productCodes; - private String registrationRequestId; - private String registrationNotifyURL; - private MerchantRegistrationInfo merchantInfo; - private String passThroughInfo; + private List productCodes; + private String registrationRequestId; + private String registrationNotifyURL; + private MerchantRegistrationInfo merchantInfo; + private String passThroughInfo; - public AlipayMerchantRegistrationRequest() { - this.setPath("/ams/api/v1/merchants/registration"); - } + public AlipayMerchantRegistrationRequest() { + this.setPath("/ams/api/v1/merchants/registration"); + } - @Override - public Class getResponseClass() { - return AlipayMerchantRegistrationResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayMerchantRegistrationResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationStatusQueryRequest.java b/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationStatusQueryRequest.java index fae6264..45dfce2 100644 --- a/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationStatusQueryRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/merchant/AlipayMerchantRegistrationStatusQueryRequest.java @@ -7,18 +7,18 @@ @Data @EqualsAndHashCode(callSuper = true) -public class AlipayMerchantRegistrationStatusQueryRequest extends - AlipayRequest { +public class AlipayMerchantRegistrationStatusQueryRequest + extends AlipayRequest { - private String registrationRequestId; - private String referenceMerchantId; + private String registrationRequestId; + private String referenceMerchantId; - public AlipayMerchantRegistrationStatusQueryRequest() { - this.setPath("/ams/api/v1/merchants/inquiryRegistrationStatus"); - } + public AlipayMerchantRegistrationStatusQueryRequest() { + this.setPath("/ams/api/v1/merchants/inquiryRegistrationStatus"); + } - @Override - public Class getResponseClass() { - return AlipayMerchantRegistrationStatusQueryResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayMerchantRegistrationStatusQueryResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayAuthNotify.java b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayAuthNotify.java index fc3d493..38de1aa 100644 --- a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayAuthNotify.java +++ b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayAuthNotify.java @@ -7,44 +7,27 @@ @EqualsAndHashCode(callSuper = true) public class AlipayAuthNotify extends AlipayNotify { - /** - * Authorization notification type - */ - private String authorizationNotifyType; - - /** - * authClientId - */ - private String authClientId; - - /** - * The access token that is used to access the corresponding scope of the user resource - */ - private String accessToken; - - /** - * A string that is generated by the acquirer to represent the consult request - */ - private String authState; - - /** - * The authorization code, used for getting an access token - */ - private String authCode; - - /** - * The reason why the authorization is canceled - */ - private String reason; - - /** - * The login ID that the user used to register in the wallet - */ - private String userLoginId; - - /** - * The ID assigned by the payment method provider to identify a user - */ - private String userId; + /** Authorization notification type */ + private String authorizationNotifyType; + /** authClientId */ + private String authClientId; + + /** The access token that is used to access the corresponding scope of the user resource */ + private String accessToken; + + /** A string that is generated by the acquirer to represent the consult request */ + private String authState; + + /** The authorization code, used for getting an access token */ + private String authCode; + + /** The reason why the authorization is canceled */ + private String reason; + + /** The login ID that the user used to register in the wallet */ + private String userLoginId; + + /** The ID assigned by the payment method provider to identify a user */ + private String userId; } diff --git a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayCaptureResultNotify.java b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayCaptureResultNotify.java index a098012..deaa3b9 100644 --- a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayCaptureResultNotify.java +++ b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayCaptureResultNotify.java @@ -9,39 +9,24 @@ @EqualsAndHashCode(callSuper = true) public class AlipayCaptureResultNotify extends AlipayNotify { - /** - * The unique ID that is assigned by the merchant to identify a capture request - */ - private String captureRequestId; - - /** - * The unique ID that is assigned by Alipay to identify a payment - */ - private String paymentId; - - /** - * The unique ID assigned by Alipay to identify a capture - */ - private String captureId; - - /** - * The capture amount that the merchant requests to receive in the transaction currency - */ - private Amount captureAmount; - - /** - * The time when Alipay captures the payment - */ - private String captureTime; - - /** - * The unique ID assigned by the non-Alipay acquirer for the transaction - */ - private String acquirerReferenceNo; - - /** - * The information of the acquirer that processes the payment. - */ - private AcquirerInfo acquirerInfo; + /** The unique ID that is assigned by the merchant to identify a capture request */ + private String captureRequestId; + /** The unique ID that is assigned by Alipay to identify a payment */ + private String paymentId; + + /** The unique ID assigned by Alipay to identify a capture */ + private String captureId; + + /** The capture amount that the merchant requests to receive in the transaction currency */ + private Amount captureAmount; + + /** The time when Alipay captures the payment */ + private String captureTime; + + /** The unique ID assigned by the non-Alipay acquirer for the transaction */ + private String acquirerReferenceNo; + + /** The information of the acquirer that processes the payment. */ + private AcquirerInfo acquirerInfo; } diff --git a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayDisputeNotify.java b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayDisputeNotify.java index 18d2358..25e9323 100644 --- a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayDisputeNotify.java +++ b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayDisputeNotify.java @@ -10,24 +10,24 @@ @Data @EqualsAndHashCode(callSuper = true) public class AlipayDisputeNotify extends AlipayNotify { - private String paymentRequestId; - private String disputeId; - private String paymentId; - private String disputeTime; - private Amount disputeAmount; - private DisputeNotificationType disputeNotificationType; - private String disputeReasonMsg; - private String disputeJudgedTime; - private Amount disputeJudgedAmount; - private DisputeJudgedResult disputeJudgedResult; - private String defenseDueTime; - private String disputeReasonCode; - private String disputeSource; - private String arn; - private DisputeAcceptReasonType disputeAcceptReason; - private String disputeAcceptTime; - private String disputeType; - private Boolean defendable; - private String captureId; - private String autoDefendReason; + private String paymentRequestId; + private String disputeId; + private String paymentId; + private String disputeTime; + private Amount disputeAmount; + private DisputeNotificationType disputeNotificationType; + private String disputeReasonMsg; + private String disputeJudgedTime; + private Amount disputeJudgedAmount; + private DisputeJudgedResult disputeJudgedResult; + private String defenseDueTime; + private String disputeReasonCode; + private String disputeSource; + private String arn; + private DisputeAcceptReasonType disputeAcceptReason; + private String disputeAcceptTime; + private String disputeType; + private Boolean defendable; + private String captureId; + private String autoDefendReason; } diff --git a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayNotify.java b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayNotify.java index 3469dc7..8502c2d 100644 --- a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayNotify.java +++ b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayNotify.java @@ -6,8 +6,7 @@ @Data public class AlipayNotify { - private String notifyType; - - private Result result; + private String notifyType; + private Result result; } diff --git a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayPayResultNotify.java b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayPayResultNotify.java index 2104d89..66cb1b7 100644 --- a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayPayResultNotify.java +++ b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayPayResultNotify.java @@ -1,81 +1,62 @@ package com.alipay.global.api.request.ams.notify; import com.alipay.global.api.model.ams.*; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - @Data @EqualsAndHashCode(callSuper = true) public class AlipayPayResultNotify extends AlipayNotify { - /** - * The unique ID that is assigned by a merchant to identify a payment request. - */ - private String paymentRequestId; - - /** - * unique id generated from ipay for this payment - */ - private String paymentId; - - /** - * amount of this payment - */ - private Amount paymentAmount; - - /** - * create time of this payment - */ - private String paymentCreateTime; - - /** - * the time of payment finish - */ - private String paymentTime; - - /** - * The total amount for customs declaration - */ - private Amount customsDeclarationAmount; - - /** - * The value of this field equals to transaction amount multiplied by the value of settlementQuote. This field is returned when the currency exchange is predetermined and the exchange rate is locked at the time of transaction - */ - private Amount grossSettlementAmount; - - /** - * The exchange rate between the settlement currency and transaction currency. This field is returned when grossSettlementAmount is returned - */ - private Quote settlementQuote; - - /** - * Information about the customer of Alipay+ Mobile Payment Provider (Alipay+ MPP) - */ - private PspCustomerInfo pspCustomerInfo; - - /** - * The unique ID assigned by the non-Alipay acquirer for the transaction - */ - private String acquirerReferenceNo; - - /** - * The payment result information - */ - private PaymentResultInfo paymentResultInfo; - - /** - * The information of the acquirer that processes the payment. - */ - private AcquirerInfo acquirerInfo; - - private List promotionResult; - - private String paymentMethodType; - - private CustomizedInfo customizedInfo; - private Quote paymentQuote; - private Amount processingAmount; + /** The unique ID that is assigned by a merchant to identify a payment request. */ + private String paymentRequestId; + + /** unique id generated from ipay for this payment */ + private String paymentId; + + /** amount of this payment */ + private Amount paymentAmount; + + /** create time of this payment */ + private String paymentCreateTime; + + /** the time of payment finish */ + private String paymentTime; + + /** The total amount for customs declaration */ + private Amount customsDeclarationAmount; + + /** + * The value of this field equals to transaction amount multiplied by the value of + * settlementQuote. This field is returned when the currency exchange is predetermined and the + * exchange rate is locked at the time of transaction + */ + private Amount grossSettlementAmount; + + /** + * The exchange rate between the settlement currency and transaction currency. This field is + * returned when grossSettlementAmount is returned + */ + private Quote settlementQuote; + + /** Information about the customer of Alipay+ Mobile Payment Provider (Alipay+ MPP) */ + private PspCustomerInfo pspCustomerInfo; + + /** The unique ID assigned by the non-Alipay acquirer for the transaction */ + private String acquirerReferenceNo; + + /** The payment result information */ + private PaymentResultInfo paymentResultInfo; + + /** The information of the acquirer that processes the payment. */ + private AcquirerInfo acquirerInfo; + + private List promotionResult; + + private String paymentMethodType; + private CustomizedInfo customizedInfo; + private Quote paymentQuote; + private Amount processingAmount; } diff --git a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayRefundNotify.java b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayRefundNotify.java index d8c502e..f925e12 100644 --- a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayRefundNotify.java +++ b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayRefundNotify.java @@ -10,42 +10,34 @@ @EqualsAndHashCode(callSuper = true) public class AlipayRefundNotify extends AlipayNotify { - /** - * Indicates the refund result. SUCCESS/FAIL - */ - private String refundStatus; - - /** - * The unique ID assigned by a merchant to identify a refund request - */ - private String refundRequestId; - - /** - * The unique ID that is assigned by Alipay to identify a refund. A one-to-one correspondence between paymentId and paymentRequestId exists - */ - private String refundId; - - /** - * The refund amount that is initiated by the merchant - */ - private Amount refundAmount; - - /** - * The date and time when the refund reaches a final state of success or failure - */ - private String refundTime; - - /** - * The refund settlement amount, which equals the refund amount multiplied by the value of settlementQuote - */ - private Amount grossSettlementAmount; - - /** - * The exchange rate between the settlement currency and transaction currency - */ - private Quote settlementQuote; - - private CustomizedInfo customizedInfo; - - private String arn; + /** Indicates the refund result. SUCCESS/FAIL */ + private String refundStatus; + + /** The unique ID assigned by a merchant to identify a refund request */ + private String refundRequestId; + + /** + * The unique ID that is assigned by Alipay to identify a refund. A one-to-one correspondence + * between paymentId and paymentRequestId exists + */ + private String refundId; + + /** The refund amount that is initiated by the merchant */ + private Amount refundAmount; + + /** The date and time when the refund reaches a final state of success or failure */ + private String refundTime; + + /** + * The refund settlement amount, which equals the refund amount multiplied by the value of + * settlementQuote + */ + private Amount grossSettlementAmount; + + /** The exchange rate between the settlement currency and transaction currency */ + private Quote settlementQuote; + + private CustomizedInfo customizedInfo; + + private String arn; } diff --git a/src/main/java/com/alipay/global/api/request/ams/notify/AlipaySubscriptionNotify.java b/src/main/java/com/alipay/global/api/request/ams/notify/AlipaySubscriptionNotify.java index 4e279b4..15317bc 100644 --- a/src/main/java/com/alipay/global/api/request/ams/notify/AlipaySubscriptionNotify.java +++ b/src/main/java/com/alipay/global/api/request/ams/notify/AlipaySubscriptionNotify.java @@ -9,14 +9,14 @@ @Data @EqualsAndHashCode(callSuper = true) -public class AlipaySubscriptionNotify extends AlipayNotify{ - private String subscriptionRequestId; - private String subscriptionId; - private SubscriptionStatus subscriptionStatus ; - private SubscriptionNotificationType subscriptionNotificationType; - private String subscriptionStartTime; - private String subscriptionEndTime; - private PeriodRule periodRule; - private Boolean allowAccumulate; - private Amount maxAccumulateAmount; +public class AlipaySubscriptionNotify extends AlipayNotify { + private String subscriptionRequestId; + private String subscriptionId; + private SubscriptionStatus subscriptionStatus; + private SubscriptionNotificationType subscriptionNotificationType; + private String subscriptionStartTime; + private String subscriptionEndTime; + private PeriodRule periodRule; + private Boolean allowAccumulate; + private Amount maxAccumulateAmount; } diff --git a/src/main/java/com/alipay/global/api/request/ams/notify/AlipaySubscriptionPayNotify.java b/src/main/java/com/alipay/global/api/request/ams/notify/AlipaySubscriptionPayNotify.java index e86096f..f03d1b6 100644 --- a/src/main/java/com/alipay/global/api/request/ams/notify/AlipaySubscriptionPayNotify.java +++ b/src/main/java/com/alipay/global/api/request/ams/notify/AlipaySubscriptionPayNotify.java @@ -1,16 +1,14 @@ package com.alipay.global.api.request.ams.notify; -import com.alipay.global.api.model.ams.Amount; -import com.alipay.global.api.request.ams.pay.AlipayPayRequest; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) public class AlipaySubscriptionPayNotify extends AlipayPayResultNotify { - private String subscriptionRequestId; - private String subscriptionId; - private String periodStartTime; - private String periodEndTime; - private String phaseNo; + private String subscriptionRequestId; + private String subscriptionId; + private String periodStartTime; + private String periodEndTime; + private String phaseNo; } diff --git a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayVaultingNotify.java b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayVaultingNotify.java index 9edbb75..62707fc 100644 --- a/src/main/java/com/alipay/global/api/request/ams/notify/AlipayVaultingNotify.java +++ b/src/main/java/com/alipay/global/api/request/ams/notify/AlipayVaultingNotify.java @@ -10,19 +10,15 @@ @EqualsAndHashCode(callSuper = true) public class AlipayVaultingNotify extends AlipayNotify { - /** - * The unique ID that is assigned by a merchant to identify a card vaulting request. - */ - private String vaultingRequestId; + /** The unique ID that is assigned by a merchant to identify a card vaulting request. */ + private String vaultingRequestId; - /** - * The details about the card payment method. - */ - private VaultingPaymentMethodDetail paymentMethodDetail; + /** The details about the card payment method. */ + private VaultingPaymentMethodDetail paymentMethodDetail; - private String vaultingCreateTime; + private String vaultingCreateTime; - private AcquirerInfo acquirerInfo; + private AcquirerInfo acquirerInfo; - private CustomizedInfo customizedInfo; -} \ No newline at end of file + private CustomizedInfo customizedInfo; +} diff --git a/src/main/java/com/alipay/global/api/request/ams/order/AlipayCreateOrderRequest.java b/src/main/java/com/alipay/global/api/request/ams/order/AlipayCreateOrderRequest.java index f2c8d9e..52f616c 100644 --- a/src/main/java/com/alipay/global/api/request/ams/order/AlipayCreateOrderRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/order/AlipayCreateOrderRequest.java @@ -13,19 +13,17 @@ @EqualsAndHashCode(callSuper = true) public class AlipayCreateOrderRequest extends AlipayRequest { - private ProductCodeType productCode; - private String paymentRequestId; - private Order order; - private Amount paymentAmount; - private String paymentRedirectUrl; - private String paymentNotifyUrl; + private ProductCodeType productCode; + private String paymentRequestId; + private Order order; + private Amount paymentAmount; + private String paymentRedirectUrl; + private String paymentNotifyUrl; - public AlipayCreateOrderRequest() { - } - - @Override - public Class getResponseClass() { - return AlipayCreateOrderResponse.class; - } + public AlipayCreateOrderRequest() {} + @Override + public Class getResponseClass() { + return AlipayCreateOrderResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayCaptureRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayCaptureRequest.java index 3241b40..8bc3023 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayCaptureRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayCaptureRequest.java @@ -1,42 +1,53 @@ +/* + * payments_capture + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.pay; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.Amount; -import com.alipay.global.api.model.ams.Transit; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayCaptureResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayCaptureRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayCaptureRequest extends AlipayRequest { - /** - * The unique ID that is assigned by the merchant to identify a capture request. Alipay uses this field for idempotence control - */ - private String captureRequestId; - - /** - * The unique ID that is assigned by Alipay to identify a payment - */ - private String paymentId; - - /** - * The capture amount that the merchant requests to receive in the transaction currency - */ - private Amount captureAmount; - - private Boolean isLastCapture; - - private Transit transit; - - public AlipayCaptureRequest() { - this.setPath(AntomPathConstants.CAPTURE_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayCaptureResponse.class; - } + /** + * The unique ID that is assigned by the merchant to identify a capture request. Antom uses this + * field for idempotence control. More information: This field is an API idempotency field.For + * capture requests that are initiated with the same value of captureRequestId and reach a final + * status (S or F), the same result is to be returned for the request. Maximum length: 64 + * characters + */ + private String captureRequestId; + + /** + * The unique ID that is assigned by Antom to identify a payment. More information: Maximum + * length: 64 characters + */ + private String paymentId; + + private Amount captureAmount; + + private Boolean isLastCapture; + + public AlipayCaptureRequest() { + this.setPath("/ams/api/v1/payments/capture"); + } + + @Override + public Class getResponseClass() { + return AlipayCaptureResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayCheckoutPaymentSessionRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayCheckoutPaymentSessionRequest.java index d196966..afc10b6 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayCheckoutPaymentSessionRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayCheckoutPaymentSessionRequest.java @@ -1,5 +1,6 @@ package com.alipay.global.api.request.ams.pay; + import com.alipay.global.api.model.ams.ProductCodeType; import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.model.constants.ProductSceneConstants; @@ -10,10 +11,9 @@ @EqualsAndHashCode(callSuper = true) public class AlipayCheckoutPaymentSessionRequest extends AlipayPaymentSessionRequest { - public AlipayCheckoutPaymentSessionRequest() { - this.setPath(AntomPathConstants.CREATE_SESSION_PATH); - this.setProductCode(ProductCodeType.CASHIER_PAYMENT); - this.setProductScene(ProductSceneConstants.CHECKOUT_PAYMENT); - } - + public AlipayCheckoutPaymentSessionRequest() { + this.setPath(AntomPathConstants.CREATE_SESSION_PATH); + this.setProductCode(ProductCodeType.CASHIER_PAYMENT); + this.setProductScene(ProductSceneConstants.CHECKOUT_PAYMENT); + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayDeviceCertificateRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayDeviceCertificateRequest.java index c32e7a6..3f1ffba 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayDeviceCertificateRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayDeviceCertificateRequest.java @@ -10,18 +10,16 @@ @EqualsAndHashCode(callSuper = true) public class AlipayDeviceCertificateRequest extends AlipayRequest { - private String devicePublicKey; + private String devicePublicKey; - private String deviceRequestId; + private String deviceRequestId; + public AlipayDeviceCertificateRequest() { + this.setPath(AntomPathConstants.CREATE_DEVICE_CERTIFICATE_PATH); + } - public AlipayDeviceCertificateRequest() { - this.setPath(AntomPathConstants.CREATE_DEVICE_CERTIFICATE_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayDeviceCertificateResponse.class; - } - + @Override + public Class getResponseClass() { + return AlipayDeviceCertificateResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayFetchNonceRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayFetchNonceRequest.java index aadddaa..3dfbfe0 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayFetchNonceRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayFetchNonceRequest.java @@ -4,21 +4,20 @@ import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayFetchNonceResponse; -import com.alipay.global.api.response.ams.pay.AlipayPayResponse; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) public class AlipayFetchNonceRequest extends AlipayRequest { - private CardPaymentMethodDetail card; + private CardPaymentMethodDetail card; - public AlipayFetchNonceRequest() { - this.setPath(AntomPathConstants.PAYMENT_FETCH_NONCE_PATH); - } + public AlipayFetchNonceRequest() { + this.setPath(AntomPathConstants.PAYMENT_FETCH_NONCE_PATH); + } - @Override - public Class getResponseClass() { - return AlipayFetchNonceResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayFetchNonceResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquireExchangeRateRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquireExchangeRateRequest.java index b04b461..4af79d7 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquireExchangeRateRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquireExchangeRateRequest.java @@ -3,23 +3,23 @@ import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayInquireExchangeRateResponse; -import com.alipay.global.api.response.ams.pay.AlipayPayResponse; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) -public class AlipayInquireExchangeRateRequest extends AlipayRequest { +public class AlipayInquireExchangeRateRequest + extends AlipayRequest { - private String merchantAccountId; - private String paymentCurrency; + private String merchantAccountId; + private String paymentCurrency; - public AlipayInquireExchangeRateRequest() { - this.setPath(AntomPathConstants.PAYMENT_INQUIRE_EXCHANGE_RATE_PATH); - } + public AlipayInquireExchangeRateRequest() { + this.setPath(AntomPathConstants.PAYMENT_INQUIRE_EXCHANGE_RATE_PATH); + } - @Override - public Class getResponseClass() { - return AlipayInquireExchangeRateResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayInquireExchangeRateResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquireInstallmentRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquireInstallmentRequest.java index 5ebcfd0..294f7a0 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquireInstallmentRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquireInstallmentRequest.java @@ -3,22 +3,21 @@ import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayInquireInstallmentResponse; -import com.alipay.global.api.response.ams.pay.AlipayPayResponse; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) -public class AlipayInquireInstallmentRequest extends AlipayRequest { - private String merchantAccountId; +public class AlipayInquireInstallmentRequest + extends AlipayRequest { + private String merchantAccountId; + public AlipayInquireInstallmentRequest() { + this.setPath(AntomPathConstants.PAYMENT_INQUIRE_INSTALLMENT_PATH); + } - public AlipayInquireInstallmentRequest() { - this.setPath(AntomPathConstants.PAYMENT_INQUIRE_INSTALLMENT_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayInquireInstallmentResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayInquireInstallmentResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquiryRefundRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquiryRefundRequest.java index c57fc1b..cf1fb6a 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquiryRefundRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayInquiryRefundRequest.java @@ -1,36 +1,50 @@ +/* + * payments_inquiryRefund + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.pay; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayInquiryRefundResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayInquiryRefundRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayInquiryRefundRequest extends AlipayRequest { - /** - * The unique ID assigned by a merchant to identify a refund request - */ - private String refundRequestId; - - /** - * The unique ID assigned by Alipay to identify a refund - */ - private String refundId; - - /** - * The unique ID to identify a merchant account. - */ - private String merchantAccountId; - - public AlipayInquiryRefundRequest() { - this.setPath(AntomPathConstants.INQUIRY_REFUND_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayInquiryRefundResponse.class; - } + /** + * The unique ID assigned by a merchant to identify a refund request. refundRequestId and refundId + * cannot both be null. Special characters are not supported. If both refundRequestId and refundId + * are specified, refundId takes precedence. More information: Maximum length: 64 characters + */ + private String refundRequestId; + + /** + * The unique ID assigned by Antom to identify a refund. refundRequestId and refundId cannot both + * be null. A one-to-one correspondence between refundId and refundRequestId exists. If both + * refundRequestId and refundId are specified, refundId takes precedence. More information: + * Maximum length: 64 characters + */ + private String refundId; + + private String merchantAccountId; + + public AlipayInquiryRefundRequest() { + this.setPath("/ams/api/v1/payments/inquiryRefund"); + } + + @Override + public Class getResponseClass() { + return AlipayInquiryRefundResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayCancelRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayCancelRequest.java index 20b377c..a60746d 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayCancelRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayCancelRequest.java @@ -1,37 +1,55 @@ +/* + * payments_cancel + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.pay; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayPayCancelResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayPayCancelRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayPayCancelRequest extends AlipayRequest { - /** - * The original payment request ID of the payment request to be canceled, generated by the merchant to uniquely identify a payment request - */ - private String paymentId; - - /** - * The original payment ID of the payment request to be canceled, generated by Alipay to uniquely identify the payment when the merchant initiates the original payment - */ - private String paymentRequestId; - - /** - * The unique ID to identify a merchant account. - */ - private String merchantAccountId; - - public AlipayPayCancelRequest() { - this.setPath(AntomPathConstants.CANCEL_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayPayCancelResponse.class; - } - + /** + * The original payment ID of the payment request to be canceled, generated by Antom to uniquely + * identify the payment when the merchant initiates the original payment. paymentId and + * paymentRequestId cannot both be null. A one-to-one correspondence between paymentId and + * paymentRequestId exists. More information: Maximum length: 64 characters + */ + private String paymentId; + + /** + * The original payment request ID of the payment request to be canceled, generated by the + * merchant to uniquely identify a payment request. paymentRequestId and paymentId cannot both be + * null. If both paymentRequestId and paymentId are provided, paymentId takes precedence. More + * information: Maximum length: 64 characters + */ + private String paymentRequestId; + + /** + * The unique ID to identify a merchant account. Note: Specify this parameter when you use a + * single client ID across multiple locations. More information: Maximum length: 32 characters + */ + private String merchantAccountId; + + public AlipayPayCancelRequest() { + this.setPath("/ams/api/v1/payments/cancel"); + } + + @Override + public Class getResponseClass() { + return AlipayPayCancelResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayConsultRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayConsultRequest.java index 9ab7ec9..4d57cdf 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayConsultRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayConsultRequest.java @@ -1,48 +1,99 @@ +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * 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.global.api.request.ams.pay; import com.alipay.global.api.model.ams.*; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.Amount; +import com.alipay.global.api.model.ams.Buyer; +import com.alipay.global.api.model.ams.Env; +import com.alipay.global.api.model.ams.Merchant; +import com.alipay.global.api.model.ams.PaymentFactor; +import com.alipay.global.api.model.ams.ProductCodeType; +import com.alipay.global.api.model.ams.SettlementStrategy; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayPayConsultResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.util.List; +import lombok.*; -@Data +/** AlipayPayConsultRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayPayConsultRequest extends AlipayRequest { - private ProductCodeType productCode; - private Amount paymentAmount; - private String merchantRegion; - private List allowedPaymentMethodRegions; - private List allowedPaymentMethods; - private List blockedPaymentMethods; - private String region; - private String customerId; - private String referenceUserId; - private Env env; - private String extendInfo; - private String userRegion; - private PaymentFactor paymentFactor; - private SettlementStrategy settlementStrategy; - private Merchant merchant; - private List allowedPspRegions; - private Buyer buyer; - /** - * The unique ID to identify a merchant account. - */ - private String merchantAccountId; - private PaymentMethodCategoryType paymentMethodCategory; - - public AlipayPayConsultRequest() { - this.setPath(AntomPathConstants.CONSULT_PAYMENT_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayPayConsultResponse.class; - } + private ProductCodeType productCode; + + private Amount paymentAmount; + + /** + * The country or region where the merchant operates the business. The parameter is a 2-letter + * country or region code that follows ISO 3166 Country Codes standard. Some possible values are + * US, SG, HK, PK, JP, CN, BR, AU, and MY. Note: This parameter is required when you use the + * Global Acquirer Gateway (GAGW) product. More information: Maximum length: 2 characters + */ + private String merchantRegion; + + /** + * A list of region codes that represent the countries or regions of payment methods. The value of + * this parameter is a 2-letter ISO country code or GLOBAL. Note: Specify this parameter if you + * want available payment methods from specific regions to be returned. For example, if you pass + * in GLOBAL, global cards Visa and Mastercard are returned. More information: Maximum length: 6 + * characters + */ + private List allowedPaymentMethodRegions; + + private List allowedPaymentMethods; + + private List blockedPaymentMethods; + + private String region; + + private String customerId; + + private String referenceUserId; + + private Env env; + + private String extendInfo; + + /** + * The 2-letter country or region code. For more information, see ISO 3166 Country Codes standard. + * The payment methods will be sorted based on payment method relevance for the given user's + * region. More information: Maximum length: 2 characters + */ + private String userRegion; + + private PaymentFactor paymentFactor; + + private SettlementStrategy settlementStrategy; + + private Merchant merchant; + + private List allowedPspRegions; + + private Buyer buyer; + + /** + * The unique ID to identify a merchant account. Note: Specify this parameter when you use a + * single client ID across multiple locations. More information: Maximum length: 32 characters + */ + private String merchantAccountId; + + public AlipayPayConsultRequest() { + this.setPath("/ams/api/v1/payments/consult"); + } + @Override + public Class getResponseClass() { + return AlipayPayConsultResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayQueryRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayQueryRequest.java index c133962..daefdfe 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayQueryRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayQueryRequest.java @@ -1,37 +1,54 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.pay; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayPayQueryResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayPayQueryRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayPayQueryRequest extends AlipayRequest { - /** - * The original payment request ID of the payment request to be canceled, generated by the merchant to uniquely identify a payment request - */ - private String paymentRequestId; - - /** - * The original payment ID of the payment request to be canceled, generated by Alipay to uniquely identify the payment when the merchant initiates the original payment - */ - private String paymentId; - - /** - * The unique ID to identify a merchant account. - */ - private String merchantAccountId; - - - public AlipayPayQueryRequest() { - this.setPath(AntomPathConstants.INQUIRY_PAYMENT_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayPayQueryResponse.class; - } + /** + * The unique ID that is assigned by a merchant to identify a payment request. paymentRequestId + * and paymentId cannot both be null. If both paymentRequestId and paymentId are specified, + * paymentId takes precedence. More information: Maximum length: 64 characters + */ + private String paymentRequestId; + + /** + * The unique ID that is assigned by Antom to identify a payment. paymentRequestId and paymentId + * cannot both be null. A one-to-one correspondence between paymentId and paymentRequestId exists. + * If both paymentRequestId and paymentId are specified, paymentId takes precedence. More + * information: Maximum length: 64 characters + */ + private String paymentId; + + /** + * The unique ID to identify a merchant account. Note: Specify this parameter when you use a + * single client ID across multiple locations. More information: Maximum length: 32 characters + */ + private String merchantAccountId; + + public AlipayPayQueryRequest() { + this.setPath("/ams/api/v1/payments/inquiryPayment"); + } + + @Override + public Class getResponseClass() { + return AlipayPayQueryResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayRequest.java index bcbea5b..bbb46ce 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPayRequest.java @@ -1,123 +1,139 @@ +/* + * payments_pay + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.pay; import com.alipay.global.api.model.ams.*; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.Amount; +import com.alipay.global.api.model.ams.CreditPayPlan; +import com.alipay.global.api.model.ams.Env; +import com.alipay.global.api.model.ams.Merchant; +import com.alipay.global.api.model.ams.Order; +import com.alipay.global.api.model.ams.PaymentFactor; +import com.alipay.global.api.model.ams.PaymentMethod; +import com.alipay.global.api.model.ams.PaymentVerificationData; +import com.alipay.global.api.model.ams.ProductCodeType; +import com.alipay.global.api.model.ams.SettlementStrategy; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayPayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayPayRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayPayRequest extends AlipayRequest { - /** - * Represents the payment product that is being used. - */ - private ProductCodeType productCode; - - /** - * The unique ID assigned by a merchant to identify a payment request - */ - private String paymentRequestId; - - /** - * The order information - */ - private Order order; - - /** - * The payment amount that the merchant requests to receive in the order currency - */ - private Amount paymentAmount; - - /** - * The payment method that is used to collect the payment by the merchant or acquirer - */ - private PaymentMethod paymentMethod; - - /** - * The specific time after which the payment will expire - */ - private String paymentExpiryTime; - - /** - * The merchant page URL that the user is redirected to after the payment is completed - */ - private String paymentRedirectUrl; - - /** - * The URL that is used to receive the payment result notification - */ - private String paymentNotifyUrl; - - /** - * Factors that impact the payment. This field is used to indicate the payment scenario - */ - private PaymentFactor paymentFactor; - - /** - * The settlement strategy for the payment request. - */ - private SettlementStrategy settlementStrategy; - - /** - * The credit payment plan information for this payment - */ - private CreditPayPlan creditPayPlan; - - /** - * The unique ID that is assigned by Alipay to identify the mini program - */ - private String appId; - - /** - * The country or region where the merchant operates the business - */ - private String merchantRegion; - - /** - * A 2-letter country or region code based on the standard of ISO 3166 Country Codes. This parameter is used to sort Alipay+ payment methods according to the user's region - */ - private String userRegion; - - /** - * Information about the environment where the order is placed, such as the device information - */ - private Env env; - - private PaymentMethod payToMethod; - - private Boolean isAuthorization; - - private Merchant merchant; - - private PaymentVerificationData paymentVerificationData; - - private String extendInfo; - - /** - * The unique ID to identify a merchant account. - */ - private String merchantAccountId; - - private Boolean dualOfflinePayment; - - private CustomizedInfo customizedInfo; - - private Quote paymentQuote; - - private Amount processingAmount; - - private SubscriptionInfo subscriptionInfo; - - public AlipayPayRequest() { - this.setPath(AntomPathConstants.PAYMENT_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayPayResponse.class; - } - + private ProductCodeType productCode; + + /** + * The unique ID assigned by a merchant to identify a payment request. Antom uses this field for + * idempotence control. More information: This field is an API idempotency field.For payment + * requests that are initiated with the same value of paymentRequestId and reach a final status of + * S or F, the same result is to be returned for the request. Maximum length: 64 characters + */ + private String paymentRequestId; + + private Order order; + + private Amount paymentAmount; + + private PaymentMethod paymentMethod; + + /** + * The payment expiration time is a specific time after which the payment will expire and the + * acquirer or merchant must terminate the order processing. Notes: For bank transfer payments, + * the default payment expiration time is 48 hours after the payment request is sent. For other + * payment categories, the default payment expiration time is usually 14 minutes after the payment + * request is sent. For example, if the request is sent on 2019-11-27T12:00:01+08:30, the payment + * expiration time is 2019-11-27T12:14:01+08:30. Specify this field if you want to use a payment + * expiration time that differs from the default time. For bank transfer payments, the specified + * payment expiration time must be less than 48 hours after the payment request is sent. For other + * payment categories, the specified payment expiration time must be less than 10 minutes after + * the payment request is sent. More information: The value follows the ISO 8601 standard format. + * For example, \"2019-11-27T12:01:01+08:00\". + */ + private String paymentExpiryTime; + + /** + * The merchant page URL that the user is redirected to after the payment is completed. More + * information: Maximum length: 2048 characters + */ + private String paymentRedirectUrl; + + /** + * The URL that is used to receive the payment result notification. Note: Specify this parameter + * if you want to receive an asynchronous notification of the payment result. You can also set the + * URL to receive the result notification in Antom Dashboard. If the URL is specified in both the + * request and Antom Dashboard, the value specified in the request takes precedence. More + * information: Maximum length: 2048 characters + */ + private String paymentNotifyUrl; + + private PaymentFactor paymentFactor; + + private SettlementStrategy settlementStrategy; + + private CreditPayPlan creditPayPlan; + + /** + * The unique ID that is assigned by Antom to identify the mini program. Note: This field is + * required when terminalType is MINI_APP. More information: Maximum length: 32 characters + */ + private String appId; + + /** + * The country or region where the merchant operates the business. The parameter is a 2-letter + * country or region code that follows ISO 3166 Country Codes standard. Some possible values are + * US, SG, HK, PK, JP, CN, BR, AU, and MY. Note: This parameter is required when you use the + * Global Acquirer Gateway (GAGW) product. More information: Maximum length: 2 characters + */ + private String merchantRegion; + + /** + * A 2-letter country or region code based on the standard of ISO 3166 Country Codes. This + * parameter is used to sort Alipay+ payment methods according to the user's region. For + * example, if ALIPAY_CN and KAKAOPAYare both on your payment method list and the user is from + * South Korea, KAKAOPAY will be listed first on the Alipay+ cashier page. Note: This parameter is + * only for the merchant that has integrated the Alipay+ cashier page. More information: Maximum + * length: 2 characters + */ + private String userRegion; + + private Env env; + + private PaymentMethod payToMethod; + + private Boolean isAuthorization; + + private Merchant merchant; + + private PaymentVerificationData paymentVerificationData; + + private String extendInfo; + + /** + * The unique ID to identify a merchant account. Note: Specify this parameter when you use a + * single client ID across multiple locations. More information: Maximum length: 32 characters + */ + private String merchantAccountId; + + private Boolean dualOfflinePayment; + + public AlipayPayRequest() { + this.setPath("/ams/api/v1/payments/pay"); + } + + @Override + public Class getResponseClass() { + return AlipayPayResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPaymentSessionRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPaymentSessionRequest.java index 21e3293..227d1db 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPaymentSessionRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayPaymentSessionRequest.java @@ -1,129 +1,136 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.pay; import com.alipay.global.api.model.ams.*; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.AgreementInfo; +import com.alipay.global.api.model.ams.Amount; +import com.alipay.global.api.model.ams.AvailablePaymentMethod; +import com.alipay.global.api.model.ams.CreditPayPlan; +import com.alipay.global.api.model.ams.Env; +import com.alipay.global.api.model.ams.Order; +import com.alipay.global.api.model.ams.PaymentFactor; +import com.alipay.global.api.model.ams.PaymentMethod; +import com.alipay.global.api.model.ams.ProductCodeType; +import com.alipay.global.api.model.ams.RiskData; +import com.alipay.global.api.model.ams.SettlementStrategy; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayPaymentSessionResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.util.List; +import lombok.*; -@Data +/** AlipayPaymentSessionRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayPaymentSessionRequest extends AlipayRequest { - /** - * Represents the payment product that is being used. The fixed value is CASHIER_PAYMENT - */ - private ProductCodeType productCode; - - /** - * The unique ID assigned by a merchant to identify a payment request - */ - private String paymentRequestId; - - /** - * The order information - */ - private Order order; - - /** - * The payment amount that the merchant requests to receive in the order currency - */ - private Amount paymentAmount; - - /** - * The payment method that is used to collect the payment by the merchant or acquirer - */ - private PaymentMethod paymentMethod; - - /** - * The expiry time of paymentSession - */ - private String paymentSessionExpiryTime; - - /** - * The merchant page URL that the user is redirected to after the payment is completed - */ - private String paymentRedirectUrl; - - /** - * The URL that is used to receive the payment result notification - */ - private String paymentNotifyUrl; - - /** - * Factors that impact the payment. This field is used to indicate the payment scenario - */ - private PaymentFactor paymentFactor; - - /** - * The settlement strategy for the payment request - */ - private SettlementStrategy settlementStrategy; - - /** - * Indicates whether Antom collects the installment information for the payment. - */ - private Boolean enableInstallmentCollection; - - /** - * The credit payment plan information for this payment - */ - private CreditPayPlan creditPayPlan; - - /** - * The country or region where the merchant operates the business - */ - private String merchantRegion; - - /** - * Information about the environment where the order is placed - */ - private Env env; - - /** - * Authorization information about Easy Pay payments - */ - private AgreementInfo agreementInfo; - - /** - * The data used by Ant Group for risk control purposes. - */ - private RiskData riskData; - - /** - * This param is used for Easy pay payments,set its value to EASY_PAY - */ - private String productScene; - - private List savedPaymentMethods; - - private String locale; - - private AvailablePaymentMethod availablePaymentMethod; - - private List allowedPaymentMethodRegions; - - private CustomizedInfo customizedInfo; - - private Quote paymentQuote; - - private Amount processingAmount; - - private SubscriptionPlan subscriptionPlan; - - private SubscriptionInfo subscriptionInfo; - - - public AlipayPaymentSessionRequest() { - this.setPath(AntomPathConstants.CREATE_SESSION_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayPaymentSessionResponse.class; - } - + private ProductCodeType productCode; + + /** + * The unique ID assigned by a merchant to identify a payment request. More information: Maximum + * length: 64 characters + */ + private String paymentRequestId; + + private Order order; + + private Amount paymentAmount; + + private PaymentMethod paymentMethod; + + /** + * The specific date and time after which the payment session will expire. The default expiration + * time is 1 hour after the session creation. For example, if the session is created at + * 2023-7-27T12:00:01+08:30, the session expiration time is 2023-7-27T13:00:01+08:30. Specify this + * parameter if you want to use a payment session expiration time that differs from the default + * time. The specified expiration time must be 0 to 1 hour after session creation. More + * information: The value follows the ISO 8601 standard format. For example, + * \"2019-11-27T12:01:01+08:00\". + */ + private String paymentSessionExpiryTime; + + /** + * The merchant page URL that the user is redirected to after the payment is completed. More + * information: Maximum length: 2048 characters + */ + private String paymentRedirectUrl; + + /** + * The URL that is used to receive the payment result notification. Specify this parameter if you + * want to receive an asynchronous notification of the payment result. You can also set the URL to + * receive the result notification in Antom Dashboard. If the URL is specified in both the request + * and Antom Dashboard, the value specified in the request takes precedence. More information: + * Maximum length: 2048 characters + */ + private String paymentNotifyUrl; + + private PaymentFactor paymentFactor; + + private SettlementStrategy settlementStrategy; + + /** + * Indicates whether Antom collects the installment information for the payment. Specify this + * parameter if you need Antom to collect the installment information. Valid values are: true: + * indicates Antom collects installment information when the user's card supports + * installments. Installments are not available when the user's card does not support + * installments. false: indicates you do not need Antom to collect the installment information. + * The same applies when the value is empty or you do not specify this parameter. + */ + private Boolean enableInstallmentCollection; + + private CreditPayPlan creditPayPlan; + + /** + * The country or region where the merchant operates the business. The parameter is a 2-letter + * country or region code that follows ISO 3166 Country Codes standard. Some possible values are + * US, SG, HK, PK, JP, CN, BR, AU, and MY. Note: This parameter is required when you use the + * Global Acquirer Gateway (GAGW) product. More information: Maximum length: 2 characters + */ + private String merchantRegion; + + private Env env; + + private AgreementInfo agreementInfo; + + private RiskData riskData; + + /** + * Specified product scenarios include valid values: ​CHECKOUT_PAYMENT​: Indicates that the + * merchant integrates using the Checkout Page. ​ELEMENT_PAYMENT​: Indicates that the merchant + * integrates using the Element. More information: Maximum length: 32 characters + */ + private String productScene; + + /** Payment information stored by the user in the merchant system. */ + private List savedPaymentMethods; + + /** + * Language tag specified for the Checkout Page. If this field is empty or set to automatic, the + * default language setting of the browser will be used, which is usually English. More + * information: Maximum length: 8 characters + */ + private String locale; + + private AvailablePaymentMethod availablePaymentMethod; + + private String testFile; + + public AlipayPaymentSessionRequest() { + this.setPath("/ams/api/v1/payments/createPaymentSession"); + } + + @Override + public Class getResponseClass() { + return AlipayPaymentSessionResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayRefundRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayRefundRequest.java index 6b91187..ee0549f 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayRefundRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayRefundRequest.java @@ -1,72 +1,83 @@ +/* + * payments_refund + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.pay; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.Amount; -import com.alipay.global.api.model.ams.CustomizedInfo; import com.alipay.global.api.model.ams.RefundDetail; -import com.alipay.global.api.model.ams.RefundToBankInfo; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayRefundResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.util.List; +import lombok.*; -@Data +/** AlipayRefundRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayRefundRequest extends AlipayRequest { - /** - * The unique ID assigned by the merchant to identify a refund request - */ - private String refundRequestId; - - /** - * The unique ID assigned by Alipay for the original payment to be refunded - */ - private String paymentId; - - /** - * The unique ID to identify a refund, which is assigned by the merchant that directly provides services or goods to the customer - */ - private String referenceRefundId; - - /** - * The refund amount that is initiated by the merchant - */ - private Amount refundAmount; - - /** - * The refund reason - */ - private String refundReason; - - /** - * The URL that is used to receive the refund result notification. The URL must be either specified in the request or set in Alipay Developer Center - */ - private String refundNotifyUrl; - - private Boolean isAsyncRefund; - - private String extendInfo; - - private List refundDetails; - - private String refundSourceAccountNo; - - private RefundToBankInfo refundToBankInfo; - - private CustomizedInfo customizedInfo; - - private String captureId; - - - public AlipayRefundRequest() { - this.setPath(AntomPathConstants.REFUND_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayRefundResponse.class; - } + /** + * The unique ID assigned by the merchant to identify a refund request. More information: This + * field is an API idempotency field.The merchant uses the refundRequestId field for idempotency + * control. For payment requests that are initiated with the same value of refundRequestId and + * reach a final status (S or F), the same result is to be returned for the request. Maximum + * length: 64 characters + */ + private String refundRequestId; + + /** + * The unique ID assigned by Antom for the original payment to be refunded. More information: + * Maximum length: 64 characters + */ + private String paymentId; + + /** + * The unique ID to identify a refund, which is assigned by the merchant that directly provides + * services or goods to the customer. Note: Specify this field if this value is needed for + * internal use or reconciliation. More information: Maximum length: 64 characters + */ + private String referenceRefundId; + + private Amount refundAmount; + + /** + * The refund reason. Note: Specify this field if you want to provide the refund reason to the + * user and payment method. More information: Maximum length: 256 characters + */ + private String refundReason; + + /** + * The URL that is used to receive the refund result notification. The URL must be either + * specified in the request or set in Antom Dashboard. Note: Specify this field if you want to + * receive an asynchronous notification of the refund result. If the refund notification URL is + * specified in both the request and Antom Dashboard, the value specified in the request takes + * precedence. More information: Maximum length: 1024 characters + */ + private String refundNotifyUrl; + + private Boolean isAsyncRefund; + + private String extendInfo; + + private List refundDetails; + + private String refundSourceAccountNo; + + public AlipayRefundRequest() { + this.setPath("/ams/api/v1/payments/refund"); + } + + @Override + public Class getResponseClass() { + return AlipayRefundResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayRetrievePaymentSessionRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayRetrievePaymentSessionRequest.java index c5fd1bf..bfdae81 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayRetrievePaymentSessionRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayRetrievePaymentSessionRequest.java @@ -2,24 +2,23 @@ import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; -import com.alipay.global.api.response.ams.pay.AlipayRefundResponse; import com.alipay.global.api.response.ams.pay.AlipayRetrievePaymentSessionResponse; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) -public class AlipayRetrievePaymentSessionRequest extends AlipayRequest { +public class AlipayRetrievePaymentSessionRequest + extends AlipayRequest { - private String paymentRequestId; + private String paymentRequestId; + public AlipayRetrievePaymentSessionRequest() { + this.setPath(AntomPathConstants.RETRIEVE_PATH); + } - public AlipayRetrievePaymentSessionRequest() { - this.setPath(AntomPathConstants.RETRIEVE_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayRetrievePaymentSessionResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayRetrievePaymentSessionResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipaySyncArrearRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipaySyncArrearRequest.java index d3a90fb..a98a1ab 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipaySyncArrearRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipaySyncArrearRequest.java @@ -4,22 +4,19 @@ import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipaySyncArrearResponse; import lombok.Data; -import lombok.EqualsAndHashCode; - @Data public class AlipaySyncArrearRequest extends AlipayRequest { - private String paymentId; - private String paymentRequestId; - + private String paymentId; + private String paymentRequestId; - public AlipaySyncArrearRequest() { - this.setPath(AntomPathConstants.SYNC_ARREAR_PATH); - } + public AlipaySyncArrearRequest() { + this.setPath(AntomPathConstants.SYNC_ARREAR_PATH); + } - @Override - public Class getResponseClass() { - return AlipaySyncArrearResponse.class; - } + @Override + public Class getResponseClass() { + return AlipaySyncArrearResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayUploadInvoiceShippingFileRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayUploadInvoiceShippingFileRequest.java index ca824f5..5ea3f29 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayUploadInvoiceShippingFileRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayUploadInvoiceShippingFileRequest.java @@ -1,6 +1,5 @@ package com.alipay.global.api.request.ams.pay; - import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayUploadInvoiceShippingFileResponse; import lombok.Data; @@ -8,21 +7,21 @@ @EqualsAndHashCode(callSuper = true) @Data -public class AlipayUploadInvoiceShippingFileRequest extends AlipayRequest { - +public class AlipayUploadInvoiceShippingFileRequest + extends AlipayRequest { - private String paymentRequestId; - private String fileId; - private String uploadFile; - private String fileType; - private String fileName; + private String paymentRequestId; + private String fileId; + private String uploadFile; + private String fileType; + private String fileName; - public AlipayUploadInvoiceShippingFileRequest() { - this.setPath("/ams/api/v1/payments/uploadInvoiceShippingFile"); - } + public AlipayUploadInvoiceShippingFileRequest() { + this.setPath("/ams/api/v1/payments/uploadInvoiceShippingFile"); + } - @Override - public Class getResponseClass() { - return AlipayUploadInvoiceShippingFileResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayUploadInvoiceShippingFileResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingPaymentMethodRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingPaymentMethodRequest.java index 75304dd..6e6ac6f 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingPaymentMethodRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingPaymentMethodRequest.java @@ -1,45 +1,75 @@ +/* + * vaults_vaultPaymentMethod + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.pay; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.CustomizedInfo; import com.alipay.global.api.model.ams.Env; import com.alipay.global.api.model.ams.PaymentMethodDetail; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayVaultingPaymentMethodResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayVaultingPaymentMethodRequest */ @EqualsAndHashCode(callSuper = true) -public class AlipayVaultingPaymentMethodRequest extends - AlipayRequest { - - private String vaultingRequestId; - - private String vaultingNotificationUrl; +@Data +public class AlipayVaultingPaymentMethodRequest + extends AlipayRequest { - private String redirectUrl; + /** + * The unique ID that is assigned by a merchant to identify a card vaulting request. More + * information: This field is an API idempotency field.For vaulting requests that are initiated + * with the same value of vaultingRequestId and reach a final status of S or F, the same result is + * to be returned for the request. Maximum length: 64 characters + */ + private String vaultingRequestId; - private String merchantRegion; + /** + * The URL that is used to receive the vaulting result notification. More information: Maximum + * length: 2048 characters + */ + private String vaultingNotificationUrl; - private PaymentMethodDetail paymentMethodDetail; + /** + * The merchant page URL that the buyer is redirected to after the vaulting process is completed. + * More information: Maximum length: 2048 characters + */ + private String redirectUrl; - private Env env; + /** + * The country or region where the merchant operates the business. The value of this parameter is + * a 2-letter country or region code based on the ISO 3166 Country Codes standard. Some possible + * values are US, SG, HK, PK, JP, CN, BR, AU, and MY. Note: Specify this parameter when you use + * the Global Acquirer Gateway (GAGW) product. More information: Maximum length: 2 characters + */ + private String merchantRegion; - private String merchantAccountId; + private PaymentMethodDetail paymentMethodDetail; - private String vaultingCurrency; + private Env env; - private CustomizedInfo customizedInfo; + private String merchantAccountId; + private String vaultingCurrency; - public AlipayVaultingPaymentMethodRequest() { - this.setPath(AntomPathConstants.VAULT_PAYMENT_METHOD_PATH); - } + private CustomizedInfo customizedInfo; - @Override - public Class getResponseClass() { - return AlipayVaultingPaymentMethodResponse.class; - } + public AlipayVaultingPaymentMethodRequest() { + this.setPath("/ams/api/v1/vaults/vaultPaymentMethod"); + } + @Override + public Class getResponseClass() { + return AlipayVaultingPaymentMethodResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingQueryRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingQueryRequest.java index b6b63c0..afc9a08 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingQueryRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingQueryRequest.java @@ -1,23 +1,41 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.pay; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayVaultingQueryResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayVaultingQueryRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayVaultingQueryRequest extends AlipayRequest { - private String vaultingRequestId; + /** + * The unique ID that is assigned by a merchant to identify a card vaulting request. More + * information about this field This field is an API idempotency field. For vaulting requests that + * are initiated with the same value of vaultingRequestId and reach a final status of S or F, the + * same result is to be returned for the request. More information: Maximum length: 64 characters + */ + private String vaultingRequestId; - public AlipayVaultingQueryRequest() { - this.setPath(AntomPathConstants.INQUIRE_VAULTING_PATH); - } + public AlipayVaultingQueryRequest() { + this.setPath("/ams/api/v1/vaults/inquireVaulting"); + } - @Override - public Class getResponseClass() { - return AlipayVaultingQueryResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayVaultingQueryResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingSessionRequest.java b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingSessionRequest.java index b4871f8..d991628 100644 --- a/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingSessionRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/pay/AlipayVaultingSessionRequest.java @@ -1,33 +1,72 @@ +/* + * vaults_createVaultingSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.pay; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.pay.AlipayVaultingSessionResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayVaultingSessionRequest */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayVaultingSessionRequest extends AlipayRequest { - private String paymentMethodType; + /** + * The payment method type is included in payment method options. See Payment methods to check the + * valid values for card payments. More information: Maximum length: 64 characters + */ + private String paymentMethodType; - private String vaultingRequestId; + /** + * The unique ID that is assigned by a merchant to identify a card vaulting request. More + * information: Maximum length: 64 characters + */ + private String vaultingRequestId; - private String vaultingNotificationUrl; + /** + * The URL that is used to receive the vaulting result notification. More information: Maximum + * length: 2048 characters + */ + private String vaultingNotificationUrl; - private String redirectUrl; + /** + * The merchant page URL that the buyer is redirected to after the vaulting is completed. Note: + * Specify this parameter if you want to redirect the buyer to your page directly after the + * vaulting is completed. More information: Maximum length: 2048 characters + */ + private String redirectUrl; - private String merchantRegion; + /** + * The country or region where the merchant operates the business. The value of this parameter is + * a 2-letter country or region code based on the ISO 3166 Country Codes standard. Some possible + * values are US, SG, HK, PK, JP, CN, BR, AU, and MY. Note: Specify this parameter when you use + * the Global Acquirer Gateway (GAGW) product. More information: Maximum length: 2 characters + */ + private String merchantRegion; - private Boolean is3DSAuthentication; + /** + * Indicates whether the transaction authentication type is 3D secure. Specify this parameter when + * the value of paymentMethodType is CARD. + */ + private Boolean is3DSAuthentication; - public AlipayVaultingSessionRequest() { - this.setPath(AntomPathConstants.CREATE_VAULTING_SESSION_PATH); - } + public AlipayVaultingSessionRequest() { + this.setPath("/ams/api/v1/vaults/createVaultingSession"); + } - @Override - public Class getResponseClass() { - return AlipayVaultingSessionResponse.class; - } -} \ No newline at end of file + @Override + public Class getResponseClass() { + return AlipayVaultingSessionResponse.class; + } +} diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/AlipayRiskScoreInquiryRequest.java b/src/main/java/com/alipay/global/api/request/ams/risk/AlipayRiskScoreInquiryRequest.java index 63d93a3..9bbd11c 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/AlipayRiskScoreInquiryRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/AlipayRiskScoreInquiryRequest.java @@ -5,24 +5,22 @@ import com.alipay.global.api.model.ams.RiskScoreType; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.risk.AlipayRiskScoreInquiryResponse; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - @Data @EqualsAndHashCode(callSuper = true) @Deprecated public class AlipayRiskScoreInquiryRequest extends AlipayRequest { - private CustomerBelongsTo customerBelongsTo; - private CustomerIdType customerIdType; - private String customerId; - private List riskScoreTypes; - - @Override - public Class getResponseClass() { - return AlipayRiskScoreInquiryResponse.class; - } + private CustomerBelongsTo customerBelongsTo; + private CustomerIdType customerIdType; + private String customerId; + private List riskScoreTypes; + @Override + public Class getResponseClass() { + return AlipayRiskScoreInquiryResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/RiskDecideRequest.java b/src/main/java/com/alipay/global/api/request/ams/risk/RiskDecideRequest.java index 58b8d0f..2876db0 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/RiskDecideRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/RiskDecideRequest.java @@ -13,74 +13,64 @@ import com.alipay.global.api.model.risk.PaymentDetail; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.risk.RiskDecideResponse; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - -/** - * The request of Ant Group's risk decide API. - * 调用蚂蚁集团风控实时决策接口的请求参数。 - */ +/** The request of Ant Group's risk decide API. 调用蚂蚁集团风控实时决策接口的请求参数。 */ @Data @EqualsAndHashCode(callSuper = true) public class RiskDecideRequest extends AlipayRequest { - /** - * A unique ID assigned to a merchant who provides a service or product directly to a customer and is used to identify the transaction. - * 直接向买家提供服务或商品的商户分配的唯一ID,用于识别交易。 - */ - private String referenceTransactionId; - /** - * The stage at which the API is called. Valid values are as follows: - * PRE_AUTHORIZATION: Indicates that you initiated this call before the card payment was authorized. - * POST_AUTHORIZATION : Indicates that you initiated this call after the card payment was authorized - * 调用 API 的阶段。有效值为: - * PRE_AUTHORIZATION:表示您在卡支付授权之前发起此请求。 - * POST_AUTHORIZATION :表示您在卡支付授权后发起此请求。 - */ - private AuthorizationPhase authorizationPhase; - /** - * Order information, including merchant, product, amount, and shipping information. - * 订单信息,包括商户、商品、金额和运输信息等。 - */ - private List orders; - /** - * Buyer information, including the buyer's ID, name, phone number, email, etc. - * 买家信息,包括买家的 ID、姓名、电话号码和电子邮件等。 - */ - private Buyer buyer; - /** - * The amount that the buyer actually needs to pay after deducting the discount. - * 扣除折扣后买家实际需要支付的金额。 - */ - private Amount actualPaymentAmount; - /** - * Payment method details, including payment method type, card information, etc. - * 支付方式详细信息,包括支付方式类型、卡信息等。 - */ - private List paymentDetails; - /** - * The amount of the discount for this transaction. - * 本次交易的折扣金额。 - */ - private Amount discountAmount; - /** - * Information about the environment in which the order was placed, such as device information. - * 下单环境信息,例如设备信息。 - */ - private Env env; + /** + * A unique ID assigned to a merchant who provides a service or product directly to a customer and + * is used to identify the transaction. 直接向买家提供服务或商品的商户分配的唯一ID,用于识别交易。 + */ + private String referenceTransactionId; + /** + * The stage at which the API is called. Valid values are as follows: PRE_AUTHORIZATION: Indicates + * that you initiated this call before the card payment was authorized. POST_AUTHORIZATION : + * Indicates that you initiated this call after the card payment was authorized 调用 API 的阶段。有效值为: + * PRE_AUTHORIZATION:表示您在卡支付授权之前发起此请求。 POST_AUTHORIZATION :表示您在卡支付授权后发起此请求。 + */ + private AuthorizationPhase authorizationPhase; + /** + * Order information, including merchant, product, amount, and shipping information. + * 订单信息,包括商户、商品、金额和运输信息等。 + */ + private List orders; + /** + * Buyer information, including the buyer's ID, name, phone number, email, etc. 买家信息,包括买家的 + * ID、姓名、电话号码和电子邮件等。 + */ + private Buyer buyer; + /** + * The amount that the buyer actually needs to pay after deducting the discount. 扣除折扣后买家实际需要支付的金额。 + */ + private Amount actualPaymentAmount; + /** + * Payment method details, including payment method type, card information, etc. + * 支付方式详细信息,包括支付方式类型、卡信息等。 + */ + private List paymentDetails; + /** The amount of the discount for this transaction. 本次交易的折扣金额。 */ + private Amount discountAmount; + /** + * Information about the environment in which the order was placed, such as device information. + * 下单环境信息,例如设备信息。 + */ + private Env env; - public RiskDecideRequest() { - this.setPath(AntomPathConstants.RISK_DECIDE_PATH); - } + public RiskDecideRequest() { + this.setPath(AntomPathConstants.RISK_DECIDE_PATH); + } - @Override - public boolean usingSandboxUrl() { - return false; - } + @Override + public boolean usingSandboxUrl() { + return false; + } - @Override - public Class getResponseClass() { - return RiskDecideResponse.class; - } -} \ No newline at end of file + @Override + public Class getResponseClass() { + return RiskDecideResponse.class; + } +} diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/RiskReportRequest.java b/src/main/java/com/alipay/global/api/request/ams/risk/RiskReportRequest.java index 3bb0710..7f544ec 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/RiskReportRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/RiskReportRequest.java @@ -7,65 +7,55 @@ import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.risk.RiskReportResponse; +import java.util.Date; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - -/** - * The request of Ant Group's risk report API. - * 调用蚂蚁集团风险上报接口的请求参数。 - */ +/** The request of Ant Group's risk report API. 调用蚂蚁集团风险上报接口的请求参数。 */ @Data @EqualsAndHashCode(callSuper = true) public class RiskReportRequest extends AlipayRequest { - /** - * A unique ID assigned to a merchant who provides a service or product directly to a customer and is used to identify the transaction. - * 直接向买家提供服务或商品的商户分配的唯一ID,用于识别交易。 - */ - private String referenceTransactionId; - /** - * The reason for the report.Providing this information can help improve the accuracy of fraud detection, and increase payment success - * rates. - * 上报的原因,提供这些信息有助于提升欺诈检测的准确性,提高支付成功率。 - */ - private String reportReason; - /** - * The type of risk reported. Valid values are as follows: - * SUSPICIOUS: indicates that the transaction is considered risky by the merchant, such as the buyer hit the merchant's blacklist. - * CHARGEBACK: indicates that the buyer initiated a chargeback. - * FRAUD: indicates that fraudulent card fraud has occurred. - * 上报的风险类型。有效值为: - * SUSPICIOUS:表示该交易被商户视为有风险,例如买家命中了商户的黑名单。 - * CHARGEBACK:表示买家发起了拒付。 - * FRAUD:表示发生了卡盗刷行为。 - */ - private String riskType; - /** - * Represents the time when a risk event occurs, defined as follows: - * If the riskType value is SUSPICIOUS, the value of this field is the time when you identified the risky transaction. - * If the value of riskType is CHARGEBACK, the value of this field is the time when the chargeback occurred included in the - * notification that the payment method sent you. - * If the value of riskType is FRAUD, the value of this field is the time of the card theft that is included in the notification sent - * to you by the payment method. - * 表示风险事件发生的时间,定义如下: - * 如果 riskType 值为 SUSPICIOUS, 该字段的值为您识别该风险交易的时间。 - * 如果 riskType 的值为 CHARGEBACK,该字段的值为支付方式向您发送的通知中包含的拒付发生时间。 - * 如果 riskType 的值为 FRAUD,该字段的值为支付方式向您发送的通知中包含的盗卡发生时间。 - */ - private Date riskOccurrenceTime; + /** + * A unique ID assigned to a merchant who provides a service or product directly to a customer and + * is used to identify the transaction. 直接向买家提供服务或商品的商户分配的唯一ID,用于识别交易。 + */ + private String referenceTransactionId; + /** + * The reason for the report.Providing this information can help improve the accuracy of fraud + * detection, and increase payment success rates. 上报的原因,提供这些信息有助于提升欺诈检测的准确性,提高支付成功率。 + */ + private String reportReason; + /** + * The type of risk reported. Valid values are as follows: SUSPICIOUS: indicates that the + * transaction is considered risky by the merchant, such as the buyer hit the merchant's + * blacklist. CHARGEBACK: indicates that the buyer initiated a chargeback. FRAUD: indicates that + * fraudulent card fraud has occurred. 上报的风险类型。有效值为: SUSPICIOUS:表示该交易被商户视为有风险,例如买家命中了商户的黑名单。 + * CHARGEBACK:表示买家发起了拒付。 FRAUD:表示发生了卡盗刷行为。 + */ + private String riskType; + /** + * Represents the time when a risk event occurs, defined as follows: If the riskType value is + * SUSPICIOUS, the value of this field is the time when you identified the risky transaction. If + * the value of riskType is CHARGEBACK, the value of this field is the time when the chargeback + * occurred included in the notification that the payment method sent you. If the value of + * riskType is FRAUD, the value of this field is the time of the card theft that is included in + * the notification sent to you by the payment method. 表示风险事件发生的时间,定义如下: 如果 riskType 值为 + * SUSPICIOUS, 该字段的值为您识别该风险交易的时间。 如果 riskType 的值为 CHARGEBACK,该字段的值为支付方式向您发送的通知中包含的拒付发生时间。 如果 + * riskType 的值为 FRAUD,该字段的值为支付方式向您发送的通知中包含的盗卡发生时间。 + */ + private Date riskOccurrenceTime; - public RiskReportRequest() { - this.setPath(AntomPathConstants.RISK_REPORT_PATH); - } + public RiskReportRequest() { + this.setPath(AntomPathConstants.RISK_REPORT_PATH); + } - @Override - public boolean usingSandboxUrl() { - return false; - } + @Override + public boolean usingSandboxUrl() { + return false; + } - @Override - public Class getResponseClass() { - return RiskReportResponse.class; - } -} \ No newline at end of file + @Override + public Class getResponseClass() { + return RiskReportResponse.class; + } +} diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/SendPaymentResultRequest.java b/src/main/java/com/alipay/global/api/request/ams/risk/SendPaymentResultRequest.java index eea236e..b30d555 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/SendPaymentResultRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/SendPaymentResultRequest.java @@ -12,54 +12,41 @@ import lombok.Data; import lombok.EqualsAndHashCode; -/** - * The request of Ant Group's send payment result API. - * 调用蚂蚁集团支付结果通知接口的请求参数。 - */ +/** The request of Ant Group's send payment result API. 调用蚂蚁集团支付结果通知接口的请求参数。 */ @Data @EqualsAndHashCode(callSuper = true) public class SendPaymentResultRequest extends AlipayRequest { - /** - * A unique ID assigned to a merchant who provides a service or product directly to a customer and is used to identify the transaction. - * 直接向买家提供服务或商品的商户分配的唯一ID,用于识别交易。 - */ - private String referenceTransactionId; - /** - * Payment result status. Valid values are as follows: - * SUCCESS: indicates that the payment is successful. - * FAIL: indicates that the payment fails. - * 支付结果状态。有效值为: - * SUCCESS:表示支付成功。 - * FAIL:表示支付失败。 - */ - private String paymentStatus; - /** - * The reason why the card payment authorization provided by the payment method provider failed. - * 支付方式提供商提供的卡支付授权失败的原因。 - */ - private AuthorizationError authorizationError; - /** - * The result of the verification of the card payment method. - * 卡支付方式的验证结果。 - */ - private CardVerificationResult cardVerificationResult; - /** - * Payment method providers. - * 支付方式提供商。 - */ - private String paymentMethodProvider; + /** + * A unique ID assigned to a merchant who provides a service or product directly to a customer and + * is used to identify the transaction. 直接向买家提供服务或商品的商户分配的唯一ID,用于识别交易。 + */ + private String referenceTransactionId; + /** + * Payment result status. Valid values are as follows: SUCCESS: indicates that the payment is + * successful. FAIL: indicates that the payment fails. 支付结果状态。有效值为: SUCCESS:表示支付成功。 FAIL:表示支付失败。 + */ + private String paymentStatus; + /** + * The reason why the card payment authorization provided by the payment method provider failed. + * 支付方式提供商提供的卡支付授权失败的原因。 + */ + private AuthorizationError authorizationError; + /** The result of the verification of the card payment method. 卡支付方式的验证结果。 */ + private CardVerificationResult cardVerificationResult; + /** Payment method providers. 支付方式提供商。 */ + private String paymentMethodProvider; - public SendPaymentResultRequest() { - this.setPath(AntomPathConstants.RISK_SEND_PAYMENT_RESULT_PATH); - } + public SendPaymentResultRequest() { + this.setPath(AntomPathConstants.RISK_SEND_PAYMENT_RESULT_PATH); + } - @Override - public boolean usingSandboxUrl() { - return false; - } + @Override + public boolean usingSandboxUrl() { + return false; + } - @Override - public Class getResponseClass() { - return SendPaymentResultResponse.class; - } -} \ No newline at end of file + @Override + public Class getResponseClass() { + return SendPaymentResultResponse.class; + } +} diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/SendRefundResultRequest.java b/src/main/java/com/alipay/global/api/request/ams/risk/SendRefundResultRequest.java index 72d82f0..953ea3e 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/SendRefundResultRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/SendRefundResultRequest.java @@ -9,50 +9,40 @@ import com.alipay.global.api.model.risk.RefundRecord; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.risk.SendRefundResultResponse; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - -/** - * The request of Ant Group's send refund result API. - * 调用蚂蚁集团退款结果通知接口的请求参数。 - */ +/** The request of Ant Group's send refund result API. 调用蚂蚁集团退款结果通知接口的请求参数。 */ @Data @EqualsAndHashCode(callSuper = true) public class SendRefundResultRequest extends AlipayRequest { - /** - * A unique ID assigned to a merchant who provides a service or product directly to a customer and is used to identify the transaction. - * 直接向买家提供服务或商品的商户分配的唯一ID,用于识别交易。 - */ - private String referenceTransactionId; - /** - * A unique ID assigned by the merchant who provides the service or product directly to the buyer to identify the refund. - * 由直接向买家提供服务或商品的商户分配的识别退款的唯一ID 。 - */ - private String referenceRefundId; - /** - * The total amount of the actual refund. - * 实际退款总额。 - */ - private Amount actualRefundAmount; - /** - * Refund history for this transaction. - * 本次交易的退款记录。 - */ - private List refundRecords; + /** + * A unique ID assigned to a merchant who provides a service or product directly to a customer and + * is used to identify the transaction. 直接向买家提供服务或商品的商户分配的唯一ID,用于识别交易。 + */ + private String referenceTransactionId; + /** + * A unique ID assigned by the merchant who provides the service or product directly to the buyer + * to identify the refund. 由直接向买家提供服务或商品的商户分配的识别退款的唯一ID 。 + */ + private String referenceRefundId; + /** The total amount of the actual refund. 实际退款总额。 */ + private Amount actualRefundAmount; + /** Refund history for this transaction. 本次交易的退款记录。 */ + private List refundRecords; - public SendRefundResultRequest() { - this.setPath(AntomPathConstants.RISK_SEND_REFUND_RESULT_PATH); - } + public SendRefundResultRequest() { + this.setPath(AntomPathConstants.RISK_SEND_REFUND_RESULT_PATH); + } - @Override - public boolean usingSandboxUrl() { - return false; - } + @Override + public boolean usingSandboxUrl() { + return false; + } - @Override - public Class getResponseClass() { - return SendRefundResultResponse.class; - } -} \ No newline at end of file + @Override + public Class getResponseClass() { + return SendRefundResultResponse.class; + } +} diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/tee/constants/CryptoSdkConstant.java b/src/main/java/com/alipay/global/api/request/ams/risk/tee/constants/CryptoSdkConstant.java index c542247..a3273ae 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/tee/constants/CryptoSdkConstant.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/tee/constants/CryptoSdkConstant.java @@ -6,18 +6,14 @@ import java.nio.charset.Charset; -/** - * necessary constants for encrypt SDK - * 加密 SDK 必要常量 - */ +/** necessary constants for encrypt SDK 加密 SDK 必要常量 */ public class CryptoSdkConstant { - public static final int TAG_LENGTH = 96; - - //to ensure that the same plaintext has the same ciphertext, we use a fixed initialization vector - public static final byte[] COMMON_IV = "i".getBytes(Charset.forName("UTF-8")); + public static final int TAG_LENGTH = 96; - public static final String ENCRYPT_ALGORITHM = "AES/GCM/NoPadding"; + // to ensure that the same plaintext has the same ciphertext, we use a fixed initialization vector + public static final byte[] COMMON_IV = "i".getBytes(Charset.forName("UTF-8")); - public static final String ENCRYPT_MAIN_ALGORITHM = "AES"; + public static final String ENCRYPT_ALGORITHM = "AES/GCM/NoPadding"; + public static final String ENCRYPT_MAIN_ALGORITHM = "AES"; } diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/tee/crypto/AESCrypto.java b/src/main/java/com/alipay/global/api/request/ams/risk/tee/crypto/AESCrypto.java index 63d54cb..f629f66 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/tee/crypto/AESCrypto.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/tee/crypto/AESCrypto.java @@ -8,6 +8,8 @@ import com.alipay.global.api.request.ams.risk.tee.constants.CryptoSdkConstant; import com.alipay.global.api.request.ams.risk.tee.enums.ErrorCodeEnum; import com.alipay.global.api.request.ams.risk.tee.exception.CryptoException; +import java.security.Security; +import javax.crypto.spec.SecretKeySpec; import org.bouncycastle.crypto.CipherParameters; import org.bouncycastle.crypto.engines.AESEngine; import org.bouncycastle.crypto.modes.GCMBlockCipher; @@ -15,91 +17,87 @@ import org.bouncycastle.crypto.params.KeyParameter; import org.bouncycastle.jce.provider.BouncyCastleProvider; -import javax.crypto.spec.SecretKeySpec; -import java.security.Security; - -/** - * AES crypto implementation - * AES 加密实现 - */ +/** AES crypto implementation AES 加密实现 */ public class AESCrypto implements Crypto { - private static volatile AESCrypto instance; + private static volatile AESCrypto instance; - static { - Security.addProvider(new BouncyCastleProvider()); - } + static { + Security.addProvider(new BouncyCastleProvider()); + } - public static AESCrypto getInstance() { + public static AESCrypto getInstance() { + if (instance == null) { + synchronized (AESCrypto.class) { if (instance == null) { - synchronized (AESCrypto.class) { - if (instance == null) { - instance = new AESCrypto(); - } - } + instance = new AESCrypto(); } - return instance; + } } + return instance; + } - /** - * encrypt by dataKey - * 通过 dataKey 加密数据 - * - * @param dataKey symmetric key - * @param data content to encrypt - * @return encrypted data if data is not null and null if data is null - */ - @Override - public byte[] encrypt(byte[] dataKey, byte[] data) { - if (dataKey == null || dataKey.length == 0) { - throw new CryptoException(ErrorCodeEnum.PARAM_ILLEGAL, "dataKey cannot be empty"); - } - if (data == null) { - return null; - } - - try { - SecretKeySpec keySpec = new SecretKeySpec(dataKey, - CryptoSdkConstant.ENCRYPT_MAIN_ALGORITHM); - return encrypt(data, keySpec); - } catch (Throwable t) { - throw new CryptoException(ErrorCodeEnum.ENCRYPT_ERROR, t); - } + /** + * encrypt by dataKey 通过 dataKey 加密数据 + * + * @param dataKey symmetric key + * @param data content to encrypt + * @return encrypted data if data is not null and null if data is null + */ + @Override + public byte[] encrypt(byte[] dataKey, byte[] data) { + if (dataKey == null || dataKey.length == 0) { + throw new CryptoException(ErrorCodeEnum.PARAM_ILLEGAL, "dataKey cannot be empty"); + } + if (data == null) { + return null; } - /** - * encrypt by dataKey - * 通过 dataKey 加密数据 - * - * @param dataKeyBase64 symmetric key encoded by base64 - * @param data content to encrypt - * @return encrypted data if data is not null and null if data is null - */ - @Override - public byte[] encrypt(String dataKeyBase64, byte[] data) { - if (dataKeyBase64 == null || dataKeyBase64.length() == 0) { - throw new CryptoException(ErrorCodeEnum.PARAM_ILLEGAL, "dataKey cannot be empty"); - } - return encrypt(Base64Provider.getBase64Encryptor().decode(dataKeyBase64), data); + try { + SecretKeySpec keySpec = new SecretKeySpec(dataKey, CryptoSdkConstant.ENCRYPT_MAIN_ALGORITHM); + return encrypt(data, keySpec); + } catch (Throwable t) { + throw new CryptoException(ErrorCodeEnum.ENCRYPT_ERROR, t); } + } - private byte[] encrypt(byte[] data, SecretKeySpec keySpec) throws Exception { + /** + * encrypt by dataKey 通过 dataKey 加密数据 + * + * @param dataKeyBase64 symmetric key encoded by base64 + * @param data content to encrypt + * @return encrypted data if data is not null and null if data is null + */ + @Override + public byte[] encrypt(String dataKeyBase64, byte[] data) { + if (dataKeyBase64 == null || dataKeyBase64.length() == 0) { + throw new CryptoException(ErrorCodeEnum.PARAM_ILLEGAL, "dataKey cannot be empty"); + } + return encrypt(Base64Provider.getBase64Encryptor().decode(dataKeyBase64), data); + } - GCMBlockCipher gcmEngine = new GCMBlockCipher(new AESEngine()); + private byte[] encrypt(byte[] data, SecretKeySpec keySpec) throws Exception { - CipherParameters params = new AEADParameters( - new KeyParameter(keySpec.getEncoded()), CryptoSdkConstant.TAG_LENGTH, - CryptoSdkConstant.COMMON_IV - ); + GCMBlockCipher gcmEngine = new GCMBlockCipher(new AESEngine()); - gcmEngine.init(true, params); - int encryptedDataLength = gcmEngine.getOutputSize(data.length); - byte[] encryptedData = new byte[encryptedDataLength]; - int outputLen = gcmEngine.processBytes(data, 0, data.length, encryptedData, 0); - gcmEngine.doFinal(encryptedData, outputLen); - byte[] result = new byte[CryptoSdkConstant.COMMON_IV.length + encryptedData.length]; - System.arraycopy(encryptedData, 0, result, 0, encryptedData.length); - System.arraycopy(CryptoSdkConstant.COMMON_IV, 0, result, encryptedData.length, CryptoSdkConstant.COMMON_IV.length); - return result; - } + CipherParameters params = + new AEADParameters( + new KeyParameter(keySpec.getEncoded()), + CryptoSdkConstant.TAG_LENGTH, + CryptoSdkConstant.COMMON_IV); + gcmEngine.init(true, params); + int encryptedDataLength = gcmEngine.getOutputSize(data.length); + byte[] encryptedData = new byte[encryptedDataLength]; + int outputLen = gcmEngine.processBytes(data, 0, data.length, encryptedData, 0); + gcmEngine.doFinal(encryptedData, outputLen); + byte[] result = new byte[CryptoSdkConstant.COMMON_IV.length + encryptedData.length]; + System.arraycopy(encryptedData, 0, result, 0, encryptedData.length); + System.arraycopy( + CryptoSdkConstant.COMMON_IV, + 0, + result, + encryptedData.length, + CryptoSdkConstant.COMMON_IV.length); + return result; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/tee/crypto/Crypto.java b/src/main/java/com/alipay/global/api/request/ams/risk/tee/crypto/Crypto.java index cc28942..ec6f5d9 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/tee/crypto/Crypto.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/tee/crypto/Crypto.java @@ -5,22 +5,21 @@ package com.alipay.global.api.request.ams.risk.tee.crypto; public interface Crypto { - /** - * encrypt by dataKey - * 通过 dataKey 加密数据 - * - * @param dataKey symmetric key - * @param data content to encrypt - * @return encrypted data if data is not null and null if data is null - */ - byte[] encrypt(byte[] dataKey, byte[] data); + /** + * encrypt by dataKey 通过 dataKey 加密数据 + * + * @param dataKey symmetric key + * @param data content to encrypt + * @return encrypted data if data is not null and null if data is null + */ + byte[] encrypt(byte[] dataKey, byte[] data); - /* - * encrypt by dataKey - * 通过 dataKey 加密数据 - * @param dataKeyBase64 symmetric key String encoded by base64 - * @param data content to encrypt - * @return encrypted data if data is not null and null if data is null - */ - byte[] encrypt(String dataKeyBase64, byte[] data); + /* + * encrypt by dataKey + * 通过 dataKey 加密数据 + * @param dataKeyBase64 symmetric key String encoded by base64 + * @param data content to encrypt + * @return encrypted data if data is not null and null if data is null + */ + byte[] encrypt(String dataKeyBase64, byte[] data); } diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/tee/encryptutil/RiskDecideEncryptUtil.java b/src/main/java/com/alipay/global/api/request/ams/risk/tee/encryptutil/RiskDecideEncryptUtil.java index bc5128e..ed41a0c 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/tee/encryptutil/RiskDecideEncryptUtil.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/tee/encryptutil/RiskDecideEncryptUtil.java @@ -14,155 +14,187 @@ import com.alipay.global.api.request.ams.risk.tee.enums.EncryptKeyEnum; import com.alipay.global.api.request.ams.risk.tee.enums.ErrorCodeEnum; import com.alipay.global.api.request.ams.risk.tee.exception.CryptoException; - import java.nio.charset.Charset; import java.util.List; -/** - * request encrypt strategy for risk decide API - * risk decide API 的请求加密策略 - */ +/** request encrypt strategy for risk decide API risk decide API 的请求加密策略 */ public class RiskDecideEncryptUtil { - private static Charset utf8Charset = Charset.forName("UTF-8"); + private static Charset utf8Charset = Charset.forName("UTF-8"); - public static void encrypt(String dataKeyBase64, AlipayRequest request, List encryptKeyList) { - if (request == null || encryptKeyList == null) { - return; - } - if (!(request instanceof RiskDecideRequest)) { - throw new CryptoException(ErrorCodeEnum.MISMATCH_ENCRYPT_UTIL, "Request is not instance of RiskDecideRequest"); - } - RiskDecideRequest riskDecideRequest = (RiskDecideRequest) request; - AESCrypto crypto = AESCrypto.getInstance(); - doEncrypt(Base64Provider.getBase64Encryptor().decode(dataKeyBase64), riskDecideRequest, encryptKeyList, crypto); + public static void encrypt( + String dataKeyBase64, AlipayRequest request, List encryptKeyList) { + if (request == null || encryptKeyList == null) { + return; + } + if (!(request instanceof RiskDecideRequest)) { + throw new CryptoException( + ErrorCodeEnum.MISMATCH_ENCRYPT_UTIL, "Request is not instance of RiskDecideRequest"); } + RiskDecideRequest riskDecideRequest = (RiskDecideRequest) request; + AESCrypto crypto = AESCrypto.getInstance(); + doEncrypt( + Base64Provider.getBase64Encryptor().decode(dataKeyBase64), + riskDecideRequest, + encryptKeyList, + crypto); + } - /** - * do encrypt by encryptKeyList - * 根据 encryptKeyList 进行加密 - * @param data_key symmetric key - * @param request plaintext RiskDecideRequest - * @param encryptKeyList list of encrypt keys - * @param crypto AESCrypto instance - */ - private static void doEncrypt(byte[] data_key, RiskDecideRequest request, List encryptKeyList, - AESCrypto crypto) { - List orders = request.getOrders(); - List paymentDetails = request.getPaymentDetails(); - byte[] encrypt; - for (EncryptKeyEnum key : encryptKeyList) { - if (key == null || key.getCode() == null) { - continue; + /** + * do encrypt by encryptKeyList 根据 encryptKeyList 进行加密 + * + * @param data_key symmetric key + * @param request plaintext RiskDecideRequest + * @param encryptKeyList list of encrypt keys + * @param crypto AESCrypto instance + */ + private static void doEncrypt( + byte[] data_key, + RiskDecideRequest request, + List encryptKeyList, + AESCrypto crypto) { + List orders = request.getOrders(); + List paymentDetails = request.getPaymentDetails(); + byte[] encrypt; + for (EncryptKeyEnum key : encryptKeyList) { + if (key == null || key.getCode() == null) { + continue; + } + switch (key) { + case BUYER_EMAIL: + String buyerEmail = request.getBuyer().getBuyerEmail(); + if (buyerEmail == null || buyerEmail.isEmpty()) { + continue; + } + encrypt = crypto.encrypt(data_key, buyerEmail.getBytes(utf8Charset)); + request + .getBuyer() + .setBuyerEmail(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); + break; + case BUYER_PHONE_NO: + String buyerPhoneNo = request.getBuyer().getBuyerPhoneNo(); + if (buyerPhoneNo == null || buyerPhoneNo.isEmpty()) { + continue; + } + encrypt = crypto.encrypt(data_key, buyerPhoneNo.getBytes(utf8Charset)); + request + .getBuyer() + .setBuyerPhoneNo(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); + break; + case BUYER_REGISTRATION_TIME: + String buyerRegistrationTime = request.getBuyer().getBuyerRegistrationTime(); + if (buyerRegistrationTime == null || buyerRegistrationTime.isEmpty()) { + continue; + } + encrypt = crypto.encrypt(data_key, buyerRegistrationTime.getBytes(utf8Charset)); + request + .getBuyer() + .setBuyerRegistrationTime( + Base64Provider.getBase64Encryptor().encodeToString(encrypt)); + break; + case CARDHOLDER_NAME: + for (PaymentDetail paymentDetail : paymentDetails) { + encryptName( + data_key, + paymentDetail.getPaymentMethod().getPaymentMethodMetaData().getCardHolderName(), + crypto); + } + break; + case SHIPPING_ADDRESS1: + for (Order order : orders) { + String address1 = order.getShipping().getShippingAddress().getAddress1(); + if (address1 == null || address1.isEmpty()) { + continue; + } + encrypt = crypto.encrypt(data_key, address1.getBytes(utf8Charset)); + order + .getShipping() + .getShippingAddress() + .setAddress1(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); + } + break; + case SHIPPING_ADDRESS2: + for (Order order : orders) { + String address2 = order.getShipping().getShippingAddress().getAddress2(); + if (address2 == null || address2.isEmpty()) { + continue; + } + encrypt = crypto.encrypt(data_key, address2.getBytes(utf8Charset)); + order + .getShipping() + .getShippingAddress() + .setAddress2(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); + } + break; + case SHIPPING_NAME: + for (Order order : orders) { + encryptName(data_key, order.getShipping().getShippingName(), crypto); + } + break; + case SHIP_TO_EMAIL: + for (Order order : orders) { + String email = order.getShipping().getShipToEmail(); + if (email == null || email.isEmpty()) { + continue; } - switch (key) { - case BUYER_EMAIL: - String buyerEmail = request.getBuyer().getBuyerEmail(); - if (buyerEmail == null || buyerEmail.isEmpty()) { - continue; - } - encrypt = crypto.encrypt(data_key, buyerEmail.getBytes(utf8Charset)); - request.getBuyer().setBuyerEmail(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); - break; - case BUYER_PHONE_NO: - String buyerPhoneNo = request.getBuyer().getBuyerPhoneNo(); - if (buyerPhoneNo == null || buyerPhoneNo.isEmpty()) { - continue; - } - encrypt = crypto.encrypt(data_key, buyerPhoneNo.getBytes(utf8Charset)); - request.getBuyer().setBuyerPhoneNo(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); - break; - case BUYER_REGISTRATION_TIME: - String buyerRegistrationTime = request.getBuyer().getBuyerRegistrationTime(); - if (buyerRegistrationTime == null || buyerRegistrationTime.isEmpty()) { - continue; - } - encrypt = crypto.encrypt(data_key, buyerRegistrationTime.getBytes(utf8Charset)); - request.getBuyer().setBuyerRegistrationTime(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); - break; - case CARDHOLDER_NAME: - for (PaymentDetail paymentDetail : paymentDetails) { - encryptName(data_key, paymentDetail.getPaymentMethod().getPaymentMethodMetaData().getCardHolderName(), crypto); - } - break; - case SHIPPING_ADDRESS1: - for (Order order : orders) { - String address1 = order.getShipping().getShippingAddress().getAddress1(); - if (address1 == null || address1.isEmpty()) { - continue; - } - encrypt = crypto.encrypt(data_key, address1.getBytes(utf8Charset)); - order.getShipping().getShippingAddress().setAddress1(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); - } - break; - case SHIPPING_ADDRESS2: - for (Order order : orders) { - String address2 = order.getShipping().getShippingAddress().getAddress2(); - if (address2 == null || address2.isEmpty()) { - continue; - } - encrypt = crypto.encrypt(data_key, address2.getBytes(utf8Charset)); - order.getShipping().getShippingAddress().setAddress2(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); - } - break; - case SHIPPING_NAME: - for (Order order : orders) { - encryptName(data_key, order.getShipping().getShippingName(), crypto); - } - break; - case SHIP_TO_EMAIL: - for (Order order : orders) { - String email = order.getShipping().getShipToEmail(); - if (email == null || email.isEmpty()) { - continue; - } - encrypt = crypto.encrypt(data_key, email.getBytes(utf8Charset)); - order.getShipping().setShipToEmail(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); - } - break; - case SHIPPING_PHONE_NO: - for (Order order : orders) { - String phoneNo = order.getShipping().getShippingPhoneNo(); - if (phoneNo == null || phoneNo.isEmpty()) { - continue; - } - encrypt = crypto.encrypt(data_key, phoneNo.getBytes(utf8Charset)); - order.getShipping().setShippingPhoneNo(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); - } - break; - default: - throw new CryptoException(ErrorCodeEnum.UNKNOWN_ENCRYPT_KEY, "unknown encrypt key"); + encrypt = crypto.encrypt(data_key, email.getBytes(utf8Charset)); + order + .getShipping() + .setShipToEmail(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); + } + break; + case SHIPPING_PHONE_NO: + for (Order order : orders) { + String phoneNo = order.getShipping().getShippingPhoneNo(); + if (phoneNo == null || phoneNo.isEmpty()) { + continue; } - } + encrypt = crypto.encrypt(data_key, phoneNo.getBytes(utf8Charset)); + order + .getShipping() + .setShippingPhoneNo(Base64Provider.getBase64Encryptor().encodeToString(encrypt)); + } + break; + default: + throw new CryptoException(ErrorCodeEnum.UNKNOWN_ENCRYPT_KEY, "unknown encrypt key"); + } } + } - /** - * encrypt username - * 加密 username - * @param data_key symmetric key - * @param userName user name - * @param crypto AESCrypto instance - */ - private static void encryptName(byte[] data_key, UserName userName, AESCrypto crypto) { - if (userName == null) { - return; - } - if (userName.getFirstName() != null && !userName.getFirstName().isEmpty()) { - userName.setFirstName(Base64Provider.getBase64Encryptor().encodeToString( - crypto.encrypt(data_key, userName.getFirstName().getBytes(utf8Charset)))); - } - if (userName.getMiddleName() != null && !userName.getMiddleName().isEmpty()) { - userName.setMiddleName(Base64Provider.getBase64Encryptor().encodeToString( - crypto.encrypt(data_key, userName.getMiddleName().getBytes(utf8Charset)))); - } - if (userName.getLastName() != null && !userName.getLastName().isEmpty()) { - userName.setLastName(Base64Provider.getBase64Encryptor().encodeToString( - crypto.encrypt(data_key, userName.getLastName().getBytes(utf8Charset)))); - } - if (userName.getFullName() != null && !userName.getFullName().isEmpty()) { - userName.setFullName(Base64Provider.getBase64Encryptor().encodeToString( - crypto.encrypt(data_key, userName.getFullName().getBytes(utf8Charset)))); - } + /** + * encrypt username 加密 username + * + * @param data_key symmetric key + * @param userName user name + * @param crypto AESCrypto instance + */ + private static void encryptName(byte[] data_key, UserName userName, AESCrypto crypto) { + if (userName == null) { + return; } + if (userName.getFirstName() != null && !userName.getFirstName().isEmpty()) { + userName.setFirstName( + Base64Provider.getBase64Encryptor() + .encodeToString( + crypto.encrypt(data_key, userName.getFirstName().getBytes(utf8Charset)))); + } + if (userName.getMiddleName() != null && !userName.getMiddleName().isEmpty()) { + userName.setMiddleName( + Base64Provider.getBase64Encryptor() + .encodeToString( + crypto.encrypt(data_key, userName.getMiddleName().getBytes(utf8Charset)))); + } + if (userName.getLastName() != null && !userName.getLastName().isEmpty()) { + userName.setLastName( + Base64Provider.getBase64Encryptor() + .encodeToString( + crypto.encrypt(data_key, userName.getLastName().getBytes(utf8Charset)))); + } + if (userName.getFullName() != null && !userName.getFullName().isEmpty()) { + userName.setFullName( + Base64Provider.getBase64Encryptor() + .encodeToString( + crypto.encrypt(data_key, userName.getFullName().getBytes(utf8Charset)))); + } + } } - diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/tee/enums/EncryptKeyEnum.java b/src/main/java/com/alipay/global/api/request/ams/risk/tee/enums/EncryptKeyEnum.java index 56b6f9d..89b2185 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/tee/enums/EncryptKeyEnum.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/tee/enums/EncryptKeyEnum.java @@ -4,44 +4,42 @@ */ package com.alipay.global.api.request.ams.risk.tee.enums; -/** - * Merchant selectable encryption keys enumeration class - * 商户可选择的加密字段枚举类 - */ +/** Merchant selectable encryption keys enumeration class 商户可选择的加密字段枚举类 */ public enum EncryptKeyEnum { - BUYER_EMAIL("buyerEmail", "buyer.buyerEmail"), - BUYER_PHONE_NO("buyerPhoneNo", "buyer.buyerPhoneNo"), - BUYER_REGISTRATION_TIME("buyerRegistrationTime", "buyer.buyerRegistrationTime"), - CARDHOLDER_NAME("cardHolderName", "paymentDetails.paymentMethod.paymentMethodMetaData.cardHolderName"), - SHIPPING_ADDRESS1("address1", "orders.shipping.shippingAddress.address1"), - SHIPPING_ADDRESS2("address2", "orders.shipping.shippingAddress.address2"), - SHIPPING_NAME("shippingName", "orders.shipping.shippingName"), - SHIP_TO_EMAIL("shipToEmail", "orders.shipping.shipToEmail"), - SHIPPING_PHONE_NO("shippingPhoneNo", "orders.shipping.shippingPhoneNo"); - private final String code; + BUYER_EMAIL("buyerEmail", "buyer.buyerEmail"), + BUYER_PHONE_NO("buyerPhoneNo", "buyer.buyerPhoneNo"), + BUYER_REGISTRATION_TIME("buyerRegistrationTime", "buyer.buyerRegistrationTime"), + CARDHOLDER_NAME( + "cardHolderName", "paymentDetails.paymentMethod.paymentMethodMetaData.cardHolderName"), + SHIPPING_ADDRESS1("address1", "orders.shipping.shippingAddress.address1"), + SHIPPING_ADDRESS2("address2", "orders.shipping.shippingAddress.address2"), + SHIPPING_NAME("shippingName", "orders.shipping.shippingName"), + SHIP_TO_EMAIL("shipToEmail", "orders.shipping.shipToEmail"), + SHIPPING_PHONE_NO("shippingPhoneNo", "orders.shipping.shippingPhoneNo"); + private final String code; - private final String description; + private final String description; - EncryptKeyEnum(String code, String description) { - this.code = code; - this.description = description; - } + EncryptKeyEnum(String code, String description) { + this.code = code; + this.description = description; + } - public static EncryptKeyEnum getEnumByCode(String code) { + public static EncryptKeyEnum getEnumByCode(String code) { - for (EncryptKeyEnum codeEnum : values()) { - if (codeEnum.getCode().equals(code)) { - return codeEnum; - } - } - return null; + for (EncryptKeyEnum codeEnum : values()) { + if (codeEnum.getCode().equals(code)) { + return codeEnum; + } } + return null; + } - public String getCode() { - return code; - } + public String getCode() { + return code; + } - public String getDescription() { - return description; - } + public String getDescription() { + return description; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/tee/enums/ErrorCodeEnum.java b/src/main/java/com/alipay/global/api/request/ams/risk/tee/enums/ErrorCodeEnum.java index fc3c1dd..5d8873a 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/tee/enums/ErrorCodeEnum.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/tee/enums/ErrorCodeEnum.java @@ -4,39 +4,38 @@ */ package com.alipay.global.api.request.ams.risk.tee.enums; -/** - * ErrorCode enumeration class that may occur during encryption - * 加密过程中可能出现的 ErrorCode 枚举类 - */ +/** ErrorCode enumeration class that may occur during encryption 加密过程中可能出现的 ErrorCode 枚举类 */ public enum ErrorCodeEnum { - PARAM_ILLEGAL("PARAM_ILLEGAL", "param illegal"), - ENCRYPT_ERROR("ENCRYPT_ERROR", "encrypt error"), - UNKNOWN_ENCRYPT_KEY("UNKNOWN_ENCRYPT_KEY", "unknown encrypt key"), - MISMATCH_ENCRYPT_UTIL("MISMATCH_ENCRYPT_UTIL","mismatch encrypt util"), - ; + PARAM_ILLEGAL("PARAM_ILLEGAL", "param illegal"), + ENCRYPT_ERROR("ENCRYPT_ERROR", "encrypt error"), + UNKNOWN_ENCRYPT_KEY("UNKNOWN_ENCRYPT_KEY", "unknown encrypt key"), + MISMATCH_ENCRYPT_UTIL("MISMATCH_ENCRYPT_UTIL", "mismatch encrypt util"), + ; - private final String code; + private final String code; - private final String description; + private final String description; - ErrorCodeEnum(String code, String description) { - this.code = code; - this.description = description; - } + ErrorCodeEnum(String code, String description) { + this.code = code; + this.description = description; + } - public static ErrorCodeEnum getEnumByCode(String code) { + public static ErrorCodeEnum getEnumByCode(String code) { - for (ErrorCodeEnum codeEnum : values()) { - if (codeEnum.getCode().equals(code)) { - return codeEnum; - } - } - return null; + for (ErrorCodeEnum codeEnum : values()) { + if (codeEnum.getCode().equals(code)) { + return codeEnum; + } } + return null; + } - public String getCode() { - return code; - } + public String getCode() { + return code; + } - public String getDescription() { return description; } -} \ No newline at end of file + public String getDescription() { + return description; + } +} diff --git a/src/main/java/com/alipay/global/api/request/ams/risk/tee/exception/CryptoException.java b/src/main/java/com/alipay/global/api/request/ams/risk/tee/exception/CryptoException.java index 544508f..675b330 100644 --- a/src/main/java/com/alipay/global/api/request/ams/risk/tee/exception/CryptoException.java +++ b/src/main/java/com/alipay/global/api/request/ams/risk/tee/exception/CryptoException.java @@ -7,43 +7,40 @@ import com.alipay.global.api.request.ams.risk.tee.enums.ErrorCodeEnum; import org.apache.commons.lang3.StringUtils; -/** - * CryptoException that may occur during crypto operations - * 加密操作期间可能发生的 CryptoException - */ +/** CryptoException that may occur during crypto operations 加密操作期间可能发生的 CryptoException */ public class CryptoException extends RuntimeException { - private static final long serialVersionUID = 4032315964590816437L; + private static final long serialVersionUID = 4032315964590816437L; - private ErrorCodeEnum errorCode; + private ErrorCodeEnum errorCode; - public CryptoException(ErrorCodeEnum errorCode, Throwable e) { - super(getMessage(e), e); - setErrorCode(errorCode); - } + public CryptoException(ErrorCodeEnum errorCode, Throwable e) { + super(getMessage(e), e); + setErrorCode(errorCode); + } - public CryptoException(ErrorCodeEnum errorCode, String message) { - super(message); - setErrorCode(errorCode); - } + public CryptoException(ErrorCodeEnum errorCode, String message) { + super(message); + setErrorCode(errorCode); + } - public CryptoException(ErrorCodeEnum errorCode, String message, Throwable throwable) { - super(message, throwable); - setErrorCode(errorCode); - } + public CryptoException(ErrorCodeEnum errorCode, String message, Throwable throwable) { + super(message, throwable); + setErrorCode(errorCode); + } - private static String getMessage(Throwable e) { - if (null == e) { - return StringUtils.EMPTY; - } - return String.format("%s: %s", e.getClass().getSimpleName(), e.getMessage()); + private static String getMessage(Throwable e) { + if (null == e) { + return StringUtils.EMPTY; } + return String.format("%s: %s", e.getClass().getSimpleName(), e.getMessage()); + } - public ErrorCodeEnum getErrorCode() { - return errorCode; - } + public ErrorCodeEnum getErrorCode() { + return errorCode; + } - private void setErrorCode(ErrorCodeEnum errorCode) { - this.errorCode = errorCode; - } -} \ No newline at end of file + private void setErrorCode(ErrorCodeEnum errorCode) { + this.errorCode = errorCode; + } +} diff --git a/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionCancelRequest.java b/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionCancelRequest.java index ccabdce..a5227f8 100644 --- a/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionCancelRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionCancelRequest.java @@ -1,40 +1,58 @@ +/* + * subscriptions_cancel + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.subscription; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.subscription.AlipaySubscriptionCancelResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipaySubscriptionCancelRequest */ @EqualsAndHashCode(callSuper = true) -public class AlipaySubscriptionCancelRequest extends - AlipayRequest { - - /** - * The unique ID assigned by Alipay to identify a subscription. - */ - private String subscriptionId; - - /** - * The unique ID assigned by a merchant to identify a subscription request. - */ - private String subscriptionRequestId; - - /** - * The cancellation type for the subscription. Valid values are: - *

- * CANCEL: indicates canceling the subscription. The subscription service is not provided to the user after the current subscription period ends. - * TERMINATE: indicates terminating the subscription. The subscription service is ceased immediately. - */ - private String cancellationType; - - public AlipaySubscriptionCancelRequest() { - this.setPath(AntomPathConstants.SUBSCRIPTION_CANCEL_PATH); - } - - @Override - public Class getResponseClass() { - return AlipaySubscriptionCancelResponse.class; - } +@Data +public class AlipaySubscriptionCancelRequest + extends AlipayRequest { + + /** + * The unique ID assigned by Antom to identify a subscription. The value of this parameter is the + * value of the same parameter that is returned by notifyPayment and notifySubscription for the + * original subscription. Note: Specify at least one of subscriptionId and subscriptionRequestId. + * A one-to-one correspondence between paymentId and paymentRequestId exists. More information: + * Maximum length: 64 characters + */ + private String subscriptionId; + + /** + * The unique ID assigned by a merchant to identify a subscription request. Note: Specify at least + * one of subscriptionId and subscriptionRequestId. A one-to-one correspondence between paymentId + * and paymentRequestId exists. More information: Maximum length: 64 characters + */ + private String subscriptionRequestId; + + /** + * The cancellation type for the subscription. Valid values are: CANCEL: indicates canceling the + * subscription. The subscription service is not provided to the user after the current + * subscription period ends. TERMINATE: indicates terminating the subscription. The subscription + * service is ceased immediately. More information: Maximum length: 32 characters + */ + private String cancellationType; + + public AlipaySubscriptionCancelRequest() { + this.setPath("/ams/api/v1/subscriptions/cancel"); + } + + @Override + public Class getResponseClass() { + return AlipaySubscriptionCancelResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionChangeRequest.java b/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionChangeRequest.java index 061a8f6..241f1bb 100644 --- a/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionChangeRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionChangeRequest.java @@ -1,80 +1,95 @@ +/* + * subscriptions_change + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.subscription; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.Amount; import com.alipay.global.api.model.ams.OrderInfo; import com.alipay.global.api.model.ams.PeriodRule; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.subscription.AlipaySubscriptionChangeResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipaySubscriptionChangeRequest */ @EqualsAndHashCode(callSuper = true) -public class AlipaySubscriptionChangeRequest extends - AlipayRequest { - - /** - * The unique ID assigned by a merchant to identify a subscription change request. Alipay uses this field for idempotency control. - */ - private String subscriptionChangeRequestId; - - /** - * The unique ID assigned by Alipay to identify a subscription. - */ - private String subscriptionId; - - /** - * The description of the subscription, used for displaying user consumption records and other actions. - */ - private String subscriptionDescription; - - /** - * The date and time when the subscription becomes active. - */ - private String subscriptionStartTime; - - /** - * The date and time when the subscription ends. - */ - private String subscriptionEndTime; - - /** - * The subscription period rule, used to define a subscription's billing period. - */ - private PeriodRule periodRule; - - /** - * A specific date and time after which the created subscription expires. - */ - private String subscriptionExpiryTime; - - /** - * The order information of the subscription. - */ - private OrderInfo orderInfo; - - /** - * The payment amount charged to the user per subscription period. - */ - private Amount paymentAmount; - - /** - * The payment amount for the initial subscription period after changing the payment amount for subsequent subscription periods. - */ - private Amount paymentAmountDifference; - - private Boolean allowAccumulate; - - private Amount maxAccumulateAmount; - - public AlipaySubscriptionChangeRequest() { - this.setPath(AntomPathConstants.SUBSCRIPTION_CHANGE_PATH); - } - - @Override - public Class getResponseClass() { - return AlipaySubscriptionChangeResponse.class; - } - +@Data +public class AlipaySubscriptionChangeRequest + extends AlipayRequest { + + /** + * The unique ID assigned by a merchant to identify a subscription change request. Antom uses this + * field for idempotency control. Note: For subscription change requests that are initiated with + * the same value of subscriptionChangeRequestId and reach a final status of ​S​ or​F​, the same + * result is to be returned for the request. More information: This field is an API idempotency + * field. Maximum length: 64 characters + */ + private String subscriptionChangeRequestId; + + /** + * The unique ID assigned by Antom to identify a subscription. The value of this parameter is the + * value of the same parameter that is returned by notifyPayment and notifySubscription for the + * original subscription. More information: Maximum length: 64 characters + */ + private String subscriptionId; + + /** + * The description of the subscription, used for displaying user consumption records and other + * actions. Note: Specify this parameter if you want to change this information. More information: + * Maximum length: 256 characters + */ + private String subscriptionDescription; + + /** + * The date and time when the subscription becomes active. Note: Specify this parameter when you + * want to designate the start time of the changed subscription. If you leave this parameter + * empty, the default value of this parameter is the time when Antom receives this request. More + * information: The value follows the ISO 8601 standard format. For example, + * \"2019-11-27T12:01:01+08:00\". + */ + private String subscriptionStartTime; + + /** + * The date and time when the subscription ends. The default value of this parameter is + * 2099-12-31T23:59:59+08:00. Note: Specify this parameter when you want to change this + * information. More information: The value follows the ISO 8601 standard format. For example, + * \"2019-11-27T12:01:01+08:00\". + */ + private String subscriptionEndTime; + + private PeriodRule periodRule; + + /** + * A specific date and time after which the created subscription expires. When the subscription + * expires, the order must be terminated. The default value of this parameter is 30 minutes after + * the subscription creation request is sent. Note: Specify this parameter if you want to change + * the subscription creation expiration time. The specified payment expiration time must be less + * than 48 hours after the subscription request is sent. More information: The value follows the + * ISO 8601 standard format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String subscriptionExpiryTime; + + private OrderInfo orderInfo; + + private Amount paymentAmount; + + private Amount paymentAmountDifference; + + public AlipaySubscriptionChangeRequest() { + this.setPath("/ams/api/v1/subscriptions/change"); + } + + @Override + public Class getResponseClass() { + return AlipaySubscriptionChangeResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionCreateRequest.java b/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionCreateRequest.java index 7e60fff..f400ec5 100644 --- a/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionCreateRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionCreateRequest.java @@ -1,106 +1,122 @@ +/* + * subscriptions_create + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.subscription; import com.alipay.global.api.model.ams.*; -import com.alipay.global.api.model.constants.AntomPathConstants; +import com.alipay.global.api.model.ams.Amount; +import com.alipay.global.api.model.ams.Env; +import com.alipay.global.api.model.ams.OrderInfo; +import com.alipay.global.api.model.ams.PaymentMethod; +import com.alipay.global.api.model.ams.PeriodRule; +import com.alipay.global.api.model.ams.SettlementStrategy; +import com.alipay.global.api.model.ams.Trial; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.subscription.AlipaySubscriptionCreateResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.util.List; +import lombok.*; -@Data +/** AlipaySubscriptionCreateRequest */ @EqualsAndHashCode(callSuper = true) -public class AlipaySubscriptionCreateRequest extends - AlipayRequest { - - /** - * The unique ID assigned by a merchant to identify a subscription request. Alipay uses this field for idempotency control. - */ - private String subscriptionRequestId; - - /** - * The description of the subscription, used for displaying user consumption records and other actions. - */ - private String subscriptionDescription; - - /** - * The merchant page URL that the user is redirected to after authorizing the subscription. - */ - private String subscriptionRedirectUrl; - - /** - * The date and time when the subscription becomes active. - */ - private String subscriptionStartTime; - - /** - * The date and time when the subscription ends. - */ - private String subscriptionEndTime; - - /** - * The subscription period rule, used to define a subscription's billing period. - */ - private PeriodRule periodRule; - - /** - * A specific date and time after which the created subscription expires. - * The duration of subscription preparation process should be less than 48 hours - */ - private String subscriptionExpiryTime; - - /** - * The payment method that is used to collect the payment by the merchant or acquirer. - */ - private PaymentMethod paymentMethod; - - /** - * The URL that is used to receive the subscription result notification. - */ - private String subscriptionNotificationUrl; - - /** - * The URL that is used to receive the subscription result notification. - */ - private String paymentNotificationUrl; - - /** - * The order information for the subscription. - */ - private OrderInfo orderInfo; - - /** - * The payment amount charged to the user per subscription period. - */ - private Amount paymentAmount; - - /** - * The settlement strategy for the payment request. - */ - private SettlementStrategy settlementStrategy; - - /** - * Information about the environment where the order is placed, such as the device information. - */ - private Env env; - - /** - * The list of trial information of a subscription. - */ - private List trials; - - private String merchantAccountId; - private Boolean allowAccumulate; - private Amount maxAccumulateAmount; - private CustomizedInfo customizedInfo; - - public AlipaySubscriptionCreateRequest() { - this.setPath(AntomPathConstants.SUBSCRIPTION_CREATE_PATH); - } - - @Override - public Class getResponseClass() { - return AlipaySubscriptionCreateResponse.class; - } +@Data +public class AlipaySubscriptionCreateRequest + extends AlipayRequest { + + /** + * The unique ID assigned by a merchant to identify a subscription request. Antom uses this field + * for idempotency control. More information: This field is an API idempotency field.For + * subscription requests that are initiated with the same value of subscriptionRequestId and reach + * a final status of S or F, the same result is to be returned for the request. Maximum length: 64 + * characters + */ + private String subscriptionRequestId; + + /** + * The description of the subscription, used for displaying user consumption records and other + * actions. More information: Maximum length: 256 characters + */ + private String subscriptionDescription; + + /** + * The merchant page URL that the user is redirected to after authorizing the subscription. More + * information: Maximum length: 2048 characters + */ + private String subscriptionRedirectUrl; + + /** + * The date and time when the subscription becomes active. More information: The value follows the + * ISO 8601 standard format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String subscriptionStartTime; + + /** + * The date and time when the subscription ends. Note: Specify this parameter when you want to + * designate the subscription end time. More information: The value follows the ISO 8601 standard + * format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String subscriptionEndTime; + + private PeriodRule periodRule; + + /** + * A specific date and time after which the created subscription expires. When the subscription + * expires, the order must be terminated. The default value of this parameter is 30 minutes after + * the subscription creation request is sent. Note: Specify this parameter if you want to + * designate the subscription creation expiration time. The specified payment expiration time must + * be less than 48 hours after the subscription request is sent. More information: The value + * follows the ISO 8601 standard format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String subscriptionExpiryTime; + + private PaymentMethod paymentMethod; + + /** + * The URL that is used to receive the subscription result notification. You can also configure + * the subscription notification URL in Antom Dashboard. If you specify this URL in both this API + * and Antom Dashboard, the URL configured in the API takes precedence. Only one subscription + * notification URL can be configured in Antom Dashboard. More information: Maximum length: 2048 + * characters + */ + private String subscriptionNotificationUrl; + + /** + * The URL that is used to receive the payment result notification for each subscription period. + * You can also configure the subscription notification URL in Antom Dashboard. If you specify + * this URL in both this API and Antom Dashboard, the URL configured in the API takes precedence. + * You can only configure one subscription notification URL in Antom Dashboard. More information: + * Maximum length: 2048 characters + */ + private String paymentNotificationUrl; + + private OrderInfo orderInfo; + + private Amount paymentAmount; + + private SettlementStrategy settlementStrategy; + + private Env env; + + /** + * The list of trial information of a subscription. Note: Specify this parameter if the + * subscription includes any trial periods. + */ + private List trials; + + public AlipaySubscriptionCreateRequest() { + this.setPath("/ams/api/v1/subscriptions/create"); + } + + @Override + public Class getResponseClass() { + return AlipaySubscriptionCreateResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionInquireRequest.java b/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionInquireRequest.java index 0e00f4f..34c9c45 100644 --- a/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionInquireRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionInquireRequest.java @@ -2,23 +2,23 @@ import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; -import com.alipay.global.api.response.ams.subscription.AlipaySubscriptionCreateResponse; import com.alipay.global.api.response.ams.subscription.AlipaySubscriptionInquireResponse; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) -public class AlipaySubscriptionInquireRequest extends AlipayRequest { - private String subscriptionId; - private String merchantSubscriptionId; +public class AlipaySubscriptionInquireRequest + extends AlipayRequest { + private String subscriptionId; + private String merchantSubscriptionId; - public AlipaySubscriptionInquireRequest() { - this.setPath(AntomPathConstants.SUBSCRIPTION_INQUIRE_PATH); - } + public AlipaySubscriptionInquireRequest() { + this.setPath(AntomPathConstants.SUBSCRIPTION_INQUIRE_PATH); + } - @Override - public Class getResponseClass() { - return AlipaySubscriptionInquireResponse.class; - } + @Override + public Class getResponseClass() { + return AlipaySubscriptionInquireResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionUpdateRequest.java b/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionUpdateRequest.java index 000bb35..0dcb392 100644 --- a/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionUpdateRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/subscription/AlipaySubscriptionUpdateRequest.java @@ -1,35 +1,67 @@ +/* + * subscriptions_update + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.request.ams.subscription; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.Amount; import com.alipay.global.api.model.ams.OrderInfo; import com.alipay.global.api.model.ams.PeriodRule; -import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.subscription.AlipaySubscriptionUpdateResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - +import lombok.*; -@Data +/** AlipaySubscriptionUpdateRequest */ @EqualsAndHashCode(callSuper = true) -public class AlipaySubscriptionUpdateRequest extends AlipayRequest { +@Data +public class AlipaySubscriptionUpdateRequest + extends AlipayRequest { + + /** + * The unique ID assigned by a merchant to identify a subscription update request. More + * information: Maximum length: 64 characters + */ + private String subscriptionUpdateRequestId; + + /** + * The unique ID assigned by Antom to identify a subscription. More information: Maximum length: + * 64 characters + */ + private String subscriptionId; + + /** + * The description of the subscription, used for displaying user consumption records and other + * actions. More information: Maximum length: 256 characters + */ + private String subscriptionDescription; + + private PeriodRule periodRule; - private String subscriptionUpdateRequestId; - private String subscriptionId; - private String subscriptionDescription; - private PeriodRule periodRule; - private Amount paymentAmount; - private String subscriptionEndTime; - private OrderInfo orderInfo; + private Amount paymentAmount; + /** + * The date and time when the subscription ends. More information: The value follows the ISO 8601 + * standard format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String subscriptionEndTime; - public AlipaySubscriptionUpdateRequest() { - this.setPath(AntomPathConstants.SUBSCRIPTION_UPDATE_PATH); - } + private OrderInfo orderInfo; + public AlipaySubscriptionUpdateRequest() { + this.setPath("/ams/api/v1/subscriptions/update"); + } - @Override - public Class getResponseClass() { - return AlipaySubscriptionUpdateResponse.class; - } + @Override + public Class getResponseClass() { + return AlipaySubscriptionUpdateResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/users/AlipayInitAuthenticationRequest.java b/src/main/java/com/alipay/global/api/request/ams/users/AlipayInitAuthenticationRequest.java index 6eb372b..53ccf67 100644 --- a/src/main/java/com/alipay/global/api/request/ams/users/AlipayInitAuthenticationRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/users/AlipayInitAuthenticationRequest.java @@ -10,22 +10,21 @@ @Data @EqualsAndHashCode(callSuper = true) -public class AlipayInitAuthenticationRequest extends - AlipayRequest { +public class AlipayInitAuthenticationRequest + extends AlipayRequest { - private AuthenticationType authenticationType; - private String authenticationRequestId; - private AuthenticationChannelType authenticationChannelType; - private UserIdentityType userIdentityType; - private String userIdentityValue; + private AuthenticationType authenticationType; + private String authenticationRequestId; + private AuthenticationChannelType authenticationChannelType; + private UserIdentityType userIdentityType; + private String userIdentityValue; - public AlipayInitAuthenticationRequest() { - this.setPath("/ams/api/v1/users/initAuthentication"); - } + public AlipayInitAuthenticationRequest() { + this.setPath("/ams/api/v1/users/initAuthentication"); + } - @Override - public Class getResponseClass() { - return AlipayInitAuthenticationResponse.class; - } - -} \ No newline at end of file + @Override + public Class getResponseClass() { + return AlipayInitAuthenticationResponse.class; + } +} diff --git a/src/main/java/com/alipay/global/api/request/ams/users/AlipayUserQueryInfoRequest.java b/src/main/java/com/alipay/global/api/request/ams/users/AlipayUserQueryInfoRequest.java index a88ffaf..701f24c 100644 --- a/src/main/java/com/alipay/global/api/request/ams/users/AlipayUserQueryInfoRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/users/AlipayUserQueryInfoRequest.java @@ -9,15 +9,14 @@ @EqualsAndHashCode(callSuper = true) public class AlipayUserQueryInfoRequest extends AlipayRequest { - private String accessToken; + private String accessToken; - public AlipayUserQueryInfoRequest() { - this.setPath("/ams/api/v1/users/inquiryUserInfo"); - } - - @Override - public Class getResponseClass() { - return AlipayUserQueryInfoResponse.class; - } + public AlipayUserQueryInfoRequest() { + this.setPath("/ams/api/v1/users/inquiryUserInfo"); + } + @Override + public Class getResponseClass() { + return AlipayUserQueryInfoResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/users/AlipayVerifyAuthenticationRequest.java b/src/main/java/com/alipay/global/api/request/ams/users/AlipayVerifyAuthenticationRequest.java index b491c04..96e11d1 100644 --- a/src/main/java/com/alipay/global/api/request/ams/users/AlipayVerifyAuthenticationRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/users/AlipayVerifyAuthenticationRequest.java @@ -8,20 +8,19 @@ @Data @EqualsAndHashCode(callSuper = true) -public class AlipayVerifyAuthenticationRequest extends - AlipayRequest { +public class AlipayVerifyAuthenticationRequest + extends AlipayRequest { - private AuthenticationType authenticationType; - private String authenticationRequestId; - private String authenticationValue; + private AuthenticationType authenticationType; + private String authenticationRequestId; + private String authenticationValue; - public AlipayVerifyAuthenticationRequest() { - this.setPath("/ams/api/v1/users/verifyAuthentication"); - } - - @Override - public Class getResponseClass() { - return AlipayVerifyAuthenticationResponse.class; - } + public AlipayVerifyAuthenticationRequest() { + this.setPath("/ams/api/v1/users/verifyAuthentication"); + } + @Override + public Class getResponseClass() { + return AlipayVerifyAuthenticationResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayDeleteTokenRequest.java b/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayDeleteTokenRequest.java index 7c1391d..484f3d4 100644 --- a/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayDeleteTokenRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayDeleteTokenRequest.java @@ -3,23 +3,21 @@ import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.ams.vaults.AlipayDeleteTokenResponse; -import com.alipay.global.api.response.ams.vaults.AlipayUpdateTokenResponse; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) -public class AlipayDeleteTokenRequest extends - AlipayRequest { - private String merchantAccountId; - private String token; +public class AlipayDeleteTokenRequest extends AlipayRequest { + private String merchantAccountId; + private String token; - public AlipayDeleteTokenRequest() { - this.setPath(AntomPathConstants.DELETE_TOKEN_VAULTING_PATH); - } + public AlipayDeleteTokenRequest() { + this.setPath(AntomPathConstants.DELETE_TOKEN_VAULTING_PATH); + } - @Override - public Class getResponseClass() { - return AlipayDeleteTokenResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayDeleteTokenResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayUpdateTokenRequest.java b/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayUpdateTokenRequest.java index 4b5f2d0..50db9be 100644 --- a/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayUpdateTokenRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayUpdateTokenRequest.java @@ -3,29 +3,25 @@ import com.alipay.global.api.model.ams.UserName; import com.alipay.global.api.model.constants.AntomPathConstants; import com.alipay.global.api.request.AlipayRequest; -import com.alipay.global.api.response.ams.pay.AlipayPayResponse; -import com.alipay.global.api.response.ams.pay.AlipayVaultingPaymentMethodResponse; import com.alipay.global.api.response.ams.vaults.AlipayUpdateTokenResponse; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) -public class AlipayUpdateTokenRequest extends - AlipayRequest { - private String merchantAccountId; - private String token; - private UserName accountHolderName; - private String email; - private String tokenExpiryTime; +public class AlipayUpdateTokenRequest extends AlipayRequest { + private String merchantAccountId; + private String token; + private UserName accountHolderName; + private String email; + private String tokenExpiryTime; + public AlipayUpdateTokenRequest() { + this.setPath(AntomPathConstants.UPDATE_TOKEN_VAULTING_PATH); + } - public AlipayUpdateTokenRequest() { - this.setPath(AntomPathConstants.UPDATE_TOKEN_VAULTING_PATH); - } - - @Override - public Class getResponseClass() { - return AlipayUpdateTokenResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayUpdateTokenResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayVaultingInquireTokenRequest.java b/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayVaultingInquireTokenRequest.java index 35d8cc0..6605cfe 100644 --- a/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayVaultingInquireTokenRequest.java +++ b/src/main/java/com/alipay/global/api/request/ams/vaults/AlipayVaultingInquireTokenRequest.java @@ -8,18 +8,17 @@ @Data @EqualsAndHashCode(callSuper = true) -public class AlipayVaultingInquireTokenRequest extends AlipayRequest { - private String merchantAccountId; - private String token; +public class AlipayVaultingInquireTokenRequest + extends AlipayRequest { + private String merchantAccountId; + private String token; + public AlipayVaultingInquireTokenRequest() { + this.setPath(AntomPathConstants.INQUIRE_TOKEN_VAULTING_PATH); + } - public AlipayVaultingInquireTokenRequest() { - this.setPath(AntomPathConstants.INQUIRE_TOKEN_VAULTING_PATH); - } - - - @Override - public Class getResponseClass() { - return AlipayVaultingInquireTokenResponse.class; - } + @Override + public Class getResponseClass() { + return AlipayVaultingInquireTokenResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsCancelPaymentRequest.java b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsCancelPaymentRequest.java index 19e635a..f25a3f3 100644 --- a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsCancelPaymentRequest.java +++ b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsCancelPaymentRequest.java @@ -5,28 +5,27 @@ public class AlipayApsCancelPaymentRequest extends AlipayRequest { - private String paymentRequestId; - private String paymentId; + private String paymentRequestId; + private String paymentId; - public String getPaymentRequestId() { - return paymentRequestId; - } + public String getPaymentRequestId() { + return paymentRequestId; + } - public void setPaymentRequestId(String paymentRequestId) { - this.paymentRequestId = paymentRequestId; - } + public void setPaymentRequestId(String paymentRequestId) { + this.paymentRequestId = paymentRequestId; + } - public String getPaymentId() { - return paymentId; - } + public String getPaymentId() { + return paymentId; + } - public void setPaymentId(String paymentId) { - this.paymentId = paymentId; - } - - @Override - public Class getResponseClass() { - return AlipayApsCancelPaymentResponse.class; - } + public void setPaymentId(String paymentId) { + this.paymentId = paymentId; + } + @Override + public Class getResponseClass() { + return AlipayApsCancelPaymentResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsConsultPaymentRequest.java b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsConsultPaymentRequest.java index b1228a7..03e875b 100644 --- a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsConsultPaymentRequest.java +++ b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsConsultPaymentRequest.java @@ -3,87 +3,85 @@ import com.alipay.global.api.model.aps.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.aps.pay.AlipayApsConsultPaymentResponse; - import java.util.List; public class AlipayApsConsultPaymentRequest extends AlipayRequest { - private Amount paymentAmount; - private String userRegion; - private PaymentFactor paymentFactor; - private SettlementStrategy settlementStrategy; - private List allowedPspRegions; - private Merchant merchant; - private String referenceUserId; - private Env env; - - public Amount getPaymentAmount() { - return paymentAmount; - } - - public void setPaymentAmount(Amount paymentAmount) { - this.paymentAmount = paymentAmount; - } - - public String getUserRegion() { - return userRegion; - } - - public void setUserRegion(String userRegion) { - this.userRegion = userRegion; - } - - public PaymentFactor getPaymentFactor() { - return paymentFactor; - } - - public void setPaymentFactor(PaymentFactor paymentFactor) { - this.paymentFactor = paymentFactor; - } - - public SettlementStrategy getSettlementStrategy() { - return settlementStrategy; - } - - public void setSettlementStrategy(SettlementStrategy settlementStrategy) { - this.settlementStrategy = settlementStrategy; - } - - public List getAllowedPspRegions() { - return allowedPspRegions; - } - - public void setAllowedPspRegions(List allowedPspRegions) { - this.allowedPspRegions = allowedPspRegions; - } - - public Merchant getMerchant() { - return merchant; - } - - public void setMerchant(Merchant merchant) { - this.merchant = merchant; - } - - public String getReferenceUserId() { - return referenceUserId; - } - - public void setReferenceUserId(String referenceUserId) { - this.referenceUserId = referenceUserId; - } - - public Env getEnv() { - return env; - } - - public void setEnv(Env env) { - this.env = env; - } - - @Override - public Class getResponseClass() { - return AlipayApsConsultPaymentResponse.class; - } - + private Amount paymentAmount; + private String userRegion; + private PaymentFactor paymentFactor; + private SettlementStrategy settlementStrategy; + private List allowedPspRegions; + private Merchant merchant; + private String referenceUserId; + private Env env; + + public Amount getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(Amount paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String getUserRegion() { + return userRegion; + } + + public void setUserRegion(String userRegion) { + this.userRegion = userRegion; + } + + public PaymentFactor getPaymentFactor() { + return paymentFactor; + } + + public void setPaymentFactor(PaymentFactor paymentFactor) { + this.paymentFactor = paymentFactor; + } + + public SettlementStrategy getSettlementStrategy() { + return settlementStrategy; + } + + public void setSettlementStrategy(SettlementStrategy settlementStrategy) { + this.settlementStrategy = settlementStrategy; + } + + public List getAllowedPspRegions() { + return allowedPspRegions; + } + + public void setAllowedPspRegions(List allowedPspRegions) { + this.allowedPspRegions = allowedPspRegions; + } + + public Merchant getMerchant() { + return merchant; + } + + public void setMerchant(Merchant merchant) { + this.merchant = merchant; + } + + public String getReferenceUserId() { + return referenceUserId; + } + + public void setReferenceUserId(String referenceUserId) { + this.referenceUserId = referenceUserId; + } + + public Env getEnv() { + return env; + } + + public void setEnv(Env env) { + this.env = env; + } + + @Override + public Class getResponseClass() { + return AlipayApsConsultPaymentResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsInquiryPaymentRequest.java b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsInquiryPaymentRequest.java index 3c1593c..e099730 100644 --- a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsInquiryPaymentRequest.java +++ b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsInquiryPaymentRequest.java @@ -5,28 +5,27 @@ public class AlipayApsInquiryPaymentRequest extends AlipayRequest { - private String paymentRequestId; - private String paymentId; + private String paymentRequestId; + private String paymentId; - public String getPaymentRequestId() { - return paymentRequestId; - } + public String getPaymentRequestId() { + return paymentRequestId; + } - public void setPaymentRequestId(String paymentRequestId) { - this.paymentRequestId = paymentRequestId; - } + public void setPaymentRequestId(String paymentRequestId) { + this.paymentRequestId = paymentRequestId; + } - public String getPaymentId() { - return paymentId; - } + public String getPaymentId() { + return paymentId; + } - public void setPaymentId(String paymentId) { - this.paymentId = paymentId; - } - - @Override - public Class getResponseClass() { - return AlipayApsInquiryPaymentResponse.class; - } + public void setPaymentId(String paymentId) { + this.paymentId = paymentId; + } + @Override + public Class getResponseClass() { + return AlipayApsInquiryPaymentResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsNotifyPaymentRequest.java b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsNotifyPaymentRequest.java index 0a1beb4..8675b2d 100644 --- a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsNotifyPaymentRequest.java +++ b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsNotifyPaymentRequest.java @@ -8,109 +8,108 @@ public class AlipayApsNotifyPaymentRequest extends AlipayRequest { - private String acquirerId; - private String pspId; - private Result paymentResult; - private String paymentRequestId; - private String paymentId; - private Amount paymentAmount; - private String paymentTime; - private String customerId; - private String walletBrandName; - private Amount settlementAmount; - private Quote settlementQuote; - - public String getAcquirerId() { - return acquirerId; - } - - public void setAcquirerId(String acquirerId) { - this.acquirerId = acquirerId; - } - - public String getPspId() { - return pspId; - } - - public void setPspId(String pspId) { - this.pspId = pspId; - } - - public Result getPaymentResult() { - return paymentResult; - } - - public void setPaymentResult(Result paymentResult) { - this.paymentResult = paymentResult; - } - - public String getPaymentRequestId() { - return paymentRequestId; - } - - public void setPaymentRequestId(String paymentRequestId) { - this.paymentRequestId = paymentRequestId; - } - - public String getPaymentId() { - return paymentId; - } - - public void setPaymentId(String paymentId) { - this.paymentId = paymentId; - } - - public Amount getPaymentAmount() { - return paymentAmount; - } - - public void setPaymentAmount(Amount paymentAmount) { - this.paymentAmount = paymentAmount; - } - - public String getPaymentTime() { - return paymentTime; - } - - public void setPaymentTime(String paymentTime) { - this.paymentTime = paymentTime; - } - - public String getCustomerId() { - return customerId; - } - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - public String getWalletBrandName() { - return walletBrandName; - } - - public void setWalletBrandName(String walletBrandName) { - this.walletBrandName = walletBrandName; - } - - public Amount getSettlementAmount() { - return settlementAmount; - } - - public void setSettlementAmount(Amount settlementAmount) { - this.settlementAmount = settlementAmount; - } - - public Quote getSettlementQuote() { - return settlementQuote; - } - - public void setSettlementQuote(Quote settlementQuote) { - this.settlementQuote = settlementQuote; - } - - @Override - public Class getResponseClass() { - return AlipayApsNotifyPaymentResponse.class; - } - + private String acquirerId; + private String pspId; + private Result paymentResult; + private String paymentRequestId; + private String paymentId; + private Amount paymentAmount; + private String paymentTime; + private String customerId; + private String walletBrandName; + private Amount settlementAmount; + private Quote settlementQuote; + + public String getAcquirerId() { + return acquirerId; + } + + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } + + public String getPspId() { + return pspId; + } + + public void setPspId(String pspId) { + this.pspId = pspId; + } + + public Result getPaymentResult() { + return paymentResult; + } + + public void setPaymentResult(Result paymentResult) { + this.paymentResult = paymentResult; + } + + public String getPaymentRequestId() { + return paymentRequestId; + } + + public void setPaymentRequestId(String paymentRequestId) { + this.paymentRequestId = paymentRequestId; + } + + public String getPaymentId() { + return paymentId; + } + + public void setPaymentId(String paymentId) { + this.paymentId = paymentId; + } + + public Amount getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(Amount paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String getPaymentTime() { + return paymentTime; + } + + public void setPaymentTime(String paymentTime) { + this.paymentTime = paymentTime; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getWalletBrandName() { + return walletBrandName; + } + + public void setWalletBrandName(String walletBrandName) { + this.walletBrandName = walletBrandName; + } + + public Amount getSettlementAmount() { + return settlementAmount; + } + + public void setSettlementAmount(Amount settlementAmount) { + this.settlementAmount = settlementAmount; + } + + public Quote getSettlementQuote() { + return settlementQuote; + } + + public void setSettlementQuote(Quote settlementQuote) { + this.settlementQuote = settlementQuote; + } + + @Override + public Class getResponseClass() { + return AlipayApsNotifyPaymentResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsPayRequest.java b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsPayRequest.java index 4344716..e9a57cd 100644 --- a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsPayRequest.java +++ b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsPayRequest.java @@ -3,114 +3,112 @@ import com.alipay.global.api.model.aps.*; import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.aps.pay.AlipayApsPayResponse; - import java.util.List; public class AlipayApsPayRequest extends AlipayRequest { - private Order order; - private String paymentRequestId; - private Amount paymentAmount; - private PaymentMethod paymentMethod; - private PaymentFactor paymentFactor; - private String paymentExpiryTime; - private String paymentNotifyUrl; - private String paymentRedirectUrl; - private SettlementStrategy settlementStrategy; - private List allowedPspRegions; - private String userRegion; - - public Order getOrder() { - return order; - } - - public void setOrder(Order order) { - this.order = order; - } - - public String getPaymentRequestId() { - return paymentRequestId; - } - - public void setPaymentRequestId(String paymentRequestId) { - this.paymentRequestId = paymentRequestId; - } - - public Amount getPaymentAmount() { - return paymentAmount; - } - - public void setPaymentAmount(Amount paymentAmount) { - this.paymentAmount = paymentAmount; - } - - public PaymentMethod getPaymentMethod() { - return paymentMethod; - } - - public void setPaymentMethod(PaymentMethod paymentMethod) { - this.paymentMethod = paymentMethod; - } - - public PaymentFactor getPaymentFactor() { - return paymentFactor; - } - - public void setPaymentFactor(PaymentFactor paymentFactor) { - this.paymentFactor = paymentFactor; - } - - public String getPaymentExpiryTime() { - return paymentExpiryTime; - } - - public void setPaymentExpiryTime(String paymentExpiryTime) { - this.paymentExpiryTime = paymentExpiryTime; - } - - public String getPaymentNotifyUrl() { - return paymentNotifyUrl; - } - - public void setPaymentNotifyUrl(String paymentNotifyUrl) { - this.paymentNotifyUrl = paymentNotifyUrl; - } - - public String getPaymentRedirectUrl() { - return paymentRedirectUrl; - } - - public void setPaymentRedirectUrl(String paymentRedirectUrl) { - this.paymentRedirectUrl = paymentRedirectUrl; - } - - public SettlementStrategy getSettlementStrategy() { - return settlementStrategy; - } - - public void setSettlementStrategy(SettlementStrategy settlementStrategy) { - this.settlementStrategy = settlementStrategy; - } - - public List getAllowedPspRegions() { - return allowedPspRegions; - } - - public void setAllowedPspRegions(List allowedPspRegions) { - this.allowedPspRegions = allowedPspRegions; - } - - public String getUserRegion() { - return userRegion; - } - - public void setUserRegion(String userRegion) { - this.userRegion = userRegion; - } - - @Override - public Class getResponseClass() { - return AlipayApsPayResponse.class; - } - + private Order order; + private String paymentRequestId; + private Amount paymentAmount; + private PaymentMethod paymentMethod; + private PaymentFactor paymentFactor; + private String paymentExpiryTime; + private String paymentNotifyUrl; + private String paymentRedirectUrl; + private SettlementStrategy settlementStrategy; + private List allowedPspRegions; + private String userRegion; + + public Order getOrder() { + return order; + } + + public void setOrder(Order order) { + this.order = order; + } + + public String getPaymentRequestId() { + return paymentRequestId; + } + + public void setPaymentRequestId(String paymentRequestId) { + this.paymentRequestId = paymentRequestId; + } + + public Amount getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(Amount paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public PaymentMethod getPaymentMethod() { + return paymentMethod; + } + + public void setPaymentMethod(PaymentMethod paymentMethod) { + this.paymentMethod = paymentMethod; + } + + public PaymentFactor getPaymentFactor() { + return paymentFactor; + } + + public void setPaymentFactor(PaymentFactor paymentFactor) { + this.paymentFactor = paymentFactor; + } + + public String getPaymentExpiryTime() { + return paymentExpiryTime; + } + + public void setPaymentExpiryTime(String paymentExpiryTime) { + this.paymentExpiryTime = paymentExpiryTime; + } + + public String getPaymentNotifyUrl() { + return paymentNotifyUrl; + } + + public void setPaymentNotifyUrl(String paymentNotifyUrl) { + this.paymentNotifyUrl = paymentNotifyUrl; + } + + public String getPaymentRedirectUrl() { + return paymentRedirectUrl; + } + + public void setPaymentRedirectUrl(String paymentRedirectUrl) { + this.paymentRedirectUrl = paymentRedirectUrl; + } + + public SettlementStrategy getSettlementStrategy() { + return settlementStrategy; + } + + public void setSettlementStrategy(SettlementStrategy settlementStrategy) { + this.settlementStrategy = settlementStrategy; + } + + public List getAllowedPspRegions() { + return allowedPspRegions; + } + + public void setAllowedPspRegions(List allowedPspRegions) { + this.allowedPspRegions = allowedPspRegions; + } + + public String getUserRegion() { + return userRegion; + } + + public void setUserRegion(String userRegion) { + this.userRegion = userRegion; + } + + @Override + public Class getResponseClass() { + return AlipayApsPayResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsUserInitiatedPayRequest.java b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsUserInitiatedPayRequest.java index cd5ba0b..ec2f157 100644 --- a/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsUserInitiatedPayRequest.java +++ b/src/main/java/com/alipay/global/api/request/aps/pay/AlipayApsUserInitiatedPayRequest.java @@ -3,48 +3,48 @@ import com.alipay.global.api.request.AlipayRequest; import com.alipay.global.api.response.aps.pay.AlipayApsUserInitiatedPayResponse; -public class AlipayApsUserInitiatedPayRequest extends AlipayRequest { - - private String acquirerId; - private String pspId; - private String codeValue; - private String customerId; - - public String getAcquirerId() { - return acquirerId; - } - - public void setAcquirerId(String acquirerId) { - this.acquirerId = acquirerId; - } - - public String getPspId() { - return pspId; - } - - public void setPspId(String pspId) { - this.pspId = pspId; - } - - public String getCodeValue() { - return codeValue; - } - - public void setCodeValue(String codeValue) { - this.codeValue = codeValue; - } - - public String getCustomerId() { - return customerId; - } - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - @Override - public Class getResponseClass() { - return AlipayApsUserInitiatedPayResponse.class; - } - +public class AlipayApsUserInitiatedPayRequest + extends AlipayRequest { + + private String acquirerId; + private String pspId; + private String codeValue; + private String customerId; + + public String getAcquirerId() { + return acquirerId; + } + + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } + + public String getPspId() { + return pspId; + } + + public void setPspId(String pspId) { + this.pspId = pspId; + } + + public String getCodeValue() { + return codeValue; + } + + public void setCodeValue(String codeValue) { + this.codeValue = codeValue; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + @Override + public Class getResponseClass() { + return AlipayApsUserInitiatedPayResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/request/aps/refund/AlipayApsRefundRequest.java b/src/main/java/com/alipay/global/api/request/aps/refund/AlipayApsRefundRequest.java index 1453c8d..5ba5c42 100644 --- a/src/main/java/com/alipay/global/api/request/aps/refund/AlipayApsRefundRequest.java +++ b/src/main/java/com/alipay/global/api/request/aps/refund/AlipayApsRefundRequest.java @@ -6,55 +6,54 @@ public class AlipayApsRefundRequest extends AlipayRequest { - private String paymentRequestId; - private String paymentId; - private String refundRequestId; - private Amount refundAmount; - private String refundReason; - - public String getPaymentRequestId() { - return paymentRequestId; - } - - public void setPaymentRequestId(String paymentRequestId) { - this.paymentRequestId = paymentRequestId; - } - - public String getPaymentId() { - return paymentId; - } - - public void setPaymentId(String paymentId) { - this.paymentId = paymentId; - } - - public String getRefundRequestId() { - return refundRequestId; - } - - public void setRefundRequestId(String refundRequestId) { - this.refundRequestId = refundRequestId; - } - - public Amount getRefundAmount() { - return refundAmount; - } - - public void setRefundAmount(Amount refundAmount) { - this.refundAmount = refundAmount; - } - - public String getRefundReason() { - return refundReason; - } - - public void setRefundReason(String refundReason) { - this.refundReason = refundReason; - } - - @Override - public Class getResponseClass() { - return AlipayApsRefundResponse.class; - } - + private String paymentRequestId; + private String paymentId; + private String refundRequestId; + private Amount refundAmount; + private String refundReason; + + public String getPaymentRequestId() { + return paymentRequestId; + } + + public void setPaymentRequestId(String paymentRequestId) { + this.paymentRequestId = paymentRequestId; + } + + public String getPaymentId() { + return paymentId; + } + + public void setPaymentId(String paymentId) { + this.paymentId = paymentId; + } + + public String getRefundRequestId() { + return refundRequestId; + } + + public void setRefundRequestId(String refundRequestId) { + this.refundRequestId = refundRequestId; + } + + public Amount getRefundAmount() { + return refundAmount; + } + + public void setRefundAmount(Amount refundAmount) { + this.refundAmount = refundAmount; + } + + public String getRefundReason() { + return refundReason; + } + + public void setRefundReason(String refundReason) { + this.refundReason = refundReason; + } + + @Override + public Class getResponseClass() { + return AlipayApsRefundResponse.class; + } } diff --git a/src/main/java/com/alipay/global/api/response/AlipayResponse.java b/src/main/java/com/alipay/global/api/response/AlipayResponse.java index 3c3bddb..8129cc8 100644 --- a/src/main/java/com/alipay/global/api/response/AlipayResponse.java +++ b/src/main/java/com/alipay/global/api/response/AlipayResponse.java @@ -1,20 +1,18 @@ package com.alipay.global.api.response; import com.alipay.global.api.model.Result; - import lombok.Data; @Data public class AlipayResponse { - private Result result; - - public Result getResult() { - return result; - } + private Result result; - public void setResult(Result result) { - this.result = result; - } + public Result getResult() { + return result; + } + public void setResult(Result result) { + this.result = result; + } } diff --git a/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthApplyTokenResponse.java b/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthApplyTokenResponse.java index 5950594..b707802 100644 --- a/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthApplyTokenResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthApplyTokenResponse.java @@ -1,20 +1,72 @@ +/* + * authorizations_applyToken + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.auth; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.PspCustomerInfo; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayAuthApplyTokenResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayAuthApplyTokenResponse extends AlipayResponse { - private String accessToken; - private String accessTokenExpiryTime; - private String refreshToken; - private String refreshTokenExpiryTime; - private String extendInfo; - private String userLoginId; - private PspCustomerInfo pspCustomerInfo; + /** + * The access token that is used to access the corresponding scope of the user resource. Note: + * This field is returned when the API is called successfully. More information: Maximum length: + * 128 characters + */ + private String accessToken; + + /** + * The time after which the access token expires. After the access token expires, the access token + * cannot be used to deduct money from the user's account. Note: This field is returned when + * accessToken is returned. More information: The value follows the ISO 8601 standard format. For + * example, \"2019-11-27T12:01:01+08:00\". + */ + private String accessTokenExpiryTime; + + /** + * The refresh token that is used to exchange for a new access token when the access token is + * about to expire. Note: This field is returned when the wallet supports refreshing the token. If + * this field is not returned, it indicates that the access token has a quite long valid period. + * More information: Maximum length: 128 characters + */ + private String refreshToken; + + /** + * The time after which the refresh token expires. After the refresh token expires, the refresh + * token cannot be used to retrieve a new access token. Note: This field is returned when + * refreshToken is returned. More information: The value follows the ISO 8601 standard format. For + * example, \"2019-11-27T12:01:01+08:00\". + */ + private String refreshTokenExpiryTime; + + /** + * Extended information. Note: This field is returned when extended information exists. More + * information: Maximum length: 2048 characters + */ + private String extendInfo; + + /** + * The login ID that the user used to register in the wallet. The login ID can be the user's + * email address or phone number, which is masked when returned to Alipay+ payment methods . This + * field can inform the merchant of the users who are registered. Note: This field is returned + * when result.resultCode is SUCCESS and the value of the scopes field in the consult API is + * AGREEMENT_PAY. More information: Maximum length: 64 characters + */ + private String userLoginId; + private PspCustomerInfo pspCustomerInfo; } diff --git a/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthConsultResponse.java b/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthConsultResponse.java index b9963e9..92ce0fc 100644 --- a/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthConsultResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthConsultResponse.java @@ -1,20 +1,61 @@ +/* + * authorizations_consult + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.auth; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.AuthCodeForm; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayAuthConsultResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayAuthConsultResponse extends AlipayResponse { - private String authUrl; - private String extendInfo; - private String normalUrl; - private String schemeUrl; - private String applinkUrl; - private String appIdentifier; - private AuthCodeForm authCodeForm; + private String authUrl; + + private String extendInfo; + + /** + * The URL that redirects users to a WAP or WEB page in the default browser or the embedded + * WebView. Note: When the value of result.resultCode is SUCCESS, at least one of schemeUrl, + * applinkUrl, and normalUrl is to be returned. More information: Maximum length: 2048 characters + */ + private String normalUrl; + + /** + * The URL scheme that redirects users to open an app in an Android or iOS system when the target + * app is installed. Note: When the value of result.resultCode is SUCCESS, at least one of + * schemeUrl, applinkUrl, and normalUrl is to be returned. More information: Maximum length: 2048 + * characters + */ + private String schemeUrl; + + /** + * The URL that redirects users to open an app when the target app is installed, or to open a WAP + * page when the target app is not installed. For Android, the URL is a Native App Link. For iOS, + * the URL is a Universal Link. Note: When the value of result.resultCode is SUCCESS, at least one + * of schemeUrl, applinkUrl, and normalUrl is to be returned. More information: Maximum length: + * 2048 characters + */ + private String applinkUrl; + + /** + * Android package name, which is used for Android app to open a cashier page. Note: This field is + * returned when result.resultCode is SUCCESS and terminalType is ​APP or ​WAP​. More information: + * Maximum length: 128 characters + */ + private String appIdentifier; + private AuthCodeForm authCodeForm; } diff --git a/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthCreateSessionResponse.java b/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthCreateSessionResponse.java index dcdb60f..e1543c7 100644 --- a/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthCreateSessionResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthCreateSessionResponse.java @@ -8,8 +8,7 @@ @EqualsAndHashCode(callSuper = true) public class AlipayAuthCreateSessionResponse extends AlipayResponse { - private String paymentSessionId; - private String paymentSessionData; - private String paymentSessionExpiryTime; - + private String paymentSessionId; + private String paymentSessionData; + private String paymentSessionExpiryTime; } diff --git a/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthQueryTokenResponse.java b/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthQueryTokenResponse.java index d720502..268380d 100644 --- a/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthQueryTokenResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthQueryTokenResponse.java @@ -8,10 +8,9 @@ @EqualsAndHashCode(callSuper = true) public class AlipayAuthQueryTokenResponse extends AlipayResponse { - private String accessToken; - private String accessTokenExpiryTime; - private String refreshToken; - private String refreshTokenExpiryTime; - private String tokenStatusType; - + private String accessToken; + private String accessTokenExpiryTime; + private String refreshToken; + private String refreshTokenExpiryTime; + private String tokenStatusType; } diff --git a/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthRevokeTokenResponse.java b/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthRevokeTokenResponse.java index 9054368..d045889 100644 --- a/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthRevokeTokenResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/auth/AlipayAuthRevokeTokenResponse.java @@ -1,13 +1,25 @@ +/* + * authorizations_revoke + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.auth; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayAuthRevokeTokenResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayAuthRevokeTokenResponse extends AlipayResponse { - private String extendInfo; - + private String extendInfo; } diff --git a/src/main/java/com/alipay/global/api/response/ams/customs/AlipayCustomsDeclareResponse.java b/src/main/java/com/alipay/global/api/response/ams/customs/AlipayCustomsDeclareResponse.java index 4b27898..1428289 100644 --- a/src/main/java/com/alipay/global/api/response/ams/customs/AlipayCustomsDeclareResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/customs/AlipayCustomsDeclareResponse.java @@ -3,7 +3,6 @@ import com.alipay.global.api.model.ams.ClearingChannel; import com.alipay.global.api.model.ams.IdentityCheckResult; import com.alipay.global.api.response.AlipayResponse; - import lombok.Data; import lombok.EqualsAndHashCode; @@ -11,11 +10,10 @@ @EqualsAndHashCode(callSuper = true) public class AlipayCustomsDeclareResponse extends AlipayResponse { - private String customsPaymentId; - private String customsOrderId; - private IdentityCheckResult identityCheckResult; - private ClearingChannel clearingChannel; - private String clearingTransactionId; - private String customsProviderRegistrationId; - + private String customsPaymentId; + private String customsOrderId; + private IdentityCheckResult identityCheckResult; + private ClearingChannel clearingChannel; + private String clearingTransactionId; + private String customsProviderRegistrationId; } diff --git a/src/main/java/com/alipay/global/api/response/ams/customs/AlipayCustomsQueryResponse.java b/src/main/java/com/alipay/global/api/response/ams/customs/AlipayCustomsQueryResponse.java index a446ecf..be5d3de 100644 --- a/src/main/java/com/alipay/global/api/response/ams/customs/AlipayCustomsQueryResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/customs/AlipayCustomsQueryResponse.java @@ -2,17 +2,15 @@ import com.alipay.global.api.model.ams.DeclarationRecord; import com.alipay.global.api.response.AlipayResponse; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - @Data @EqualsAndHashCode(callSuper = true) public class AlipayCustomsQueryResponse extends AlipayResponse { - private List declarationRequestsNotFound; - - private List declarationRecords; + private List declarationRequestsNotFound; + private List declarationRecords; } diff --git a/src/main/java/com/alipay/global/api/response/ams/dispute/AlipayAcceptDisputeResponse.java b/src/main/java/com/alipay/global/api/response/ams/dispute/AlipayAcceptDisputeResponse.java index 5277d89..47c4dae 100644 --- a/src/main/java/com/alipay/global/api/response/ams/dispute/AlipayAcceptDisputeResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/dispute/AlipayAcceptDisputeResponse.java @@ -1,16 +1,35 @@ +/* + * payments_acceptDispute + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.dispute; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; +import lombok.*; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@Data +/** AlipayAcceptDisputeResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayAcceptDisputeResponse extends AlipayResponse { - private String disputeId; - - private String disputeResolutionTime; + /** + * The unique ID assigned by Antom to identify a dispute. Note: This prameter is returned when the + * value of resultCode is SUCCESS. More information: Maximum length: 64 characters + */ + private String disputeId; + /** + * The time when you accept the dispute. Note: This prameter is returned when the value of + * resultCode is SUCCESS. More information: Maximum length: 64 characters + */ + private String disputeResolutionTime; } diff --git a/src/main/java/com/alipay/global/api/response/ams/dispute/AlipayDownloadDisputeEvidenceResponse.java b/src/main/java/com/alipay/global/api/response/ams/dispute/AlipayDownloadDisputeEvidenceResponse.java index 9e88971..177d81b 100644 --- a/src/main/java/com/alipay/global/api/response/ams/dispute/AlipayDownloadDisputeEvidenceResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/dispute/AlipayDownloadDisputeEvidenceResponse.java @@ -1,17 +1,33 @@ +/* + * payments_downloadDisputeEvidence + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.dispute; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.DisputeEvidenceFormatType; import com.alipay.global.api.response.AlipayResponse; +import lombok.*; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@Data +/** AlipayDownloadDisputeEvidenceResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayDownloadDisputeEvidenceResponse extends AlipayResponse { - private String disputeEvidence; - - private DisputeEvidenceFormatType disputeEvidenceFormat; + /** + * The dispute evidence that is encoded in the Based64 format. Decode the Base64 document to get + * the Word or PDF file. Note: This prameter is returned when the value of resultCode is SUCCESS. + * More information: Maximum length: 1000000 characters + */ + private String disputeEvidence; + private DisputeEvidenceFormatType disputeEvidenceFormat; } diff --git a/src/main/java/com/alipay/global/api/response/ams/dispute/AlipaySupplyDefenseDocumentResponse.java b/src/main/java/com/alipay/global/api/response/ams/dispute/AlipaySupplyDefenseDocumentResponse.java index 490b09e..5d65a3c 100644 --- a/src/main/java/com/alipay/global/api/response/ams/dispute/AlipaySupplyDefenseDocumentResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/dispute/AlipaySupplyDefenseDocumentResponse.java @@ -1,16 +1,35 @@ +/* + * payments_supplyDefenseDocument + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.dispute; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; +import lombok.*; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@Data +/** AlipaySupplyDefenseDocumentResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipaySupplyDefenseDocumentResponse extends AlipayResponse { - private String disputeId; - - private String disputeResolutionTime; + /** + * The unique ID assigned by Antom to identify a dispute. Note: This prameter is returned when the + * value of resultCode is SUCCESS. More information: Maximum length: 64 characters + */ + private String disputeId; + /** + * The time when you upload the dispute defense document. Note: This prameter is returned when the + * value of resultCode is SUCCESS. More information: Maximum length: 64 characters + */ + private String disputeResolutionTime; } diff --git a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayCreatePayoutResponse.java b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayCreatePayoutResponse.java index b95cfbe..83e20b7 100644 --- a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayCreatePayoutResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayCreatePayoutResponse.java @@ -1,17 +1,42 @@ +/* + * marketplace_createPayout + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.TransferFromDetail; import com.alipay.global.api.model.ams.TransferToDetail; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayCreatePayoutResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayCreatePayoutResponse extends AlipayResponse { - private String transferId; - private String transferRequestId; - private TransferFromDetail transferFromDetail; - private TransferToDetail transferToDetail; + /** + * The unique ID assigned by Antom to identify a payout. This parameter is returned when the value + * of result.resultStatus is U. More information: Maximum length: 64 characters + */ + private String transferId; + + /** + * The unique ID assigned by the marketplace to identify a payout request. This parameter is + * returned when the value of result.resultStatus is U. More information: Maximum length: 64 + * characters + */ + private String transferRequestId; + + private TransferFromDetail transferFromDetail; + + private TransferToDetail transferToDetail; } diff --git a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayCreateTransferResponse.java b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayCreateTransferResponse.java index 8b56c7d..7d8141f 100644 --- a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayCreateTransferResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayCreateTransferResponse.java @@ -1,18 +1,42 @@ +/* + * marketplace_createTransfer + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.TransferFromDetail; import com.alipay.global.api.model.ams.TransferToDetail; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayCreateTransferResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayCreateTransferResponse extends AlipayResponse { - private String transferId; - private String transferRequestId; - private TransferFromDetail transferFromDetail; - private TransferToDetail transferToDetail; + /** + * The unique ID assigned by Antom to identify a transfer. This parameter is returned when the + * value of result.resultStatus is U. More information: Maximum length: 64 characters + */ + private String transferId; + + /** + * The unique ID assigned by the marketplace to identify a transfer request. This parameter is + * returned when the value of result.resultStatus is U. More information: Maximum length: 64 + * characters + */ + private String transferRequestId; + + private TransferFromDetail transferFromDetail; + private TransferToDetail transferToDetail; } diff --git a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayInquireBalanceResponse.java b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayInquireBalanceResponse.java index 99a5caf..63e55ca 100644 --- a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayInquireBalanceResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayInquireBalanceResponse.java @@ -1,16 +1,30 @@ +/* + * marketplace_inquireBalance + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.AccountBalance; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.util.List; +import lombok.*; -@Data +/** AlipayInquireBalanceResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayInquireBalanceResponse extends AlipayResponse { - private List accountBalances; - + /** + * The list of balance accounts assigned by Alipay. More information:Maximum length: 64 characters + */ + private List accountBalances; } diff --git a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayRegisterResponse.java b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayRegisterResponse.java index bfb27dc..cc39e58 100644 --- a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayRegisterResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipayRegisterResponse.java @@ -1,17 +1,31 @@ +/* + * marketplace_register + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayRegisterResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayRegisterResponse extends AlipayResponse { - /** - * The registration status of the merchant. The value of this parameter is fixed to PROCESSING. - * Get the sub-merchant's registration result from the notifyRegistration interface. - * This parameter is returned when the value of result.resultStatus is S. - */ - private String registrationStatus; + /** + * The registration status of the merchant. The value of this parameter is fixed to PROCESSING. + * Get the sub-merchant's registration result from the notifyRegistration interface. This + * parameter is returned when the value of result.resultStatus is S. More information: Maximum + * length: 64 characters + */ + private String registrationStatus; } diff --git a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySettleResponse.java b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySettleResponse.java index 486fe72..8444bc8 100644 --- a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySettleResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySettleResponse.java @@ -1,12 +1,35 @@ +/* + * marketplace_settle + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipaySettleResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipaySettleResponse extends AlipayResponse { - private String settlementRequestId; - private String settlementId; + + /** + * The unique ID that is assigned by the marketplace to identify a settlement request. More + * information: Maximum length: 64 characters + */ + private String settlementRequestId; + + /** + * The unique ID that is assigned by Antom to identify a settlement. More information: Maximum + * length: 64 characters + */ + private String settlementId; } diff --git a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySettlementInfoUpdateResponse.java b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySettlementInfoUpdateResponse.java index d624c16..cc0178b 100644 --- a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySettlementInfoUpdateResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySettlementInfoUpdateResponse.java @@ -1,17 +1,31 @@ +/* + * marketplace_update + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipaySettlementInfoUpdateResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipaySettlementInfoUpdateResponse extends AlipayResponse { - /** - * The update status of the settlement information. The value of this parameter is fixed to PROCESSING. - * Get the settlement information update result from the notifyUpdate and inquireUpdate interfaces. - * This parameter is returned when the value of result.resultStatus is S. - */ - private String updateStatus; + /** + * The update status of the settlement information. The value of this parameter is fixed to + * PROCESSING. Get the settlement information update result from the notifyUpdate and + * inquireUpdate interfaces. This parameter is returned when the value of result.resultStatus is + * S. More information: Maximum length: 64 characters + */ + private String updateStatus; } diff --git a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySubmitAttachmentResponse.java b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySubmitAttachmentResponse.java index e8c72d8..347f1bb 100644 --- a/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySubmitAttachmentResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/marketplace/AlipaySubmitAttachmentResponse.java @@ -1,16 +1,40 @@ +/* + * marketplace_submitAttachment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.marketplace; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.AttachmentType; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipaySubmitAttachmentResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipaySubmitAttachmentResponse extends AlipayResponse { - private String submitAttachmentRequestId; - private AttachmentType attachmentType; - private String attachmentKey; + /** + * The unique ID assigned by the marketplace to identify an attachment submission request. This + * parameter is returned when the value of result.resultStatus is S. More information: Maximum + * length: 32 characters + */ + private String submitAttachmentRequestId; + + private AttachmentType attachmentType; + /** + * The unique key value of the attachment that you submit. The value of this parameter is used by + * the fileKeys or fileKey parameters in the register API. This parameter is returned when the + * value of result.resultStatus is S. More information: Maximum length: 256 characters + */ + private String attachmentKey; } diff --git a/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationInfoQueryResponse.java b/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationInfoQueryResponse.java index 1199651..1e8a8c3 100644 --- a/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationInfoQueryResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationInfoQueryResponse.java @@ -3,16 +3,14 @@ import com.alipay.global.api.model.ams.MerchantRegistrationInfo; import com.alipay.global.api.model.ams.ProductCodeType; import com.alipay.global.api.response.AlipayResponse; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - @Data @EqualsAndHashCode(callSuper = true) public class AlipayMerchantRegistrationInfoQueryResponse extends AlipayResponse { - private MerchantRegistrationInfo merchantInfo; - private List productCodes; - + private MerchantRegistrationInfo merchantInfo; + private List productCodes; } diff --git a/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationResponse.java b/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationResponse.java index 255ffa1..40231c8 100644 --- a/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationResponse.java @@ -8,6 +8,5 @@ @EqualsAndHashCode(callSuper = true) public class AlipayMerchantRegistrationResponse extends AlipayResponse { - private String passThroughInfo; - + private String passThroughInfo; } diff --git a/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationStatusQueryResponse.java b/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationStatusQueryResponse.java index 3d6f195..620571c 100644 --- a/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationStatusQueryResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/merchant/AlipayMerchantRegistrationStatusQueryResponse.java @@ -3,16 +3,14 @@ import com.alipay.global.api.model.ams.PSPRegistrationResult; import com.alipay.global.api.model.ams.RegistrationResult; import com.alipay.global.api.response.AlipayResponse; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - @Data @EqualsAndHashCode(callSuper = true) public class AlipayMerchantRegistrationStatusQueryResponse extends AlipayResponse { - private RegistrationResult registrationResult; - private List pspRegistrationResultList; - + private RegistrationResult registrationResult; + private List pspRegistrationResultList; } diff --git a/src/main/java/com/alipay/global/api/response/ams/order/AlipayCreateOrderResponse.java b/src/main/java/com/alipay/global/api/response/ams/order/AlipayCreateOrderResponse.java index 6b8e65f..77809a6 100644 --- a/src/main/java/com/alipay/global/api/response/ams/order/AlipayCreateOrderResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/order/AlipayCreateOrderResponse.java @@ -7,50 +7,49 @@ @Deprecated public class AlipayCreateOrderResponse extends AlipayResponse { - private String paymentId; - private String paymentRequestId; - private String clientPaymentToken; - private Amount paymentAmount; - private RedirectActionForm redirectActionForm; - - public String getPaymentId() { - return paymentId; - } - - public void setPaymentId(String paymentId) { - this.paymentId = paymentId; - } - - public String getPaymentRequestId() { - return paymentRequestId; - } - - public void setPaymentRequestId(String paymentRequestId) { - this.paymentRequestId = paymentRequestId; - } - - public String getClientPaymentToken() { - return clientPaymentToken; - } - - public void setClientPaymentToken(String clientPaymentToken) { - this.clientPaymentToken = clientPaymentToken; - } - - public Amount getPaymentAmount() { - return paymentAmount; - } - - public void setPaymentAmount(Amount paymentAmount) { - this.paymentAmount = paymentAmount; - } - - public RedirectActionForm getRedirectActionForm() { - return redirectActionForm; - } - - public void setRedirectActionForm(RedirectActionForm redirectActionForm) { - this.redirectActionForm = redirectActionForm; - } - + private String paymentId; + private String paymentRequestId; + private String clientPaymentToken; + private Amount paymentAmount; + private RedirectActionForm redirectActionForm; + + public String getPaymentId() { + return paymentId; + } + + public void setPaymentId(String paymentId) { + this.paymentId = paymentId; + } + + public String getPaymentRequestId() { + return paymentRequestId; + } + + public void setPaymentRequestId(String paymentRequestId) { + this.paymentRequestId = paymentRequestId; + } + + public String getClientPaymentToken() { + return clientPaymentToken; + } + + public void setClientPaymentToken(String clientPaymentToken) { + this.clientPaymentToken = clientPaymentToken; + } + + public Amount getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(Amount paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public RedirectActionForm getRedirectActionForm() { + return redirectActionForm; + } + + public void setRedirectActionForm(RedirectActionForm redirectActionForm) { + this.redirectActionForm = redirectActionForm; + } } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayCaptureResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayCaptureResponse.java index b4711d4..286938e 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayCaptureResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayCaptureResponse.java @@ -1,19 +1,58 @@ +/* + * payments_capture + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.pay; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.Amount; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayCaptureResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayCaptureResponse extends AlipayResponse { - private String captureRequestId; - private String captureId; - private String paymentId; - private Amount captureAmount; - private String captureTime; - private String acquirerReferenceNo; + /** + * The unique ID that is assigned by a merchant to identify a capture request. Note: This + * parameter is returned when the capture status is successful. More information: Maximum length: + * 64 characters + */ + private String captureRequestId; + + /** + * The unique ID that is assigned by Antom to identify a capture. Note: This parameter is returned + * when the capture status is successful. More information: Maximum length: 64 characters + */ + private String captureId; + + /** + * The unique ID that is assigned by Antom to identify a payment. Note: This parameter is returned + * when the capture status is successful. More information: Maximum length: 64 characters + */ + private String paymentId; + + private Amount captureAmount; + + /** + * The time when Antom captures the payment. Note: This parameter is returned when the capture + * status is successful. More information: The value follows the ISO 8601 standard format. For + * example, \"2019-11-27T12:01:01+08:00\". + */ + private String captureTime; + /** + * The unique ID assigned by the non-Antom acquirer for the transaction. More information: Maximum + * length: 64 characters + */ + private String acquirerReferenceNo; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayDeviceCertificateResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayDeviceCertificateResponse.java index d8580b3..ded1f87 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayDeviceCertificateResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayDeviceCertificateResponse.java @@ -7,5 +7,5 @@ @Data @EqualsAndHashCode(callSuper = true) public class AlipayDeviceCertificateResponse extends AlipayResponse { - private String deviceCertificate; + private String deviceCertificate; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayFetchNonceResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayFetchNonceResponse.java index e77c1fb..ca68ae7 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayFetchNonceResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayFetchNonceResponse.java @@ -7,5 +7,5 @@ @Data @EqualsAndHashCode(callSuper = true) public class AlipayFetchNonceResponse extends AlipayResponse { - private String cardToken; + private String cardToken; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquireExchangeRateResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquireExchangeRateResponse.java index b06e556..c1877b0 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquireExchangeRateResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquireExchangeRateResponse.java @@ -1,13 +1,12 @@ package com.alipay.global.api.response.ams.pay; import com.alipay.global.api.model.ams.Quote; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - @Data @EqualsAndHashCode(callSuper = true) -public class AlipayInquireExchangeRateResponse extends AlipayPayResponse{ - private List quotes; +public class AlipayInquireExchangeRateResponse extends AlipayPayResponse { + private List quotes; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquireInstallmentResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquireInstallmentResponse.java index 95c1758..1e972af 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquireInstallmentResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquireInstallmentResponse.java @@ -8,5 +8,5 @@ @Data @EqualsAndHashCode(callSuper = true) public class AlipayInquireInstallmentResponse extends AlipayResponse { - private InstallmentBank installmentBanks; + private InstallmentBank installmentBanks; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquiryRefundResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquiryRefundResponse.java index a1082af..27ed952 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquiryRefundResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayInquiryRefundResponse.java @@ -1,30 +1,59 @@ +/* + * payments_inquiryRefund + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.pay; import com.alipay.global.api.model.ams.*; +import com.alipay.global.api.model.ams.AcquirerInfo; +import com.alipay.global.api.model.ams.Amount; +import com.alipay.global.api.model.ams.Quote; +import com.alipay.global.api.model.ams.TransactionStatusType; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayInquiryRefundResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayInquiryRefundResponse extends AlipayResponse { - private String refundId; - private String refundRequestId; - private Amount refundAmount; - /** - * refundStatus - * -SUCCESS - * -PROCESSING - */ - private TransactionStatusType refundStatus; - private String refundTime; - private Amount grossSettlementAmount; - private Quote settlementQuote; + /** + * The unique ID assigned by Antom to identify a refund. A one-to-one correspondence between + * refundId and refundRequestId exists. Note: This field is null when the refund record cannot be + * found, or result.resultStatus is F or U. + */ + private String refundId; + + /** + * The unique ID assigned by the merchant to identify a refund request. Note: This field is null + * when the refund record cannot be found, or result.resultStatus is F or U. More information: + * Maximum length: 64 characters + */ + private String refundRequestId; + + private Amount refundAmount; + + private TransactionStatusType refundStatus; + + /** + * The date and time when the refund reaches a final state of success on the Antom side, not the + * Alipay+ Mobile Payment Provider (Alipay+ payment methods) side. Note: This field is returned + * when the value of refundStatus is SUCCESS. More information: The value follows the ISO 8601 + * standard format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String refundTime; - private AcquirerInfo acquirerInfo; + private Amount grossSettlementAmount; - private CustomizedInfo customizedInfo; + private Quote settlementQuote; - private String arn; + private AcquirerInfo acquirerInfo; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayCancelResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayCancelResponse.java index 9ce77b0..ddf3e5b 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayCancelResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayCancelResponse.java @@ -1,15 +1,45 @@ +/* + * payments_cancel + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.pay; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayPayCancelResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayPayCancelResponse extends AlipayResponse { - private String paymentId; - private String paymentRequestId; - private String cancelTime; + /** + * The unique ID that is assigned by Antom to identify a payment. Note: This field is returned + * when the cancellation succeeds (the value of result.resultStatus is S). More information: + * Maximum length: 64 characters + */ + private String paymentId; + + /** + * The unique ID that is assigned by a merchant to identify a payment request. Note: This field is + * returned when the cancellation succeeds (the value of result.resultStatus is S). More + * information: Maximum length: 64 characters + */ + private String paymentRequestId; + /** + * The actual execution completion time of the payment cancellation process, which is the date and + * time when the payment cancellation succeeds. Note: This field is returned when the cancellation + * succeeds (the value of result.resultStatus is S). More information: The value follows the ISO + * 8601 standard format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String cancelTime; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayConsultResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayConsultResponse.java index b88fb32..abce679 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayConsultResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayConsultResponse.java @@ -1,19 +1,33 @@ +/* + * Payment API + * Payment API is used for xxx. Refer [doc](https://global.alipay.com/docs/ac/ams/consult) # Auth + * + * The version of the OpenAPI document: 1 + * + * + * 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.global.api.response.ams.pay; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.PaymentMethodInfo; import com.alipay.global.api.model.ams.PaymentOption; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.util.List; +import lombok.*; -@Data +/** AlipayPayConsultResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayPayConsultResponse extends AlipayResponse { - private List paymentOptions; - private List paymentMethodInfos; - private String extendInfo; + /** The payment option list. */ + private List paymentOptions; + + private List paymentMethodInfos; + private String extendInfo; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayQueryResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayQueryResponse.java index ebd82a1..e092960 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayQueryResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayQueryResponse.java @@ -1,54 +1,143 @@ +/* + * payments_ inquiryPayment + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.pay; import com.alipay.global.api.model.ams.*; +import com.alipay.global.api.model.ams.AcquirerInfo; +import com.alipay.global.api.model.ams.Amount; +import com.alipay.global.api.model.ams.CardInfo; +import com.alipay.global.api.model.ams.PspCustomerInfo; +import com.alipay.global.api.model.ams.Quote; +import com.alipay.global.api.model.ams.RedirectActionForm; +import com.alipay.global.api.model.ams.Transaction; +import com.alipay.global.api.model.ams.TransactionStatusType; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.util.List; +import lombok.*; -@Data +/** AlipayPayQueryResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayPayQueryResponse extends AlipayResponse { - private TransactionStatusType paymentStatus; - private String paymentResultCode; - private String paymentResultMessage; - private String paymentRequestId; - private String paymentId; - private String authPaymentId; - private Amount paymentAmount; - private Amount actualPaymentAmount; - private Quote paymentQuote; - private String authExpiryTime; - private String paymentCreateTime; - private String paymentTime; - private Amount nonGuaranteeCouponAmount; - private PspCustomerInfo pspCustomerInfo; - private RedirectActionForm redirectActionForm; + private TransactionStatusType paymentStatus; + + /** + * The result code for different payment statuses. Possible payment result codes are listed in the + * Payment result codes table on this page. Note: This field is returned when the API is called + * successfully (the value of result.resultStatus is S). More information: Maximum length: 64 + * characters + */ + private String paymentResultCode; + + /** + * The result message that explains the payment result code. Note: This field is returned when the + * API is called successfully (the value of result.resultStatus is S). More information: Maximum + * length: 256 characters + */ + private String paymentResultMessage; + + /** + * The unique ID that is assigned by a merchant to identify a payment request. Note: This field is + * returned when the API is called successfully (the value of result.resultStatus is S). More + * information: Maximum length: 64 characters + */ + private String paymentRequestId; + + /** + * The unique ID that is assigned by Antom to identify a payment. Note: This field is returned + * when the API is called successfully (the value of result.resultStatus is S). More information: + * Maximum length: 64 characters + */ + private String paymentId; + + private String authPaymentId; + + private Amount paymentAmount; + + private Amount actualPaymentAmount; + + private Quote paymentQuote; + + /** + * The expiration date and time of the authorization payment. You cannot capture the payment after + * this time. This parameter is returned when the value of paymentMethodType in the pay (Checkout + * Payment) API is CARD. More information about this field: The value follows the ISO 8601 + * standard format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String authExpiryTime; + + /** + * The date and time when the payment is created. Note: This field is returned when the API is + * called successfully (the value of result.resultStatus is S). More information: The value + * follows the ISO 8601 standard format. For example, \"2019-11-27T12:01:01+08:00\". + */ + private String paymentCreateTime; + + /** + * The date and time when the payment reaches a final state of success. Note: This field is + * returned only when the payment reaches a final state of success (the value of paymentStatus is + * SUCCESS). More information: The value follows the ISO 8601 standard format. For example, + * \"2019-11-27T12:01:01+08:00\". + */ + private String paymentTime; + + private Amount nonGuaranteeCouponAmount; + + private PspCustomerInfo pspCustomerInfo; + + private RedirectActionForm redirectActionForm; + + private CardInfo cardInfo; + + /** + * The unique ID assigned by the non-Antom acquirer for the transaction. More information: Maximum + * length: 64 characters + */ + private String acquirerReferenceNo; + + private String extendInfo; + + /** + * Information about the subsequent action against a transaction. Note: This parameter is returned + * when a refund or a capture against the transaction exists. + */ + private List transactions; - private CardInfo cardInfo; + private Amount customsDeclarationAmount; - private String acquirerReferenceNo; - private String extendInfo; - private List transactions; - private Amount customsDeclarationAmount; - private Amount grossSettlementAmount; - private Quote settlementQuote; - private PaymentResultInfo paymentResultInfo; + private Amount grossSettlementAmount; - private AcquirerInfo acquirerInfo; - private String merchantAccountId; + private Quote settlementQuote; - private List promotionResults; + private PaymentResultInfo paymentResultInfo; - private String earliestSettlementTime; + private AcquirerInfo acquirerInfo; - private String paymentMethodType; + private String merchantAccountId; - private String authExpirytime; - private CustomizedInfo customizedInfo; - private Amount processingAmount; + /** + * Promotion result. Note: This parameter is returned when the buyer applied a promotion while + * placing an order. + */ + private List promotionResults; + private String earliestSettlementTime; + /** + * The payment method type that is included in payment method options. See Payment methods to + * check the valid values. Note: This field will be returned when selecting the Antom Chechkout + * Page integration. More information: Maximum length: 64 characters + */ + private String paymentMethodType; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayResponse.java index e614653..5346fff 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPayResponse.java @@ -1,41 +1,123 @@ +/* + * payments_pay + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.pay; import com.alipay.global.api.model.ams.*; +import com.alipay.global.api.model.ams.AcquirerInfo; +import com.alipay.global.api.model.ams.Amount; +import com.alipay.global.api.model.ams.ChallengeActionForm; +import com.alipay.global.api.model.ams.OrderCodeForm; +import com.alipay.global.api.model.ams.PspCustomerInfo; +import com.alipay.global.api.model.ams.Quote; +import com.alipay.global.api.model.ams.RedirectActionForm; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.util.List; +import lombok.*; -@Data +/** AlipayPayResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayPayResponse extends AlipayResponse { - private String paymentRequestId; - private String paymentId; - private Amount paymentAmount; - private String paymentData; - private Amount actualPaymentAmount; - private Quote paymentQuote; - private String paymentTime; - private String paymentCreateTime; - private String authExpiryTime; - private Amount nonGuaranteeCouponValue; - private String paymentActionForm; - private PspCustomerInfo pspCustomerInfo; - private ChallengeActionForm challengeActionForm; - private RedirectActionForm redirectActionForm; - private OrderCodeForm orderCodeForm; - private Amount grossSettlementAmount; - private Quote settlementQuote; - private String extendInfo; - private String normalUrl; - private String schemeUrl; - private String applinkUrl; - private String appIdentifier; - private PaymentResultInfo paymentResultInfo; - private AcquirerInfo acquirerInfo; - private List promotionResult; - private Amount processingAmount; + /** + * The unique ID that is assigned by a merchant to identify a payment request. Note: This field is + * returned when resultCode is PAYMENT_IN_PROCESS. More information: Maximum length: 64 characters + */ + private String paymentRequestId; + + /** + * The unique ID that is assigned by Antom to identify a payment. Note: This field is returned + * when resultCode is PAYMENT_IN_PROCESS. More information: Maximum length: 64 characters + */ + private String paymentId; + + private Amount paymentAmount; + + /** + * Used by the Antom client SDK to render the checkout page. This parameter is returned if the + * merchant app has integrated Antom client SDK. After receiving the parameter, you can call the + * showPaymentSheet API of the Antom client SDK. More information: Maximum length: 20000 + * characters + */ + private String paymentData; + + private Amount actualPaymentAmount; + + private Quote paymentQuote; + + private String paymentTime; + + /** + * The date and time when the payment is created. Note: This field is returned when resultCode is + * PAYMENT_IN_PROCESS. More information: The value follows the ISO 8601 standard format. For + * example, \"2019-11-27T12:01:01+08:00\". + */ + private String paymentCreateTime; + + private String authExpiryTime; + + private Amount nonGuaranteeCouponValue; + + private String paymentActionForm; + + private PspCustomerInfo pspCustomerInfo; + + private ChallengeActionForm challengeActionForm; + + private RedirectActionForm redirectActionForm; + + private OrderCodeForm orderCodeForm; + + private Amount grossSettlementAmount; + + private Quote settlementQuote; + + private String extendInfo; + + /** + * The URL that redirects users to a WAP or WEB page in the default browser or the embedded + * WebView. Note: When the value of resultCode is ​PAYMENT_IN_PROCESS​, at least one of schemeUrl, + * applinkUrl, and normalUrl is to be returned. More information: Maximum length: 2048 characters + */ + private String normalUrl; + + /** + * The URL scheme that redirects users to open an app in an Android or iOS system when the target + * app is installed. Note: When the value of resultCode is ​PAYMENT_IN_PROCESS​, at least one of + * schemeUrl, applinkUrl, and normalUrl is to be returned. More information: Maximum length: 2048 + * characters + */ + private String schemeUrl; + + /** + * The URL that redirects users to open an app when the target app is installed, or to open a WAP + * page when the target app is not installed. For Android, the URL is a Native App Link. For iOS, + * the URL is a Universal Link. Note: When the value of resultCode is ​PAYMENT_IN_PROCESS​, at + * least one of schemeUrl, applinkUrl, and normalUrl is to be returned. More information: Maximum + * length: 2048 characters + */ + private String applinkUrl; + + /** + * Android package name, which is used by Android apps to open a cashier page. Note: This field is + * returned when resultCode is ​PAYMENT_IN_PROCESS​ and terminalType is APP or WAP. + */ + private String appIdentifier; + + private PaymentResultInfo paymentResultInfo; + + private AcquirerInfo acquirerInfo; + /** Promotion result. */ + private List promotionResult; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPaymentSessionResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPaymentSessionResponse.java index caf3361..929cc90 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPaymentSessionResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayPaymentSessionResponse.java @@ -1,21 +1,48 @@ +/* + * payments_createPaymentSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.pay; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayPaymentSessionResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayPaymentSessionResponse extends AlipayResponse { - private String paymentSessionData; - - private String paymentSessionExpiryTime; - - private String paymentSessionId; - - private String normalUrl; - - private String url; - + /** + * The encrypted payment session data. Pass the data to your front end to initiate the client-side + * SDK. More information: Maximum length: 4096 characters + */ + private String paymentSessionData; + + /** + * The specific date and time after which the payment session will expire. More information: The + * value follows the ISO 8601 standard format. For example, + * \"2019-11-27T12:01:01+08:00\". + */ + private String paymentSessionExpiryTime; + + /** + * The encrypted ID that is assigned by Antom to identify a payment session. More information: + * Maximum length: 64 characters + */ + private String paymentSessionId; + + /** + * The URL used to redirect to the Checkout Page. More information: Maximum length: 2048 + * characters + */ + private String normalUrl; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayRefundResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayRefundResponse.java index 2ffee64..f925d2e 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayRefundResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayRefundResponse.java @@ -1,25 +1,71 @@ +/* + * payments_refund + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.pay; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.AcquirerInfo; import com.alipay.global.api.model.ams.Amount; import com.alipay.global.api.model.ams.Quote; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayRefundResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayRefundResponse extends AlipayResponse { - private String refundRequestId; - private String refundId; - private String paymentId; - private Amount refundAmount; - private String refundTime; - private Amount refundNonGuaranteeCouponAmount; - private Amount grossSettlementAmount; - private Quote settlementQuote; - private AcquirerInfo acquirerInfo; - private String acquirerReferenceNo; + /** + * The unique ID that is assigned by the merchant to identify a refund request. Note: This field + * is returned when the refund succeeds (the value of result.resultStatus is S). More information: + * Maximum length: 64 characters + */ + private String refundRequestId; + + /** + * The unique ID that is assigned by Antom to identify a refund. A one-to-one correspondence + * between refundId and refundRequestId exists. Note: This field is returned when the refund + * succeeds (the value of result.resultStatus is S). More information: Maximum length: 64 + * characters + */ + private String refundId; + + /** + * The unique ID assigned by Antom for the original payment to be refunded. Note: This field is + * returned when the refund succeeds (the value of result.resultStatus is S). More information: + * Maximum length: 64 characters + */ + private String paymentId; + + private Amount refundAmount; + + /** + * The date and time when the refund reaches the state of success, failure, or unknown. More + * information: The value follows the ISO 8601 standard format. For example, + * \"2019-11-27T12:01:01+08:00\". + */ + private String refundTime; + + private Amount refundNonGuaranteeCouponAmount; + + private Amount grossSettlementAmount; + + private Quote settlementQuote; + + private AcquirerInfo acquirerInfo; + /** + * The unique ID assigned by the non-Antom acquirer for the transaction. More information: Maximum + * length: 64 characters + */ + private String acquirerReferenceNo; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayRetrievePaymentSessionResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayRetrievePaymentSessionResponse.java index 3f054dc..bd83a3f 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayRetrievePaymentSessionResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayRetrievePaymentSessionResponse.java @@ -3,15 +3,14 @@ import com.alipay.global.api.model.ams.Order; import com.alipay.global.api.model.ams.PromotionResult; import com.alipay.global.api.response.AlipayResponse; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - @Data @EqualsAndHashCode(callSuper = true) public class AlipayRetrievePaymentSessionResponse extends AlipayResponse { - private Order order; - private List promotionResults; - private String customizedInfo; + private Order order; + private List promotionResults; + private String customizedInfo; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipaySyncArrearResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipaySyncArrearResponse.java index fabb67c..4c040a0 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipaySyncArrearResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipaySyncArrearResponse.java @@ -6,5 +6,4 @@ @Data @EqualsAndHashCode(callSuper = true) -public class AlipaySyncArrearResponse extends AlipayResponse { -} +public class AlipaySyncArrearResponse extends AlipayResponse {} diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayUploadInvoiceShippingFileResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayUploadInvoiceShippingFileResponse.java index 98c53f1..6a2e812 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayUploadInvoiceShippingFileResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayUploadInvoiceShippingFileResponse.java @@ -2,5 +2,4 @@ import com.alipay.global.api.response.AlipayResponse; -public class AlipayUploadInvoiceShippingFileResponse extends AlipayResponse { -} +public class AlipayUploadInvoiceShippingFileResponse extends AlipayResponse {} diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingPaymentMethodResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingPaymentMethodResponse.java index 67bd413..9470cf8 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingPaymentMethodResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingPaymentMethodResponse.java @@ -1,22 +1,54 @@ +/* + * vaults_vaultPaymentMethod + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.pay; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.PaymentMethodDetail; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayVaultingPaymentMethodResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayVaultingPaymentMethodResponse extends AlipayResponse { - private String vaultingRequestId; - - private PaymentMethodDetail paymentMethodDetail; - - private String normalUrl; - - private String schemeUrl; - - private String applinkUrl; - + /** + * The unique ID that is assigned by a merchant to identify a card vaulting request. More + * information: Maximum length: 64 characters + */ + private String vaultingRequestId; + + private PaymentMethodDetail paymentMethodDetail; + + /** + * The URL that redirects the user to a WAP or WEB page in the default browser or the embedded + * WebView. Note: When the value of result.resultCode is VERIFICATION_IN_PROCESS, one or more of + * the following URLs may be returned: schemeUrl, appLinkUrl, and normalUrl. When the value of + * paymentMethodType is CARD, the user is required to complete the 3DS authentication on the page + * accessed through this URL. More information: Maximum length: 2048 characters + */ + private String normalUrl; + + /** + * The URL scheme that redirects the user to open an app in an Android or iOS system when the + * target app is installed. More information: Maximum length: 2048 characters + */ + private String schemeUrl; + + /** + * The URL that redirects the user to open an app when the target app is installed, or to open a + * WAP page when the target app is not installed. More information: Maximum length: 2048 + * characters + */ + private String applinkUrl; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingQueryResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingQueryResponse.java index ffab4f9..697313b 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingQueryResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingQueryResponse.java @@ -1,24 +1,67 @@ +/* + * vaults_inquireVaulting + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.pay; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.model.ams.PaymentMethodDetail; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayVaultingQueryResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayVaultingQueryResponse extends AlipayResponse { - private String vaultingRequestId; - - private String normalUrl; + /** + * The unique ID that is assigned by a merchant to identify a card vaulting request. More + * information: Maximum length: 64 characters + */ + private String vaultingRequestId; - private String schemeUrl; + /** + * The URL that redirects users to a WAP or WEB page in the default browser or the embedded + * WebView. Note: When the value of result.resultStatus is S and the value of vaultingStatus is + * PROCESSING, one or more of the following URLs may be returned: schemeUrl, applinkUrl, and + * normalUrl. When the value of paymentMethodType is CARD, the user is required to complete the + * 3DS authentication on the page accessed through this URL. More information: Maximum length: + * 2048 characters + */ + private String normalUrl; - private String applinkUrl; + /** + * The URL scheme that redirects users to open an App in an Android or iOS system when the target + * App is installed. Note: When the value of result.resultStatus is S and the value of + * vaultingStatus is PROCESSING, one or more of the following URLs may be returned: schemeUrl, + * applinkUrl, and normalUrl. More information: Maximum length: 2048 characters + */ + private String schemeUrl; - private String vaultingStatus; + /** + * The URL that redirects users to open an app when the target app is installed, or to open a WAP + * page when the target app is not installed. For Android, the URL is a Native App Link. For iOS, + * the URL is a Universal Link. Note: When the value of result.resultStatus is S and the value of + * vaultingStatus is PROCESSING, one or more of the following URLs may be returned: schemeUrl, + * applinkUrl, and normalUrl. More information: Maximum length: 2048 characters + */ + private String applinkUrl; - private PaymentMethodDetail paymentMethodDetail; + /** + * Indicates the payment method's vaulting status. Valid values are: SUCCESS: indicates that + * the vaulting is successful. FAIL: indicates that the vaulting failed. PROCESSING: indicates + * that the vaulting is under process. This parameter is returned when the value of + * result.resultStatus is S. More information: Maximum length: 10 characters + */ + private String vaultingStatus; + private PaymentMethodDetail paymentMethodDetail; } diff --git a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingSessionResponse.java b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingSessionResponse.java index 3eb358e..e04d648 100644 --- a/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingSessionResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/pay/AlipayVaultingSessionResponse.java @@ -1,16 +1,42 @@ +/* + * vaults_createVaultingSession + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.pay; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipayVaultingSessionResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipayVaultingSessionResponse extends AlipayResponse { - private String normalUrl; - private String vaultingSessionData; - private String vaultingSessionId; - private String vaultingSessionExpiryTime; + /** + * The encrypted vaulting session data. Pass the data to your front end to initiate the + * client-side SDK. More information: Maximum length: 4096 characters + */ + private String vaultingSessionData; + + /** + * The encrypted ID is assigned by Antom to identify a vaulting session. More information: Maximum + * length: 64 characters + */ + private String vaultingSessionId; -} \ No newline at end of file + /** + * The specific date and time after which the vaulting session will expire. More information: The + * value follows the ISO 8601 standard format. For example, + * \"2019-11-27T12:01:01+08:00\". + */ + private String vaultingSessionExpiryTime; +} diff --git a/src/main/java/com/alipay/global/api/response/ams/risk/AlipayRiskScoreInquiryResponse.java b/src/main/java/com/alipay/global/api/response/ams/risk/AlipayRiskScoreInquiryResponse.java index 32751f2..12b9ab3 100644 --- a/src/main/java/com/alipay/global/api/response/ams/risk/AlipayRiskScoreInquiryResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/risk/AlipayRiskScoreInquiryResponse.java @@ -2,16 +2,14 @@ import com.alipay.global.api.model.ams.RiskScoreResult; import com.alipay.global.api.response.AlipayResponse; +import java.util.List; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.List; - @Data @EqualsAndHashCode(callSuper = true) @Deprecated public class AlipayRiskScoreInquiryResponse extends AlipayResponse { - private List riskScoreResults; - + private List riskScoreResults; } diff --git a/src/main/java/com/alipay/global/api/response/ams/risk/RiskDecideResponse.java b/src/main/java/com/alipay/global/api/response/ams/risk/RiskDecideResponse.java index c12cb8c..e06e6cf 100644 --- a/src/main/java/com/alipay/global/api/response/ams/risk/RiskDecideResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/risk/RiskDecideResponse.java @@ -7,30 +7,21 @@ import lombok.Data; import lombok.EqualsAndHashCode; -/** - * The response of Ant Group's risk decide API. - * 调用蚂蚁集团风控实时决策接口的响应结果。 - */ +/** The response of Ant Group's risk decide API. 调用蚂蚁集团风控实时决策接口的响应结果。 */ @Data @EqualsAndHashCode(callSuper = true) public class RiskDecideResponse extends RiskResponse { - /** - * Ant Group's risk decisions. Valid values are as follows: - * ACCEPT: indicates that the payment is accepted. - * REJECT: indicates that the payment is rejected. - * 蚂蚁集团的风控决策。有效值为: - * ACCEPT:表示建议接受该笔支付。 - * REJECT:表示建议拒绝该笔支付。 - */ - private String decision; - /** - * Ant Group's recommended authentication method. Valid values are as follows: - * 3D: 3D authentication is recommended for this transaction. - * NON_3D: Non-3D authentication is recommended for this transaction. - * * 蚂蚁集团推荐的身份验证方法。有效值为: - * * 3D:本次交易建议使用 3D 认证。 - * * NON_3D:本次交易建议使用非 3D 认证。 - */ - private String authenticationDecision; - -} \ No newline at end of file + /** + * Ant Group's risk decisions. Valid values are as follows: ACCEPT: indicates that the payment is + * accepted. REJECT: indicates that the payment is rejected. 蚂蚁集团的风控决策。有效值为: ACCEPT:表示建议接受该笔支付。 + * REJECT:表示建议拒绝该笔支付。 + */ + private String decision; + /** + * Ant Group's recommended authentication method. Valid values are as follows: 3D: 3D + * authentication is recommended for this transaction. NON_3D: Non-3D authentication is + * recommended for this transaction. * 蚂蚁集团推荐的身份验证方法。有效值为: * 3D:本次交易建议使用 3D 认证。 * NON_3D:本次交易建议使用非 + * 3D 认证。 + */ + private String authenticationDecision; +} diff --git a/src/main/java/com/alipay/global/api/response/ams/risk/RiskReportResponse.java b/src/main/java/com/alipay/global/api/response/ams/risk/RiskReportResponse.java index d496159..ae13652 100644 --- a/src/main/java/com/alipay/global/api/response/ams/risk/RiskReportResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/risk/RiskReportResponse.java @@ -7,11 +7,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; -/** - * The response of Ant Group's risk report API. - * 调用蚂蚁集团风控风险上报接口的响应结果。 - */ +/** The response of Ant Group's risk report API. 调用蚂蚁集团风控风险上报接口的响应结果。 */ @Data @EqualsAndHashCode(callSuper = true) -public class RiskReportResponse extends RiskResponse { -} \ No newline at end of file +public class RiskReportResponse extends RiskResponse {} diff --git a/src/main/java/com/alipay/global/api/response/ams/risk/RiskResponse.java b/src/main/java/com/alipay/global/api/response/ams/risk/RiskResponse.java index 286b86a..3a3b827 100644 --- a/src/main/java/com/alipay/global/api/response/ams/risk/RiskResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/risk/RiskResponse.java @@ -12,6 +12,5 @@ @EqualsAndHashCode(callSuper = true) public class RiskResponse extends AlipayResponse { - private String securityId; - -} \ No newline at end of file + private String securityId; +} diff --git a/src/main/java/com/alipay/global/api/response/ams/risk/SendPaymentResultResponse.java b/src/main/java/com/alipay/global/api/response/ams/risk/SendPaymentResultResponse.java index cff449f..c5e94c9 100644 --- a/src/main/java/com/alipay/global/api/response/ams/risk/SendPaymentResultResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/risk/SendPaymentResultResponse.java @@ -7,11 +7,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; -/** - * The response of Ant Group's risk send payment result API. - * 调用蚂蚁集团风控支付结果通知接口的响应结果。 - */ +/** The response of Ant Group's risk send payment result API. 调用蚂蚁集团风控支付结果通知接口的响应结果。 */ @Data @EqualsAndHashCode(callSuper = true) -public class SendPaymentResultResponse extends RiskResponse { -} \ No newline at end of file +public class SendPaymentResultResponse extends RiskResponse {} diff --git a/src/main/java/com/alipay/global/api/response/ams/risk/SendRefundResultResponse.java b/src/main/java/com/alipay/global/api/response/ams/risk/SendRefundResultResponse.java index 5d2987a..2e9146e 100644 --- a/src/main/java/com/alipay/global/api/response/ams/risk/SendRefundResultResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/risk/SendRefundResultResponse.java @@ -7,11 +7,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; -/** - * The response of Ant Group's risk send refund result API. - * 调用蚂蚁集团风控退款结果通知接口的响应结果。 - */ +/** The response of Ant Group's risk send refund result API. 调用蚂蚁集团风控退款结果通知接口的响应结果。 */ @Data @EqualsAndHashCode(callSuper = true) -public class SendRefundResultResponse extends RiskResponse { -} \ No newline at end of file +public class SendRefundResultResponse extends RiskResponse {} diff --git a/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionCancelResponse.java b/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionCancelResponse.java index 8b6e556..a2c97d2 100644 --- a/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionCancelResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionCancelResponse.java @@ -1,10 +1,22 @@ +/* + * subscriptions_cancel + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.subscription; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipaySubscriptionCancelResponse */ @EqualsAndHashCode(callSuper = true) -public class AlipaySubscriptionCancelResponse extends AlipayResponse { -} +@Data +public class AlipaySubscriptionCancelResponse extends AlipayResponse {} diff --git a/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionChangeResponse.java b/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionChangeResponse.java index 8fbbc97..54b5abc 100644 --- a/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionChangeResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionChangeResponse.java @@ -1,10 +1,22 @@ +/* + * subscriptions_change + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.subscription; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipaySubscriptionChangeResponse */ @EqualsAndHashCode(callSuper = true) -public class AlipaySubscriptionChangeResponse extends AlipayResponse { -} +@Data +public class AlipaySubscriptionChangeResponse extends AlipayResponse {} diff --git a/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionCreateResponse.java b/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionCreateResponse.java index 7113e65..d4df50f 100644 --- a/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionCreateResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionCreateResponse.java @@ -1,19 +1,53 @@ +/* + * subscriptions_create + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.subscription; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; -import lombok.Data; -import lombok.EqualsAndHashCode; +import lombok.*; -@Data +/** AlipaySubscriptionCreateResponse */ @EqualsAndHashCode(callSuper = true) +@Data public class AlipaySubscriptionCreateResponse extends AlipayResponse { - private String schemeUrl; - - private String applinkUrl; + /** + * The URL scheme that redirects users to open an app in an Android or iOS system when the target + * app is installed. Note: When the value of result.resultCode is S, at least one of schemeUrl, + * applinkUrl, and normalUrl is to be returned. More information: Maximum length: 2048 characters + */ + private String schemeUrl; - private String normalUrl; + /** + * The URL that redirects users to open an app when the target app is installed, or to open a WAP + * page when the target app is not installed. For Android, the URL is a Native App Link. For iOS, + * the URL is a Universal Link. Note: When the value of result.resultCode is S, at least one of + * schemeUrl, applinkUrl, and normalUrl is to be returned. More information: Maximum length: 2048 + * characters + */ + private String applinkUrl; - private String appIdentifier; + /** + * The URL that redirects users to a WAP or Web page in the default browser or the embedded + * WebView. Note: When the value of result.resultCode is S, at least one of schemeUrl, applinkUrl, + * and normalUrl is to be returned. More information: Maximum length: 2048 characters + */ + private String normalUrl; + /** + * An Android package name, which is used for Android app to open a cashier page. Note: This field + * is returned when result.resultCode is S and terminalType is APP or WAP. More information: + * Maximum length: 128 characters + */ + private String appIdentifier; } diff --git a/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionInquireResponse.java b/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionInquireResponse.java index 76463e0..2cbe2cc 100644 --- a/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionInquireResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionInquireResponse.java @@ -6,18 +6,17 @@ import lombok.Data; import lombok.EqualsAndHashCode; - @Data @EqualsAndHashCode(callSuper = true) public class AlipaySubscriptionInquireResponse extends AlipayResponse { - private String subscriptionId; - private String subscriptionRequestId; - private String subscriptionStatus; - private Amount paymentAmount; - private Boolean allowAccumulate; - private Amount maxAccumulateAmount; - private PeriodRule periodRule; - private String phaseNo; - private String subscriptionStartTime; - private String subscriptionEndTime; + private String subscriptionId; + private String subscriptionRequestId; + private String subscriptionStatus; + private Amount paymentAmount; + private Boolean allowAccumulate; + private Amount maxAccumulateAmount; + private PeriodRule periodRule; + private String phaseNo; + private String subscriptionStartTime; + private String subscriptionEndTime; } diff --git a/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionUpdateResponse.java b/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionUpdateResponse.java index d766df9..3f7d717 100644 --- a/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionUpdateResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/subscription/AlipaySubscriptionUpdateResponse.java @@ -1,6 +1,22 @@ +/* + * subscriptions_update + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * 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.global.api.response.ams.subscription; +import com.alipay.global.api.model.ams.*; import com.alipay.global.api.response.AlipayResponse; +import lombok.*; -public class AlipaySubscriptionUpdateResponse extends AlipayResponse { -} +/** AlipaySubscriptionUpdateResponse */ +@EqualsAndHashCode(callSuper = true) +@Data +public class AlipaySubscriptionUpdateResponse extends AlipayResponse {} diff --git a/src/main/java/com/alipay/global/api/response/ams/users/AlipayInitAuthenticationResponse.java b/src/main/java/com/alipay/global/api/response/ams/users/AlipayInitAuthenticationResponse.java index cb912fb..05ae0cb 100644 --- a/src/main/java/com/alipay/global/api/response/ams/users/AlipayInitAuthenticationResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/users/AlipayInitAuthenticationResponse.java @@ -8,6 +8,5 @@ @EqualsAndHashCode(callSuper = true) public class AlipayInitAuthenticationResponse extends AlipayResponse { - private String authenticationRequestId; - + private String authenticationRequestId; } diff --git a/src/main/java/com/alipay/global/api/response/ams/users/AlipayUserQueryInfoResponse.java b/src/main/java/com/alipay/global/api/response/ams/users/AlipayUserQueryInfoResponse.java index c01d6ac..a1fb2a4 100644 --- a/src/main/java/com/alipay/global/api/response/ams/users/AlipayUserQueryInfoResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/users/AlipayUserQueryInfoResponse.java @@ -8,8 +8,7 @@ @EqualsAndHashCode(callSuper = true) public class AlipayUserQueryInfoResponse extends AlipayResponse { - private String userId; - private String userLoginId; - private String hashUserLoginId; - + private String userId; + private String userLoginId; + private String hashUserLoginId; } diff --git a/src/main/java/com/alipay/global/api/response/ams/users/AlipayVerifyAuthenticationResponse.java b/src/main/java/com/alipay/global/api/response/ams/users/AlipayVerifyAuthenticationResponse.java index a25dd53..8d0b52d 100644 --- a/src/main/java/com/alipay/global/api/response/ams/users/AlipayVerifyAuthenticationResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/users/AlipayVerifyAuthenticationResponse.java @@ -8,6 +8,5 @@ @EqualsAndHashCode(callSuper = true) public class AlipayVerifyAuthenticationResponse extends AlipayResponse { - private boolean isPassed; - -} \ No newline at end of file + private boolean isPassed; +} diff --git a/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayDeleteTokenResponse.java b/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayDeleteTokenResponse.java index 33c4024..f5c8abf 100644 --- a/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayDeleteTokenResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayDeleteTokenResponse.java @@ -6,5 +6,4 @@ @Data @EqualsAndHashCode(callSuper = true) -public class AlipayDeleteTokenResponse extends AlipayResponse { -} +public class AlipayDeleteTokenResponse extends AlipayResponse {} diff --git a/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayUpdateTokenResponse.java b/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayUpdateTokenResponse.java index 52d90f1..87a1416 100644 --- a/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayUpdateTokenResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayUpdateTokenResponse.java @@ -7,5 +7,5 @@ @Data @EqualsAndHashCode(callSuper = true) public class AlipayUpdateTokenResponse extends AlipayResponse { - private String token; + private String token; } diff --git a/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayVaultingInquireTokenResponse.java b/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayVaultingInquireTokenResponse.java index 13df297..4d6fdcf 100644 --- a/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayVaultingInquireTokenResponse.java +++ b/src/main/java/com/alipay/global/api/response/ams/vaults/AlipayVaultingInquireTokenResponse.java @@ -8,10 +8,10 @@ @Data @EqualsAndHashCode(callSuper = true) public class AlipayVaultingInquireTokenResponse extends AlipayResponse { - private String token; - private UserName accountHolderName; - private String email; - private String issuerName; - private String issuingCountry; - private String tokenExpiryTime; + private String token; + private UserName accountHolderName; + private String email; + private String issuerName; + private String issuingCountry; + private String tokenExpiryTime; } diff --git a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsCancelPaymentResponse.java b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsCancelPaymentResponse.java index 69ce05e..6319383 100644 --- a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsCancelPaymentResponse.java +++ b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsCancelPaymentResponse.java @@ -4,23 +4,22 @@ public class AlipayApsCancelPaymentResponse extends AlipayResponse { - private String pspId; - private String acquirerId; + private String pspId; + private String acquirerId; - public String getPspId() { - return pspId; - } + public String getPspId() { + return pspId; + } - public void setPspId(String pspId) { - this.pspId = pspId; - } + public void setPspId(String pspId) { + this.pspId = pspId; + } - public String getAcquirerId() { - return acquirerId; - } - - public void setAcquirerId(String acquirerId) { - this.acquirerId = acquirerId; - } + public String getAcquirerId() { + return acquirerId; + } + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } } diff --git a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsConsultPaymentResponse.java b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsConsultPaymentResponse.java index 0380d03..6410074 100644 --- a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsConsultPaymentResponse.java +++ b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsConsultPaymentResponse.java @@ -2,19 +2,17 @@ import com.alipay.global.api.model.aps.PaymentOption; import com.alipay.global.api.response.AlipayResponse; - import java.util.List; public class AlipayApsConsultPaymentResponse extends AlipayResponse { - private List paymentOptions; - - public List getPaymentOptions() { - return paymentOptions; - } + private List paymentOptions; - public void setPaymentOptions(List paymentOptions) { - this.paymentOptions = paymentOptions; - } + public List getPaymentOptions() { + return paymentOptions; + } + public void setPaymentOptions(List paymentOptions) { + this.paymentOptions = paymentOptions; + } } diff --git a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsInquiryPaymentResponse.java b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsInquiryPaymentResponse.java index 560924c..d20ed5e 100644 --- a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsInquiryPaymentResponse.java +++ b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsInquiryPaymentResponse.java @@ -5,117 +5,116 @@ import com.alipay.global.api.model.aps.Quote; import com.alipay.global.api.model.aps.Transaction; import com.alipay.global.api.response.AlipayResponse; - import java.util.List; public class AlipayApsInquiryPaymentResponse extends AlipayResponse { - private String acquirerId; - private String pspId; - private Result paymentResult; - private String paymentRequestId; - private String paymentId; - private Amount paymentAmount; - private String paymentTime; - private String customerId; - private String walletBrandName; - private List transactions; - private Amount settlementAmount; - private Quote settlementQuote; - - public Result getPaymentResult() { - return paymentResult; - } - - public void setPaymentResult(Result paymentResult) { - this.paymentResult = paymentResult; - } - - public String getAcquirerId() { - return acquirerId; - } - - public void setAcquirerId(String acquirerId) { - this.acquirerId = acquirerId; - } - - public String getPspId() { - return pspId; - } - - public void setPspId(String pspId) { - this.pspId = pspId; - } - - public String getPaymentRequestId() { - return paymentRequestId; - } - - public void setPaymentRequestId(String paymentRequestId) { - this.paymentRequestId = paymentRequestId; - } - - public String getPaymentId() { - return paymentId; - } - - public void setPaymentId(String paymentId) { - this.paymentId = paymentId; - } - - public Amount getPaymentAmount() { - return paymentAmount; - } - - public void setPaymentAmount(Amount paymentAmount) { - this.paymentAmount = paymentAmount; - } - - public String getPaymentTime() { - return paymentTime; - } - - public void setPaymentTime(String paymentTime) { - this.paymentTime = paymentTime; - } - - public String getCustomerId() { - return customerId; - } - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - public String getWalletBrandName() { - return walletBrandName; - } - - public void setWalletBrandName(String walletBrandName) { - this.walletBrandName = walletBrandName; - } - - public List getTransactions() { - return transactions; - } - - public void setTransactions(List transactions) { - this.transactions = transactions; - } - - public Amount getSettlementAmount() { - return settlementAmount; - } - - public void setSettlementAmount(Amount settlementAmount) { - this.settlementAmount = settlementAmount; - } - - public Quote getSettlementQuote() { - return settlementQuote; - } - - public void setSettlementQuote(Quote settlementQuote) { - this.settlementQuote = settlementQuote; - } + private String acquirerId; + private String pspId; + private Result paymentResult; + private String paymentRequestId; + private String paymentId; + private Amount paymentAmount; + private String paymentTime; + private String customerId; + private String walletBrandName; + private List transactions; + private Amount settlementAmount; + private Quote settlementQuote; + + public Result getPaymentResult() { + return paymentResult; + } + + public void setPaymentResult(Result paymentResult) { + this.paymentResult = paymentResult; + } + + public String getAcquirerId() { + return acquirerId; + } + + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } + + public String getPspId() { + return pspId; + } + + public void setPspId(String pspId) { + this.pspId = pspId; + } + + public String getPaymentRequestId() { + return paymentRequestId; + } + + public void setPaymentRequestId(String paymentRequestId) { + this.paymentRequestId = paymentRequestId; + } + + public String getPaymentId() { + return paymentId; + } + + public void setPaymentId(String paymentId) { + this.paymentId = paymentId; + } + + public Amount getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(Amount paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String getPaymentTime() { + return paymentTime; + } + + public void setPaymentTime(String paymentTime) { + this.paymentTime = paymentTime; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getWalletBrandName() { + return walletBrandName; + } + + public void setWalletBrandName(String walletBrandName) { + this.walletBrandName = walletBrandName; + } + + public List getTransactions() { + return transactions; + } + + public void setTransactions(List transactions) { + this.transactions = transactions; + } + + public Amount getSettlementAmount() { + return settlementAmount; + } + + public void setSettlementAmount(Amount settlementAmount) { + this.settlementAmount = settlementAmount; + } + + public Quote getSettlementQuote() { + return settlementQuote; + } + + public void setSettlementQuote(Quote settlementQuote) { + this.settlementQuote = settlementQuote; + } } diff --git a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsNotifyPaymentResponse.java b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsNotifyPaymentResponse.java index f0337a7..81a6e93 100644 --- a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsNotifyPaymentResponse.java +++ b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsNotifyPaymentResponse.java @@ -2,7 +2,4 @@ import com.alipay.global.api.response.AlipayResponse; -public class AlipayApsNotifyPaymentResponse extends AlipayResponse { - - -} +public class AlipayApsNotifyPaymentResponse extends AlipayResponse {} diff --git a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsPayResponse.java b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsPayResponse.java index 0730d0a..679374b 100644 --- a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsPayResponse.java +++ b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsPayResponse.java @@ -6,85 +6,85 @@ public class AlipayApsPayResponse extends AlipayResponse { - private String acquirerId; - private String paymentId; - private String paymentTime; - private String paymentUrl; - private Amount paymentAmount; - private OrderCodeForm orderCodeForm; - private String customerId; - private String pspId; - private String walletBrandName; - - public String getAcquirerId() { - return acquirerId; - } - - public void setAcquirerId(String acquirerId) { - this.acquirerId = acquirerId; - } - - public String getPaymentId() { - return paymentId; - } - - public void setPaymentId(String paymentId) { - this.paymentId = paymentId; - } - - public String getPaymentTime() { - return paymentTime; - } - - public void setPaymentTime(String paymentTime) { - this.paymentTime = paymentTime; - } - - public Amount getPaymentAmount() { - return paymentAmount; - } - - public void setPaymentAmount(Amount paymentAmount) { - this.paymentAmount = paymentAmount; - } - - public String getPaymentUrl() { - return paymentUrl; - } - - public void setPaymentUrl(String paymentUrl) { - this.paymentUrl = paymentUrl; - } - - public OrderCodeForm getOrderCodeForm() { - return orderCodeForm; - } - - public void setOrderCodeForm(OrderCodeForm orderCodeForm) { - this.orderCodeForm = orderCodeForm; - } - - public String getCustomerId() { - return customerId; - } - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - public String getPspId() { - return pspId; - } - - public void setPspId(String pspId) { - this.pspId = pspId; - } - - public String getWalletBrandName() { - return walletBrandName; - } - - public void setWalletBrandName(String walletBrandName) { - this.walletBrandName = walletBrandName; - } + private String acquirerId; + private String paymentId; + private String paymentTime; + private String paymentUrl; + private Amount paymentAmount; + private OrderCodeForm orderCodeForm; + private String customerId; + private String pspId; + private String walletBrandName; + + public String getAcquirerId() { + return acquirerId; + } + + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } + + public String getPaymentId() { + return paymentId; + } + + public void setPaymentId(String paymentId) { + this.paymentId = paymentId; + } + + public String getPaymentTime() { + return paymentTime; + } + + public void setPaymentTime(String paymentTime) { + this.paymentTime = paymentTime; + } + + public Amount getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(Amount paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String getPaymentUrl() { + return paymentUrl; + } + + public void setPaymentUrl(String paymentUrl) { + this.paymentUrl = paymentUrl; + } + + public OrderCodeForm getOrderCodeForm() { + return orderCodeForm; + } + + public void setOrderCodeForm(OrderCodeForm orderCodeForm) { + this.orderCodeForm = orderCodeForm; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getPspId() { + return pspId; + } + + public void setPspId(String pspId) { + this.pspId = pspId; + } + + public String getWalletBrandName() { + return walletBrandName; + } + + public void setWalletBrandName(String walletBrandName) { + this.walletBrandName = walletBrandName; + } } diff --git a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsUserInitiatedPayResponse.java b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsUserInitiatedPayResponse.java index 51fae43..225246c 100644 --- a/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsUserInitiatedPayResponse.java +++ b/src/main/java/com/alipay/global/api/response/aps/pay/AlipayApsUserInitiatedPayResponse.java @@ -5,87 +5,85 @@ public class AlipayApsUserInitiatedPayResponse extends AlipayResponse { - private CodeType codeType; - private String paymentRequestId; - private Order order; - private PaymentFactor paymentFactor; - private Amount amount; - private String paymentNotifyUrl; - private String paymentRedirectUrl; - private String paymentExpiryTime; - private SettlementStrategy settlementStrategy; - - public CodeType getCodeType() { - return codeType; - } - - public void setCodeType(CodeType codeType) { - this.codeType = codeType; - } - - public String getPaymentRequestId() { - return paymentRequestId; - } - - public void setPaymentRequestId(String paymentRequestId) { - this.paymentRequestId = paymentRequestId; - } - - public Order getOrder() { - return order; - } - - public void setOrder(Order order) { - this.order = order; - } - - public PaymentFactor getPaymentFactor() { - return paymentFactor; - } - - public void setPaymentFactor(PaymentFactor paymentFactor) { - this.paymentFactor = paymentFactor; - } - - public Amount getAmount() { - return amount; - } - - public void setAmount(Amount amount) { - this.amount = amount; - } - - public String getPaymentNotifyUrl() { - return paymentNotifyUrl; - } - - public void setPaymentNotifyUrl(String paymentNotifyUrl) { - this.paymentNotifyUrl = paymentNotifyUrl; - } - - public String getPaymentRedirectUrl() { - return paymentRedirectUrl; - } - - public void setPaymentRedirectUrl(String paymentRedirectUrl) { - this.paymentRedirectUrl = paymentRedirectUrl; - } - - public String getPaymentExpiryTime() { - return paymentExpiryTime; - } - - public void setPaymentExpiryTime(String paymentExpiryTime) { - this.paymentExpiryTime = paymentExpiryTime; - } - - public SettlementStrategy getSettlementStrategy() { - return settlementStrategy; - } - - public void setSettlementStrategy(SettlementStrategy settlementStrategy) { - this.settlementStrategy = settlementStrategy; - } - + private CodeType codeType; + private String paymentRequestId; + private Order order; + private PaymentFactor paymentFactor; + private Amount amount; + private String paymentNotifyUrl; + private String paymentRedirectUrl; + private String paymentExpiryTime; + private SettlementStrategy settlementStrategy; + + public CodeType getCodeType() { + return codeType; + } + + public void setCodeType(CodeType codeType) { + this.codeType = codeType; + } + + public String getPaymentRequestId() { + return paymentRequestId; + } + + public void setPaymentRequestId(String paymentRequestId) { + this.paymentRequestId = paymentRequestId; + } + + public Order getOrder() { + return order; + } + + public void setOrder(Order order) { + this.order = order; + } + + public PaymentFactor getPaymentFactor() { + return paymentFactor; + } + + public void setPaymentFactor(PaymentFactor paymentFactor) { + this.paymentFactor = paymentFactor; + } + + public Amount getAmount() { + return amount; + } + + public void setAmount(Amount amount) { + this.amount = amount; + } + + public String getPaymentNotifyUrl() { + return paymentNotifyUrl; + } + + public void setPaymentNotifyUrl(String paymentNotifyUrl) { + this.paymentNotifyUrl = paymentNotifyUrl; + } + + public String getPaymentRedirectUrl() { + return paymentRedirectUrl; + } + + public void setPaymentRedirectUrl(String paymentRedirectUrl) { + this.paymentRedirectUrl = paymentRedirectUrl; + } + + public String getPaymentExpiryTime() { + return paymentExpiryTime; + } + + public void setPaymentExpiryTime(String paymentExpiryTime) { + this.paymentExpiryTime = paymentExpiryTime; + } + + public SettlementStrategy getSettlementStrategy() { + return settlementStrategy; + } + + public void setSettlementStrategy(SettlementStrategy settlementStrategy) { + this.settlementStrategy = settlementStrategy; + } } - diff --git a/src/main/java/com/alipay/global/api/response/aps/refund/AlipayApsRefundResponse.java b/src/main/java/com/alipay/global/api/response/aps/refund/AlipayApsRefundResponse.java index 85cc93e..031c11d 100644 --- a/src/main/java/com/alipay/global/api/response/aps/refund/AlipayApsRefundResponse.java +++ b/src/main/java/com/alipay/global/api/response/aps/refund/AlipayApsRefundResponse.java @@ -6,68 +6,67 @@ public class AlipayApsRefundResponse extends AlipayResponse { - private String acquirerId; - private String pspId; - private String refundId; - private String refundTime; - private Amount refundAmount; - private Amount settlementAmount; - private Quote settlementQuote; - - public String getAcquirerId() { - return acquirerId; - } - - public void setAcquirerId(String acquirerId) { - this.acquirerId = acquirerId; - } - - public String getPspId() { - return pspId; - } - - public void setPspId(String pspId) { - this.pspId = pspId; - } - - public String getRefundId() { - return refundId; - } - - public void setRefundId(String refundId) { - this.refundId = refundId; - } - - public String getRefundTime() { - return refundTime; - } - - public void setRefundTime(String refundTime) { - this.refundTime = refundTime; - } - - public Amount getRefundAmount() { - return refundAmount; - } - - public void setRefundAmount(Amount refundAmount) { - this.refundAmount = refundAmount; - } - - public Amount getSettlementAmount() { - return settlementAmount; - } - - public void setSettlementAmount(Amount settlementAmount) { - this.settlementAmount = settlementAmount; - } - - public Quote getSettlementQuote() { - return settlementQuote; - } - - public void setSettlementQuote(Quote settlementQuote) { - this.settlementQuote = settlementQuote; - } - + private String acquirerId; + private String pspId; + private String refundId; + private String refundTime; + private Amount refundAmount; + private Amount settlementAmount; + private Quote settlementQuote; + + public String getAcquirerId() { + return acquirerId; + } + + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } + + public String getPspId() { + return pspId; + } + + public void setPspId(String pspId) { + this.pspId = pspId; + } + + public String getRefundId() { + return refundId; + } + + public void setRefundId(String refundId) { + this.refundId = refundId; + } + + public String getRefundTime() { + return refundTime; + } + + public void setRefundTime(String refundTime) { + this.refundTime = refundTime; + } + + public Amount getRefundAmount() { + return refundAmount; + } + + public void setRefundAmount(Amount refundAmount) { + this.refundAmount = refundAmount; + } + + public Amount getSettlementAmount() { + return settlementAmount; + } + + public void setSettlementAmount(Amount settlementAmount) { + this.settlementAmount = settlementAmount; + } + + public Quote getSettlementQuote() { + return settlementQuote; + } + + public void setSettlementQuote(Quote settlementQuote) { + this.settlementQuote = settlementQuote; + } } diff --git a/src/main/java/com/alipay/global/api/ssl/TrueHostnameVerifier.java b/src/main/java/com/alipay/global/api/ssl/TrueHostnameVerifier.java index 5eb8cfb..74b3a79 100644 --- a/src/main/java/com/alipay/global/api/ssl/TrueHostnameVerifier.java +++ b/src/main/java/com/alipay/global/api/ssl/TrueHostnameVerifier.java @@ -4,9 +4,9 @@ import javax.net.ssl.SSLSession; public class TrueHostnameVerifier implements HostnameVerifier { - @Override - public boolean verify(String s, SSLSession sslSession) { - // 不允许URL的主机名和服务器的标识主机名不匹配的情况 - return false; - } + @Override + public boolean verify(String s, SSLSession sslSession) { + // 不允许URL的主机名和服务器的标识主机名不匹配的情况 + return false; + } } diff --git a/src/main/java/com/alipay/global/api/ssl/X509TrustManagerImp.java b/src/main/java/com/alipay/global/api/ssl/X509TrustManagerImp.java index 9eac4f9..715dff1 100644 --- a/src/main/java/com/alipay/global/api/ssl/X509TrustManagerImp.java +++ b/src/main/java/com/alipay/global/api/ssl/X509TrustManagerImp.java @@ -1,21 +1,20 @@ package com.alipay.global.api.ssl; -import javax.net.ssl.X509TrustManager; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; +import javax.net.ssl.X509TrustManager; public class X509TrustManagerImp implements X509TrustManager { - @Override - public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { - } + @Override + public void checkClientTrusted(X509Certificate[] x509Certificates, String s) + throws CertificateException {} - @Override - public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { - } + @Override + public void checkServerTrusted(X509Certificate[] x509Certificates, String s) + throws CertificateException {} - @Override - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[0]; - } + @Override + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } } - diff --git a/src/main/java/com/alipay/global/api/tools/Constants.java b/src/main/java/com/alipay/global/api/tools/Constants.java index 6c41bf5..fb93805 100644 --- a/src/main/java/com/alipay/global/api/tools/Constants.java +++ b/src/main/java/com/alipay/global/api/tools/Constants.java @@ -2,30 +2,29 @@ public interface Constants { - String SCHEME = "https"; + String SCHEME = "https"; - String DEFAULT_CHARSET = "UTF-8"; + String DEFAULT_CHARSET = "UTF-8"; - String CLIENT_ID_HEADER = "client-id"; + String CLIENT_ID_HEADER = "client-id"; - String ACCEPT_HEADER = "Accept"; + String ACCEPT_HEADER = "Accept"; - String CONTENT_TYPE_HEADER = "Content-Type"; + String CONTENT_TYPE_HEADER = "Content-Type"; - String USER_AGENT_HEADER = "User-Agent"; + String USER_AGENT_HEADER = "User-Agent"; - String CONNECTION_HEADER = "Connection"; + String CONNECTION_HEADER = "Connection"; - String REQ_SIGN_HEADER = "Signature"; + String REQ_SIGN_HEADER = "Signature"; - String REQ_TIME_HEADER = "Request-Time"; + String REQ_TIME_HEADER = "Request-Time"; - String RSP_SIGN_HEADER = "signature"; + String RSP_SIGN_HEADER = "signature"; - String RSP_TIME_HEADER = "response-time"; + String RSP_TIME_HEADER = "response-time"; - String AGENT_TOKEN_HEADER = "agent-token"; - - int HTTP_SUCCESS_CODE = 200; + String AGENT_TOKEN_HEADER = "agent-token"; + int HTTP_SUCCESS_CODE = 200; } diff --git a/src/main/java/com/alipay/global/api/tools/DateTool.java b/src/main/java/com/alipay/global/api/tools/DateTool.java index e270bbf..0778fa8 100644 --- a/src/main/java/com/alipay/global/api/tools/DateTool.java +++ b/src/main/java/com/alipay/global/api/tools/DateTool.java @@ -1,19 +1,17 @@ package com.alipay.global.api.tools; -import org.apache.commons.lang3.time.DateFormatUtils; - import java.util.Date; +import org.apache.commons.lang3.time.DateFormatUtils; public class DateTool { - public final static String ISO8601= "yyyy-MM-dd'T'HH:mm:ssZZZ"; - - public static String getCurISO8601Time() { - return DateFormatUtils.format(new Date().getTime(), ISO8601); - } + public static final String ISO8601 = "yyyy-MM-dd'T'HH:mm:ssZZZ"; - public static String getCurrentTimeMillis() { - return String.valueOf(System.currentTimeMillis()); - } + public static String getCurISO8601Time() { + return DateFormatUtils.format(new Date().getTime(), ISO8601); + } + public static String getCurrentTimeMillis() { + return String.valueOf(System.currentTimeMillis()); + } } diff --git a/src/main/java/com/alipay/global/api/tools/IpAddressTool.java b/src/main/java/com/alipay/global/api/tools/IpAddressTool.java index 72c943b..f31caa4 100644 --- a/src/main/java/com/alipay/global/api/tools/IpAddressTool.java +++ b/src/main/java/com/alipay/global/api/tools/IpAddressTool.java @@ -7,32 +7,31 @@ public class IpAddressTool { - public static String getIpAddress() { - try { - Enumeration networkInterfaces = NetworkInterface - .getNetworkInterfaces(); + public static String getIpAddress() { + try { + Enumeration networkInterfaces = NetworkInterface.getNetworkInterfaces(); - while (networkInterfaces.hasMoreElements()) { - NetworkInterface networkInterface = networkInterfaces.nextElement(); + while (networkInterfaces.hasMoreElements()) { + NetworkInterface networkInterface = networkInterfaces.nextElement(); - if (networkInterface.isLoopback() || networkInterface.isVirtual() - || !networkInterface.isUp()) { - continue; - } + if (networkInterface.isLoopback() + || networkInterface.isVirtual() + || !networkInterface.isUp()) { + continue; + } - Enumeration inetAddresses = networkInterface.getInetAddresses(); - while (inetAddresses.hasMoreElements()) { - InetAddress inetAddress = inetAddresses.nextElement(); + Enumeration inetAddresses = networkInterface.getInetAddresses(); + while (inetAddresses.hasMoreElements()) { + InetAddress inetAddress = inetAddresses.nextElement(); - if (inetAddress instanceof java.net.Inet4Address) { - return inetAddress.getHostAddress(); - } - } - } - } catch (SocketException e) { - e.printStackTrace(); + if (inetAddress instanceof java.net.Inet4Address) { + return inetAddress.getHostAddress(); + } } - return null; + } + } catch (SocketException e) { + e.printStackTrace(); } - + return null; + } } diff --git a/src/main/java/com/alipay/global/api/tools/SignatureTool.java b/src/main/java/com/alipay/global/api/tools/SignatureTool.java index 2f7872a..a55cea2 100644 --- a/src/main/java/com/alipay/global/api/tools/SignatureTool.java +++ b/src/main/java/com/alipay/global/api/tools/SignatureTool.java @@ -1,12 +1,7 @@ package com.alipay.global.api.tools; - -/** - * Alipay.com Inc. Copyright (c) 2004-2019 All Rights Reserved. - */ - +/** Alipay.com Inc. Copyright (c) 2004-2019 All Rights Reserved. */ import com.alipay.global.api.base64.Base64Provider; - import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; @@ -19,138 +14,159 @@ public class SignatureTool { - private static final String RSA = "RSA"; - private static final String SHA256WITHRSA = "SHA256withRSA"; - private static final String DEFAULT_CHARSET = "UTF-8"; - - public static String sign(String httpMethod, String path, String clientId, String reqTimeStr, String reqBody, String merchantPrivateKey) throws Exception{ - String reqContent = genSignContent(httpMethod, path, clientId, reqTimeStr, reqBody); - return encode(signWithSHA256RSA(reqContent, merchantPrivateKey), DEFAULT_CHARSET); - } - - public static boolean verify(String httpMethod, String path, String clientId, String rspTimeStr, String rspBody, String signature, String alipayPublicKey) throws Exception { - String rspContent = genSignContent(httpMethod, path, clientId, rspTimeStr, rspBody); - return verifySignatureWithSHA256RSA(rspContent, decode(signature, DEFAULT_CHARSET), alipayPublicKey); - } - - public static String genSignContent(String httpMethod, String path, String clientId, String timeString, String content){ - String payload = httpMethod + " " + path + "\n" + clientId + "." + timeString - + "." + content; - - return payload; - } - - /** - * Sign the contents of the merchant request - * - * @param reqContent = httpMethod + " " + uriWithQueryString + "\n" + clientId + "." + timeString + "." + reqBody; - * @param merchantPrivateKey the private key - * @return the string - * @throws Exception the exception - */ - public static String sign(String reqContent, String merchantPrivateKey) throws Exception{ - return encode(signWithSHA256RSA(reqContent, merchantPrivateKey), DEFAULT_CHARSET); - } - - /** - * Check the response of Alipay - * - * @param rspContent = httpMethod + " " + uriWithQueryString + "\n" + clientId + "." + timeString + "." + rspBody; - * @param signature the signature - * @param alipayPublicKey the public key - * @return the boolean - * @throws Exception the exception - */ - public static boolean verify(String rspContent, String signature, String alipayPublicKey) throws Exception { - return verifySignatureWithSHA256RSA(rspContent, decode(signature, DEFAULT_CHARSET), alipayPublicKey); - } - - /** - * Verify if the received signature is correctly generated with the sender's public key - * - * @param rspContent: the original content signed by the sender and to be verified by the receiver. - * @param signature: the signature generated by the sender - * @param strPk: the public key string-base64 encoded - * @return - * @throws Exception - */ - private static boolean verifySignatureWithSHA256RSA(String rspContent, String signature, String strPk) throws Exception { - PublicKey publicKey = getPublicKeyFromBase64String(strPk); - - Signature publicSignature = Signature.getInstance(SHA256WITHRSA); - publicSignature.initVerify(publicKey); - publicSignature.update(rspContent.getBytes(DEFAULT_CHARSET)); - - byte[] signatureBytes = Base64Provider.getBase64Encryptor().decode(signature); - return publicSignature.verify(signatureBytes); - - } - - - /** - * Generate base64 encoded signature using the sender's private key - * - * @param reqContent: the original content to be signed by the sender - * @param strPrivateKey: the private key which should be base64 encoded - * @return - * @throws Exception - */ - private static String signWithSHA256RSA(String reqContent, String strPrivateKey) throws Exception { - Signature privateSignature = Signature.getInstance(SHA256WITHRSA); - privateSignature.initSign(getPrivateKeyFromBase64String(strPrivateKey)); - privateSignature.update(reqContent.getBytes(DEFAULT_CHARSET)); - byte[] s = privateSignature.sign(); - - return Base64Provider.getBase64Encryptor().encodeToString(s); - } - - /** - * - * @param publicKeyString - * @return - */ - private static PublicKey getPublicKeyFromBase64String(String publicKeyString) throws Exception{ - byte[] b1 = Base64Provider.getBase64Encryptor().decode(publicKeyString); - X509EncodedKeySpec X509publicKey = new X509EncodedKeySpec(b1); - KeyFactory kf = KeyFactory.getInstance(RSA); - return kf.generatePublic(X509publicKey); - } - - /** - * - * @param privateKeyString - * @return - * @throws Exception - */ - private static PrivateKey getPrivateKeyFromBase64String(String privateKeyString) throws Exception{ - byte[] b1 = Base64Provider.getBase64Encryptor().decode(privateKeyString); - PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(b1); - KeyFactory kf = KeyFactory.getInstance(RSA); - return kf.generatePrivate(spec); - } - - /** - * URL encode - * @param originalStr - * @param characterEncoding - * @return - * @throws UnsupportedEncodingException - */ - private static String encode(String originalStr, - String characterEncoding) throws UnsupportedEncodingException { - return URLEncoder.encode(originalStr, characterEncoding); - } - - /** - * URL decode - * @param originalStr - * @param characterEncoding - * @return - * @throws UnsupportedEncodingException - */ - private static String decode(String originalStr, - String characterEncoding) throws UnsupportedEncodingException { - return URLDecoder.decode(originalStr, characterEncoding); - } - + private static final String RSA = "RSA"; + private static final String SHA256WITHRSA = "SHA256withRSA"; + private static final String DEFAULT_CHARSET = "UTF-8"; + + public static String sign( + String httpMethod, + String path, + String clientId, + String reqTimeStr, + String reqBody, + String merchantPrivateKey) + throws Exception { + String reqContent = genSignContent(httpMethod, path, clientId, reqTimeStr, reqBody); + return encode(signWithSHA256RSA(reqContent, merchantPrivateKey), DEFAULT_CHARSET); + } + + public static boolean verify( + String httpMethod, + String path, + String clientId, + String rspTimeStr, + String rspBody, + String signature, + String alipayPublicKey) + throws Exception { + String rspContent = genSignContent(httpMethod, path, clientId, rspTimeStr, rspBody); + return verifySignatureWithSHA256RSA( + rspContent, decode(signature, DEFAULT_CHARSET), alipayPublicKey); + } + + public static String genSignContent( + String httpMethod, String path, String clientId, String timeString, String content) { + String payload = httpMethod + " " + path + "\n" + clientId + "." + timeString + "." + content; + + return payload; + } + + /** + * Sign the contents of the merchant request + * + * @param reqContent = httpMethod + " " + uriWithQueryString + "\n" + clientId + "." + timeString + * + "." + reqBody; + * @param merchantPrivateKey the private key + * @return the string + * @throws Exception the exception + */ + public static String sign(String reqContent, String merchantPrivateKey) throws Exception { + return encode(signWithSHA256RSA(reqContent, merchantPrivateKey), DEFAULT_CHARSET); + } + + /** + * Check the response of Alipay + * + * @param rspContent = httpMethod + " " + uriWithQueryString + "\n" + clientId + "." + timeString + * + "." + rspBody; + * @param signature the signature + * @param alipayPublicKey the public key + * @return the boolean + * @throws Exception the exception + */ + public static boolean verify(String rspContent, String signature, String alipayPublicKey) + throws Exception { + return verifySignatureWithSHA256RSA( + rspContent, decode(signature, DEFAULT_CHARSET), alipayPublicKey); + } + + /** + * Verify if the received signature is correctly generated with the sender's public key + * + * @param rspContent: the original content signed by the sender and to be verified by the + * receiver. + * @param signature: the signature generated by the sender + * @param strPk: the public key string-base64 encoded + * @return + * @throws Exception + */ + private static boolean verifySignatureWithSHA256RSA( + String rspContent, String signature, String strPk) throws Exception { + PublicKey publicKey = getPublicKeyFromBase64String(strPk); + + Signature publicSignature = Signature.getInstance(SHA256WITHRSA); + publicSignature.initVerify(publicKey); + publicSignature.update(rspContent.getBytes(DEFAULT_CHARSET)); + + byte[] signatureBytes = Base64Provider.getBase64Encryptor().decode(signature); + return publicSignature.verify(signatureBytes); + } + + /** + * Generate base64 encoded signature using the sender's private key + * + * @param reqContent: the original content to be signed by the sender + * @param strPrivateKey: the private key which should be base64 encoded + * @return + * @throws Exception + */ + private static String signWithSHA256RSA(String reqContent, String strPrivateKey) + throws Exception { + Signature privateSignature = Signature.getInstance(SHA256WITHRSA); + privateSignature.initSign(getPrivateKeyFromBase64String(strPrivateKey)); + privateSignature.update(reqContent.getBytes(DEFAULT_CHARSET)); + byte[] s = privateSignature.sign(); + + return Base64Provider.getBase64Encryptor().encodeToString(s); + } + + /** + * @param publicKeyString + * @return + */ + private static PublicKey getPublicKeyFromBase64String(String publicKeyString) throws Exception { + byte[] b1 = Base64Provider.getBase64Encryptor().decode(publicKeyString); + X509EncodedKeySpec X509publicKey = new X509EncodedKeySpec(b1); + KeyFactory kf = KeyFactory.getInstance(RSA); + return kf.generatePublic(X509publicKey); + } + + /** + * @param privateKeyString + * @return + * @throws Exception + */ + private static PrivateKey getPrivateKeyFromBase64String(String privateKeyString) + throws Exception { + byte[] b1 = Base64Provider.getBase64Encryptor().decode(privateKeyString); + PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(b1); + KeyFactory kf = KeyFactory.getInstance(RSA); + return kf.generatePrivate(spec); + } + + /** + * URL encode + * + * @param originalStr + * @param characterEncoding + * @return + * @throws UnsupportedEncodingException + */ + private static String encode(String originalStr, String characterEncoding) + throws UnsupportedEncodingException { + return URLEncoder.encode(originalStr, characterEncoding); + } + + /** + * URL decode + * + * @param originalStr + * @param characterEncoding + * @return + * @throws UnsupportedEncodingException + */ + private static String decode(String originalStr, String characterEncoding) + throws UnsupportedEncodingException { + return URLDecoder.decode(originalStr, characterEncoding); + } } diff --git a/src/main/java/com/alipay/global/api/tools/WebhookTool.java b/src/main/java/com/alipay/global/api/tools/WebhookTool.java index 3100799..6160a1d 100644 --- a/src/main/java/com/alipay/global/api/tools/WebhookTool.java +++ b/src/main/java/com/alipay/global/api/tools/WebhookTool.java @@ -4,40 +4,53 @@ public class WebhookTool { - /** - * Check webhook signature - * - * @param requestUri your webhook endpoint, domain part excluded, sample: /payNotify - * @param httpMethod http method - * @param clientId your clientId, sample: SANDBOX_5X00000000000000 - * @param requestTime requestTime from http header, sample: 2019-01-01T01:01:01Z - * @param signature signature from http header, sample: algorithm=RSA256,keyVersion=1,signature=xxx - * @param notifyBody notify body - * @param alipayPublicKey alipay public key - * @return - * @throws AlipayApiException - */ - public static boolean checkSignature(String requestUri, String httpMethod, String clientId, String requestTime, - String signature, String notifyBody, String alipayPublicKey) throws AlipayApiException { - String realSignature = ""; - - // get valid part from raw signature - if (signature == null || signature.isEmpty()) { - throw new RuntimeException("empty notify signature"); - } else { - String[] parts = signature.split("signature="); - if (parts.length > 1) { - realSignature = parts[1]; - } - } - - try { - // verify signature - return SignatureTool.verify(httpMethod, requestUri, clientId, requestTime, notifyBody, realSignature, alipayPublicKey); - } catch (Exception e) { - throw new AlipayApiException(e); - } + /** + * Check webhook signature + * + * @param requestUri your webhook endpoint, domain part excluded, sample: /payNotify + * @param httpMethod http method + * @param clientId your clientId, sample: SANDBOX_5X00000000000000 + * @param requestTime requestTime from http header, sample: 2019-01-01T01:01:01Z + * @param signature signature from http header, sample: + * algorithm=RSA256,keyVersion=1,signature=xxx + * @param notifyBody notify body + * @param alipayPublicKey alipay public key + * @return + * @throws AlipayApiException + */ + public static boolean checkSignature( + String requestUri, + String httpMethod, + String clientId, + String requestTime, + String signature, + String notifyBody, + String alipayPublicKey) + throws AlipayApiException { + String realSignature = ""; + // get valid part from raw signature + if (signature == null || signature.isEmpty()) { + throw new RuntimeException("empty notify signature"); + } else { + String[] parts = signature.split("signature="); + if (parts.length > 1) { + realSignature = parts[1]; + } } + try { + // verify signature + return SignatureTool.verify( + httpMethod, + requestUri, + clientId, + requestTime, + notifyBody, + realSignature, + alipayPublicKey); + } catch (Exception e) { + throw new AlipayApiException(e); + } + } }