From da87b386a324a5883df5a9375c4533bda970cd98 Mon Sep 17 00:00:00 2001 From: Ramon Gutierrez Date: Mon, 9 Oct 2023 17:02:23 +0800 Subject: [PATCH] Add changelog to insurance info on vehicle endpoint #761 --- src/Controller/CustomerAppAPI/VehicleController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Controller/CustomerAppAPI/VehicleController.php b/src/Controller/CustomerAppAPI/VehicleController.php index a4be2ca5..446f43b3 100644 --- a/src/Controller/CustomerAppAPI/VehicleController.php +++ b/src/Controller/CustomerAppAPI/VehicleController.php @@ -333,6 +333,9 @@ class VehicleController extends ApiController 'transaction_status' => $gt->getStatus(), '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;