facturajs
Version:
Comunicación con los web services de AFIP utilizando nodejs.
27 lines • 809 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const AfipServices_1 = require("../AfipServices");
const config = {
certPath: './private/dev/cert.pem',
privateKeyPath: './private/dev/private_key.key',
cacheTokensPath: './.lastTokens',
homo: true,
tokensExpireInHours: 12,
};
const afip = new AfipServices_1.AfipServices(config);
const cuit = 27310090854;
async function facturaBExample() {
const res = await afip.getLastBillNumber({
Auth: { Cuit: cuit },
params: {
CbteTipo: 6,
PtoVta: 7,
},
});
console.log('Last bill number: ', res.CbteNro);
}
facturaBExample().catch((err) => {
console.error('Something was wrong!');
console.error(err);
});
//# sourceMappingURL=get-last-bill-number.js.map