package org.springblade.yeePay.api;

import com.yeepay.yop.sdk.service.common.request.YopRequest;
import lombok.Getter;

/**
 * @author: lianghanqiang
 * @description: 易宝--平台商API
 * @since: 9/6/21 -- 11:14 AM
 */
@Getter
public enum YeepaySaas {

	//----------------------------聚合支付start--------------------------------------
	/**
	 * 查询商户入网进度
	 */
	Query_Invitation("/rest/v2.0/mer/register/query", "GET"),

	/**
	 * 聚合支付统一下单
	 */
	AGGPAY_PREPAY("/rest/v1.0/aggpay/pre-pay", "POST"),

	/**
	 * 微信实名认证申请单申请
	 */
	WECHAT_AUTH_APPLY("/rest/v1.0/mer/merchant/wechatauth/apply", "POST"),

	/**
	 * 特约商户入网(企业/个体)
	 */
	Invitation_TO_YEEPAY("/rest/v2.0/mer/register/saas/merchant", "POST"),

	/**
	 * 特约商户入网(小微)
	 */
	MICRO_Invitation_TO_YEEPAY("/rest/v2.0/mer/register/saas/micro", "POST"),

	/**
	 * 生成聚合订单码
	 */
	PAY_LINK_ORDER("/rest/v1.0/cashier/pay-link/order", "POST"),

	/**
	 * 付款码支付
	 */
	AGG_PAY_PAY("/rest/v1.0/aggpay/pay", "POST"),

	/**
	 * 撤销微信实名认证申请单
	 */
	WECHAT_AUTH_CANCEL("/rest/v1.0/mer/merchant/wechatauth/cancel", "POST"),

	/**
	 * 查询微信实名认证状态
	 */
	WECHAT_AUTH_QUERY("/rest/v1.0/mer/merchant/wechatauth/query", "GET"),

	/**
	 * 商户授权状态查询接口
	 */
	AUTH_STATE_QUERY("/rest/v2.0/mer/auth/state/query", "GET"),

	/**
	 * 微信违规查询接口(服务商/平台商版)
	 */
	WECHAT_VIOLATION_CHANNEL("/rest/v1.0/aggpay/violation/wechat/channel", "GET"),

	/**
	 *公众号配置接口
	 */
	WECHAT_CONFIG_ADD("/rest/v2.0/aggpay/wechat-config/add","POST"),

	/**
	 *公众号配置查询
	 */
	WECHAT_CONFIG_QUERY("/rest/v2.0/aggpay/wechat-config/query","GET"),

	//----------------------------聚合支付end--------------------------------------

	//----------------------------账户服务start--------------------------------------
	/**
	 * 充值-网银下单
	 */
	ONLINE_BANK_RECHARGE_ORDER("/rest/v1.0/account/recharge/onlinebank/order", "POST"),

	/**
	 * 充值-银行汇款下单
	 */
	BANK_RECHARGE_ORDER("/rest/v1.0/account/recharge/order", "POST"),

	/**
	 * 充值-查询
	 */
	RECHARGE_QUERY("/rest/v1.0/account/recharge/query", "GET"),

	/**
	 * 转账-下单
	 */
	TRANSFER_ORDER("/rest/v1.0/account/transfer/b2b/order", "POST"),

	/**
	 * 转账-查询
	 */
	TRANSFER_B2B_QUERY("/rest/v1.0/account/transfer/b2b/query", "GET"),

	/**
	 * 提现-查询
	 */
	WITHDRAW_QUERY("/rest/v1.0/account/withdraw/query", "GET"),

	/**
	 * 提现-下单
	 */
	WITHDRAW_ORDER("/rest/v1.0/account/withdraw/order", "POST"),

	/**
	 * 提现卡查询
	 */
	WITHDRAW_CARD_QUERY("/rest/v1.0/account/withdraw/card/query", "GET"),

	/**
	 * 提现卡-添加
	 */
	WITHDRAW_CARD_BIND("/rest/v1.0/account/withdraw/card/bind", "POST"),

	/**
	 * 提现卡-修改/注销
	 */
	WITHDRAW_CARD_MODIFY("/rest/v1.0/account/withdraw/card/modify", "POST"),

