UNPKG

portone-api-v2

Version:
43 lines 1.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CashReceipt = void 0; const request_1 = require("../request"); class CashReceipt extends request_1.PortOneRequest { constructor(portone) { super(portone); } /** * 현금영수증 단건 조회 * @param paymentId 결제 건 ID * @param storeId 상점 ID. 미입력 시 토큰에 담긴 값 사용 */ async find(paymentId, storeId) { return this.request({ method: 'GET', url: this.setQuery(`/payments/${paymentId}/cash-receipt`, { storeId }), }); } /** * 현금영수증 발급 */ async issue(data) { return this.request({ method: 'POST', url: '/cash-receipts', data, }); } /** * 현금영수증 취소 * @param paymentId 결제 건 ID * @param storeId 상점 ID. 미입력 시 토큰에 담긴 값 사용 */ async cancel(paymentId, storeId) { return this.request({ method: 'POST', url: this.setQuery(`/payments/${paymentId}/cash-receipt/cancel`, { storeId }), }); } } exports.CashReceipt = CashReceipt; //# sourceMappingURL=cash-receipt.js.map