public function init($arr = null) { if ($arr != null) { foreach ($arr as $arry) { if ($arry != null && isset($arry['text']) && $arry['name'] == 'profileid') { $this->ProfileID = $arry["text"]; } if ($arry != null && isset($arry['text']) && $arry['name'] == 'profilestatus') { $this->ProfileStatus = $arry["text"]; } if ($arry != null && isset($arry['text']) && $arry['name'] == 'description') { $this->Description = $arry["text"]; } if ($arry != null && isset($arry['text']) && $arry['name'] == 'autobilloutstandingamount') { $this->AutoBillOutstandingAmount = $arry["text"]; } if ($arry != null && isset($arry['text']) && $arry['name'] == 'maxfailedpayments') { $this->MaxFailedPayments = $arry["text"]; } if (is_array($arry["children"]) && $arry["children"] != null) { if ($arry["name"] == 'recurringpaymentsprofiledetails') { $this->RecurringPaymentsProfileDetails = new RecurringPaymentsProfileDetailsType(); $this->RecurringPaymentsProfileDetails->init($arry["children"]); } } if (is_array($arry["children"]) && $arry["children"] != null) { if ($arry["name"] == 'currentrecurringpaymentsperiod') { $this->CurrentRecurringPaymentsPeriod = new BillingPeriodDetailsType(); $this->CurrentRecurringPaymentsPeriod->init($arry["children"]); } } if (is_array($arry["children"]) && $arry["children"] != null) { if ($arry["name"] == 'recurringpaymentssummary') { $this->RecurringPaymentsSummary = new RecurringPaymentsSummaryType(); $this->RecurringPaymentsSummary->init($arry["children"]); } } if (is_array($arry["children"]) && $arry["children"] != null) { if ($arry["name"] == 'creditcard') { $this->CreditCard = new CreditCardDetailsType(); $this->CreditCard->init($arry["children"]); } } if (is_array($arry["children"]) && $arry["children"] != null) { if ($arry["name"] == 'trialrecurringpaymentsperiod') { $this->TrialRecurringPaymentsPeriod = new BillingPeriodDetailsType(); $this->TrialRecurringPaymentsPeriod->init($arry["children"]); } } if (is_array($arry["children"]) && $arry["children"] != null) { if ($arry["name"] == 'regularrecurringpaymentsperiod') { $this->RegularRecurringPaymentsPeriod = new BillingPeriodDetailsType(); $this->RegularRecurringPaymentsPeriod->init($arry["children"]); } } if (is_array($arry["attributes"]) && $arry["attributes"] != null) { if ($arry["name"] == 'trialamountpaid') { $tmp = array(); $atr = array(); foreach ($arry["attributes"] as $key => $val) { $atr[0]["name"] = $key; $atr[0]["text"] = $val; } $atr[1]["name"] = "value"; $atr[1]["text"] = $arry["text"]; $this->TrialAmountPaid = new BasicAmountType(); $this->TrialAmountPaid->init($atr); } } if (is_array($arry["attributes"]) && $arry["attributes"] != null) { if ($arry["name"] == 'regularamountpaid') { $tmp = array(); $atr = array(); foreach ($arry["attributes"] as $key => $val) { $atr[0]["name"] = $key; $atr[0]["text"] = $val; } $atr[1]["name"] = "value"; $atr[1]["text"] = $arry["text"]; $this->RegularAmountPaid = new BasicAmountType(); $this->RegularAmountPaid->init($atr); } } if (is_array($arry["attributes"]) && $arry["attributes"] != null) { if ($arry["name"] == 'aggregateamount') { $tmp = array(); $atr = array(); foreach ($arry["attributes"] as $key => $val) { $atr[0]["name"] = $key; $atr[0]["text"] = $val; } $atr[1]["name"] = "value"; $atr[1]["text"] = $arry["text"]; $this->AggregateAmount = new BasicAmountType(); $this->AggregateAmount->init($atr); } } if (is_array($arry["attributes"]) && $arry["attributes"] != null) { if ($arry["name"] == 'aggregateoptionalamount') { $tmp = array(); $atr = array(); foreach ($arry["attributes"] as $key => $val) { $atr[0]["name"] = $key; $atr[0]["text"] = $val; } $atr[1]["name"] = "value"; $atr[1]["text"] = $arry["text"]; $this->AggregateOptionalAmount = new BasicAmountType(); $this->AggregateOptionalAmount->init($atr); } } if ($arry != null && isset($arry['text']) && $arry['name'] == 'finalpaymentduedate') { $this->FinalPaymentDueDate = $arry["text"]; } } } }