Facturx.CII (Facturx v0.1.0)

Copy Markdown View Source

Cross Industry Invoice (CII) XML — build and parse (pure Elixir, via Saxy).

Maps between Facturx.Invoice and the EN 16931 CII vocabulary (rsm:CrossIndustryInvoice, ram:*, udt:*). Element order follows the CII schema so the output validates.

Summary

Functions

Build the CII XML for invoice.

Parse a CII XML binary into an Facturx.Invoice.

Functions

build(invoice, opts \\ [])

@spec build(
  Facturx.Invoice.t(),
  keyword()
) :: {:ok, binary()} | {:error, term()}

Build the CII XML for invoice.

Options: :profile overrides invoice.profile.

parse(xml)

@spec parse(binary()) :: {:ok, Facturx.Invoice.t()} | {:error, term()}

Parse a CII XML binary into an Facturx.Invoice.