package org.springblade.community.pay.wx.response;

import lombok.Getter;

@Getter
public class WxPayResponse {

	/**
	 * 状态码
	 */
	private String code;

	/**
	 * 消息
	 */
	private String message;

	private WxPayResponse(String code, String message) {
		this.code = code;
		this.message = message;
	}

	/**
	 * 成功
	 * @return
	 */
	public static WxPayResponse success(){
		return success(null);
	}

	/**
	 * 成功
	 * @return
	 */
	public static WxPayResponse success(String message){
		return new WxPayResponse("SUCCESS",message);
	}

	/**
	 * 失败
	 * @return
	 */
	public static WxPayResponse fail(){
		return fail(null);
	}

	/**
	 * 失败
	 * @return
	 */
	public static WxPayResponse fail(String message){
		return new WxPayResponse("FAIL",message);
	}
}
