public function toXMLString() { $str = ''; if ($this->BuyerPhone != null) { $str .= '<ebl:BuyerPhone>'; $str .= $this->BuyerPhone->toXMLString(); $str .= '</ebl:BuyerPhone>'; } if ($this->ItemAmount != null) { $str .= '<ebl:ItemAmount'; $str .= $this->ItemAmount->toXMLString(); $str .= '</ebl:ItemAmount>'; } if ($this->Tax != null) { $str .= '<ebl:Tax'; $str .= $this->Tax->toXMLString(); $str .= '</ebl:Tax>'; } if ($this->Shipping != null) { $str .= '<ebl:Shipping'; $str .= $this->Shipping->toXMLString(); $str .= '</ebl:Shipping>'; } if ($this->ItemName != null) { $str .= '<ebl:ItemName>' . PPUtils::escapeInvalidXmlCharsRegex($this->ItemName) . '</ebl:ItemName>'; } if ($this->ItemNumber != null) { $str .= '<ebl:ItemNumber>' . PPUtils::escapeInvalidXmlCharsRegex($this->ItemNumber) . '</ebl:ItemNumber>'; } if ($this->Custom != null) { $str .= '<ebl:Custom>' . PPUtils::escapeInvalidXmlCharsRegex($this->Custom) . '</ebl:Custom>'; } if ($this->InvoiceID != null) { $str .= '<ebl:InvoiceID>' . PPUtils::escapeInvalidXmlCharsRegex($this->InvoiceID) . '</ebl:InvoiceID>'; } if ($this->ReturnURL != null) { $str .= '<ebl:ReturnURL>' . PPUtils::escapeInvalidXmlCharsRegex($this->ReturnURL) . '</ebl:ReturnURL>'; } if ($this->CancelURL != null) { $str .= '<ebl:CancelURL>' . PPUtils::escapeInvalidXmlCharsRegex($this->CancelURL) . '</ebl:CancelURL>'; } if ($this->AddressDisplayOptions != null) { $str .= '<ebl:AddressDisplayOptions>' . PPUtils::escapeInvalidXmlCharsRegex($this->AddressDisplayOptions) . '</ebl:AddressDisplayOptions>'; } if ($this->SharePhone != null) { $str .= '<ebl:SharePhone>' . PPUtils::escapeInvalidXmlCharsRegex($this->SharePhone) . '</ebl:SharePhone>'; } if ($this->ShipToAddress != null) { $str .= '<ebl:ShipToAddress>'; $str .= $this->ShipToAddress->toXMLString(); $str .= '</ebl:ShipToAddress>'; } if ($this->BuyerEmail != null) { $str .= '<ebl:BuyerEmail>' . PPUtils::escapeInvalidXmlCharsRegex($this->BuyerEmail) . '</ebl:BuyerEmail>'; } return $str; }
public function toXMLString() { $str = ''; if ($this->BuyerPhone != null) { //prop is not a collection //prop is complex //prop is not enum //does not contain attribute or is attribute $str .= '<ebl:BuyerPhone>'; $str .= $this->BuyerPhone->toXMLString(); $str .= '</ebl:BuyerPhone>'; } if ($this->ItemAmount != null) { //prop is not a collection //prop is complex //prop is not enum //prop containsattribute $str .= '<ebl:ItemAmount'; $str .= $this->ItemAmount->toXMLString(); $str .= '</ebl:ItemAmount>'; } if ($this->Tax != null) { //prop is not a collection //prop is complex //prop is not enum //prop containsattribute $str .= '<ebl:Tax'; $str .= $this->Tax->toXMLString(); $str .= '</ebl:Tax>'; } if ($this->Shipping != null) { //prop is not a collection //prop is complex //prop is not enum //prop containsattribute $str .= '<ebl:Shipping'; $str .= $this->Shipping->toXMLString(); $str .= '</ebl:Shipping>'; } if ($this->ItemName != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:ItemName>' . $this->ItemName . '</ebl:ItemName>'; } if ($this->ItemNumber != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:ItemNumber>' . $this->ItemNumber . '</ebl:ItemNumber>'; } if ($this->Custom != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:Custom>' . $this->Custom . '</ebl:Custom>'; } if ($this->InvoiceID != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:InvoiceID>' . $this->InvoiceID . '</ebl:InvoiceID>'; } if ($this->ReturnURL != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:ReturnURL>' . $this->ReturnURL . '</ebl:ReturnURL>'; } if ($this->CancelURL != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:CancelURL>' . $this->CancelURL . '</ebl:CancelURL>'; } if ($this->AddressDisplayOptions != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:AddressDisplayOptions>' . $this->AddressDisplayOptions . '</ebl:AddressDisplayOptions>'; } if ($this->SharePhone != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:SharePhone>' . $this->SharePhone . '</ebl:SharePhone>'; } if ($this->ShipToAddress != null) { //prop is not a collection //prop is complex //prop is not enum //does not contain attribute or is attribute $str .= '<ebl:ShipToAddress>'; $str .= $this->ShipToAddress->toXMLString(); $str .= '</ebl:ShipToAddress>'; } if ($this->BuyerEmail != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:BuyerEmail>' . $this->BuyerEmail . '</ebl:BuyerEmail>'; } return $str; }