public function toXMLString() { $str = ''; if ($this->Token != null) { $str .= '<ebl:Token>' . PPUtils::escapeInvalidXmlCharsRegex($this->Token) . '</ebl:Token>'; } if ($this->CreditCard != null) { $str .= '<ebl:CreditCard>'; $str .= $this->CreditCard->toXMLString(); $str .= '</ebl:CreditCard>'; } if ($this->RecurringPaymentsProfileDetails != null) { $str .= '<ebl:RecurringPaymentsProfileDetails>'; $str .= $this->RecurringPaymentsProfileDetails->toXMLString(); $str .= '</ebl:RecurringPaymentsProfileDetails>'; } if ($this->ScheduleDetails != null) { $str .= '<ebl:ScheduleDetails>'; $str .= $this->ScheduleDetails->toXMLString(); $str .= '</ebl:ScheduleDetails>'; } if ($this->PaymentDetailsItem != null) { for ($i = 0; $i < count($this->PaymentDetailsItem); $i++) { $str .= '<ebl:PaymentDetailsItem>'; $str .= $this->PaymentDetailsItem[$i]->toXMLString(); $str .= '</ebl:PaymentDetailsItem>'; } } return $str; }
public function toXMLString() { $str = ''; 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->CreditCard != null) { //prop is not a collection //prop is complex //prop is not enum //does not contain attribute or is attribute $str .= '<ebl:CreditCard>'; $str .= $this->CreditCard->toXMLString(); $str .= '</ebl:CreditCard>'; } if ($this->RecurringPaymentsProfileDetails != null) { //prop is not a collection //prop is complex //prop is not enum //does not contain attribute or is attribute $str .= '<ebl:RecurringPaymentsProfileDetails>'; $str .= $this->RecurringPaymentsProfileDetails->toXMLString(); $str .= '</ebl:RecurringPaymentsProfileDetails>'; } if ($this->ScheduleDetails != null) { //prop is not a collection //prop is complex //prop is not enum //does not contain attribute or is attribute $str .= '<ebl:ScheduleDetails>'; $str .= $this->ScheduleDetails->toXMLString(); $str .= '</ebl:ScheduleDetails>'; } 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>'; } } return $str; }