class Zugpferd::Reader

Overview

Parses a ZUGFeRD 2.x CII XML string into an Invoice. Does not run the validator — call Validator.new(invoice).validate! separately if EN 16931 business-rule validation is needed after parsing.

Defined in:

zugpferd/reader.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(xml : String) #

[View source]

Class Method Detail

def self.from_xml(xml : String) : Invoice #

Parses a ZUGFeRD CII XML string and returns an Invoice. Raises ParseError on structural problems (missing required elements, unknown enum values).


[View source]
def self.parse_profile(uri : String) : Profile #

Maps a ZUGFeRD guideline URI to a Profile enum member. Handles both canonical URIs (from our Generator) and short-form URIs used by real-world documents (e.g. "urn:cen.eu:en16931:2017").


[View source]

Instance Method Detail

def read : Invoice #

[View source]