Modelo anémico que representa una factura electrónica. Contiene toda la información de una factura, como datos del emisor, receptor, productos/servicios, importes, método de pago, tipo de factura, entre otros.
| 20 | * productos/servicios, importes, método de pago, tipo de factura, entre otros. |
| 21 | */ |
| 22 | public class Invoice extends BaseDto{ |
| 23 | |
| 24 | private String versionCode; |
| 25 | private String series; |
| 26 | private String number; |
| 27 | private String uuid; |
| 28 | private Integer consecutive; |
| 29 | @JsonSerialize(using = BigDecimalSerializer.class) |
| 30 | private BigDecimal subtotal; |
| 31 | @JsonSerialize(using = BigDecimalSerializer.class) |
| 32 | private BigDecimal discount; |
| 33 | @JsonSerialize(using = BigDecimalSerializer.class) |
| 34 | private BigDecimal total; |
| 35 | @JsonIgnore |
| 36 | private LocalDateTime date; |
| 37 | private String paymentFormCode; |
| 38 | private String paymentConditions; |
| 39 | private String currencyCode; |
| 40 | private String typeCode; |
| 41 | private String expeditionZipCode; |
| 42 | private String exportCode; |
| 43 | private String paymentMethodCode; |
| 44 | @JsonSerialize(using = BigDecimalSerializer.class) |
| 45 | private BigDecimal exchangeRate; |
| 46 | private InvoiceIssuer issuer; |
| 47 | private InvoiceRecipient recipient; |
| 48 | private List<InvoiceItem> items; |
| 49 | private GlobalInformation globalInformation; |
| 50 | private List<RelatedInvoice> relatedInvoices; |
| 51 | private List<InvoicePayment> payments; |
| 52 | private Complement complement; |
| 53 | private List<InvoiceResponse> responses; |
| 54 | |
| 55 | |
| 56 | private CatalogDto status; |
| 57 | |
| 58 | /** |
| 59 | * Constructor por defecto |
| 60 | */ |
| 61 | public Invoice() { |
| 62 | this.versionCode = "4.0"; |
| 63 | this.currencyCode = "MXN"; |
| 64 | this.exportCode = "01"; |
| 65 | //this.exchangeRate = 1.0; |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * @return Número de la factura (atributo Folio del CFDI) |
| 70 | */ |
| 71 | public String getNumber() { |
| 72 | return number; |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * @param number Número de la factura (1-40 caracteres alfanuméricos) |
| 77 | */ |
| 78 | public void setNumber(String number) { |
| 79 | this.number = number; |
nothing calls this directly
no outgoing calls
no test coverage detected