<?php

namespace App\Http\Controllers\Rules;

use App\Classes\Modules\Rules\ControllersLogic\CheckEInvoiceRuleLogic;
use App\Classes\Modules\Rules\ControllersLogic\CheckPurchaseOrderRuleLogic;
use App\Classes\Modules\Rules\ControllersLogic\CheckTransferRuleLogic;
use App\Classes\Modules\Rules\ControllersLogic\CheckEInvoiceAmountLimitLogic;
use App\Classes\Modules\Rules\ControllersLogic\CheckTransferPeriodLockRuleLogic;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class CheckRuleController
{
    /**
     * @param Request $request
     * @param CheckEInvoiceRuleLogic $logic
     * @return JsonResponse
     */
    public function checkEInvoiceRule(Request $request, CheckEInvoiceRuleLogic $logic): JsonResponse {
        return $logic->execute($request);
    }

    /**
     * @param Request $request
     * @param CheckPurchaseOrderRuleLogic $logic
     * @return JsonResponse
     */
    public function checkPurchaseOrderRule(Request $request, CheckPurchaseOrderRuleLogic $logic): JsonResponse {
        return $logic->execute($request);
    }

    /**
     * @param Request $request
     * @param CheckTransferRuleLogic $logic
     * @return JsonResponse
     */
    public function checkTransferRule(Request $request, CheckTransferRuleLogic $logic): JsonResponse {
        return $logic->execute($request);
    }

    /**
     * @param Request $request
     * @param CheckEInvoiceAmountLimitLogic $logic
     * @return JsonResponse
     */
    public function checkEInvoiceAmountLimitRule(Request $request, CheckEInvoiceAmountLimitLogic $logic): JsonResponse {
        return $logic->execute($request);
    }

    /**
     * @param Request $request
     * @param CheckTransferPeriodLockRuleLogic $logic
     * @return JsonResponse
     */
    public function checkTransferPeriodLockRule(Request $request, CheckTransferPeriodLockRuleLogic $logic): JsonResponse {
        return $logic->execute($request);
    }
}
