Пример #1
0
 /**
  * @param Customer $customer
  *
  * @return \SimpleXMLElement
  * @throws BpostApiBusinessException
  * @throws BpostApiSystemException
  * @throws BpostCurlException
  * @throws BpostInvalidResponseException
  */
 public function createMember(Customer $customer)
 {
     $url = '/customer';
     $document = new \DOMDocument('1.0', 'utf-8');
     $document->preserveWhiteSpace = false;
     $document->formatOutput = true;
     $document->appendChild($customer->toXML($document));
     return $this->doCall($url, $document->saveXML(), 'POST');
 }