package com.jeequan.jeepay.thirdparty.channel.sxfpay.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

/**
 * TODO
 *
 * @author crystal
 * @date 2024/2/27 11:52
 */
@Data
public class ReqMethod {

    /**
     * 统一请求域名
     */
    private final static String DOMAIN = "https://openapi.tianquetech.com";


    @Getter
    @AllArgsConstructor
    public enum Method{

        WX_CERT("/merchant/realName/commitApply","微信认证"),

        WX_CERT_STATUS("/merchant/realName/queryGrantStatus","查询微信认证授权状态"),

        WX_CERT_RESULT("/merchant/realName/queryApplyInfo","微信实名认证申请结果查询接口"),

        WX_CERT_CANCEL("/merchant/realName/backApplyBill","微信实名认证申请撤销接口"),

        ALI_CERT("/merchant/alipayRealName/commitApply","支付宝实名认证申请"),

        ALI_CERT_STATUS("/merchant/alipayRealName/queryGrantStatus","支付宝实名认证状态查询"),

        ALI_CERT_RESULT("/merchant/alipayRealName/queryApplyInfo","支付宝实名认证结果查询"),

        ALI_CERT_CANCEL("/merchant/alipayRealName/backApplyBill","支付宝实名认证申请单撤销"),

        MERCHANT_INCOME("/merchant/income","商户入驻"),

        MERCHANT_INCOME_PHOTO_UPLOAD("/merchant/uploadPicture","进件图片上传"),

        MERCHANT_INFO_UPDATE("/merchant/updateMerchantInfo","商户入驻信息修改"),

        MERCHANT_INFO_MODIFY("/merchant/editMerchantInfo","商户信息修改"),

        MERCHANT_APPLY_QUERY("/merchant/queryMerchantInfo","商户申请单信息查询"),

        MERCHANT_INFO_QUERY("/merchant/merchantInfoQuery","商户信息查询通过商户号"),

        MERCHANT_AUDIT_RESULT_QUERY("/merchant/queryModifyResult","商户审核结果查询"),

        /**
         * 正式环境修改商户费率信息 次日0时 生效
         */
        MERCHANT_RATE_UPDATE("/merchant/merchantSetup","商户费率信息修改"),

        MERCHANT_DETAIL_QUERY("/merchant/merchantInfoQuery","商户详情查询"),

        MERCHANT_WX_CONF("/merchant/weChatPaySet/addConf","商户微信参数配置配置APPID和支付授权目录"),

        MERCHANT_WX_CONF_QUERY("/merchant/weChatPaySet/queryConf","微信子商户支付参数查询"),

        TRADE_SCAN_PAY("/order/reverseScan","主扫付款（扫用户付款码发起支付）"),

        TRADE_JSAPI_PAY("/order/jsapiScan","被扫支付(用户扫二维码发起支付)"),

        TRADE_ORDER_REFUND("/order/refund","订单退款"),

        TRADE_REFUND_QUERY("/query/refundQuery","退款查询"),

        TRADE_ORDER_QUERY("/query/tradeQuery","交易查询"),

        TRADE_ORDER_CLOSE("/query/close","订单关闭"),

        TRADE_ORDER_CANCEL("/query/cancel","订单撤销"),

        TRADE_ACTIVE_PAY("/order/activeScan","商户生成带金额的付款码用户扫码付款"),

        OTHER_GET_WX_OPENID("/query/getSubOPenid","微信获取openid"),

        OTHER_GET_UNION_USERID("/query/getUnionInfo","获取银联用户标识"),


        MARKET_TANSFER("/capital/fundManage/orgTransfer","营销转账"),

        MARKET_TANSFER_QUERY("/capital/fundManage/getTransferInfo","营销转账查询"),

        MARKET_TRANSFER_BATCH("/capital/fundManage/batchTransfer","批量营销转账"),

        MARKET_TRANSFER_BATCH_QUERY("/capital/fundManage/queryBatchTransfer","批量营销转账查询"),

        SETTLE_QUERY("/capital/query/querySettlement","结算查询"),

        SETTLE_BALANCE_QUERY("/capital/query/queryBalance","商户结算余额查询"),


        CHECK_GET_FILE("/capital/fileDownload/getFileUrl","获取对账文件下载路径"),



        ;

        private final String method;

        private final String desc;

    }

    /**
     * 获取请求接口地址
     * @param method
     * @return
     */
    public static String getUrl(Method method){
        return DOMAIN + method.getMethod();
    }
}
