Skip to content

Commit d67b0bc

Browse files
committed
java docs updated
1 parent 5e7c019 commit d67b0bc

File tree

13 files changed

+134
-36
lines changed

13 files changed

+134
-36
lines changed

pom.xml

Lines changed: 112 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,62 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

7+
<!-- Información básica del proyecto -->
78
<groupId>com.fiscalapi</groupId>
89
<artifactId>fiscalapi</artifactId>
9-
<version>1.0-SNAPSHOT</version>
10+
<version>4.0.124</version>
11+
<packaging>jar</packaging>
1012

13+
<!-- Metadatos del proyecto -->
14+
<name>Fiscalapi</name>
15+
<description>Genera facturas CFDI válidas ante el SAT consumiendo el API de https://www.fiscalapi.com</description>
16+
<url>https://www.fiscalapi.com</url>
17+
<inceptionYear>2019</inceptionYear>
18+
19+
<!-- Información de la organización -->
20+
<organization>
21+
<name>FISCAL API S DE R.L DE C.V</name>
22+
<url>https://www.fiscalapi.com</url>
23+
</organization>
24+
25+
<!-- Licencia -->
26+
<licenses>
27+
<license>
28+
<name>Mozilla Public License 2.0</name>
29+
<url>https://www.mozilla.org/en-US/MPL/2.0/</url>
30+
<distribution>repo</distribution>
31+
</license>
32+
</licenses>
33+
34+
<!-- Información del desarrollador -->
35+
<developers>
36+
<developer>
37+
<id>fiscalapi</id>
38+
<name>Fiscalapi Team</name>
39+
<email>[email protected]</email>
40+
<organization>FISCAL API S DE R.L DE C.V</organization>
41+
<organizationUrl>https://www.fiscalapi.com</organizationUrl>
42+
</developer>
43+
</developers>
44+
45+
<!-- Sistema de control de versiones -->
46+
<scm>
47+
<connection>scm:git:https://github.com/FiscalAPI/fiscalapi-java.git</connection>
48+
<developerConnection>scm:git:ssh://[email protected]:FiscalAPI/fiscalapi-java.git</developerConnection>
49+
<url>https://github.com/FiscalAPI/fiscalapi-java</url>
50+
<tag>HEAD</tag>
51+
</scm>
52+
53+
<!-- Propiedades del proyecto -->
1154
<properties>
1255
<maven.compiler.source>8</maven.compiler.source>
1356
<maven.compiler.target>8</maven.compiler.target>
1457
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
58+
<gpg.executable>gpg</gpg.executable>
59+
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
1560
</properties>
1661

1762
<dependencies>
18-
1963
<!-- OkHttp -->
2064
<dependency>
2165
<groupId>com.squareup.okhttp3</groupId>
@@ -37,4 +81,70 @@
3781
</dependency>
3882
</dependencies>
3983

