UNPKG

falcotura-atv-sdk

Version:

Librería (SDK) de Javascript/NodeJS para acceder al API de Administración Tributaria Virtual (ATV) del Ministerio de Hacienda.

29 lines 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Clave = void 0; const genClave_1 = require("../../lib/genClave"); class Clave { get value() { const claveObj = (0, genClave_1.genClaveObj)({ cedulaEmisor: this.props.emitterIdentifier, codigoPais: this.props.countryCode, codigoSeguridad: this.props.securityCode, consecutivo: this.props.consecutiveIdentifier, situacionCE: this.props.ceSituation, sucursal: this.props.branch, terminal: this.props.terminal, tipoCedula: this.props.identifierType, tipoDocKey: this.props.docKeyType }); const claveStr = (0, genClave_1.genString)(claveObj); return claveStr; } constructor(props) { this.props = props; } static create(props) { return new Clave(Object.assign(Object.assign({}, props), { branch: props.branch.padStart(3, '0'), terminal: props.terminal.padStart(5, '0'), securityCode: props.securityCode.padStart(8, '0') })); } } exports.Clave = Clave; //# sourceMappingURL=Clave.js.map