UNPKG

coa-allin-pay

Version:
93 lines (92 loc) 3.62 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AllinPayComplaintService = void 0; const AllinPaySybService_1 = require("../libs/AllinPaySybService"); class AllinPayComplaintService extends AllinPaySybService_1.AllinPaySybService { /** * 微信查询投诉单列表 * @link https://aipboss.allinpay.com/know/devhelp/main.php?pid=75#mid=1203 * @param beginDate 开始日期,格式为yyyy-MM-DD。注意,查询日期跨度不超过30天 * @param endDate 结束日期,格式为yyyy-MM-DD。注意,查询日期跨度不超过30天 * @param currentPageNum 当前页码,分页查询页码,不传则默认为1 * @param pageSize 每页条数,分页查询每次查询的数据量,建议不超过20,不传则默认为10 */ async complaintQry(beginDate, endDate, currentPageNum = 1, pageSize = 10) { return await this.bin.request('riskfeeback', 'wxcomplaintlistquery', { begindate: beginDate, enddate: endDate, current_page_num: currentPageNum, page_size: pageSize, groupall: 1, }); } /** * 微信查询投诉单详情 * @link https://aipboss.allinpay.com/know/devhelp/main.php?pid=75#mid=1204 * @param cusId 平台商户号 * @param complaintId 投诉单号 */ async complaintDetail(cusId, complaintId) { return await this.bin.request('riskfeeback', 'wxcomplaintdetail', { cusId, complaint_id: complaintId, }); } /** * 微信查询投诉协商历史 * @link https://aipboss.allinpay.com/know/devhelp/main.php?pid=75#mid=1218 * @param cusId 平台商户号 * @param complaintId 投诉单号 * @param offset 分页大小,可空,默认为0 * @param limit 分页开始位置,可空,默认为100 */ async complaintHistory(cusId, complaintId, offset = 0, limit = 100) { return await this.bin.request('riskfeeback', 'wxcomplainthistory', { cusId, complaint_id: complaintId, offset, limit, }); } /** * 微信回复用户 * @link https://aipboss.allinpay.com/know/devhelp/main.php?pid=75#mid=1219 * @param cusId 平台商户号 * @param complaintId 投诉单号 * @param content 回复内容,不超过200字符 * @param images 回复图片,多张是以#@#相隔,最多4张 */ async complaintResp(cusId, complaintId, content, images = '') { return await this.bin.request('riskfeeback', 'complaintsResp', { cusId, complaint_id: complaintId, response_content: content, response_images: images, }); } /** * 微信反馈处理完成 * @link https://aipboss.allinpay.com/know/devhelp/main.php?pid=75#mid=1220 * @param cusId 平台商户号 * @param complaintId 投诉单号 */ async complaintComplete(cusId, complaintId) { return await this.bin.request('riskfeeback', 'complaintsComplete', { cusId, complaint_id: complaintId, }); } /** * 微信下载微信图片 * @link https://aipboss.allinpay.com/know/devhelp/main.php?pid=45#mid=1210 * @param cusId 平台商户号 * @param imgUrl 图片地址 */ async getMerchantImage(cusId, imgUrl) { return await this.bin.request('riskfeeback', 'wxgetmerchantimage', { cusId, imgurl: imgUrl, }); } } exports.AllinPayComplaintService = AllinPayComplaintService;