public function toXMLString()
 {
     $str = '';
     if ($this->OrderTotal != null) {
         $str .= '<ebl:OrderTotal';
         $str .= $this->OrderTotal->toXMLString();
         $str .= '</ebl:OrderTotal>';
     }
     if ($this->ItemTotal != null) {
         $str .= '<ebl:ItemTotal';
         $str .= $this->ItemTotal->toXMLString();
         $str .= '</ebl:ItemTotal>';
     }
     if ($this->ShippingTotal != null) {
         $str .= '<ebl:ShippingTotal';
         $str .= $this->ShippingTotal->toXMLString();
         $str .= '</ebl:ShippingTotal>';
     }
     if ($this->HandlingTotal != null) {
         $str .= '<ebl:HandlingTotal';
         $str .= $this->HandlingTotal->toXMLString();
         $str .= '</ebl:HandlingTotal>';
     }
     if ($this->TaxTotal != null) {
         $str .= '<ebl:TaxTotal';
         $str .= $this->TaxTotal->toXMLString();
         $str .= '</ebl:TaxTotal>';
     }
     if ($this->OrderDescription != null) {
         $str .= '<ebl:OrderDescription>' . PPUtils::escapeInvalidXmlCharsRegex($this->OrderDescription) . '</ebl:OrderDescription>';
     }
     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->ButtonSource != null) {
         $str .= '<ebl:ButtonSource>' . PPUtils::escapeInvalidXmlCharsRegex($this->ButtonSource) . '</ebl:ButtonSource>';
     }
     if ($this->NotifyURL != null) {
         $str .= '<ebl:NotifyURL>' . PPUtils::escapeInvalidXmlCharsRegex($this->NotifyURL) . '</ebl:NotifyURL>';
     }
     if ($this->ShipToAddress != null) {
         $str .= '<ebl:ShipToAddress>';
         $str .= $this->ShipToAddress->toXMLString();
         $str .= '</ebl:ShipToAddress>';
     }
     if ($this->FulfillmentReferenceNumber != null) {
         $str .= '<ebl:FulfillmentReferenceNumber>' . PPUtils::escapeInvalidXmlCharsRegex($this->FulfillmentReferenceNumber) . '</ebl:FulfillmentReferenceNumber>';
     }
     if ($this->FulfillmentAddress != null) {
         $str .= '<ebl:FulfillmentAddress>';
         $str .= $this->FulfillmentAddress->toXMLString();
         $str .= '</ebl:FulfillmentAddress>';
     }
     if ($this->PaymentCategoryType != null) {
         $str .= '<ebl:PaymentCategoryType>' . PPUtils::escapeInvalidXmlCharsRegex($this->PaymentCategoryType) . '</ebl:PaymentCategoryType>';
     }
     if ($this->ShippingMethod != null) {
         $str .= '<ebl:ShippingMethod>' . PPUtils::escapeInvalidXmlCharsRegex($this->ShippingMethod) . '</ebl:ShippingMethod>';
     }
     if ($this->ProfileAddressChangeDate != null) {
         $str .= '<ebl:ProfileAddressChangeDate>' . PPUtils::escapeInvalidXmlCharsRegex($this->ProfileAddressChangeDate) . '</ebl:ProfileAddressChangeDate>';
     }
     if ($this->PaymentDetailsItem != null) {
         for ($i = 0; $i < count($this->PaymentDetailsItem); $i++) {
             $str .= '<ebl:PaymentDetailsItem>';
             $str .= $this->PaymentDetailsItem[$i]->toXMLString();
             $str .= '</ebl:PaymentDetailsItem>';
         }
     }
     if ($this->InsuranceTotal != null) {
         $str .= '<ebl:InsuranceTotal';
         $str .= $this->InsuranceTotal->toXMLString();
         $str .= '</ebl:InsuranceTotal>';
     }
     if ($this->ShippingDiscount != null) {
         $str .= '<ebl:ShippingDiscount';
         $str .= $this->ShippingDiscount->toXMLString();
         $str .= '</ebl:ShippingDiscount>';
     }
     if ($this->InsuranceOptionOffered != null) {
         $str .= '<ebl:InsuranceOptionOffered>' . PPUtils::escapeInvalidXmlCharsRegex($this->InsuranceOptionOffered) . '</ebl:InsuranceOptionOffered>';
     }
     if ($this->AllowedPaymentMethod != null) {
         $str .= '<ebl:AllowedPaymentMethod>' . PPUtils::escapeInvalidXmlCharsRegex($this->AllowedPaymentMethod) . '</ebl:AllowedPaymentMethod>';
     }
     if ($this->EnhancedPaymentData != null) {
         $str .= '<ebl:EnhancedPaymentData>';
         $str .= $this->EnhancedPaymentData->toXMLString();
         $str .= '</ebl:EnhancedPaymentData>';
     }
     if ($this->SellerDetails != null) {
         $str .= '<ebl:SellerDetails>';
         $str .= $this->SellerDetails->toXMLString();
         $str .= '</ebl:SellerDetails>';
     }
     if ($this->NoteText != null) {
         $str .= '<ebl:NoteText>' . PPUtils::escapeInvalidXmlCharsRegex($this->NoteText) . '</ebl:NoteText>';
     }
     if ($this->TransactionId != null) {
         $str .= '<ebl:TransactionId>' . PPUtils::escapeInvalidXmlCharsRegex($this->TransactionId) . '</ebl:TransactionId>';
     }
     if ($this->PaymentAction != null) {
         $str .= '<ebl:PaymentAction>' . PPUtils::escapeInvalidXmlCharsRegex($this->PaymentAction) . '</ebl:PaymentAction>';
     }
     if ($this->PaymentRequestID != null) {
         $str .= '<ebl:PaymentRequestID>' . PPUtils::escapeInvalidXmlCharsRegex($this->PaymentRequestID) . '</ebl:PaymentRequestID>';
     }
     if ($this->OrderURL != null) {
         $str .= '<ebl:OrderURL>' . PPUtils::escapeInvalidXmlCharsRegex($this->OrderURL) . '</ebl:OrderURL>';
     }
     if ($this->SoftDescriptor != null) {
         $str .= '<ebl:SoftDescriptor>' . PPUtils::escapeInvalidXmlCharsRegex($this->SoftDescriptor) . '</ebl:SoftDescriptor>';
     }
     if ($this->BranchLevel != null) {
         $str .= '<ebl:BranchLevel>' . PPUtils::escapeInvalidXmlCharsRegex($this->BranchLevel) . '</ebl:BranchLevel>';
     }
     if ($this->OfferDetails != null) {
         $str .= '<ebl:OfferDetails>';
         $str .= $this->OfferDetails->toXMLString();
         $str .= '</ebl:OfferDetails>';
     }
     if ($this->Recurring != null) {
         $str .= '<ebl:Recurring>' . PPUtils::escapeInvalidXmlCharsRegex($this->Recurring) . '</ebl:Recurring>';
     }
     if ($this->PaymentReason != null) {
         $str .= '<ebl:PaymentReason>' . PPUtils::escapeInvalidXmlCharsRegex($this->PaymentReason) . '</ebl:PaymentReason>';
     }
     return $str;
 }
 public function toXMLString()
 {
     $str = '';
     if ($this->OrderTotal != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //prop containsattribute
         $str .= '<ebl:OrderTotal';
         $str .= $this->OrderTotal->toXMLString();
         $str .= '</ebl:OrderTotal>';
     }
     if ($this->ItemTotal != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //prop containsattribute
         $str .= '<ebl:ItemTotal';
         $str .= $this->ItemTotal->toXMLString();
         $str .= '</ebl:ItemTotal>';
     }
     if ($this->ShippingTotal != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //prop containsattribute
         $str .= '<ebl:ShippingTotal';
         $str .= $this->ShippingTotal->toXMLString();
         $str .= '</ebl:ShippingTotal>';
     }
     if ($this->HandlingTotal != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //prop containsattribute
         $str .= '<ebl:HandlingTotal';
         $str .= $this->HandlingTotal->toXMLString();
         $str .= '</ebl:HandlingTotal>';
     }
     if ($this->TaxTotal != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //prop containsattribute
         $str .= '<ebl:TaxTotal';
         $str .= $this->TaxTotal->toXMLString();
         $str .= '</ebl:TaxTotal>';
     }
     if ($this->OrderDescription != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:OrderDescription>' . $this->OrderDescription . '</ebl:OrderDescription>';
     }
     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->ButtonSource != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:ButtonSource>' . $this->ButtonSource . '</ebl:ButtonSource>';
     }
     if ($this->NotifyURL != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:NotifyURL>' . $this->NotifyURL . '</ebl:NotifyURL>';
     }
     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->FulfillmentAddress != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //does not contain attribute or is attribute
         $str .= '<ebl:FulfillmentAddress>';
         $str .= $this->FulfillmentAddress->toXMLString();
         $str .= '</ebl:FulfillmentAddress>';
     }
     if ($this->PaymentCategoryType != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:PaymentCategoryType>' . $this->PaymentCategoryType . '</ebl:PaymentCategoryType>';
     }
     if ($this->ShippingMethod != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:ShippingMethod>' . $this->ShippingMethod . '</ebl:ShippingMethod>';
     }
     if ($this->ProfileAddressChangeDate != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:ProfileAddressChangeDate>' . $this->ProfileAddressChangeDate . '</ebl:ProfileAddressChangeDate>';
     }
     if ($this->PaymentDetailsItem != null) {
         for ($i = 0; $i < count($this->PaymentDetailsItem); $i++) {
             //property is collection
             //prop.complex
             //does not contain attribute or is attribute
             $str .= '<ebl:PaymentDetailsItem>';
             $str .= $this->PaymentDetailsItem[$i]->toXMLString();
             $str .= '</ebl:PaymentDetailsItem>';
         }
     }
     if ($this->InsuranceTotal != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //prop containsattribute
         $str .= '<ebl:InsuranceTotal';
         $str .= $this->InsuranceTotal->toXMLString();
         $str .= '</ebl:InsuranceTotal>';
     }
     if ($this->ShippingDiscount != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //prop containsattribute
         $str .= '<ebl:ShippingDiscount';
         $str .= $this->ShippingDiscount->toXMLString();
         $str .= '</ebl:ShippingDiscount>';
     }
     if ($this->InsuranceOptionOffered != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:InsuranceOptionOffered>' . $this->InsuranceOptionOffered . '</ebl:InsuranceOptionOffered>';
     }
     if ($this->AllowedPaymentMethod != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:AllowedPaymentMethod>' . $this->AllowedPaymentMethod . '</ebl:AllowedPaymentMethod>';
     }
     if ($this->EnhancedPaymentData != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //does not contain attribute or is attribute
         $str .= '<ebl:EnhancedPaymentData>';
         $str .= $this->EnhancedPaymentData->toXMLString();
         $str .= '</ebl:EnhancedPaymentData>';
     }
     if ($this->SellerDetails != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //does not contain attribute or is attribute
         $str .= '<ebl:SellerDetails>';
         $str .= $this->SellerDetails->toXMLString();
         $str .= '</ebl:SellerDetails>';
     }
     if ($this->NoteText != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:NoteText>' . $this->NoteText . '</ebl:NoteText>';
     }
     if ($this->TransactionId != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:TransactionId>' . $this->TransactionId . '</ebl:TransactionId>';
     }
     if ($this->PaymentAction != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:PaymentAction>' . $this->PaymentAction . '</ebl:PaymentAction>';
     }
     if ($this->PaymentRequestID != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:PaymentRequestID>' . $this->PaymentRequestID . '</ebl:PaymentRequestID>';
     }
     if ($this->OrderURL != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:OrderURL>' . $this->OrderURL . '</ebl:OrderURL>';
     }
     if ($this->SoftDescriptor != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:SoftDescriptor>' . $this->SoftDescriptor . '</ebl:SoftDescriptor>';
     }
     if ($this->BranchLevel != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:BranchLevel>' . $this->BranchLevel . '</ebl:BranchLevel>';
     }
     if ($this->OfferDetails != null) {
         //prop is not a collection
         //prop is complex
         //prop is not enum
         //does not contain attribute or is attribute
         $str .= '<ebl:OfferDetails>';
         $str .= $this->OfferDetails->toXMLString();
         $str .= '</ebl:OfferDetails>';
     }
     if ($this->Recurring != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:Recurring>' . $this->Recurring . '</ebl:Recurring>';
     }
     if ($this->PaymentReason != null) {
         //prop is not a collection
         //prop not complex
         //prop is not value
         $str .= '<ebl:PaymentReason>' . $this->PaymentReason . '</ebl:PaymentReason>';
     }
     return $str;
 }