package org.springblade.yeePay.entity.saas.trade;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springblade.yeePay.common.YeepayApiConstant;

import javax.validation.constraints.NotBlank;

@NoArgsConstructor
@AllArgsConstructor
@Data
@Builder
@ApiModel("申请退款入参")
public class RefundDto {

	@NotBlank
	@ApiModelProperty(value = "收款交易对应的商户收款请求号", required = true)
	private String orderId;

	@NotBlank
	@ApiModelProperty(value = "商户退款请求号", required = true)
	private String refundRequestId;

	@NotBlank
	@ApiModelProperty(value = "发起方商户编号。与交易下单传入的保持一致", required = true)
	private String parentMerchantNo;

	@NotBlank
	@ApiModelProperty(value = "收款商户编号", required = true)
	private String merchantNo;

	@ApiModelProperty(value = "收款交易对应的易宝收款订单号")
	private String uniqueOrderNo;

	@NotBlank
	@ApiModelProperty(value = "单位：元，两位小数，最低0.01，退款金额不能大于原订单金额，多次退款时，累计退款金额不能超过原订单金额", required = true)
	private String refundAmount;

	@ApiModelProperty(value = "退款原因")
	private String description;

	@ApiModelProperty(value = "商户自定义参数，会展示在交易对账单中")
	private String memo;

	/**
	 * 不传则默认使用未结算资金退款,如未结算资金不足则使用支付账户余额退款
	 */
	@ApiModelProperty(value = "退款资金来源")
	private YeepayApiConstant.refundAccountType refundAccountType;

	@ApiModelProperty(value = "接收退款结果通知地址，不传则不通知")
	private String notifyUrl;

	@ApiModelProperty(value = "易宝优惠退款信息")
	private String ypPromotionRefundInfo;
}
