UNPKG

portone-api-v2

Version:
53 lines 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BillingKey = void 0; const request_1 = require("../request"); class BillingKey extends request_1.PortOneRequest { constructor(portone) { super(portone); } /** * 빌링키 단건 조회 * @param billingKey 조회할 빌링키 * @param storeId 상점 ID. 미입력 시 토큰에 담긴 값 사용 */ async find(billingKey, storeId) { return this.request({ method: 'GET', url: this.setQuery(`/billing-keys/${billingKey}`, { storeId }), }); } /** * 빌링키 다건 조회 * @param requestBody 빌링키 다건 조회 요청 데이터 */ async findMany(requestBody) { return this.request({ method: 'GET', url: this.setQuery('/billing-keys', { requestBody }), }); } /** * 빌링키 발급 */ async issue(data) { return this.request({ method: 'POST', url: '/billing-keys', data, }); } /** * 빌링키 삭제 * @param billingKey 삭제할 빌링키 * @param storeId 상점 ID. 미입력 시 토큰에 담긴 값 사용 */ async delete(billingKey, storeId) { return this.request({ method: 'DELETE', url: this.setQuery(`/billing-keys/${billingKey}`, { storeId }), }); } } exports.BillingKey = BillingKey; //# sourceMappingURL=billing-key.js.map