UNPKG

asaas

Version:

Unofficial Asaas Payment Gateway SDK

20 lines (19 loc) 519 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseAPI = void 0; class BaseAPI { apiClient; printError; constructor(apiClient, options = {}) { this.apiClient = apiClient; this.printError = options.printError !== undefined ? options.printError : true; } handleError(error, errorMessage) { if (this.printError) { console.error(errorMessage, error); } throw error; } } exports.BaseAPI = BaseAPI;