Handle unavailable properties in Yodlee response

This commit is contained in:
David Bomba 2023-06-25 14:35:58 +10:00
parent c6e249bb67
commit fdc67cd5fb

View File

@ -151,7 +151,7 @@ class IncomeTransformer implements BankRevenueInterface
'category_type' => $transaction->categoryType, 'category_type' => $transaction->categoryType,
'date' => $transaction->date, 'date' => $transaction->date,
'bank_account_id' => $transaction->accountId, 'bank_account_id' => $transaction->accountId,
'description' => $transaction->description->original, 'description' => $transaction?->description?->original ?? '',
'base_type' => property_exists($transaction, 'baseType') ? $transaction->baseType : $this->calculateBaseType($transaction), 'base_type' => property_exists($transaction, 'baseType') ? $transaction->baseType : $this->calculateBaseType($transaction),
]; ];
} }