Files
shipping-portal/app/Classes/Modules/Companies/ControllersLogic/LinkExchangeCompanyLogic.php
T
2023-11-19 17:14:39 +08:00

45 lines
1.4 KiB
PHP

<?php
namespace App\Classes\Modules\Companies\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Companies\Processors\LinkExchangeCompanyProcessor;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class LinkExchangeCompanyLogic extends AbstractControllerLogic
{
protected function notification():array {
return [
'title' => 'Connect Exchange with Izyim Account',
'message' => 'You have successfully connect your exchange account to Izyim Account'
];
}
/** @var LinkExchangeCompanyProcessor */
private $linkExchangeCompanyProcessor;
/**
* LinkExchangeCompanyLogic constructor.
* @param LinkExchangeCompanyProcessor $linkExchangeCompanyProcessor
*/
public function __construct(LinkExchangeCompanyProcessor $linkExchangeCompanyProcessor)
{
$this->linkExchangeCompanyProcessor = $linkExchangeCompanyProcessor;
}
/**
* @param Request $request
* @return JsonResponse
* @throws \App\Classes\Exceptions\AccessForbiddenException
* @throws \App\Classes\Exceptions\AccessUnauthorisedException
* @throws \App\Classes\Exceptions\RequestValidationException
*/
protected function logic(Request $request): JsonResponse {
return $this->response($this->linkExchangeCompanyProcessor->execute($request));
}
}