com.payermax.sdk.domain.GatewayResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of payermax-server-sdk Show documentation
Show all versions of payermax-server-sdk Show documentation
PayerMax payment sdk for merchant server.
package com.payermax.sdk.domain;
import java.io.Serializable;
/**
* @author zhu.q
*/
public class GatewayResult implements Serializable {
public static final String APPLY_SUCCESS = "APPLY_SUCCESS";
private String code;
private String msg;
private T data;
public GatewayResult() {
}
public GatewayResult(T data) {
this.data = data;
}
public GatewayResult(String msg, String code) {
this.msg = msg;
this.code = code;
}
public GatewayResult(T data, String msg, String code) {
this.msg = msg;
this.code = code;
this.data = data;
}
public T getData() {
return this.data;
}
public void setData(T data) {
this.data = data;
}
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return this.msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public GatewayResult mapper(GatewayResult> biz) {
this.setCode(biz.getCode());
this.setMsg(biz.getMsg());
return this;
}
public boolean isSuccess() {
return APPLY_SUCCESS.equals(this.code);
}
@Override
public String toString() {
return "Result{code='" + this.code + '\'' + ", msg='" + this.msg + '\'' + ", data=" + this.data + '}';
}
}