Add changelog to insurance info on vehicle endpoint #761

This commit is contained in:
Ramon Gutierrez 2023-10-09 17:02:23 +08:00
parent d3054760d3
commit da87b386a3

View file

@ -333,6 +333,9 @@ class VehicleController extends ApiController
'transaction_status' => $gt->getStatus(), 'transaction_status' => $gt->getStatus(),
'premium_amount' => (string)bcdiv($gt->getAmount(), 100), // NOTE: hard expressing as string so it's consistent 'premium_amount' => (string)bcdiv($gt->getAmount(), 100), // NOTE: hard expressing as string so it's consistent
]; ];
// get information changelog
$insurance['changelog'] = $iobj->getMetadata()['changes'] ?? [];
} }
$row['latest_insurance'] = $insurance; $row['latest_insurance'] = $insurance;