package com.neusoft.smart.pos.payment.repository;

import com.neusoft.smart.pos.dto.payment.request.PostGrantToPayRequest;
import com.neusoft.smart.pos.payment.persistent.domain.GrantPayOrder;
import com.neusoft.smart.pos.payment.persistent.domain.MchPayChannel;
import com.neusoft.smart.pos.payment.persistent.domain.PayTypeDict;
import com.neusoft.smart.pos.payment.persistent.ext.domain.*;

/**
 * @author zcf
 * @date 2018-01-09 10：43
 * @description 第三方支付资金预授权实现类使用接口
 */
public interface IThirdPayGrantRepository {
	
	/**
	 * 资金授权冻结使用方法(含主扫与被扫)
	 * @return
	 */
	ThirdPlatformFreezePay freezePayToThirdPlatform(GrantPayOrder grantPayOrder, MchPayChannel mchPayChannel, PayTypeDict payTypeDict);
	
	/**
	 * 资金授权信息查询使用方法
	 * @return
	 */
	ThirdPlatformQueryPayGrant queryPayGrantFromThirdPlatform(GrantPayOrder grantPayOrder, MchPayChannel mchPayChannel);

	/**
	 * 资金授权撤销使用方法
	 * @return
	 */
	ThirdPlatformReversePayGrant reversePayGrantFromThirdPlatform(GrantPayOrder grantPayOrder, MchPayChannel mchPayChannel);

	/**
	 * 资金授权解冻使用方法
	 * @return
	 */
	ThirdPlatformUnFreezePayGrant unfreezePayFromThirdPlatform(Long amount,GrantPayOrder grantPayOrder, MchPayChannel mchPayChannel);

	/**
	 * 授权转支付使用方法
	 * @return
	 */
	ThirdPlatformGrantToPay grantToPayFromThirdPlatform(PostGrantToPayRequest grantToPayRequest,GrantPayOrder grantPayOrder, MchPayChannel mchPayChannel, PayTypeDict payTypeDict);

//	/**
//	 * 支付单信息查询使用方法
//	 * @return
//	 */
//	ThirdPlatformQueryOrder queryPayOrderFromThirdPlatform(PayOrder payOrder, MchPayChannel mchPayChannel);

	/**
	 * 预付单退款使用方法
	 * @return
	 */
	ThirdPlatformRefundOrder refundPayOrderFromThirdPlatform(GrantPayOrder grantPayOrder, String refundNumber, Long refundAmount, MchPayChannel mchPayChannel, PayTypeDict payTypeDict);

}
