mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 20:44:03 +00:00
36 lines
1.0 KiB
PHP
36 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\ControllersLogic\FreightForwarder;
|
|
|
|
|
|
use App\Classes\Modules\ControllerLogic\Exceptions\InternalServerErrorException;
|
|
use App\Classes\Modules\FreightForwarder\Services\DeletesServiceFees;
|
|
use App\Classes\ValueObjects\Constants\HttpStatus;
|
|
use Illuminate\Http\JsonResponse;
|
|
|
|
class DeleteServiceFeesLogic
|
|
{
|
|
/** @var DeletesServiceFees */
|
|
private $deletesServiceFees;
|
|
|
|
/**
|
|
* DeleteServiceFeesLogic constructor.
|
|
* @param DeletesServiceFees $deletesServiceFees
|
|
*/
|
|
public function __construct(DeletesServiceFees $deletesServiceFees)
|
|
{
|
|
$this->deletesServiceFees = $deletesServiceFees;
|
|
}
|
|
|
|
public function execute(String $serviceId){
|
|
|
|
try{
|
|
return $this->deletesServiceFees->execute($serviceId);
|
|
return new JsonResponse([],HttpStatus::REQUEST_ACCEPTED);
|
|
|
|
}catch(\Exception $exception){
|
|
|
|
throw new InternalServerErrorException("Failed to delete Customer Relation because{$exception->getMessage()}");
|
|
}
|
|
}
|
|
} |