namespace DocumentOperator.Application.Common.DTOs; /// /// Response containing extracted Swiss QR Code data and passed-through references. /// /// Reference strings passed through from the request /// Parsed Swiss QR Code data from the last page of the PDF /// /// { /// "references": ["REF-001", "REF-002"], /// "qrCodeData": { /// "qrType": "SPC", /// "version": "0200", /// "codingType": "1", /// "iban": "CH4431999123000889012", /// "creditor": { /// "addressType": "S", /// "name": "Robert Schneider AG", /// "street": "Rue du Lac", /// "buildingNumber": "1268", /// "postalCode": "2501", /// "city": "Biel", /// "country": "CH" /// }, /// "amount": 1949.75, /// "currency": "CHF", /// "referenceType": "QRR", /// "reference": "210000000003139471430009017" /// } /// } /// public record SwissQrCodeExtractionResult( IReadOnlyList References, SwissQrCodeDataDto QrCodeData ); /// /// Swiss QR Code data according to Swiss QR Bill Standard 2.0. /// Contains all fields defined in the Swiss Payment Standards. /// public record SwissQrCodeDataDto( /// QR type - always "SPC" for Swiss Payment Code string QrType, /// Version of the Swiss QR Code standard (e.g., "0200" for version 2.0) string Version, /// Character set code (always "1" for UTF-8) string CodingType, /// IBAN of the creditor (payee) string Iban, /// Creditor (payee) information AddressDataDto Creditor, /// Ultimate creditor information (optional) AddressDataDto? UltimateCreditor, /// Payment amount (null if not specified) decimal? Amount, /// Currency code (CHF or EUR) string Currency, /// Ultimate debtor (payer) information (optional) AddressDataDto? UltimateDebtor, /// Reference type: "QRR" (QR Reference), "SCOR" (Creditor Reference ISO 11649), or "NON" (No Reference) string ReferenceType, /// Payment reference (format depends on ReferenceType) string? Reference, /// Unstructured message (max 140 characters) string? UnstructuredMessage, /// Bill information (structured data for automated processing) string? BillInformation, /// Alternative procedure parameters (up to 2 entries) IReadOnlyList? AlternativeProcedureParameters ); /// /// Address data in Swiss QR Code (creditor or debtor). /// Can be either structured (S) or combined (K) format. /// public record AddressDataDto( /// Address type: "S" for structured, "K" for combined string AddressType, /// Name of person or company string Name, /// Street name (structured address only) string? Street, /// Building number (structured address only) string? BuildingNumber, /// Address line 1 (combined address only) string? AddressLine1, /// Address line 2 (combined address only) string? AddressLine2, /// Postal code string PostalCode, /// City/town name string City, /// Two-letter country code (ISO 3166-1 alpha-2) string Country );