package org.springblade.yeePay.service;

import com.yeepay.yop.sdk.service.common.YopClient;
import com.yeepay.yop.sdk.service.common.YopClientBuilder;
import com.yeepay.yop.sdk.service.common.request.YopRequest;
import com.yeepay.yop.sdk.service.common.response.YopResponse;
import lombok.extern.slf4j.Slf4j;
import org.springblade.yeePay.api.YeepaySaas;
import org.springblade.yeePay.common.YeePayConst;
import org.springblade.yeePay.entity.InitOrderDto;
import org.springblade.yeePay.entity.saas.*;
import org.springblade.yeePay.entity.saas.account.*;
import org.springblade.yeePay.entity.saas.changeservice.MerchantDisposeQueryDto;
import org.springblade.yeePay.entity.saas.changeservice.MerchantDisposeUnfreezeDto;
import org.springblade.yeePay.entity.saas.changeservice.ProductFeeModifyDto;
import org.springblade.yeePay.entity.saas.changeservice.ProductFeeQueryDto;
import org.springblade.yeePay.entity.saas.receipt.*;
import org.springblade.yeePay.entity.saas.settlement.*;
import org.springblade.yeePay.entity.saas.trade.*;
import org.springblade.yeePay.utils.YeepayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: lianghanqiang
 * @description: 易宝--平台商服务
 * @since: 9/6/21 -- 10:55 AM
 */
@Service
@Slf4j
public class YeepaySaasService {

	@Autowired
	private YeePayConst yeePayConst;

	YopClient yopClient = YopClientBuilder.builder().build();

