Skip to content

Commit f7f141b

Browse files
Change readme (#17)
* Fix first set of warnings * Fix xml snapshot tests * Print warnings * Print warnings * Release 1.1.2.Final * Prepare next release 1.1.3-SNAPSHOT * change badge and java versions
1 parent b279d05 commit f7f141b

File tree

3 files changed

+17
-81
lines changed

3 files changed

+17
-81
lines changed

.github/workflows/ci-actions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
timeout-minutes: 120
1919
strategy:
2020
matrix:
21-
java-version: [8, 11, 13]
21+
java-version: [8, 11, 15]
2222

2323
runs-on: ubuntu-latest
2424

README.md

Lines changed: 15 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,27 @@
1+
![Maven Central](https://img.shields.io/maven-central/v/io.github.project-openubl/xbuilder)
2+
[![License](https://img.shields.io/badge/License-EPL%202.0-green.svg)](https://opensource.org/licenses/EPL-2.0)
13
![CI](https://github.com/project-openubl/xbuilder/workflows/CI/badge.svg)
24
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=project-openubl_xbuilder&metric=alert_status)](https://sonarcloud.io/dashboard?id=project-openubl_xbuilder)
35

4-
# XBuilder
5-
6-
Java library for creating and signing XML files based on UBL standards.
7-
8-
XBuilder can be found in [Maven Central](https://mvnrepository.com/artifact/io.github.project-openubl/xbuilder)
9-
10-
## Installation
11-
### Maven
6+
[![Project Chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg?style=for-the-badge&logo=zulip)](https://projectopenubl.zulipchat.com/)
7+
[![Supported JVM Versions](https://img.shields.io/badge/JVM-8--11--15-brightgreen.svg?style=for-the-badge&logo=Java)](https://github.com/quarkusio/quarkus/actions/runs/113853915/)
128

13-
Open your `pom.xml` file and add:
14-
15-
```xml
16-
<dependency>
17-
<groupId>io.github.project-openubl</groupId>
18-
<artifactId>xbuilder</artifactId>
19-
<version>1.1.0.Final</version>
20-
</dependency>
21-
```
22-
23-
### Gradle
9+
# XBuilder
2410

25-
Open your `build.gradle` file and add:
11+
Librería Java para crear XMLs basados en UBL y los estándares de la SUNAT respecto a la facturación electrónica.
2612

27-
```java
28-
compile group: 'io.github.project-openubl', name: 'xbuilder', version: '1.1.0.Final'
29-
```
13+
XBuilder esta diseñado para que puedas crear XMLs fácilmente.
3014

31-
## Supported countries
15+
- Crea XMLs sin que necesites conocer nada sobre manejo de archivos XMLs.
16+
- Hace cálculos internos por ti.
17+
- Requiere solamente datos mínimos.
3218

33-
- Perú
19+
## ¿Qué puedes hacer con XBuilder?
3420

35-
> If you want support for your country please create an issue.
21+
- Crear XMLs
22+
- Firmar XMLs
3623

3724
## Getting started
3825

39-
XML files can be created from Input Models; for instance:
40-
41-
```java
42-
InvoiceInputModel input = InvoiceInputModel.Builder.anInvoiceInputModel()
43-
.withSerie("F001")
44-
.withNumero(1)
45-
.withProveedor(ProveedorInputModel.Builder.aProveedorInputModel()
46-
.withRuc("12345678912")
47-
.withRazonSocial("Softgreen S.A.C.")
48-
.build()
49-
)
50-
.withCliente(ClienteInputModel.Builder.aClienteInputModel()
51-
.withNombre("Carlos Feria")
52-
.withNumeroDocumentoIdentidad("12121212121")
53-
.withTipoDocumentoIdentidad(Catalog6.RUC.toString())
54-
.build()
55-
)
56-
.withDetalle(Arrays.asList(
57-
DocumentLineInputModel.Builder.aDocumentLineInputModel()
58-
.withDescripcion("Item1")
59-
.withCantidad(new BigDecimal(10))
60-
.withPrecioUnitario(new BigDecimal(100))
61-
.withUnidadMedida("KGM")
62-
.build(),
63-
DocumentLineInputModel.Builder.aDocumentLineInputModel()
64-
.withDescripcion("Item2")
65-
.withCantidad(new BigDecimal(10))
66-
.withPrecioUnitario(new BigDecimal(100))
67-
.withUnidadMedida("KGM")
68-
.build())
69-
)
70-
.build();
71-
72-
// Process Input and get XML
73-
DocumentWrapper<InvoiceOutputModel> result = DocumentFacade.createXML(input, config, systemClock);
74-
InvoiceOutputModel output = result.getOutput();
75-
String xml = result.getXml();
76-
```
77-
78-
## Sign XMLs
79-
80-
After you created the `xml` file you can now sign it:
81-
82-
```java
83-
String xml;
84-
String signID = "mySignID";
85-
86-
// Get your certificate using the method of your preference
87-
X509Certificate certificate;
88-
PrivateKey privateKey;
89-
90-
Document signedXML = XMLSigner.signXML(xml, signID, certificate, privateKey);
91-
```
26+
- [Documentación](https://project-openubl.github.io/docs/xsender)
27+
- [Discusiones](https://github.com/project-openubl/xsender/discussions)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<groupId>io.github.project-openubl</groupId>
2525
<artifactId>xbuilder</artifactId>
26-
<version>1.1.2-SNAPSHOT</version>
26+
<version>1.1.3-SNAPSHOT</version>
2727

2828
<name>XML Builder :: Lib</name>
2929
<description>XML Builder Library</description>

0 commit comments

Comments
 (0)