<?php

namespace App\Http\Controllers\Api\Hacienda;

use Illuminate\Http\JsonResponse;

use App\Http\Controllers\ApiController;
use App\Services\TipoCambioService;

class TipoCambioController extends ApiController
{
    public function __construct(
        protected TipoCambioService $service,
    ) {}

    public function __invoke(): JsonResponse
    {
        return response()->json($this->service->obtenerCambioActual(['bccr']));
    }
}