mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
df4fd497a6
- SECURITY PATCH
62 lines
2.0 KiB
PHP
62 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Accounting\ControllersLogic;
|
|
|
|
|
|
use App\Classes\Modules\Accounting\Standards\Rules\CanListBankStatementTransactions;
|
|
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
|
use App\Classes\Modules\Accounting\Services\ListsBankStatementDetails;
|
|
use App\Classes\Modules\Accounting\Services\ListsBankStatementTransactions;
|
|
use App\Http\Resources\BankStatementTransactionResource;
|
|
use App\Models\StatementTransaction;
|
|
use ErrorException;
|
|
use Illuminate\Http\JsonResponse;
|
|
use Illuminate\Http\Request;
|
|
|
|
class ListBankStatementTransactionsLogic extends AbstractControllerLogic
|
|
{
|
|
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function notification():array {
|
|
return [
|
|
'title' => 'Retrieved Bank Statement Transactions',
|
|
'message' => 'You have successfully retrieved a Bank Statement Transactions'
|
|
];
|
|
}
|
|
|
|
|
|
/** @var ListsBankStatementTransactions */
|
|
private $listsBankStatementTransactions;
|
|
|
|
/** @var CanListBankStatementTransactions */
|
|
private $canListBankStatementTransactions;
|
|
|
|
/**
|
|
* @param ListsBankStatementTransactions $listsBankStatementTransactions
|
|
* @param CanListBankStatementTransactions $canListBankStatementTransactions
|
|
*/
|
|
public function __construct(ListsBankStatementTransactions $listsBankStatementTransactions, CanListBankStatementTransactions $canListBankStatementTransactions)
|
|
{
|
|
$this->listsBankStatementTransactions = $listsBankStatementTransactions;
|
|
$this->canListBankStatementTransactions = $canListBankStatementTransactions;
|
|
}
|
|
|
|
/**
|
|
* @param Request $request
|
|
* @return JsonResponse
|
|
* @throws ErrorException
|
|
*/
|
|
public function logic(Request $request) : JsonResponse
|
|
{
|
|
$this->canListBankStatementTransactions->passes();
|
|
|
|
$query = $this->listsBankStatementTransactions->execute($this->listsBankStatementTransactions->deserializeFilters($request->input('filters')));
|
|
|
|
return $this->collectionResponse(BankStatementTransactionResource::collection($query));
|
|
}
|
|
|
|
}
|