namespace DocumentOperator.Domain.ValueObjects;
///
/// Represents Swiss QR Code data according to Swiss QR Bill Standard 2.0.
/// Immutable value object containing all fields from a Swiss QR payment part.
///
public sealed record SwissQrCodeData
{
///
/// QR type - always "SPC" for Swiss Payment Code
///
public required string QrType { get; init; }
///
/// Version of the Swiss QR Code standard (e.g., "0200" for version 2.0)
///
public required string Version { get; init; }
///
/// Character set code (always "1" for UTF-8)
///
public required string CodingType { get; init; }
///
/// IBAN of the creditor (payee)
///
public required string Iban { get; init; }
///
/// Creditor (payee) information
///
public required AddressData Creditor { get; init; }
///
/// Ultimate creditor information (optional)
///
public AddressData? UltimateCreditor { get; init; }
///
/// Payment amount (null if not specified)
///
public decimal? Amount { get; init; }
///
/// Currency code (CHF or EUR)
///
public required string Currency { get; init; }
///
/// Ultimate debtor (payer) information (optional)
///
public AddressData? UltimateDebtor { get; init; }
///
/// Reference type (QRR, SCOR, or NON)
///
public required string ReferenceType { get; init; }
///
/// Payment reference (format depends on ReferenceType)
///
public string? Reference { get; init; }
///
/// Unstructured message (max 140 characters)
///
public string? UnstructuredMessage { get; init; }
///
/// Bill information (structured data for automated processing)
///
public string? BillInformation { get; init; }
///
/// Alternative procedure parameters (up to 2 entries)
///
public IReadOnlyList? AlternativeProcedureParameters { get; init; }
}
///
/// Represents address data in Swiss QR Code (creditor or debtor)
///
public sealed record AddressData
{
///
/// Address type: "S" for structured, "K" for combined
///
public required string AddressType { get; init; }
///
/// Name of person or company
///
public required string Name { get; init; }
///
/// Street name (structured address only)
///
public string? Street { get; init; }
///
/// Building number (structured address only)
///
public string? BuildingNumber { get; init; }
///
/// Address line 1 (combined address only)
///
public string? AddressLine1 { get; init; }
///
/// Address line 2 (combined address only)
///
public string? AddressLine2 { get; init; }
///
/// Postal code
///
public required string PostalCode { get; init; }
///
/// City/town name
///
public required string City { get; init; }
///
/// Two-letter country code (ISO 3166-1 alpha-2)
///
public required string Country { get; init; }
}