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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.5.1] - 2026-07-17
### Fixed
- Expose `InvoiceItem.PropertyTaxAccount` as a list of property tax account numbers.

## [6.5.0] - 2026-06-07
### Added
- Expose structured API error metadata on `FacturapiException`, including `Code`, `Path`, `Location`, `Errors`, `LogId`, and response `Headers`.
Expand Down
26 changes: 26 additions & 0 deletions FacturapiTest/ClientCompatibilityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,32 @@ public async Task RetentionCancelAsync_ThrowsFacturapiExceptionWithStatus()
Assert.Equal("bad retention", exception.Message);
}

[Fact]
public async Task InvoiceRetrieveAsync_DeserializesPropertyTaxAccounts()
{
var handler = new StubHttpMessageHandler((request, cancellationToken) =>
{
var response = new HttpResponseMessage(HttpStatusCode.OK)
{
Content = new StringContent(
"{\"id\":\"inv_123\",\"items\":[{\"property_tax_account\":[\"0102030405\"]}]}",
Encoding.UTF8,
"application/json")
};
return Task.FromResult(response);
});

var httpClient = new HttpClient(handler)
{
BaseAddress = new Uri("https://www.facturapi.io/v2/")
};
var wrapper = new InvoiceWrapper("test_key", "v2", httpClient);

var invoice = await wrapper.RetrieveAsync("inv_123");

Assert.Equal(new[] { "0102030405" }, invoice.Items[0].PropertyTaxAccount);
}

[Fact]
public async Task InvoiceStampDraftAsync_AndLegacyMethod_BothWork()
{
Expand Down
3 changes: 3 additions & 0 deletions Models/InvoiceItem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;

using System.Collections.Generic;

namespace Facturapi
{
public class InvoiceItem
Expand All @@ -8,5 +10,6 @@ public class InvoiceItem
public Decimal Discount { get; set; }
public string Description { get; set; }
public Product Product { get; set; }
public List<string> PropertyTaxAccount { get; set; }
}
}
2 changes: 1 addition & 1 deletion facturapi-net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Summary>SDK oficial de Facturapi para .NET para facturación electrónica en México (CFDI), envío de documentos, búsqueda y trazabilidad.</Summary>
<PackageTags>factura factura-electronica facturacion cfdi cfdi40 sat invoice invoicing facturapi mexico</PackageTags>
<Title>Facturapi</Title>
<Version>6.5.0</Version>
<Version>6.5.1</Version>
<PackageVersion>$(Version)</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand Down
Loading