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

com.alipay.api.AlipayResponse Maven / Gradle / Ivy

Go to download

Alipay openapi SDK for Java Copyright © 2018 杭州蚂蚁金服 All rights reserved. 版权所有 (C)杭州蚂蚁金服 http://open.alipay.com

There is a newer version: 4.39.218.ALL
Show newest version
package com.alipay.api;

import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.util.StringUtils;

import java.io.Serializable;
import java.util.Map;

/**
 * API基础响应信息。
 *
 * @author fengsheng
 */
public abstract class AlipayResponse implements Serializable {

    private static final long serialVersionUID = 5014379068811962022L;

    @ApiField("code")
    private String code;

    @ApiField("msg")
    private String msg;

    @ApiField("sub_code")
    private String subCode;

    @ApiField("sub_msg")
    private String subMsg;

    private String              body;
    private Map params;

    /**
     * 废弃方法,请使用getCode替换
     *
     * @return
     */
    @Deprecated
    public String getErrorCode() {
        return this.getCode();
    }

    /**
     * 废弃方法,请使用setCode替换
     *
     * @param errorCode
     */
    @Deprecated
    public void setErrorCode(String errorCode) {
        this.setCode(errorCode);
    }

    /**
     * Getter method for property code.
     *
     * @return property value of code
     */
    public String getCode() {
        return code;
    }

    /**
     * Setter method for property code.
     *
     * @param code value to be assigned to property code
     */
    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getSubCode() {
        return this.subCode;
    }

    public void setSubCode(String subCode) {
        this.subCode = subCode;
    }

    public String getSubMsg() {
        return this.subMsg;
    }

    public void setSubMsg(String subMsg) {
        this.subMsg = subMsg;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public Map getParams() {
        return params;
    }

    public void setParams(Map params) {
        this.params = params;
    }

    public boolean isSuccess() {
        return StringUtils.isEmpty(subCode);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy