Skip to content

Commit bbb9d77

Browse files
authored
FAC-1936: add constants for tax, cancellation, and global invoice fields (#48)
* Add constants for tax, cancellation, global invoice fields, and statuses * Bump version to 6.1.0 and add changelog entry * Improve NuGet metadata and package presentation
1 parent 8fd389f commit bbb9d77

14 files changed

Lines changed: 138 additions & 7 deletions

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [6.1.0] - 2026-04-01
9+
10+
### Added
11+
12+
- Added `TaxFactor` and `IepsMode` constants for tax payload fields.
13+
- Added `CancellationMotive` and `CancellationStatus` constants for cancellation flows.
14+
- Added `GlobalPeriodicity`, `GlobalMonths`, and `ExportCode` constants for global invoice payload fields.
15+
- Added `InvoiceStatus` and `ReceiptStatus` constants for common document status handling.
16+
- Added `receipt.cancellation_status_updated` to webhook event constants.
17+
18+
### Changed
19+
20+
- Updated `TaxSystem` constants to include missing SAT regime code `625`.
21+
- Expanded `Taxability` constants to include codes `06`, `07`, and `08`.
22+
823
## [6.0.0] - 2026-03-30
924

1025
### Migration Guide

Constants/CancellationMotive.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Facturapi
2+
{
3+
public static class CancellationMotive
4+
{
5+
public const string COMPROBANTE_EMITIDO_CON_ERRORES_CON_RELACION = "01";
6+
public const string COMPROBANTE_EMITIDO_CON_ERRORES_SIN_RELACION = "02";
7+
public const string NO_SE_LLEVO_A_CABO_LA_OPERACION = "03";
8+
public const string OPERACION_NOMINATIVA_RELACIONADA_EN_GLOBAL = "04";
9+
}
10+
}

Constants/CancellationStatus.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace Facturapi
2+
{
3+
public static class CancellationStatus
4+
{
5+
public const string NONE = "none";
6+
public const string VERIFYING = "verifying";
7+
public const string PENDING = "pending";
8+
public const string ACCEPTED = "accepted";
9+
public const string REJECTED = "rejected";
10+
public const string EXPIRED = "expired";
11+
}
12+
}

Constants/ExportCode.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Facturapi
2+
{
3+
public static class ExportCode
4+
{
5+
public const string NO_APLICA = "01";
6+
public const string DEFINITIVA = "02";
7+
public const string TEMPORAL = "03";
8+
public const string DEFINITIVA_CON_CLAVE_DISTINTA_A_A1_O_NO_APLICA = "04";
9+
}
10+
}

Constants/GlobalMonths.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
namespace Facturapi
2+
{
3+
public static class GlobalMonths
4+
{
5+
public const string ENERO = "01";
6+
public const string FEBRERO = "02";
7+
public const string MARZO = "03";
8+
public const string ABRIL = "04";
9+
public const string MAYO = "05";
10+
public const string JUNIO = "06";
11+
public const string JULIO = "07";
12+
public const string AGOSTO = "08";
13+
public const string SEPTIEMBRE = "09";
14+
public const string OCTUBRE = "10";
15+
public const string NOVIEMBRE = "11";
16+
public const string DICIEMBRE = "12";
17+
public const string ENERO_FEBRERO = "13";
18+
public const string MARZO_ABRIL = "14";
19+
public const string MAYO_JUNIO = "15";
20+
public const string JULIO_AGOSTO = "16";
21+
public const string SEPTIEMBRE_OCTUBRE = "17";
22+
public const string NOVIEMBRE_DICIEMBRE = "18";
23+
}
24+
}

Constants/GlobalPeriodicity.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace Facturapi
2+
{
3+
public static class GlobalPeriodicity
4+
{
5+
public const string DAY = "day";
6+
public const string WEEK = "week";
7+
public const string FORTNIGHT = "fortnight";
8+
public const string MONTH = "month";
9+
public const string TWO_MONTHS = "two_months";
10+
}
11+
}

Constants/IepsMode.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Facturapi
2+
{
3+
public static class IepsMode
4+
{
5+
public const string SUM_BEFORE_TAXES = "sum_before_taxes";
6+
public const string BREAK_DOWN = "break_down";
7+
public const string UNIT = "unit";
8+
public const string SUBTRACT_BEFORE_BREAK_DOWN = "subtract_before_break_down";
9+
}
10+
}

Constants/InvoiceStatus.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Facturapi
2+
{
3+
public static class InvoiceStatus
4+
{
5+
public const string PENDING = "pending";
6+
public const string VALID = "valid";
7+
public const string CANCELED = "canceled";
8+
public const string DRAFT = "draft";
9+
}
10+
}

Constants/ReceiptStatus.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Facturapi
2+
{
3+
public static class ReceiptStatus
4+
{
5+
public const string OPEN = "open";
6+
public const string CANCELED = "canceled";
7+
public const string INVOICED_TO_CUSTOMER = "invoiced_to_customer";
8+
public const string INVOICED_GLOBALLY = "invoiced_globally";
9+
}
10+
}

Constants/TaxFactor.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Facturapi
2+
{
3+
public static class TaxFactor
4+
{
5+
public const string TASA = "Tasa";
6+
public const string CUOTA = "Cuota";
7+
public const string EXENTO = "Exento";
8+
}
9+
}

0 commit comments

Comments
 (0)