84+
<!-- Configuración de construcción -->
85+
<build>
86+
<plugins>
87+
<!-- Plugin para generar el JAR del código fuente -->
88+
<plugin>
89+
<groupId>org.apache.maven.plugins</groupId>
90+
<artifactId>maven-source-plugin</artifactId>
91+
<version>3.2.1</version>
92+
<executions>
93+
<execution>
94+
<id>attach-sources</id>
95+
<goals>
96+
<goal>jar</goal>
97+
</goals>
98+
</execution>
99+
</executions>
100+
</plugin>
101+
102+
<!-- Plugin para generar la documentación Javadoc -->
103+
<plugin>
104+
<groupId>org.apache.maven.plugins</groupId>
105+
<artifactId>maven-javadoc-plugin</artifactId>
106+
<version>3.3.1</version>
107+
<executions>
108+
<execution>
109+
<id>attach-javadocs</id>
110+
<goals>
111+
<goal>jar</goal>
112+
</goals>
113+
</execution>
114+
</executions>
115+
</plugin>
116+
117+
<!-- Plugin para firmar los artefactos con GPG -->
118+
<plugin>
119+
<groupId>org.apache.maven.plugins</groupId>
120+
<artifactId>maven-gpg-plugin</artifactId>
121+
<version>3.0.1</version>
122+
<executions>
123+
<execution>
124+
<id>sign-artifacts</id>
125+
<phase>verify</phase>
126+
<goals>
127+
<goal>sign</goal>
128+
</goals>
129+
</execution>
130+
</executions>
131+
</plugin>
132+
133+
<!-- Plugin para publicar en Central Publisher Portal -->
134+
<plugin>
135+
<groupId>org.sonatype.central</groupId>
136+
<artifactId>central-publishing-maven-plugin</artifactId>
137+
<version>0.7.0</version>
138+
<extensions>true</extensions>
139+
<configuration>
140+
<publishingServerId>central</publishingServerId>
141+
<autoPublish>true</autoPublish>
142+
<waitUntil>published</waitUntil>
143+
</configuration>
144+
</plugin>
145+
146+
</plugins>
147+
</build>
148+
149+
40150
</project>

src/main/java/com/fiscalapi/abstractions/BaseFiscalApiService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ public ApiResponse<Boolean> delete(String id) {
120120
* Truco para obtener la clase en tiempo de ejecución.
121121
*
122122
* Se puede usar reflection o sobrescribir este método en subclases
123-
* para devolver el Class<T> correspondiente.
123+
* para devolver el Class&lt;T&gt; correspondiente.
124+
*
125+
* @return La clase del tipo paramétrico T usado en este servicio
124126
*/
125127
protected abstract Class<T> getTypeParameterClass();
126128
}

src/main/java/com/fiscalapi/abstractions/IApiKeyService.java

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

