package ink.wgink.module.wechat.pay.pojo.v3;

/**
 * @ClassName: PaySign
 * @Description: 支付签名
 * @Author: wanggeng
 * @Date: 2021/8/20 5:41 下午
 * @Version: 1.0
 */
public class PaySign {

    private String appId;
    private String timestamp;
    private String nonceStr;
    /**
     * 预支付交易会话标识，预支付交易会话标识。用于后续接口调用中使用，该值有效期为2小时
     */
    private String prepayId;
    private String paySign;

    public String getAppId() {
        return appId == null ? "" : appId.trim();
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getTimestamp() {
        return timestamp == null ? "" : timestamp.trim();
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public String getNonceStr() {
        return nonceStr == null ? "" : nonceStr.trim();
    }

    public void setNonceStr(String nonceStr) {
        this.nonceStr = nonceStr;
    }

    public String getPrepayId() {
        return prepayId == null ? "" : prepayId.trim();
    }

    public void setPrepayId(String prepayId) {
        this.prepayId = prepayId;
    }

    public String getPaySign() {
        return paySign == null ? "" : paySign.trim();
    }

    public void setPaySign(String paySign) {
        this.paySign = paySign;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"appId\":\"")
                .append(appId).append('\"');
        sb.append(",\"timestamp\":\"")
                .append(timestamp).append('\"');
        sb.append(",\"nonceStr\":\"")
                .append(nonceStr).append('\"');
        sb.append(",\"prepayId\":\"")
                .append(prepayId).append('\"');
        sb.append(",\"paySign\":\"")
                .append(paySign).append('\"');
        sb.append('}');
        return sb.toString();
    }
}
