keycae-ts 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,17 +27,17 @@ const client = new KeyCaeClient('sk_test_public_sandbox_cuit_20999999999');
|
|
|
27
27
|
// O para producción: const client = new KeyCaeClient('sk_live_tu_api_key');
|
|
28
28
|
|
|
29
29
|
// Consultar contribuyente
|
|
30
|
-
const taxpayer = await client.getTaxpayer('
|
|
30
|
+
const taxpayer = await client.getTaxpayer('20999999999');
|
|
31
31
|
console.log(`${taxpayer.nombre} | ${taxpayer.estado}`);
|
|
32
32
|
|
|
33
33
|
// Verificar qué tipos de factura puede emitir
|
|
34
|
-
const capability = await client.checkEmissionCapability('
|
|
34
|
+
const capability = await client.checkEmissionCapability('20999999999');
|
|
35
35
|
console.log(`Tipos compatibles: ${capability.compatible_types.join(', ')}`);
|
|
36
36
|
console.log(capability.recommendation);
|
|
37
37
|
|
|
38
38
|
// Emitir factura
|
|
39
39
|
const invoice = await client.emitInvoice({
|
|
40
|
-
cuit_emisor: '
|
|
40
|
+
cuit_emisor: '20999999999',
|
|
41
41
|
punto_de_venta: 1,
|
|
42
42
|
tipo_comprobante: 'B',
|
|
43
43
|
receptor: { tipo_doc: 'CUIT', nro_doc: '20333444555' },
|
|
@@ -54,7 +54,7 @@ Por defecto `conceptos[].precio` se envía con IVA incluido. Si tu sistema manej
|
|
|
54
54
|
|
|
55
55
|
```typescript
|
|
56
56
|
const invoice = await client.emitInvoice({
|
|
57
|
-
cuit_emisor: '
|
|
57
|
+
cuit_emisor: '20999999999',
|
|
58
58
|
punto_de_venta: 1,
|
|
59
59
|
tipo_comprobante: 'A',
|
|
60
60
|
iva_incluido: false, // conceptos[].precio son netos
|
|
@@ -70,7 +70,7 @@ Los datos del emisor que se imprimen en el PDF (razón social, domicilio, Ingres
|
|
|
70
70
|
|
|
71
71
|
```typescript
|
|
72
72
|
const invoice = await client.emitInvoice({
|
|
73
|
-
cuit_emisor: '
|
|
73
|
+
cuit_emisor: '20999999999',
|
|
74
74
|
punto_de_venta: 1,
|
|
75
75
|
tipo_comprobante: 'B',
|
|
76
76
|
emisor_razon_social: 'Mi Empresa S.A.',
|
|
@@ -91,7 +91,7 @@ Sin certificados, sin llaves privadas. En minutos facturás.
|
|
|
91
91
|
|
|
92
92
|
```typescript
|
|
93
93
|
const delegation = await client.createDelegation({
|
|
94
|
-
cuit: '
|
|
94
|
+
cuit: '20999999999',
|
|
95
95
|
organization: 'Tu Empresa'
|
|
96
96
|
});
|
|
97
97
|
```
|
|
@@ -101,7 +101,7 @@ Generación segura de claves RSA y CSR.
|
|
|
101
101
|
|
|
102
102
|
```typescript
|
|
103
103
|
const credential = await client.createCredential({
|
|
104
|
-
cuit: '
|
|
104
|
+
cuit: '20999999999',
|
|
105
105
|
organization: 'Tu Empresa'
|
|
106
106
|
});
|
|
107
107
|
```
|
|
@@ -111,7 +111,7 @@ Subida directa de certificados (.crt) y llaves (.key).
|
|
|
111
111
|
|
|
112
112
|
```typescript
|
|
113
113
|
await client.importCredential({
|
|
114
|
-
cuit: '
|
|
114
|
+
cuit: '20999999999',
|
|
115
115
|
organization: 'Tu Empresa',
|
|
116
116
|
certificate: certificatePem,
|
|
117
117
|
private_key: privateKeyPem
|