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

StandardRule standard the files implement
VersionRule version the files implement
ProfileInvoice profile the rules target
SchemaFileXML Schema file to validate against when no package provides one
SchematronStylesheetFileSchematron stylesheet to evaluate when no package provides one
PackageFileManifest file or package directory to resolve
PackageSHA256Expected manifest digest; empty when the package is not pinned
PackageFilesFiles 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