Skip to content

Commit d8f1082

Browse files
Merge branch 'main' into chore/cartaporteCatalogs
2 parents 06b0c2e + fd35b31 commit d8f1082

22 files changed

+341
-19
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup .NET
1717
uses: actions/setup-dotnet@v4
1818
with:
19-
dotnet-version: '7.0.x' # Adjust the .NET version as needed
19+
dotnet-version: '8.0.x' # Adjust the .NET version as needed
2020

2121
- name: Restore dependencies
2222
run: dotnet restore
@@ -27,5 +27,24 @@ jobs:
2727
- name: Pack
2828
run: dotnet pack --configuration Release --no-build --output ./nupkg
2929

30+
- name: Install xmllint
31+
run: sudo apt-get update && sudo apt-get install -y libxml2-utils
32+
33+
- name: Check if version exists on NuGet
34+
id: version-check
35+
run: |
36+
PACKAGE_ID="Facturapi"
37+
VERSION=$(xmllint --xpath "string(//Project/PropertyGroup/Version)" facturapi-net.csproj)
38+
echo "Detected version: $VERSION"
39+
echo "version=$VERSION" >> $GITHUB_OUTPUT
40+
if curl -sSf "https://api.nuget.org/v3-flatcontainer/${PACKAGE_ID,,}/$VERSION/${PACKAGE_ID,,}.$VERSION.nupkg" > /dev/null; then
41+
echo "Version $VERSION already exists. Skipping push."
42+
echo "exists=true" >> $GITHUB_OUTPUT
43+
else
44+
echo "Version $VERSION does not exist. Proceeding with publish."
45+
echo "exists=false" >> $GITHUB_OUTPUT
46+
fi
47+
3048
- name: Publish to NuGet
49+
if: steps.version-check.outputs.exists == 'false'
3150
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

CHANGELOG.md

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,59 @@ 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-
98
## [4.11.0] = 2025-12-10
109

1110
### Added
1211

1312
- Methods to carta porte catalogs
14-
- `SearchAirTranportCodes`, `SearchTransportConfigs`,`SearchRightsOfPassage`,
15-
`SearchCustomsDocuments`,
16-
`SearchPackagingTypes`
17-
`SearchTrailerTypes`,
18-
`SearchHazardousMaterials`,
19-
`SearchNavalAuthorizations`,
20-
`SearchPortStations`,
21-
`SearchMarineContainers`
13+
- `SearchAirTranportCodes`, `SearchTransportConfigs`,`SearchRightsOfPassage`, `SearchCustomsDocuments`, `SearchPackagingTypes` `SearchTrailerTypes`, `SearchHazardousMaterials`, `SearchNavalAuthorizations`, `SearchPortStations`, `SearchMarineContainers`
14+
15+
## [4.10.1] = 2025-10-23
16+
17+
### Added
18+
19+
- Added fields to `Customer` model: `DefaultInvoiceUse`.
20+
21+
## [4.10.0] - 2025-09-04
22+
23+
### Added
24+
25+
- Add `Invoices.PreviewPdfAsync` method to preview invoice PDF before stamping.
26+
27+
## [4.9.1] - 2025-07-21
28+
29+
### Fixed
30+
31+
- Fix `Invoices.SendByEmailAsync`, `Receipts.SendByEmailAsync`, `Retentions.SendByEmailAsync` method and mark the `data` parameter as optional.
32+
33+
### Added
34+
35+
- Add `AddOns` property to `Organization` model to support Facturapi add-ons.
36+
- Add missing properties to `Organization.Customization.PdfExtra` model: `AddressCodes`, `RoundUnitPrice`, `TaxBreakdown`, `IepsBreakdown`, `RenderCartaPorte`, and `RepeatSignature`.
37+
38+
## [4.9.0] - 2025-06-16
39+
40+
### Added
41+
42+
- Add `Organizations.UpdateSelfInvoiceSettingsAsync` method to update self invoice settings.
43+
44+
## [4.8.0] - 2025-04-22
2245