	/**
	 * 自动提现-规则设置
	 */
	AUTO_WITHDRAW_RULE_SET("/rest/v1.0/account/auto-withdraw-rules/set", "POST"),

	/**
	 * 自动提现-规则查询
	 */
	AUTO_WITHDRAW_RULE_QUERY("/rest/v1.0/account/auto-withdraw-rules/query", "GET"),

	/**
	 * 自动提现-规则作废
	 */
	AUTO_WITHDRAW_RULE_CANCEL("/rest/v1.0/account/auto-withdraw-rules/cancel", "POST"),

	/**
	 * 账户余额的查询
	 */
	ACCOUNT_INFOS_QUERY("/rest/v1.0/account/accountinfos/query", "GET"),

	/**
	 * 资金账户余额查询
	 */
	ACCOUNT_BALANCE_QUERY("/rest/v1.0/account/balance/query", "GET"),

	/**
	 * 付款-下单
	 */
	ACCOUNT_PAY_ORDER("/rest/v1.0/account/pay/order", "POST"),

	/**
	 * 付款-撤销
	 */
	ACCOUNT_PAY_CANCEL("/rest/v1.0/account/pay/cancel", "POST"),

	/**
	 * 付款-查询
	 */
	ACCOUNT_PAY_QUERY("/rest/v1.0/account/pay/query", "GET"),

	/**
	 * 付款-批量下单
	 */
	ACCOUNT_PAY_BATCH_ORDER("/rest/v1.0/account/pay/batch-order", "POST"),

	/**
	 * 付款-批次查询
	 */
	ACCOUNT_PAY_BATCH_QUERY("/rest/v1.0/account/pay/batch-query", "GET"),

	/**
	 * 付款到供应商--申请添加供应商
	 */
	SUPPLIER_APPLY("/rest/v1.0/account/supplier/apply", "POST"),

	/**
	 * 付款到供应商--查询申请进度
	 */
	SUPPLIER_QUERY_PROGRESS("/rest/v1.0/account/supplier/query-progress", "GET"),

	/**
	 * 付款到供应商--查询已添加的供应商
	 */
	SUPPLIER_QUERY("/rest/v1.0/account/supplier/query", "GET"),

	/**
	 * 付款到供应商-下单
	 */
	SUPPLIER_PAY_ORDER("/rest/v1.0/account/supplier/pay/order", "POST"),
	//----------------------------账户服务end--------------------------------------

	//----------------------------交易start--------------------------------------
	/**
	 * 交易下单
	 */
	TRADE_ORDER("/rest/v1.0/trade/order", "POST"),

	/**
	 * 企业账户支付-下单
	 */
	ENTERPRISE_ACCOUNT_PAY_ORDER("/rest/v1.0/account/enterprise/account-pay/order", "POST"),

	/**
	 * 企业账户支付-自动付款
	 */
	ENTERPRISE_AUTO_PAYMENT_ORDER("/rest/v1.0/account/enterprise/auto-payment/order", "POST"),

	/**
	 * 企业账户支付-自动付款订单查询
	 */
	ENTERPRISE_AUTO_PAYMENT_QUERY("/rest/v1.0/account/enterprise/auto-payment/query", "GET"),

	/**
	 * 查询合并订单
	 */
	TRADE_ORDER_COMBINE_QUERY("/rest/v1.0/trade/order/combine-query", "GET"),

	/**
	 * 关闭订单
	 */
	TRADE_ORDER_CLOSE("/rest/v1.0/trade/order/close", "POST"),

	/**
	 * 查询订单
	 */
	TRADE_ORDER_QUERY("/rest/v1.0/trade/order/query", "GET"),

	/**
	 * 申请分账
	 */
	DIVIDE_APPLY("/rest/v1.0/divide/apply", "POST"),

	/**
	 * 完结分账
	 */
	DIVIDE_COMPLETE("/rest/v1.0/divide/complete", "POST"),

	/**
	 * 查询分账资金归还结果
	 */
	DIVIDE_BACK_QUERY("/rest/v1.0/divide/back/query", "GET"),

	/**
	 * 申请分账资金归还
	 */
	DIVIDE_BACK("/rest/v1.0/divide/back", "POST"),

	/**
	 * 查询分账结果
	 */
	DIVIDE_QUERY("/rest/v1.0/divide/query", "GET"),

