Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- Coordenadas del proyecto -->
<groupId>com.fiscalapi</groupId>
<artifactId>fiscalapi</artifactId>
<version>4.0.360</version>
<version>4.0.372</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Genera facturas CFDI válidas ante el SAT consumiendo la API de https://www.fiscalapi.com</description>
<url>https://www.fiscalapi.com</url>
Expand Down
3,817 changes: 3,817 additions & 0 deletions src/main/java/com/fiscalapi/examples/EjemplosCartaPorteReferencias.java

Large diffs are not rendered by default.

3,904 changes: 3,904 additions & 0 deletions src/main/java/com/fiscalapi/examples/EjemplosCartaPorteValores.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fiscalapi;
package com.fiscalapi.examples;

//package com.fiscalapi;
//
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/fiscalapi/models/invoicing/Complement.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.fiscalapi.models.invoicing;

import com.fiscalapi.models.invoicing.billOfLading.CartaPorte;
import com.fiscalapi.models.invoicing.localTaxes.LocalTaxes;
import com.fiscalapi.models.invoicing.paymentComplement.InvoicePayment;
import com.fiscalapi.models.invoicing.payroll.Payroll;
Expand All @@ -8,6 +9,7 @@ public class Complement {
private Payroll payroll;
private InvoicePayment payment;
private LocalTaxes localTaxes;
private CartaPorte cartaPorte;

public Payroll getPayroll() {
return payroll;
Expand All @@ -32,4 +34,12 @@ public LocalTaxes getLocalTaxes() {
public void setLocalTaxes(LocalTaxes localTaxes) {
this.localTaxes = localTaxes;
}

public CartaPorte getCartaPorte() {
return cartaPorte;
}

public void setCartaPorte(CartaPorte cartaPorte) {
this.cartaPorte = cartaPorte;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
package com.fiscalapi.models.invoicing.billOfLading;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fiscalapi.serialization.BigDecimalSerializer;

import java.math.BigDecimal;
import java.util.List;

public class Autotransporte {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Autotransporte must extend the project DTO base hierarchy.

Line 9 defines a model DTO without inheriting from the required DTO chain.

As per coding guidelines **/models/**/*.java: All DTOs must extend the DTO hierarchy: SerializableDtoAuditableDto (with createdAt, updatedAt fields) → BaseDto (with id field).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/com/fiscalapi/models/invoicing/billOfLading/Autotransporte.java`
at line 9, The Autotransporte DTO currently doesn't inherit the project DTO
hierarchy; update its declaration so it extends the project's DTO base (e.g.,
change class Autotransporte to extend BaseDto from the
SerializableDto→AuditableDto→BaseDto chain) and add the necessary import(s) for
BaseDto (and any serialVersionUID if required by SerializableDto); ensure the
class therefore inherits id (from BaseDto) and createdAt/updatedAt (from
AuditableDto) as required by the project's DTO convention.

private String permSCTId;
private String numPermisoSCT;
private String configVehicularId;

@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal pesoBrutoVehicular;

private String placaVM;
private int anioModeloVM;
private String aseguraRespCivil;
private String polizaRespCivil;
private String aseguraMedAmbiente;
private String polizaMedAmbiente;
private String aseguraCarga;
private String polizaCarga;

@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal primaSeguro;

private List<Remolque> remolques;

public String getPermSCTId() {
return permSCTId;
}

public void setPermSCTId(String permSCTId) {
this.permSCTId = permSCTId;
}

public String getNumPermisoSCT() {
return numPermisoSCT;
}

public void setNumPermisoSCT(String numPermisoSCT) {
this.numPermisoSCT = numPermisoSCT;
}

public String getConfigVehicularId() {
return configVehicularId;
}

public void setConfigVehicularId(String configVehicularId) {
this.configVehicularId = configVehicularId;
}

public BigDecimal getPesoBrutoVehicular() {
return pesoBrutoVehicular;
}

public void setPesoBrutoVehicular(BigDecimal pesoBrutoVehicular) {
this.pesoBrutoVehicular = pesoBrutoVehicular;
}

public String getPlacaVM() {
return placaVM;
}

public void setPlacaVM(String placaVM) {
this.placaVM = placaVM;
}

public int getAnioModeloVM() {
return anioModeloVM;
}

public void setAnioModeloVM(int anioModeloVM) {
this.anioModeloVM = anioModeloVM;
}

public String getAseguraRespCivil() {
return aseguraRespCivil;
}

public void setAseguraRespCivil(String aseguraRespCivil) {
this.aseguraRespCivil = aseguraRespCivil;
}

public String getPolizaRespCivil() {
return polizaRespCivil;
}

public void setPolizaRespCivil(String polizaRespCivil) {
this.polizaRespCivil = polizaRespCivil;
}

public String getAseguraMedAmbiente() {
return aseguraMedAmbiente;
}

public void setAseguraMedAmbiente(String aseguraMedAmbiente) {
this.aseguraMedAmbiente = aseguraMedAmbiente;
}

public String getPolizaMedAmbiente() {
return polizaMedAmbiente;
}

public void setPolizaMedAmbiente(String polizaMedAmbiente) {
this.polizaMedAmbiente = polizaMedAmbiente;
}

public String getAseguraCarga() {
return aseguraCarga;
}

public void setAseguraCarga(String aseguraCarga) {
this.aseguraCarga = aseguraCarga;
}

public String getPolizaCarga() {
return polizaCarga;
}

public void setPolizaCarga(String polizaCarga) {
this.polizaCarga = polizaCarga;
}

public BigDecimal getPrimaSeguro() {
return primaSeguro;
}

public void setPrimaSeguro(BigDecimal primaSeguro) {
this.primaSeguro = primaSeguro;
}

public List<Remolque> getRemolques() {
return remolques;
}

public void setRemolques(List<Remolque> remolques) {
this.remolques = remolques;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.fiscalapi.models.invoicing.billOfLading;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fiscalapi.serialization.BigDecimalSerializer;

import java.math.BigDecimal;

public class CantidadTransporta {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

CantidadTransporta should inherit from the required DTO hierarchy.

Line 8 declares this DTO as a standalone POJO instead of extending the project DTO base chain.

As per coding guidelines **/models/**/*.java: All DTOs must extend the DTO hierarchy: SerializableDtoAuditableDto (with createdAt, updatedAt fields) → BaseDto (with id field).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/com/fiscalapi/models/invoicing/billOfLading/CantidadTransporta.java`
at line 8, The CantidadTransporta DTO is declared as a plain POJO; update its
declaration to extend the project DTO hierarchy by making CantidadTransporta
extend BaseDto (which inherits AuditableDto and SerializableDto in the project),
add the necessary import for BaseDto, and add any required serialVersionUID or
constructors if other DTOs in the hierarchy require them; ensure the class
signature uses "public class CantidadTransporta extends BaseDto" (and remove any
duplicate id/createdAt/updatedAt fields if present).

@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal cantidad;

private String idOrigen;
private String idDestino;
private String cvesTransporteId;

public BigDecimal getCantidad() {
return cantidad;
}

public void setCantidad(BigDecimal cantidad) {
this.cantidad = cantidad;
}

public String getIdOrigen() {
return idOrigen;
}

public void setIdOrigen(String idOrigen) {
this.idOrigen = idOrigen;
}

public String getIdDestino() {
return idDestino;
}

public void setIdDestino(String idDestino) {
this.idDestino = idDestino;
}

public String getCvesTransporteId() {
return cvesTransporteId;
}

public void setCvesTransporteId(String cvesTransporteId) {
this.cvesTransporteId = cvesTransporteId;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package com.fiscalapi.models.invoicing.billOfLading;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fiscalapi.serialization.BigDecimalSerializer;

import java.math.BigDecimal;
import java.util.List;

public class Carro {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Inherit the standard DTO fields for this nested model.

Carro is a model DTO but currently bypasses the common DTO hierarchy. Please extend the project DTO base class so its shape stays consistent with the rest of the SDK.

♻️ Minimal shape of the change
-public class Carro {
+public class Carro extends BaseDto {

Add the corresponding BaseDto import used by the project.

As per coding guidelines: **/models/**/*.java: All DTOs must extend the DTO hierarchy: SerializableDtoAuditableDto (with createdAt, updatedAt fields) → BaseDto (with id field).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main/java/com/fiscalapi/models/invoicing/billOfLading/Carro.java` at line
9, Carro currently declares an empty DTO class; update it to extend the
project's DTO hierarchy by importing and extending BaseDto (which itself extends
AuditableDto and SerializableDto) so Carro inherits id, createdAt and updatedAt;
modify the class declaration to extend BaseDto and add the required import for
BaseDto (ensure package name matches project imports) so Carro aligns with other
DTOs.

private String tipoCarroId;
private String matriculaCarro;
private String guiaCarro;

@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal toneladasNetasCarro;

private List<CarroContenedor> contenedores;

public String getTipoCarroId() {
return tipoCarroId;
}

public void setTipoCarroId(String tipoCarroId) {
this.tipoCarroId = tipoCarroId;
}

public String getMatriculaCarro() {
return matriculaCarro;
}

public void setMatriculaCarro(String matriculaCarro) {
this.matriculaCarro = matriculaCarro;
}

public String getGuiaCarro() {
return guiaCarro;
}

public void setGuiaCarro(String guiaCarro) {
this.guiaCarro = guiaCarro;
}

public BigDecimal getToneladasNetasCarro() {
return toneladasNetasCarro;
}

public void setToneladasNetasCarro(BigDecimal toneladasNetasCarro) {
this.toneladasNetasCarro = toneladasNetasCarro;
}

public List<CarroContenedor> getContenedores() {
return contenedores;
}

public void setContenedores(List<CarroContenedor> contenedores) {
this.contenedores = contenedores;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package com.fiscalapi.models.invoicing.billOfLading;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fiscalapi.serialization.BigDecimalSerializer;

import java.math.BigDecimal;

public class CarroContenedor {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Extend the DTO hierarchy for the container DTO.

CarroContenedor is in the model package but does not inherit the standard DTO base chain, leaving out the common id and audit metadata contract.

♻️ Minimal shape of the change
-public class CarroContenedor {
+public class CarroContenedor extends BaseDto {

Add the corresponding BaseDto import used by the project.

As per coding guidelines: **/models/**/*.java: All DTOs must extend the DTO hierarchy: SerializableDtoAuditableDto (with createdAt, updatedAt fields) → BaseDto (with id field).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/com/fiscalapi/models/invoicing/billOfLading/CarroContenedor.java`
at line 8, CarroContenedor currently doesn't extend the DTO hierarchy; change
its declaration to extend BaseDto (which itself extends AuditableDto and
SerializableDto) and add the corresponding import for BaseDto; ensure the class
signature uses "extends BaseDto" (symbol: CarroContenedor) and remove any
conflicting fields now provided by the base classes, keeping
constructors/getters compatible with the inherited id, createdAt and updatedAt
properties.

private String tipoContenedorId;

@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal pesoContenedorVacio;

@JsonSerialize(using = BigDecimalSerializer.class)
private BigDecimal pesoNetoMercancia;

public String getTipoContenedorId() {
return tipoContenedorId;
}

public void setTipoContenedorId(String tipoContenedorId) {
this.tipoContenedorId = tipoContenedorId;
}

public BigDecimal getPesoContenedorVacio() {
return pesoContenedorVacio;
}

public void setPesoContenedorVacio(BigDecimal pesoContenedorVacio) {
this.pesoContenedorVacio = pesoContenedorVacio;
}

public BigDecimal getPesoNetoMercancia() {
return pesoNetoMercancia;
}

public void setPesoNetoMercancia(BigDecimal pesoNetoMercancia) {
this.pesoNetoMercancia = pesoNetoMercancia;
}
}
Loading