public function init($map = null, $prefix = '') { if ($map != null) { $mapKeyName = $prefix . 'fundingPlanId'; if ($map != null && array_key_exists($mapKeyName, $map)) { $this->fundingPlanId = $map[$mapKeyName]; } if (PPUtils::array_match_key($map, $prefix . "fundingAmount.")) { $newPrefix = $prefix . "fundingAmount."; $this->fundingAmount = new CurrencyType(); $this->fundingAmount->init($map, $newPrefix); } if (PPUtils::array_match_key($map, $prefix . "backupFundingSource.")) { $newPrefix = $prefix . "backupFundingSource."; $this->backupFundingSource = new FundingSource(); $this->backupFundingSource->init($map, $newPrefix); } if (PPUtils::array_match_key($map, $prefix . "senderFees.")) { $newPrefix = $prefix . "senderFees."; $this->senderFees = new CurrencyType(); $this->senderFees->init($map, $newPrefix); } if (PPUtils::array_match_key($map, $prefix . "currencyConversion.")) { $newPrefix = $prefix . "currencyConversion."; $this->currencyConversion = new CurrencyConversion(); $this->currencyConversion->init($map, $newPrefix); } $i = 0; while (true) { if (PPUtils::array_match_key($map, $prefix . "charge({$i})")) { $newPrefix = $prefix . "charge({$i})."; $this->charge[$i] = new FundingPlanCharge(); $this->charge[$i]->init($map, $newPrefix); } else { break; } $i++; } } }