46+
### Added
47+
48+
- Add Create Webhook `Webhooks.CreateAsync`
49+
- Add Update Webhook `Webhooks.UpdateAsync`
50+
- Add Retrieve Webhook `Webhooks.RetrieveAsync`
51+
- Add Delete Webhook `Webhooks.DeleteAsync`
52+
- Add List Webhooks `Webhooks.ListAsync`
53+
- Add Validate Signature Webhook `Webhooks.ValidateSignatureAsync`
54+
55+
## [4.7.1] - 2025-04-16
56+
57+
### Added
58+
59+
- Type IepsMode for Tax model
60+
- Type Factor for Tax model
2361

2462
## [4.7.0] = 2025-02-25
2563

@@ -29,14 +67,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2967
- Added fields to `Customer` model: `SatValidatedAt`, `EditLink` and `EditLinkExpiresAt`.
3068
- Added targets for .NET 6.0 and .NET 7.0.
3169

32-
## [4.6.0] - 2024-23-09
70+
## [4.6.0] - 2024-09-23
3371

3472
### Added
3573

3674
- Add List of Live Api Keys `Organizations.ListAsyncLiveApiKey`
3775
- Add Delete of a Live Api Key `Organization.DeleteAsyncLiveApiKey`
3876

39-
## [4.5.0] - 2024-06-05
77+
78+
## [4.5.0] - 2024-05-06
4079

4180
### Added
4281

Constants/WebhookEvents.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace Facturapi
2+
{
3+
public static class WebhooksEvents
4+
{
5+
public const string GLOBAL_INVOICE_CREATED = "invoice.global_invoice_created";
6+
public const string INVOICE_STATUS_UPDATED = "invoice.status_updated";
7+
public const string INVOICE_CANCELLATION_STATUS_UPDATED = "invoice.cancellation_status_updated";
8+
public const string INVOICES_CREATED_FROM_DASHBOARD = "invoice.created_from_dashboard";
9+
public const string RECEIPT_SELF_INVOICE_COMPLETE = "receipt.self_invoice_complete";
10+
public const string RECEIPT_STATUS_UPDATED = "receipt.status_updated";
11+
public const string CUSTOMER_EDIT_LINK_COMPLETED = "customer.edit_link_completed";
12+
}
13+
}

Models/Customer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ public class Customer
1616
public DateTime SatValidatedAt { get; set; }
1717
public string EditLink { get; set; }
1818
public DateTime EditLinkExpiresAt { get; set; }
19+
public string DefaultInvoiceUse { get; set; }
1920
}
2021
}

Models/Organization.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ public class Organization
1111
public List<CompletionStep> PendingSteps { get; set; }
1212
public Legal Legal { get; set; }
1313
public Customization Customization { get; set; }
14+
public SelfInvoiceSettings SelfInvoice { get; set; }
1415
public Certificate Certificate { get; set; }
15-
1616
public List<LiveApiKey> ApiKeys { get; set; }
17+
public List<string> AddOns { get; set; }
1718
}
1819
}

Models/PdfExtra.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ namespace Facturapi
33
public class PdfExtra
44
{
55
public bool Codes { get; set; }
6+
public bool AddressCodes { get; set; }
67
public bool ProductKey { get; set; }
8+
public bool RoundUnitPrice { get; set; }
9+
public bool TaxBreakdown { get; set; }
10+
public bool IepsBreakdown { get; set; }
11+
public bool RenderCartaPorte { get; set; }
12+
public bool RepeatSignature { get; set; }
713
}
814
}

Models/SelfInvoiceSettings.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 class SelfInvoiceSettings
4+
{
5+
public string[] AllowedCfdiUses { get; set; }
6+
public bool ApplyResicoIsr { get; set; }
7+
public string SupportEmail { get; set; }
8+
public bool SupportEmailVerified { get; set; }
9+
}
10+
}

Models/Tax.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ public class Tax
1313
public string Type { get; set; }
1414
public decimal Rate { get; set; }
1515
public bool Withholding { get; set; }
16+
public string Factor {get; set;}
17+
public string IepsMode { get; set; }
1618
}
1719
}

Models/Webhook.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
3+
namespace Facturapi
4+
{
5+
public class Webhook
6+
7+
{
8+
public string Id { get; set; }
9+
public DateTime CreatedAt { get; set; }
10+
11+
public string[] EnabledEvents { get; set; }
12+
13+
public bool Livemode { get; set; }
14+
15+
public Organization Organization { get; set; }
16+
17+
public string Url { get; set; }
18+
19+
public string Status { get; set; }
20+
}
21+
}

0 commit comments

Comments
 (0)