Resolve "Regional pricing" #1703
2 changed files with 26 additions and 0 deletions
|
|
@ -307,4 +307,9 @@ apiv2_insurance_application_create:
|
|||
apiv2_insurance_premiums_banner:
|
||||
path: /apiv2/insurance/premiums_banner
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::getPremiumsBanner
|
||||
methods: [GET]
|
||||
|
||||
apiv2_insurance_body_types:
|
||||
path: /apiv2/insurance/body_types
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::getBodyTypes
|
||||
methods: [GET]
|
||||
|
|
@ -307,6 +307,27 @@ class InsuranceController extends ApiController
|
|||
]);
|
||||
}
|
||||
|
||||
public function getBodyTypes(Request $req)
|
||||
{
|
||||
// validate params
|
||||
$validity = $this->validateRequest($req);
|
||||
|
||||
if (!$validity['is_valid']) {
|
||||
return new ApiResponse(false, $validity['error']);
|
||||
}
|
||||
|
||||
// TODO: if this changes often, make an entity and make it manageable on CRM
|
||||
$body_types = [
|
||||
'SEDAN' => 'Sedan',
|
||||
'SUV' => 'SUV',
|
||||
'TRUCK' => 'Truck',
|
||||
];
|
||||
|
||||
return new ApiResponse(true, '', [
|
||||
'body_types' => $body_types,
|
||||
]);
|
||||
}
|
||||
|
||||
protected function getLineType($mv_type_id, $vehicle_use_type, $is_public = false)
|
||||
{
|
||||
$line = '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue