Merge branch '791-support-for-insurance-premiums-banner' of gitlab.com:jankstudio/resq into 780-regional-pricing
This commit is contained in:
commit
7ed9f90945
4 changed files with 21 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -12,3 +12,4 @@
|
|||
|
||||
*.swp
|
||||
/public/warranty_uploads/*
|
||||
.vscode
|
||||
|
|
|
|||
|
|
@ -303,3 +303,8 @@ apiv2_insurance_application_create:
|
|||
path: /apiv2/insurance/application
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::createApplication
|
||||
methods: [POST]
|
||||
|
||||
apiv2_insurance_premiums_banner:
|
||||
path: /apiv2/insurance/premiums_banner
|
||||
controller: App\Controller\CustomerAppAPI\InsuranceController::getPremiumsBanner
|
||||
methods: [GET]
|
||||
|
|
@ -15,6 +15,7 @@ parameters:
|
|||
api_version: "%env(API_VERSION)%"
|
||||
android_app_version: "%env(ANDROID_APP_VERSION)%"
|
||||
ios_app_version: "%env(IOS_APP_VERSION)%"
|
||||
insurance_premiums_banner_url: "%env(INSURANCE_PREMIUMS_BANNER_URL)%"
|
||||
|
||||
services:
|
||||
# default configuration for services in *this* file
|
||||
|
|
|
|||
|
|
@ -293,6 +293,20 @@ class InsuranceController extends ApiController
|
|||
]);
|
||||
}
|
||||
|
||||
public function getPremiumsBanner(Request $req)
|
||||
{
|
||||
// validate params
|
||||
$validity = $this->validateRequest($req);
|
||||
|
||||
if (!$validity['is_valid']) {
|
||||
return new ApiResponse(false, $validity['error']);
|
||||
}
|
||||
|
||||
return new ApiResponse(true, '', [
|
||||
'url' => $this->getParameter('insurance_premiums_banner_url'),
|
||||
]);
|
||||
}
|
||||
|
||||
protected function getLineType($mv_type_id, $vehicle_use_type, $is_public = false)
|
||||
{
|
||||
$line = '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue