updatesCustomerRelation = $updatesCustomerRelation; } public function execute(int $companyId, Request $request){ try{ $object = new CustomerRelationObject(1, $companyId, $request->input('customer_rate'), $request->input('wave')); return $this->updatesCustomerRelation->execute($object); return new JsonResponse([], HttpStatus::REQUEST_ACCEPTED); }catch(\Exception $exception){ throw new InternalServerErrorException("Failed to update Customer Relation because{$exception->getMessage()}"); } } }