UNPKG

@montarist/nilvera-api

Version:

An unofficial SDK for integrating with Nilvera e-Invoice, e-Archive services

30 lines (29 loc) 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GeneralService = void 0; const constants_1 = require("../constants"); const base_service_1 = require("./base.service"); /** * GeneralService * Service for managing general operations. */ class GeneralService extends base_service_1.BaseService { /** * Gets exchange rates. * @returns {Promise<ApiResponse<ExchangeRateResponse>>} - Exchange rates information with curl command */ async getExchangeRates() { const url = constants_1.GENERAL_ENDPOINTS.EXCHANGE_RATE.GET; return await this.apiClient.get(url); } /** * Checks if a taxpayer is an e-invoice taxpayer. * @param {string} taxNumber - Tax number * @returns {Promise<ApiResponse<any[]>>} - Information about taxpayer's e-invoice status with curl command */ async checkIfGlobalCustomer(taxNumber) { const url = constants_1.GENERAL_ENDPOINTS.GLOBAL_COMPANY.CHECK_BY_TAX(taxNumber); return await this.apiClient.get(url); } } exports.GeneralService = GeneralService;