	/**
	 * 商户入网
	 */
	public YopResponse inviteMerchant(InvitationDto invitationDto) {
		YopRequest yopRequest = YeepaySaas.Invitation_TO_YEEPAY.buildRequest();
		YeepayUtils.addParamsFromObj(invitationDto, yopRequest, InvitationDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 小微商户入网
	 */
	public YopResponse inviteMicro(MicroInvitationDto microInvitationDto) {
		YopRequest yopRequest = YeepaySaas.MICRO_Invitation_TO_YEEPAY.buildRequest();
		YeepayUtils.addParamsFromObj(microInvitationDto, yopRequest, MicroInvitationDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 查询商户入网进度
	 */
	public YopResponse queryInvitation(String requestNo) {
		YopRequest yopRequest = YeepaySaas.Query_Invitation.buildRequest();
		yopRequest.addParameter("requestNo", requestNo);
		return yopClient.request(yopRequest);
	}

	/**
	 * 聚合支付统一下单
	 */
	public YopResponse aggPrepay(InitOrderDto initOrderDto) {
		YopRequest yopRequest = YeepaySaas.AGGPAY_PREPAY.buildRequest();
		YeepayUtils.addParamsFromObj(initOrderDto, yopRequest, InitOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 微信实名认证申请单申请
	 */
	public YopResponse wechatApply(WechatApplyDto wechatApplyDto) {
		YopRequest yopRequest = YeepaySaas.WECHAT_AUTH_APPLY.buildRequest();
		YeepayUtils.addParamsFromObj(wechatApplyDto, yopRequest, WechatApplyDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 生成聚合订单码
	 */
	public YopResponse payLinkOrder(PayLinkOrderDto payLinkOrderDto) {
		YopRequest yopRequest = YeepaySaas.PAY_LINK_ORDER.buildRequest();
		YeepayUtils.addParamsFromObj(payLinkOrderDto, yopRequest, PayLinkOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 付款码支付
	 */
	public YopResponse aggayPay(AggpayPayDto AggpayPayDto) {
		YopRequest yopRequest = YeepaySaas.AGG_PAY_PAY.buildRequest();
		YeepayUtils.addParamsFromObj(AggpayPayDto, yopRequest, AggpayPayDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 撤销微信实名认证申请单
	 */
	public YopResponse wechatAuthCancel(WechatAuthDto wechatAuthDto) {
		YopRequest yopRequest = YeepaySaas.WECHAT_AUTH_CANCEL.buildRequest();
		YeepayUtils.addParamsFromObj(wechatAuthDto, yopRequest, WechatAuthDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 查询微信实名认证状态
	 */
	public YopResponse wechatAuthQuery(WechatAuthDto wechatAuthDto) {
		YopRequest yopRequest = YeepaySaas.WECHAT_AUTH_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(wechatAuthDto, yopRequest, WechatAuthDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 商户授权状态查询接口
	 */
	public YopResponse authStateQuery(AuthStateQueryDto authStateQueryDto) {
		YopRequest yopRequest = YeepaySaas.AUTH_STATE_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(authStateQueryDto, yopRequest, AuthStateQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 微信违规查询接口(服务商/平台商版)
	 */
	public YopResponse wechatViolationChannel(WechatViolationChannelDto wechatViolationChannelDto) {
		YopRequest yopRequest = YeepaySaas.WECHAT_VIOLATION_CHANNEL.buildRequest();
		YeepayUtils.addParamsFromObj(wechatViolationChannelDto, yopRequest, WechatViolationChannelDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 充值-网银下单
	 */
	public YopResponse onlineBankRechargeOrder(OnlineBankRechargeOrderDto onlineBankRechargeOrderDto) {
		YopRequest yopRequest = YeepaySaas.ONLINE_BANK_RECHARGE_ORDER.buildRequest();
		YeepayUtils.addParamsFromObj(onlineBankRechargeOrderDto, yopRequest, OnlineBankRechargeOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 充值-银行汇款下单
	 */
	public YopResponse bankRechargeOrder(BankRechargeOrderDto bankRechargeOrderDto) {
		YopRequest yopRequest = YeepaySaas.BANK_RECHARGE_ORDER.buildRequest();
		YeepayUtils.addParamsFromObj(bankRechargeOrderDto, yopRequest, BankRechargeOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 充值-查询
	 */
	public YopResponse rechargeQuery(RechargeQueryDto rechargeQueryDto) {
		YopRequest yopRequest = YeepaySaas.RECHARGE_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(rechargeQueryDto, yopRequest, RechargeQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 转账-下单
	 */
	public YopResponse transferOrder(TransferOrderDto transferOrderDto) {
		YopRequest yopRequest = YeepaySaas.TRANSFER_ORDER.buildRequest();
		YeepayUtils.addParamsFromObj(transferOrderDto, yopRequest, TransferOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 转账-查询
	 */
	public YopResponse transferB2bQuery(TransferB2bQueryDto transferB2bQueryDto) {
		YopRequest yopRequest = YeepaySaas.TRANSFER_B2B_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(transferB2bQueryDto, yopRequest, TransferB2bQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 提现-查询
	 */
	public YopResponse withdrawQuery(WithdrawQueryDto withdrawQueryDto) {
		YopRequest yopRequest = YeepaySaas.WITHDRAW_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(withdrawQueryDto, yopRequest, WithdrawQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 提现-下单
	 */
	public YopResponse withdrawOrder(WithdrawOrderDto withdrawOrderDto) {
		YopRequest yopRequest = YeepaySaas.WITHDRAW_ORDER.buildRequest();
		YeepayUtils.addParamsFromObj(withdrawOrderDto, yopRequest, WithdrawOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 提现卡查询
	 */
	public YopResponse withdrawCardQuery(String merchantNo) {
		YopRequest yopRequest = YeepaySaas.WITHDRAW_CARD_QUERY.buildRequest();
		yopRequest.addParameter("merchantNo", merchantNo);
		return yopClient.request(yopRequest);
	}

	/**
	 * 提现卡-添加
	 */
	public YopResponse withdrawCardBind(WithdrawCardBindDto withdrawCardBindDto) {
		YopRequest yopRequest = YeepaySaas.WITHDRAW_CARD_BIND.buildRequest();
		YeepayUtils.addParamsFromObj(withdrawCardBindDto, yopRequest, WithdrawCardBindDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 提现卡-修改/注销
	 */
	public YopResponse withdrawCardModify(WithdrawCardModifyDto withdrawCardModifyDto) {
		YopRequest yopRequest = YeepaySaas.WITHDRAW_CARD_BIND.buildRequest();
		YeepayUtils.addParamsFromObj(withdrawCardModifyDto, yopRequest, WithdrawCardModifyDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 自动提现-规则设置
	 */
	public YopResponse autoWithdrawRuleSet(AutoWithdrawRuleSetDto autoWithdrawRuleSetDto) {
		YopRequest yopRequest = YeepaySaas.AUTO_WITHDRAW_RULE_SET.buildRequest();
		YeepayUtils.addParamsFromObj(autoWithdrawRuleSetDto, yopRequest, AutoWithdrawRuleSetDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 自动提现-规则查询
	 */
	public YopResponse autoWithdrawRuleQuery(AutoWithdrawRuleQueryDto autoWithdrawRuleQueryDto) {
		YopRequest yopRequest = YeepaySaas.AUTO_WITHDRAW_RULE_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(autoWithdrawRuleQueryDto, yopRequest, AutoWithdrawRuleQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 自动提现-规则作废
	 */
	public YopResponse autoWithdrawRuleCancel(AutoWithdrawRuleCancelDto autoWithdrawRuleCancelDto) {
		YopRequest yopRequest = YeepaySaas.AUTO_WITHDRAW_RULE_CANCEL.buildRequest();
		YeepayUtils.addParamsFromObj(autoWithdrawRuleCancelDto, yopRequest, AutoWithdrawRuleCancelDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 账户余额的查询
	 */
	public YopResponse accountInfosQuery(String merchantNo) {
		YopRequest yopRequest = YeepaySaas.ACCOUNT_INFOS_QUERY.buildRequest();
		yopRequest.addParameter("merchantNo", merchantNo);
		return yopClient.request(yopRequest);
	}

	/**
	 * 资金账户余额查询
	 */
	public YopResponse accountBalanceQuery(String merchantNo) {
		YopRequest yopRequest = YeepaySaas.ACCOUNT_BALANCE_QUERY.buildRequest();
		yopRequest.addParameter("merchantNo", merchantNo);
		return yopClient.request(yopRequest);
	}

	/**
	 * 付款-下单
	 */
	public YopResponse accountPayOrder(AccountPayOrderDto accountPayOrderDto) {
		YopRequest yopRequest = YeepaySaas.ACCOUNT_PAY_ORDER.buildRequest();
		YeepayUtils.addParamsFromObj(accountPayOrderDto, yopRequest, AccountPayOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 付款-撤销
	 */
	public YopResponse accountPayCancel(AccountPayCancelDto accountPayCancelDto) {
		YopRequest yopRequest = YeepaySaas.ACCOUNT_PAY_CANCEL.buildRequest();
		YeepayUtils.addParamsFromObj(accountPayCancelDto, yopRequest, AccountPayCancelDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 付款-查询
	 */
	public YopResponse accountPayQuery(AccountPayQueryDto accountPayQueryDto) {
		YopRequest yopRequest = YeepaySaas.ACCOUNT_PAY_CANCEL.buildRequest();
		YeepayUtils.addParamsFromObj(accountPayQueryDto, yopRequest, AccountPayQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 付款-批量下单
	 */
	public YopResponse accountPayBatchOrder(AccountPayBatchOrderDto accountPayBatchOrderDto) {
		YopRequest yopRequest = YeepaySaas.ACCOUNT_PAY_BATCH_ORDER.buildRequest();
		YeepayUtils.addParamsFromObj(accountPayBatchOrderDto, yopRequest, AccountPayBatchOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 付款-批次查询
	 */
	public YopResponse accountPayBatchOrderQuery(String batchNo) {
		YopRequest yopRequest = YeepaySaas.ACCOUNT_PAY_BATCH_QUERY.buildRequest();
		yopRequest.addParameter("batchNo", batchNo);
		return yopClient.request(yopRequest);
	}

	/**
	 * 付款到供应商--申请添加供应商
	 */
	public YopResponse supplierApply(SupplierApplyDto supplierApplyDto) {
		YopRequest yopRequest = YeepaySaas.SUPPLIER_APPLY.buildRequest();
		YeepayUtils.addParamsFromObj(supplierApplyDto, yopRequest, SupplierApplyDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 付款到供应商--查询申请进度
	 */
	public YopResponse supplierQueryProgress(String requestNo) {
		YopRequest yopRequest = YeepaySaas.SUPPLIER_QUERY_PROGRESS.buildRequest();
		yopRequest.addParameter("requestNo", requestNo);
		return yopClient.request(yopRequest);
	}

	/**
	 * 付款到供应商--查询已添加的供应商
	 */
	public YopResponse supplierQuery(String merchantNo) {
		YopRequest yopRequest = YeepaySaas.SUPPLIER_QUERY_PROGRESS.buildRequest();
		yopRequest.addParameter("merchantNo", merchantNo);
		return yopClient.request(yopRequest);
	}

	/**
	 * 付款到供应商--下单
	 */
	public YopResponse supplierPayOrder(SupplierPayOrderDto supplierPayOrderDto) {
		YopRequest yopRequest = YeepaySaas.SUPPLIER_APPLY.buildRequest();
		YeepayUtils.addParamsFromObj(supplierPayOrderDto, yopRequest, SupplierPayOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 交易下单
	 */
	public YopResponse tradeOrder(TradeOrderDto tradeOrderDto) {
		YopRequest yopRequest = YeepaySaas.TRADE_ORDER.buildRequest();
		YeepayUtils.addParamsFromObj(tradeOrderDto, yopRequest, TradeOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 企业账户支付-下单
	 */
	public YopResponse enterpriseAccountPayOrder(EnterpriseAccountPayOrderDto enterpriseAccountPayOrderDto) {
		YopRequest yopRequest = YeepaySaas.ENTERPRISE_ACCOUNT_PAY_ORDER.buildRequest();
		YeepayUtils.addParamsFromObj(enterpriseAccountPayOrderDto, yopRequest, EnterpriseAccountPayOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 企业账户支付-自动付款
	 */
	public YopResponse enterpriseAutoPaymentOrder(EnterpriseAutoPaymentOrderDto enterpriseAutoPaymentOrderDto) {
		YopRequest yopRequest = YeepaySaas.ENTERPRISE_AUTO_PAYMENT_ORDER.buildRequest();
		YeepayUtils.addParamsFromObj(enterpriseAutoPaymentOrderDto, yopRequest, EnterpriseAutoPaymentOrderDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 企业账户支付-自动付款订单查询
	 */
	public YopResponse enterpriseAutoPaymentQuery(EnterpriseAutoPaymentQueryDto enterpriseAutoPaymentQueryDto) {
		YopRequest yopRequest = YeepaySaas.ENTERPRISE_AUTO_PAYMENT_ORDER.buildRequest();
		YeepayUtils.addParamsFromObj(enterpriseAutoPaymentQueryDto, yopRequest, EnterpriseAutoPaymentQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 查询合并订单
	 */
	public YopResponse tradeOrderCombineQuery(TradeOrderCombineQueryDto tradeOrderCombineQueryDto) {
		YopRequest yopRequest = YeepaySaas.TRADE_ORDER_COMBINE_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(tradeOrderCombineQueryDto, yopRequest, TradeOrderCombineQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 关闭订单
	 */
	public YopResponse tradeOrderClose(TradeOrderCloseDto tradeOrderCloseDto) {
		YopRequest yopRequest = YeepaySaas.TRADE_ORDER_CLOSE.buildRequest();
		YeepayUtils.addParamsFromObj(tradeOrderCloseDto, yopRequest, TradeOrderCloseDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 查询订单
	 */
	public YopResponse tradeOrderQuery(TradeOrderQueryDto tradeOrderQueryDto) {
		YopRequest yopRequest = YeepaySaas.TRADE_ORDER_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(tradeOrderQueryDto, yopRequest, TradeOrderQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 申请分账
	 */
	public YopResponse divideApply(DivideApplyDto divideApplyDto) {
		YopRequest yopRequest = YeepaySaas.DIVIDE_APPLY.buildRequest();
		YeepayUtils.addParamsFromObj(divideApplyDto, yopRequest, DivideApplyDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 完结分账
	 */
	public YopResponse divideComplete(DivideCompleteDto divideCompleteDto) {
		YopRequest yopRequest = YeepaySaas.DIVIDE_COMPLETE.buildRequest();
		YeepayUtils.addParamsFromObj(divideCompleteDto, yopRequest, DivideCompleteDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 查询分账资金归还结果
	 */
	public YopResponse divideBackQuery(DivideBackQueryDto divideBackQueryDto) {
		YopRequest yopRequest = YeepaySaas.DIVIDE_BACK_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(divideBackQueryDto, yopRequest, DivideBackQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 申请分账资金归还
	 */
	public YopResponse divideBack(DivideBackDto divideBackDto) {
		YopRequest yopRequest = YeepaySaas.DIVIDE_BACK.buildRequest();
		YeepayUtils.addParamsFromObj(divideBackDto, yopRequest, DivideBackDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 查询分账结果
	 */
	public YopResponse divideQuery(DivideQueryDto divideQueryDto) {
		YopRequest yopRequest = YeepaySaas.DIVIDE_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(divideQueryDto, yopRequest, DivideQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 申请极速退款
	 */
	public YopResponse refundFast(RefundFastDto refundFastDto) {
		YopRequest yopRequest = YeepaySaas.REFUND_FAST.buildRequest();
		YeepayUtils.addParamsFromObj(refundFastDto, yopRequest, RefundFastDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 上送卡信息退款
	 */
	public YopResponse refundSupply(RefundSupplyDto refundSupplyDto) {
		YopRequest yopRequest = YeepaySaas.REFUND_SUPPLY.buildRequest();
		YeepayUtils.addParamsFromObj(refundSupplyDto, yopRequest, RefundSupplyDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 结束退款
	 */
	public YopResponse refundEnd(RefundEndDto refundEndDto) {
		YopRequest yopRequest = YeepaySaas.REFUND_END.buildRequest();
		YeepayUtils.addParamsFromObj(refundEndDto, yopRequest, RefundEndDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 申请退款
	 */
	public YopResponse refund(RefundDto refundDto) {
		YopRequest yopRequest = YeepaySaas.REFUND.buildRequest();
		YeepayUtils.addParamsFromObj(refundDto, yopRequest, RefundDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 查询退款
	 */
	public YopResponse refundQuery(RefundQueryDto refundQueryDto) {
		YopRequest yopRequest = YeepaySaas.REFUND_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(refundQueryDto, yopRequest, RefundQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 交易回单
	 */
	public YopResponse tradeReceiptDownload(TradeReceiptDownloadDto tradeReceiptDownloadDto) {
		YopRequest yopRequest = YeepaySaas.TRADE_RECEIPT_DOWNLOAD.buildRequest();
		YeepayUtils.addParamsFromObj(tradeReceiptDownloadDto, yopRequest, TradeReceiptDownloadDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 分账回单
	 */
	public YopResponse divideReceiptDownload(DivideReceiptDownloadDto divideReceiptDownloadDto) {
		YopRequest yopRequest = YeepaySaas.DIVIDE_RECEIPT_DOWNLOAD.buildRequest();
		YeepayUtils.addParamsFromObj(divideReceiptDownloadDto, yopRequest, DivideReceiptDownloadDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 待结算账户查询
	 */
	public YopResponse settleBalanceQuery(SettleBalanceQueryDto settleBalanceQueryDto) {
		YopRequest yopRequest = YeepaySaas.SETTLE_BALANCE_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(settleBalanceQueryDto, yopRequest, SettleBalanceQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 自助结算申请
	 */
	public YopResponse settleSelfSettleApply(SettleSelfSettleApplyDto settleSelfSettleApplyDto) {
		YopRequest yopRequest = YeepaySaas.SETTLE_SELF_SETTLE_APPLY.buildRequest();
		YeepayUtils.addParamsFromObj(settleSelfSettleApplyDto, yopRequest, SettleSelfSettleApplyDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 结算记录查询
	 */
	public YopResponse settleRecordsQuery(SettleRecordsQueryDto settleRecordsQueryDto) {
		YopRequest yopRequest = YeepaySaas.SETTLE_RECORDS_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(settleRecordsQueryDto, yopRequest, SettleRecordsQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 结算对账文件获取接口
	 */
	public YopResponse settleFileGet(SettleFileGetDto settleFileGetDto) {
		YopRequest yopRequest = YeepaySaas.SETTLE_FILE_GET.buildRequest();
		YeepayUtils.addParamsFromObj(settleFileGetDto, yopRequest, SettleFileGetDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 新增结算卡
	 */
	public YopResponse settleCardAdd(SettleCardAddDto settleCardAddDto) {
		YopRequest yopRequest = YeepaySaas.SETTLE_CARD_ADD.buildRequest();
		YeepayUtils.addParamsFromObj(settleCardAddDto, yopRequest, SettleCardAddDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 修改结算卡
	 */
	public YopResponse settleCardModify(SettleCardModifyDto settleCardModifyDto) {
		YopRequest yopRequest = YeepaySaas.SETTLE_CARD_MODIFY.buildRequest();
		YeepayUtils.addParamsFromObj(settleCardModifyDto, yopRequest, SettleCardModifyDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 电子回单-下载
	 */
	public YopResponse receiptGet(ReceiptGetDto receiptGetDto) {
		YopRequest yopRequest = YeepaySaas.RECEIPT_GET.buildRequest();
		YeepayUtils.addParamsFromObj(receiptGetDto, yopRequest, ReceiptGetDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 资金账单下载
	 */
	public YopResponse fundBillDownload(FundBillDownloadDto fundBillDownloadDto) {
		YopRequest yopRequest = YeepaySaas.FUND_BILL_DOWNLOAD.buildRequest();
		YeepayUtils.addParamsFromObj(fundBillDownloadDto, yopRequest, FundBillDownloadDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 资金账单申请
	 */
	public YopResponse fundBillApply(FundBillApplyDto fundBillApplyDto) {
		YopRequest yopRequest = YeepaySaas.FUND_BILL_APPLY.buildRequest();
		YeepayUtils.addParamsFromObj(fundBillApplyDto, yopRequest, FundBillApplyDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 交易日对账下载
	 */
	public YopResponse billTradeDayDownload(BillTradeDayDownloadDto billTradeDayDownloadDto) {
		YopRequest yopRequest = YeepaySaas.BILL_TRADE_DAY_DOWNLOAD.buildRequest();
		YeepayUtils.addParamsFromObj(billTradeDayDownloadDto, yopRequest, BillTradeDayDownloadDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 账户对账单-下载
	 */
	public YopResponse billDownload(BillDownloadDto billDownloadDto) {
		YopRequest yopRequest = YeepaySaas.BILL_DOWNLOAD.buildRequest();
		YeepayUtils.addParamsFromObj(billDownloadDto, yopRequest, BillDownloadDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 分账日对账下载
	 */
	public YopResponse billDivideDayDownload(BillDivideDayDownloadDto billDivideDayDownloadDto) {
		YopRequest yopRequest = YeepaySaas.BILL_DIVIDE_DAY_DOWNLOAD.buildRequest();
		YeepayUtils.addParamsFromObj(billDivideDayDownloadDto, yopRequest, BillDivideDayDownloadDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 商户产品费率变更
	 */
	public YopResponse productFeeModify(ProductFeeModifyDto productFeeModifyDto) {
		YopRequest yopRequest = YeepaySaas.PRODUCT_FEE_MODIFY.buildRequest();
		YeepayUtils.addParamsFromObj(productFeeModifyDto, yopRequest, ProductFeeModifyDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 商户产品费率查询
	 */
	public YopResponse productFeeQuery(ProductFeeQueryDto productFeeQueryDto) {
		YopRequest yopRequest = YeepaySaas.PRODUCT_FEE_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(productFeeQueryDto, yopRequest, ProductFeeQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 沉默商户解冻申请
	 */
	public YopResponse merchantDisposeUnfreeze(MerchantDisposeUnfreezeDto merchantDisposeUnfreezeDto) {
		YopRequest yopRequest = YeepaySaas.MERCHANT_DISPOSE_UNFREEZE.buildRequest();
		YeepayUtils.addParamsFromObj(merchantDisposeUnfreezeDto, yopRequest, MerchantDisposeUnfreezeDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 沉默商户解冻申请进度查询
	 */
	public YopResponse merchantDisposeQuery(MerchantDisposeQueryDto merchantDisposeQueryDto) {
		YopRequest yopRequest = YeepaySaas.MERCHANT_DISPOSE_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(merchantDisposeQueryDto, yopRequest, MerchantDisposeQueryDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 公众号配置接口
	 */
	public YopResponse wechatConfigAdd(WechatConfigAddDto wechatConfigAddDto) {
		YopRequest yopRequest = YeepaySaas.WECHAT_CONFIG_ADD.buildRequest();
		YeepayUtils.addParamsFromObj(wechatConfigAddDto, yopRequest, WechatConfigAddDto.class);
		return yopClient.request(yopRequest);
	}

	/**
	 * 公众号配置查询
	 */
	public YopResponse wechatConfigQuery(WechatConfigQueryDto wechatConfigQueryDto) {
		YopRequest yopRequest = YeepaySaas.WECHAT_CONFIG_QUERY.buildRequest();
		YeepayUtils.addParamsFromObj(wechatConfigQueryDto, yopRequest, WechatConfigQueryDto.class);
		return yopClient.request(yopRequest);
	}

}
