pub fn attach_b2b(
nfe_proc_xml: &str,
b2b_xml: &str,
tag_b2b: Option<&str>,
) -> Result<String, FiscalError>Expand description
Attach a B2B financial tag to an authorized <nfeProc> XML,
wrapping both in a <nfeProcB2B> element.
§Arguments
nfe_proc_xml- The authorized nfeProc XML.b2b_xml- The B2B financial XML (must contain thetag_b2belement).tag_b2b- Optional B2B tag name; defaults to"NFeB2BFin".
§Errors
Returns FiscalError::XmlParsing if:
- The
nfe_proc_xmldoes not contain<nfeProc> - The
b2b_xmldoes not contain the expected B2B tag - Either tag cannot be extracted