55
/**
66
* Define el contrato específico para operaciones con "apikey".
7-
* Hereda las operaciones básicas (CRUD) de IFiscalApiService<ApiKey>.
7+
* Hereda las operaciones básicas (CRUD) de IFiscalApiService&lt;ApiKey&gt;.
88
*/
99
public interface IApiKeyService extends IFiscalApiService<ApiKey> {
1010

src/main/java/com/fiscalapi/abstractions/ICatalogService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public interface ICatalogService extends IFiscalApiService<CatalogDto> {
1010
/**
1111
* GET /api/{apiVersion}/catalogs
1212
* Recupera todos los nombres de los catálogos disponibles para búsquedas.
13-
* @return ApiResponse con una lista de nombres de catálogos (List<String>).
13+
* @return ApiResponse con una lista de nombres de catálogos (List&lt;String&gt;).
1414
*/
1515
ApiResponse<List<String>> getList();
1616

@@ -24,7 +24,7 @@ public interface ICatalogService extends IFiscalApiService<CatalogDto> {
2424
ApiResponse<CatalogDto> getRecordById(String catalogName, String id);
2525

2626
/**
27-
* GET /api/{apiVersion}/catalogs/{catalogName}/{searchText}?pageNumber=x&pageSize=y
27+
* GET /api/{apiVersion}/catalogs/{catalogName}/{searchText}?pageNumber=x&amp;pageSize=y
2828
* Busca en un catálogo.
2929
* @param catalogName Nombre del catálogo.
3030
* @param searchText Criterio de búsqueda (mínimo 4 caracteres).
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package com.fiscalapi.abstractions;
22

3-
import com.fiscalapi.common.ApiResponse;
43
import com.fiscalapi.models.Person;
54

65
/**
76
* Define el contrato específico para operaciones con "Person".
8-
* Hereda las operaciones básicas (CRUD) de IFiscalApiService<Person>.
7+
* Hereda las operaciones básicas (CRUD) de IFiscalApiService&lt;Person&gt;.
98
*/
109
public interface IPersonService extends IFiscalApiService<Person> {
1110

12-
1311
// other specific methods
1412
}

src/main/java/com/fiscalapi/abstractions/IProductService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55

66
/**
77
* Define el contrato específico para operaciones con "Product".
8-
* Hereda las operaciones básicas (CRUD) de IFiscalApiService<Product>.
8+
* Hereda las operaciones básicas (CRUD) de IFiscalApiService&lt;Product&gt;.
99
*/
1010
public interface IProductService extends IFiscalApiService<Product> {
1111

1212
/**
1313
* Ejemplo: un método adicional para obtener el inventario
1414
* o información específica de un producto.
15+
* @param productId El identificador único del producto
16+
* @return ApiResponse con el número de unidades en inventario
1517
*/
1618
ApiResponse<Integer> getProductStock(String productId);
1719
}

src/main/java/com/fiscalapi/abstractions/ITaxFileService.java

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

88
/**
99
* Define el contrato específico para operaciones con "tax-file".
10-
* Hereda las operaciones básicas (CRUD) de IFiscalApiService<TaxFile>.
10+
* Hereda las operaciones básicas (CRUD) de IFiscalApiService&lt;TaxFile&gt;.
1111
*/
1212
public interface ITaxFileService extends IFiscalApiService<TaxFile> {
1313

src/main/java/com/fiscalapi/models/Product.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,8 @@
1616
* <li><code>satTaxObjectId</code>: "02"</li>
1717
* <li><code>satProductCodeId</code>: "01010101"</li>
1818
* </ul>
19-
* </p>
2019
*
2120
* <p>Esta clase extiende de {@link BaseDto} que a su vez extiende de {@link AuditableDto}.</p>
22-
*
23-
* @see BaseDto
24-
* @see AuditableDto
25-
* @see CatalogDto
2621
*/
2722
public class Product extends BaseDto {
2823

src/main/java/com/fiscalapi/models/ProductTax.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* <li><strong>taxFlagId</strong>: "T", "R"</li>
1818
* <li><strong>taxTypeId</strong>: "Tasa", "Cuota", "Exento"</li>
1919
* </ul>
20-
* </p>
2120
*
2221
* @see CatalogDto
2322
*/
@@ -215,17 +214,5 @@ public void setTaxType(CatalogDto taxType) {
215214
this.taxType = taxType;
216215
}
217216

218-
@Override
219-
public String toString() {
220-
return "ProductTax{" +
221-
"productId='" + productId + '\'' +
222-
", rate=" + rate +
223-
", taxId='" + taxId + '\'' +
224-
", tax=" + tax +
225-
", taxFlagId='" + taxFlagId + '\'' +
226-
", taxFlag=" + taxFlag +
227-
", taxTypeId='" + taxTypeId + '\'' +
228-
", taxType=" + taxType +
229-
"} " + super.toString();
230-
}
217+
231218
}

src/main/java/com/fiscalapi/services/ApiKeyService.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33
import com.fiscalapi.abstractions.BaseFiscalApiService;
44
import com.fiscalapi.abstractions.IApiKeyService;
55
import com.fiscalapi.abstractions.IFiscalApiHttpClient;
6-
import com.fiscalapi.abstractions.IPersonService;
7-
import com.fiscalapi.common.ApiResponse;
86
import com.fiscalapi.common.FiscalApiSettings;
97
import com.fiscalapi.models.ApiKey;
10-
import com.fiscalapi.models.Person;
11-
128

139

1410
public class ApiKeyService extends BaseFiscalApiService<ApiKey> implements IApiKeyService {
1511

1612
/**
1713
* Crea un ApiKeyService con el path "apikeys" y la versión de API dada.
14+
* @param httpClient Cliente HTTP utilizado para realizar las peticiones a la API
15+
* @param settings Configuración con los parámetros de conexión a la API
1816
*/
1917
public ApiKeyService(IFiscalApiHttpClient httpClient, FiscalApiSettings settings) {
2018
super(httpClient, settings, "apikeys", settings.getApiVersion());

0 commit comments

Comments
 (0)