Grabar UF y capacidad de obtener hoy.

This commit is contained in:
Juan Pablo Vial
2025-05-05 16:45:00 -04:00
parent 972e57b6f1
commit 7d04b406ab
3 changed files with 8 additions and 5 deletions

View File

@ -18,9 +18,12 @@ class MiIndicador implements Provider
/**
* @throws EmptyResponse
*/
public function get(string $money_symbol, DateTimeInterface $dateTime): float
public function get(string $money_symbol, ?DateTimeInterface $dateTime = null): float
{
$request_uri = "{$money_symbol}/{$dateTime->format('d-m-Y')}";
$request_uri = "{$money_symbol}";
if ($dateTime !== null) {
$request_uri = "{$money_symbol}/{$dateTime->format('d-m-Y')}";
}
try {
$response = $this->client->get($request_uri);
} catch (GuzzleException) {