	/**
	 * 申请极速退款
	 */
	REFUND_FAST("/rest/v1.0/trade/refund/fast", "POST"),

	/**
	 * 上送卡信息退款
	 */
	REFUND_SUPPLY("/rest/v1.0/trade/refund/supply", "POST"),

	/**
	 * 结束退款
	 */
	REFUND_END("/rest/v1.0/trade/refund/end", "POST"),

	/**
	 * 申请退款
	 */
	REFUND("/rest/v1.0/trade/refund", "POST"),

	/**
	 * 查询退款
	 */
	REFUND_QUERY("/rest/v1.0/trade/refund/query", "GET"),

	/**
	 * 交易回单
	 */
	TRADE_RECEIPT_DOWNLOAD("/yos/v1.0/trade/receipt/download", "GET"),

	/**
	 * 分账回单
	 */
	DIVIDE_RECEIPT_DOWNLOAD("/yos/v1.0/divide/receipt/download", "GET"),
	//----------------------------交易end----------------------------------------

	//----------------------------结算start--------------------------------------
	/**
	 * 待结算金额查询
	 */
	SETTLE_BALANCE_QUERY("/rest/v1.0/settle/balance/query", "GET"),

	/**
	 * 自助结算申请
	 */
	SETTLE_SELF_SETTLE_APPLY("/rest/v1.0/settle/self-settle/apply", "POST"),

	/**
	 * 结算记录查询
	 */
	SETTLE_RECORDS_QUERY("/rest/v1.0/settle/records/query", "GET"),

	/**
	 * 结算对账文件获取接口
	 */
	SETTLE_FILE_GET("/yos/v1.0/settle/file/get", "GET"),

	/**
	 * 新增结算卡
	 */
	SETTLE_CARD_ADD("/rest/v1.0/settle/settle-card/add", "POST"),

	/**
	 * 修改结算卡
	 */
	SETTLE_CARD_MODIFY("/rest/v1.0/settle/settle-card/modify", "POST"),
	//----------------------------结算end----------------------------------------

	//----------------------------对账start--------------------------------------
	/**
	 * 电子回单-下载
	 */
	RECEIPT_GET("/rest/v1.0/account/receipt/get", "GET"),

	/**
	 * 资金账单下载
	 */
	FUND_BILL_DOWNLOAD("/yos/v1.0/std/bill/fundbill/download", "GET"),

	/**
	 * 资金账单申请
	 */
	FUND_BILL_APPLY("/rest/v1.0/std/bill/fundbill/apply", "POST"),

	/**
	 * 交易日对账下载
	 */
	BILL_TRADE_DAY_DOWNLOAD("/yos/v1.0/std/bill/tradedaydownload", "POST"),

	/**
	 * 账户对账单-下载
	 */
	BILL_DOWNLOAD("/yos/v1.0/bill/download", "GET"),

	/**
	 * 分账日对账下载
	 */
	BILL_DIVIDE_DAY_DOWNLOAD("/yos/v1.0/std/bill/dividedaydownload", "GET"),
	//----------------------------对账end----------------------------------------

	//----------------------------变更服务start-----------------------------------
	/**
	 * 商户产品费率变更
	 */
	PRODUCT_FEE_MODIFY("/rest/v2.0/mer/product/fee/modify", "POST"),

	/**
	 * 商户产品费率查询
	 */
	PRODUCT_FEE_QUERY("/rest/v2.0/mer/product/fee/query", "GET"),

	/**
	 * 沉默商户解冻申请
	 */
	MERCHANT_DISPOSE_UNFREEZE("/rest/v1.0/mer/merchant/dispose/unfreeze","POST"),

	/**
	 * 沉默商户解冻申请进度查询
	 */
	MERCHANT_DISPOSE_QUERY("/rest/v1.0/mer/merchant/dispose/query","GET"),


	//----------------------------变更服务end  -----------------------------------
	;


	String requestUrl;
	String requestMethods;

	YeepaySaas(String url, String requestMethods) {
		this.requestMethods = requestMethods;
		this.requestUrl = url;
	}

	public YopRequest buildRequest() {
		return new YopRequest(requestUrl, requestMethods);
	}
}
