Move third party api controllers to a more descriptive directory. #686
This commit is contained in:
parent
60f401e26e
commit
44b9679a2e
5 changed files with 30 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Controller\CAPI\ResqAPI;
|
namespace App\Controller\TAPI;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Controller\CAPI\ResqAPI;
|
namespace App\Controller\TAPI;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
@ -75,17 +75,28 @@ class JobOrderController extends APIController
|
||||||
// check required parameters and api key
|
// check required parameters and api key
|
||||||
$required_params = [
|
$required_params = [
|
||||||
'service_type',
|
'service_type',
|
||||||
'cv_id',
|
'trade_in_type',
|
||||||
'trade_in',
|
'longitude',
|
||||||
'long',
|
'latitude',
|
||||||
'lat',
|
|
||||||
'warranty',
|
|
||||||
'mode_of_payment',
|
'mode_of_payment',
|
||||||
|
'first_name',
|
||||||
|
'last_name',
|
||||||
|
'mobile_number',
|
||||||
|
'vehicle_manufacturer',
|
||||||
|
'vehicle_model',
|
||||||
|
'plate_number'
|
||||||
];
|
];
|
||||||
|
|
||||||
$res = $this->checkParamsAndKey($req, $em, $required_params);
|
$res = $this->checkParamsAndKey($req, $em, $required_params);
|
||||||
if ($res->isError())
|
if ($res->isError())
|
||||||
return $res->getReturnResponse();
|
return $res->getReturnResponse();
|
||||||
|
|
||||||
|
// get data from request
|
||||||
|
$data = $this->getJobOrderRequestInfo($req);
|
||||||
|
|
||||||
|
// process customer and vehicle information
|
||||||
|
$this->processCustomerAndVehicleInformation();
|
||||||
|
|
||||||
// trade in type
|
// trade in type
|
||||||
$trade_in = $req->request->get('trade_in');
|
$trade_in = $req->request->get('trade_in');
|
||||||
|
|
||||||
|
|
@ -1633,5 +1644,14 @@ class JobOrderController extends APIController
|
||||||
|
|
||||||
return $file_path;
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Controller\CAPI\ResqAPI;
|
namespace App\Controller\TAPI;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Controller\CAPI\ResqAPI;
|
namespace App\Controller\TAPI;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Controller\CAPI\ResqAPI;
|
namespace App\Controller\TAPI;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
Loading…
Reference in a new issue