public function toXMLString() { $str = ''; if ($this->PaymentAction != null) { $str .= '<ebl:PaymentAction>' . PPUtils::escapeInvalidXmlCharsRegex($this->PaymentAction) . '</ebl:PaymentAction>'; } if ($this->Token != null) { $str .= '<ebl:Token>' . PPUtils::escapeInvalidXmlCharsRegex($this->Token) . '</ebl:Token>'; } if ($this->PayerID != null) { $str .= '<ebl:PayerID>' . PPUtils::escapeInvalidXmlCharsRegex($this->PayerID) . '</ebl:PayerID>'; } if ($this->OrderURL != null) { $str .= '<ebl:OrderURL>' . PPUtils::escapeInvalidXmlCharsRegex($this->OrderURL) . '</ebl:OrderURL>'; } if ($this->PaymentDetails != null) { for ($i = 0; $i < count($this->PaymentDetails); $i++) { $str .= '<ebl:PaymentDetails>'; $str .= $this->PaymentDetails[$i]->toXMLString(); $str .= '</ebl:PaymentDetails>'; } } if ($this->PromoOverrideFlag != null) { $str .= '<ebl:PromoOverrideFlag>' . PPUtils::escapeInvalidXmlCharsRegex($this->PromoOverrideFlag) . '</ebl:PromoOverrideFlag>'; } if ($this->PromoCode != null) { $str .= '<ebl:PromoCode>' . PPUtils::escapeInvalidXmlCharsRegex($this->PromoCode) . '</ebl:PromoCode>'; } if ($this->EnhancedData != null) { $str .= '<ebl:EnhancedData>'; $str .= $this->EnhancedData->toXMLString(); $str .= '</ebl:EnhancedData>'; } if ($this->SoftDescriptor != null) { $str .= '<ebl:SoftDescriptor>' . PPUtils::escapeInvalidXmlCharsRegex($this->SoftDescriptor) . '</ebl:SoftDescriptor>'; } if ($this->UserSelectedOptions != null) { $str .= '<ebl:UserSelectedOptions>'; $str .= $this->UserSelectedOptions->toXMLString(); $str .= '</ebl:UserSelectedOptions>'; } if ($this->GiftMessage != null) { $str .= '<ebl:GiftMessage>' . PPUtils::escapeInvalidXmlCharsRegex($this->GiftMessage) . '</ebl:GiftMessage>'; } if ($this->GiftReceiptEnable != null) { $str .= '<ebl:GiftReceiptEnable>' . PPUtils::escapeInvalidXmlCharsRegex($this->GiftReceiptEnable) . '</ebl:GiftReceiptEnable>'; } if ($this->GiftWrapName != null) { $str .= '<ebl:GiftWrapName>' . PPUtils::escapeInvalidXmlCharsRegex($this->GiftWrapName) . '</ebl:GiftWrapName>'; } if ($this->GiftWrapAmount != null) { $str .= '<ebl:GiftWrapAmount'; $str .= $this->GiftWrapAmount->toXMLString(); $str .= '</ebl:GiftWrapAmount>'; } if ($this->BuyerMarketingEmail != null) { $str .= '<ebl:BuyerMarketingEmail>' . PPUtils::escapeInvalidXmlCharsRegex($this->BuyerMarketingEmail) . '</ebl:BuyerMarketingEmail>'; } if ($this->SurveyQuestion != null) { $str .= '<ebl:SurveyQuestion>' . PPUtils::escapeInvalidXmlCharsRegex($this->SurveyQuestion) . '</ebl:SurveyQuestion>'; } if ($this->SurveyChoiceSelected != null) { for ($i = 0; $i < count($this->SurveyChoiceSelected); $i++) { $str .= '<ebl:SurveyChoiceSelected>' . PPUtils::escapeInvalidXmlCharsRegex($this->SurveyChoiceSelected[$i]) . '</ebl:SurveyChoiceSelected>'; } } if ($this->ButtonSource != null) { $str .= '<ebl:ButtonSource>' . PPUtils::escapeInvalidXmlCharsRegex($this->ButtonSource) . '</ebl:ButtonSource>'; } if ($this->SkipBACreation != null) { $str .= '<ebl:SkipBACreation>' . PPUtils::escapeInvalidXmlCharsRegex($this->SkipBACreation) . '</ebl:SkipBACreation>'; } if ($this->CoupledBuckets != null) { for ($i = 0; $i < count($this->CoupledBuckets); $i++) { $str .= '<ebl:CoupledBuckets>'; $str .= $this->CoupledBuckets[$i]->toXMLString(); $str .= '</ebl:CoupledBuckets>'; } } return $str; }
public function toXMLString() { $str = ''; 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->Token != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:Token>' . $this->Token . '</ebl:Token>'; } if ($this->PayerID != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:PayerID>' . $this->PayerID . '</ebl:PayerID>'; } 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->PaymentDetails != null) { for ($i = 0; $i < count($this->PaymentDetails); $i++) { //property is collection //prop.complex //does not contain attribute or is attribute $str .= '<ebl:PaymentDetails>'; $str .= $this->PaymentDetails[$i]->toXMLString(); $str .= '</ebl:PaymentDetails>'; } } if ($this->PromoOverrideFlag != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:PromoOverrideFlag>' . $this->PromoOverrideFlag . '</ebl:PromoOverrideFlag>'; } if ($this->PromoCode != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:PromoCode>' . $this->PromoCode . '</ebl:PromoCode>'; } if ($this->EnhancedData != null) { //prop is not a collection //prop is complex //prop is not enum //does not contain attribute or is attribute $str .= '<ebl:EnhancedData>'; $str .= $this->EnhancedData->toXMLString(); $str .= '</ebl:EnhancedData>'; } 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->UserSelectedOptions != null) { //prop is not a collection //prop is complex //prop is not enum //does not contain attribute or is attribute $str .= '<ebl:UserSelectedOptions>'; $str .= $this->UserSelectedOptions->toXMLString(); $str .= '</ebl:UserSelectedOptions>'; } if ($this->GiftMessage != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:GiftMessage>' . $this->GiftMessage . '</ebl:GiftMessage>'; } if ($this->GiftReceiptEnable != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:GiftReceiptEnable>' . $this->GiftReceiptEnable . '</ebl:GiftReceiptEnable>'; } if ($this->GiftWrapName != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:GiftWrapName>' . $this->GiftWrapName . '</ebl:GiftWrapName>'; } if ($this->GiftWrapAmount != null) { //prop is not a collection //prop is complex //prop is not enum //prop containsattribute $str .= '<ebl:GiftWrapAmount'; $str .= $this->GiftWrapAmount->toXMLString(); $str .= '</ebl:GiftWrapAmount>'; } if ($this->BuyerMarketingEmail != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:BuyerMarketingEmail>' . $this->BuyerMarketingEmail . '</ebl:BuyerMarketingEmail>'; } if ($this->SurveyQuestion != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:SurveyQuestion>' . $this->SurveyQuestion . '</ebl:SurveyQuestion>'; } if ($this->SurveyChoiceSelected != null) { for ($i = 0; $i < count($this->SurveyChoiceSelected); $i++) { //property is collection //not a complex member //prop is not a value $str .= '<ebl:SurveyChoiceSelected>' . $this->SurveyChoiceSelected[$i] . '</ebl:SurveyChoiceSelected>'; } } 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->SkipBACreation != null) { //prop is not a collection //prop not complex //prop is not value $str .= '<ebl:SkipBACreation>' . $this->SkipBACreation . '</ebl:SkipBACreation>'; } if ($this->CoupledBuckets != null) { for ($i = 0; $i < count($this->CoupledBuckets); $i++) { //property is collection //prop.complex //does not contain attribute or is attribute $str .= '<ebl:CoupledBuckets>'; $str .= $this->CoupledBuckets[$i]->toXMLString(); $str .= '</ebl:CoupledBuckets>'; } } return $str; }