Refactored the codebase to use shared DTOs from `DocumentService.Application.Common.DTOs`, removing inline DTO definitions in client interfaces and tests. Introduced conditional compilation to handle framework-specific differences in DTOs and handlers. Updated test cases to align with the new DTO structures, including `SwissQrCodeExtractionResult`, `PdfValidationResult`, and `ZugferdExtractionResult`. Adjusted test data to match updated DTO properties. Cleaned up solution and project files, ensuring proper references and organization. Removed unused files and fixed project references in `DocumentService.Tests.csproj`. Improved maintainability and consistency across the codebase.
41 lines
1007 B
C#
41 lines
1007 B
C#
namespace DocumentService.Application.Common.DTOs;
|
|
|
|
/// <summary>
|
|
/// Response containing extracted Swiss QR Code in dual format.
|
|
/// </summary>
|
|
/// <param name="Bill">Parsed Swiss QR Bill (structured format)</param>
|
|
/// <param name="RawLines">Raw Swiss QR Code lines (original newline-separated format)</param>
|
|
/// <example>
|
|
/// {
|
|
/// "bill": {
|
|
/// "version": "V2_0",
|
|
/// "amount": 630.20,
|
|
/// "currency": "CHF",
|
|
/// "account": "CH953000520280564701R",
|
|
/// "creditor": {
|
|
/// "type": "Structured",
|
|
/// "name": "ALMAT AG",
|
|
/// "town": "Tagelswangen"
|
|
/// },
|
|
/// "referenceType": "QRR",
|
|
/// "reference": "000000000000000000252080824"
|
|
/// },
|
|
/// "rawLines": [
|
|
/// "SPC",
|
|
/// "0200",
|
|
/// "1",
|
|
/// "CH953000520280564701R",
|
|
/// "S",
|
|
/// "ALMAT AG",
|
|
/// "..."
|
|
/// ]
|
|
/// }
|
|
/// </example>
|
|
public record SwissQrCodeExtractionResult(
|
|
#if NET
|
|
SwissQrBillDto Bill,
|
|
#else
|
|
object? Bill,
|
|
#endif
|
|
IEnumerable<string> RawLines
|
|
); |