private function mapBankTransfers($bouncedRows) { $bankTransfers = array(); foreach ($bouncedRows as $index => $bouncedRow) { $bankTransfer = new BankTransfer(); if (isset($bouncedRow->subMerchantKey)) { $bankTransfer->setSubMerchantKey($bouncedRow->subMerchantKey); } if (isset($bouncedRow->iban)) { $bankTransfer->setIban($bouncedRow->iban); } if (isset($bouncedRow->contactName)) { $bankTransfer->setContactName($bouncedRow->contactName); } if (isset($bouncedRow->contactSurname)) { $bankTransfer->setContactSurname($bouncedRow->contactSurname); } if (isset($bouncedRow->legalCompanyTitle)) { $bankTransfer->setLegalCompanyTitle($bouncedRow->legalCompanyTitle); } if (isset($bouncedRow->marketplaceSubmerchantType)) { $bankTransfer->setMarketplaceSubMerchantType($bouncedRow->marketplaceSubmerchantType); } $bankTransfers[$index] = $bankTransfer; } return $bankTransfers; }