code: public function toNode(DOMDocument $document = null)
      {
          if (null === $document) {
              $document = new DOMDocument();
          }
  
          $node = $document->createElement('AlternateDeliveryAddress');
  
          if ($this->getName()) {
              $node->appendChild($document->createElement('Name', $this->getName()));
          }
  
          if ($this->getUpsAccessPointId()) {
              $node->appendChild($document->createElement('UPSAccessPointID', $this->getUpsAccessPointId()));
          }
  
          $address = $this->getAddress();
          if (isset($address)) {
              $node->appendChild($address->toNode($document));
          }
  
          return $node;
      }
docs: @param null|DOMDocument $document
  
  @return \DOMElement