Skip to content

Commit f88f6ed

Browse files
committed
Se migra API Client a nuevo paquete de composer.
1 parent 7f4e1b8 commit f88f6ed

17 files changed

Lines changed: 6080 additions & 456 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
vendor
2+
docs
3+
tests/test.env
4+
tests/contribuyentes.csv
5+

README.md

Lines changed: 66 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,77 @@
11
Cliente API Gateway para PHP
22
============================
33

4-
[![Total Downloads](https://poser.pugx.org/sasco/libredte-api-client/downloads)](https://packagist.org/packages/sasco/libredte-api-client)
5-
[![Monthly Downloads](https://poser.pugx.org/sasco/libredte-api-client/d/monthly)](https://packagist.org/packages/sasco/libredte-api-client)
6-
[![License](https://poser.pugx.org/sasco/libredte-api-client/license)](https://packagist.org/packages/sasco/libredte-api-client)
4+
[![Total Downloads](https://poser.pugx.org/apigatewaycl/apigateway-api-client/downloads)](https://packagist.org/packages/apigatewaycl/apigateway-api-client)
5+
[![Monthly Downloads](https://poser.pugx.org/apigatewaycl/apigateway-api-client/d/monthly)](https://packagist.org/packages/apigatewaycl/apigateway-api-client)
6+
[![License](https://poser.pugx.org/apigatewaycl/apigateway-api-client/license)](https://packagist.org/packages/apigatewaycl/apigateway-api-client)
77

8-
Cliente para realizar la integración con los servicios web de API Gateway (www.apigateway.cl) desde PHP.
9-
10-
Este código está liberado bajo licencia [LGPL](http://www.gnu.org/licenses/lgpl-3.0.en.html).
11-
O sea, puede ser utilizado tanto en software libre como en software privativo.
8+
Cliente para realizar la integración con los servicios web de [API Gateway](https://www.apigateway.cl) desde PHP.
129

1310
Instalación
1411
-----------
1512

16-
Directamente desde la terminal con:
13+
Ejecutar en la terminal:
14+
15+
```shell
16+
composer require apigatewaycl/apigateway-api-client
17+
```
18+
19+
Ejemplos
20+
--------
21+
22+
Para revisar ejemplos de cómo consumir los servicios web, dependiendo de la
23+
forma de autenticación que requieras usar, revisa las siguientes pruebas:
24+
25+
- Sin autenticación en SII: `SiiContribuyentesTest.php`.
26+
- Autenticación con RUT y clave tributaria: `SiiMisiiTest.php` o `SiiBheTest.php`.
27+
- Autenticación con firma electrónica: `SiiDteTest.php`.
28+
29+
Documentación (dev)
30+
-------------------
31+
32+
Para crear la documentación se necesita tener instaladas las dependencias
33+
de composer, GraphViz en el sistema operativo y luego ejecutar:
34+
35+
```shell
36+
./vendor/bin/phpdoc -d ./src -t ./docs
37+
```
38+
39+
Pruebas unitarias (dev)
40+
-----------------------
41+
42+
Para ejecutar las pruebas unitarias se necesita tener instaladas las
43+
dependencias de composer y luego ejecutar:
44+
45+
```shell
46+
./vendor/bin/phpunit
47+
```
48+
49+
También es posible ejecutar una pruebas específica indicando el test. Ejemplo:
50+
51+
```shell
52+
./vendor/bin/phpunit --filter test_contribuyentes_datos
53+
```
54+
55+
Licencia
56+
--------
57+
58+
Este programa es software libre: usted puede redistribuirlo y/o modificarlo
59+
bajo los términos de la GNU Lesser General Public License (LGPL) publicada
60+
por la Fundación para el Software Libre, ya sea la versión 3 de la Licencia,
61+
o (a su elección) cualquier versión posterior de la misma.
62+
63+
Este programa se distribuye con la esperanza de que sea útil, pero SIN
64+
GARANTÍA ALGUNA; ni siquiera la garantía implícita MERCANTIL o de APTITUD
65+
PARA UN PROPÓSITO DETERMINADO. Consulte los detalles de la GNU Lesser General
66+
Public License (LGPL) para obtener una información más detallada.
1767

18-
$ composer require sasco/libredte-api-client
68+
Debería haber recibido una copia de la GNU Lesser General Public License
69+
(LGPL) junto a este programa. En caso contrario, consulte
70+
[GNU Lesser General Public License](http://www.gnu.org/licenses/lgpl.html).
1971

20-
O editando el archivo *composer.json* y agregando:
72+
Enlaces
73+
-------
2174

22-
{
23-
"require": {
24-
"sasco/libredte-api-client": "1.*"
25-
}
26-
}
75+
- [Sitio web API Gateway](https://www.apigateway.cl).
76+
- [Código fuente en GitHub](https://github.com/apigatewaycl/apigateway-api-client-php).
77+
- [Paquete en Packagist](https://packagist.org/packages/apigatewaycl/apigateway-api-client).

composer.json

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
11
{
2-
"name": "sasco/libredte-api-client",
3-
"description": "Cliente para realizar la integración con los servicios web de API Gateway",
2+
"name": "apigatewaycl/apigateway-api-client",
3+
"description": "Cliente para realizar la integración con los servicios web de API Gateway desde PHP.",
44
"type": "library",
5-
"keywords": ["api", "sii", "dte", "facturación electrónica"],
6-
"homepage": "https://apigateway.cl",
5+
"keywords": ["api", "sii", "dte", "facturación electrónica", "chile"],
6+
"homepage": "https://www.apigateway.cl",
77
"license": "LGPL-3.0+",
88
"authors": [
99
{
10-
"name": "SASCO SpA",
11-
"homepage": "https://sasco.cl"
10+
"name": "API Gateway",
11+
"homepage": "https://www.apigateway.cl"
1212
}
1313
],
1414
"support": {
15-
"issues": "https://github.com/LibreDTE/apigateway-client-php/issues",
16-
"source": "https://github.com/LibreDTE/apigateway-client-php"
15+
"issues": "https://github.com/apigatewaycl/apigateway-api-client-php/issues",
16+
"source": "https://github.com/apigatewaycl/apigateway-api-client-php"
17+
},
18+
"config": {
19+
"platform": {
20+
"php": "7.3"
21+
}
22+
},
23+
"autoload": {
24+
"psr-4": {"apigatewaycl\\api_client\\": "src/"}
1725
},
1826
"require": {
19-
"php": "7.3.* || 7.4.*",
27+
"php": "^7.3 || ^8.0",
2028
"guzzlehttp/guzzle": "^7"
2129
},
22-
"autoload": {
23-
"psr-4": {"sasco\\LibreDTE\\API\\": "src/"}
30+
"require-dev": {
31+
"phpdocumentor/phpdocumentor": "^2.9",
32+
"phpunit/phpunit": "^9.2",
33+
"vlucas/phpdotenv": "^5.6"
2434
}
2535
}

0 commit comments

Comments
 (0)