<?php

namespace App\Classes\Modules\Affiliate\ControllersLogic;

use App\Classes\Modules\Affiliate\Services\GetsAffiliateSettings;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class GetAffiliateSettingsLogic
{
    /** @var GetsAffiliateSettings */
    private $getsAffiliateSettings;

    /**
     * @param GetsAffiliateSettings $getsAffiliateSettings
     */
    public function __construct(GetsAffiliateSettings $getsAffiliateSettings)
    {
        $this->getsAffiliateSettings = $getsAffiliateSettings;
    }

    /**
     * @param Request $request
     * @return JsonResponse
     */
    public function execute(Request $request): JsonResponse
    {
        $settings = $this->getsAffiliateSettings->execute();
        
        return response()->json($settings);
    }
}

