package com.jeesharp.business.modules.pay.api;

import com.jeesharp.business.modules.pay.refund.dto.PayRefundRequestDTO;
import com.jeesharp.business.modules.pay.refund.dto.PayRefundResultDTO;

/**
 * 微信退款渠道跨模块 API，供财务退款应用服务调用；按 {@code wechatPayMode} 分流直连与收付通。
 *
 * @author jeesharp
 * @since 2026-06-11
 */
public interface PayRefundChannelApi {

    /**
     * 发起微信退款：DIRECT → {@code /v3/refund/domestic/refunds}；PARTNER → {@code /v3/ecommerce/refunds/apply}。
     */
    PayRefundResultDTO applyRefund(PayRefundRequestDTO request);

    /**
     * 按商户退款单号查询退款状态（直连/收付通路径由 {@code wechatPayMode} 决定）。
     *
     * @param wechatPayMode DIRECT / PARTNER，空则按 DIRECT
     * @param subMchId      PARTNER 必填
     */
    PayRefundResultDTO queryByOutRefundNo(String platformTenantId, String wechatPayMode,
            String subMchId, String outRefundNo);
}
