src/Entity/ReferenceNumber.php
public function toNode(DOMDocument $document = null)
    {
        if (null === $document) {
            $document = new DOMDocument();
        }

        $node = $document->createElement('ReferenceNumber');

        if ($this->getBarCodeIndicator()) {
            $node->appendChild($document->createElement('BarCodeIndicator'));
        }
        $node->appendChild($document->createElement('Code', $this->getCode()));
        $node->appendChild($document->createElement('Value', $this->getValue()));

        return $node;
    }
public function toNode(DOMDocument $document = null)
    {
        if (null === $document) {
            $document = new DOMDocument();
        }

        $node = $document->createElement('ReferenceNumber');

        if ($this->getBarCodeIndicator()) {
            $node->appendChild($document->createElement('BarCodeIndicator'));
        }
        $node->appendChild($document->createElement('Code', $this->getCode()));
        $node->appendChild($document->createElement('Value', $this->getValue()));

        return $node;
    }
@param null|DOMDocument $document

@return DOMElement