public function toXMLString()
 {
     $str = '';
     if ($this->BillingAgreementDetails != null) {
         $str .= '<ebl:BillingAgreementDetails>';
         $str .= $this->BillingAgreementDetails->toXMLString();
         $str .= '</ebl:BillingAgreementDetails>';
     }
     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->LocaleCode != null) {
         $str .= '<ebl:LocaleCode>' . PPUtils::escapeInvalidXmlCharsRegex($this->LocaleCode) . '</ebl:LocaleCode>';
     }
     if ($this->PageStyle != null) {
         $str .= '<ebl:PageStyle>' . PPUtils::escapeInvalidXmlCharsRegex($this->PageStyle) . '</ebl:PageStyle>';
     }
     if ($this->cppheaderimage != null) {
         $str .= '<ebl:cpp-header-image>' . PPUtils::escapeInvalidXmlCharsRegex($this->cppheaderimage) . '</ebl:cpp-header-image>';
     }
     if ($this->cppheaderbordercolor != null) {
         $str .= '<ebl:cpp-header-border-color>' . PPUtils::escapeInvalidXmlCharsRegex($this->cppheaderbordercolor) . '</ebl:cpp-header-border-color>';
     }
     if ($this->cppheaderbackcolor != null) {
         $str .= '<ebl:cpp-header-back-color>' . PPUtils::escapeInvalidXmlCharsRegex($this->cppheaderbackcolor) . '</ebl:cpp-header-back-color>';
     }
     if ($this->cpppayflowcolor != null) {
         $str .= '<ebl:cpp-payflow-color>' . PPUtils::escapeInvalidXmlCharsRegex($this->cpppayflowcolor) . '</ebl:cpp-payflow-color>';
     }
     if ($this->BuyerEmail != null) {
         $str .= '<ebl:BuyerEmail>' . PPUtils::escapeInvalidXmlCharsRegex($this->BuyerEmail) . '</ebl:BuyerEmail>';
     }
     if ($this->ReqBillingAddress != null) {
         $str .= '<ebl:ReqBillingAddress>' . PPUtils::escapeInvalidXmlCharsRegex($this->ReqBillingAddress) . '</ebl:ReqBillingAddress>';
     }
     return $str;
 }
 public function toXMLString()
 {
     $str = '';
     if ($this->BillingAgreementDetails != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //does not contain attribute or is attribute
         $str .= '<ebl:BillingAgreementDetails>';
         $str .= $this->BillingAgreementDetails->toXMLString();
         $str .= '</ebl:BillingAgreementDetails>';
     }
     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->LocaleCode != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:LocaleCode>' . $this->LocaleCode . '</ebl:LocaleCode>';
     }
     if ($this->PageStyle != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:PageStyle>' . $this->PageStyle . '</ebl:PageStyle>';
     }
     if ($this->cppheaderimage != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:cpp-header-image>' . $this->cppheaderimage . '</ebl:cpp-header-image>';
     }
     if ($this->cppheaderbordercolor != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:cpp-header-border-color>' . $this->cppheaderbordercolor . '</ebl:cpp-header-border-color>';
     }
     if ($this->cppheaderbackcolor != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:cpp-header-back-color>' . $this->cppheaderbackcolor . '</ebl:cpp-header-back-color>';
     }
     if ($this->cpppayflowcolor != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:cpp-payflow-color>' . $this->cpppayflowcolor . '</ebl:cpp-payflow-color>';
     }
     if ($this->BuyerEmail != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:BuyerEmail>' . $this->BuyerEmail . '</ebl:BuyerEmail>';
     }
     if ($this->ReqBillingAddress != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:ReqBillingAddress>' . $this->ReqBillingAddress . '</ebl:ReqBillingAddress>';
     }
     return $str;
 }