TPDFInvoiceRuleSet
Data types, invoices, compliance
Description
TPDFInvoiceRuleSet tells the validator which trusted rules to run for an invoice profile. A caller either supplies a package manifest or directory through PackageFile, optionally pinned by PackageSHA256, or names the schema and Schematron files directly.
After a package is resolved, the validator fills PackageFiles so a provider can check the rule files against the verified manifest.
Syntax
Delphi
TPDFInvoiceRuleSet = record
Standard, Version, Profile: WideString;
SchemaFile, SchematronStylesheetFile: WideString;
PackageFile, PackageSHA256: WideString;
PackageFiles: TPDFInvoiceRulePackageFileArray;
end;Fields
| Standard | Rule standard the files implement |
|---|---|
| Version | Rule version the files implement |
| Profile | Invoice profile the rules target |
| SchemaFile | XML Schema file to validate against when no package provides one |
| SchematronStylesheetFile | Schematron stylesheet to evaluate when no package provides one |
| PackageFile | Manifest file or package directory to resolve |
| PackageSHA256 | Expected manifest digest; empty when the package is not pinned |
| PackageFiles | Files of the resolved package, filled by the validator before the provider runs |
Remarks
Set Standard and Version explicitly; the validator does not infer them from the invoice XML.
Supplying both PackageFile and a direct SchemaFile or SchematronStylesheetFile is rejected as an invalid request; use one form or the other.
A resolved package must declare the requested standard and version, otherwise the run fails with a rule-package mismatch.
See also
TPDFInvoiceValidationRequest, TPDFInvoiceRulePackageInfo, ValidateInvoiceBusinessRules