From 44b9679a2e97c6a3c9e73d5cf51071a4f8e7be0d Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Thu, 16 Jun 2022 04:26:27 +0000 Subject: [PATCH] Move third party api controllers to a more descriptive directory. #686 --- .../ResqAPI => TAPI}/BatteryController.php | 2 +- .../ResqAPI => TAPI}/JobOrderController.php | 32 +++++++++++++++---- .../ResqAPI => TAPI}/PromoController.php | 2 +- .../ResqAPI => TAPI}/ServiceController.php | 2 +- .../ResqAPI => TAPI}/VehicleController.php | 2 +- 5 files changed, 30 insertions(+), 10 deletions(-) rename src/Controller/{CAPI/ResqAPI => TAPI}/BatteryController.php (98%) rename src/Controller/{CAPI/ResqAPI => TAPI}/JobOrderController.php (98%) rename src/Controller/{CAPI/ResqAPI => TAPI}/PromoController.php (96%) rename src/Controller/{CAPI/ResqAPI => TAPI}/ServiceController.php (98%) rename src/Controller/{CAPI/ResqAPI => TAPI}/VehicleController.php (98%) diff --git a/src/Controller/CAPI/ResqAPI/BatteryController.php b/src/Controller/TAPI/BatteryController.php similarity index 98% rename from src/Controller/CAPI/ResqAPI/BatteryController.php rename to src/Controller/TAPI/BatteryController.php index 7c294e2c..5423153b 100644 --- a/src/Controller/CAPI/ResqAPI/BatteryController.php +++ b/src/Controller/TAPI/BatteryController.php @@ -1,6 +1,6 @@ checkParamsAndKey($req, $em, $required_params); if ($res->isError()) return $res->getReturnResponse(); + // get data from request + $data = $this->getJobOrderRequestInfo($req); + + // process customer and vehicle information + $this->processCustomerAndVehicleInformation(); + // trade in type $trade_in = $req->request->get('trade_in'); @@ -1633,5 +1644,14 @@ class JobOrderController extends APIController return $file_path; } + + protected function getJobOrderRequestInfo(Request $req) + { + + return $data; + } + + // TODO: add function to clean plate number + // TODO: add function to normalize strings (lowercase them since the types are lowercase) } diff --git a/src/Controller/CAPI/ResqAPI/PromoController.php b/src/Controller/TAPI/PromoController.php similarity index 96% rename from src/Controller/CAPI/ResqAPI/PromoController.php rename to src/Controller/TAPI/PromoController.php index 87e214d0..9b21a429 100644 --- a/src/Controller/CAPI/ResqAPI/PromoController.php +++ b/src/Controller/TAPI/PromoController.php @@ -1,6 +1,6 @@