'Lock Created', 'message' => 'You have successfully created a lock' ]; } // /** @var CanCreateBooking */ // private $canCreateBooking; /** @var CreatesKeyValuePair */ private $createsKeyValuePair; /** * CreateLockLogic constructor. * @param CanCreateBooking $canCreateBooking * @param CreatesKeyValuePair $createsKeyValuePair */ public function __construct(CanCreateBooking $canCreateBooking, CreatesKeyValuePair $createsKeyValuePair) { // $this->canCreateBooking = $canCreateBooking; $this->createsKeyValuePair = $createsKeyValuePair; } /** * @param Request $request * @return JsonResponse * @throws \App\Classes\Exceptions\AccessForbiddenException * @throws \App\Classes\Exceptions\MalformedRequestException * @throws \App\Classes\Exceptions\RequestValidationException */ public function logic(Request $request) : JsonResponse { // cief todo: 110 - CanCreateLock // $password = $request->input('password'); // if($password !== 'prototype'){ // throw new AccessForbiddenException('Incorrect Password'); // } $keyValuePairObject = new KeyValuePairObject( KVPKey::UI_SUPPLIER_PAID_CURRENCY_ORDER_TAB_IS_LOCKED, 0 ); $this->createsKeyValuePair->execute(null, $keyValuePairObject); return $this->response([]); } }