Parametros correctos

This commit is contained in:
Juan Pablo Vial
2025-05-13 20:12:26 -04:00
parent 3e937ab748
commit d6e60efcaf
3 changed files with 8 additions and 9 deletions

View File

@ -73,7 +73,7 @@ class Subscription extends AbstractEndPoint
$params[$key] = $this->datosVenta($data['venta']);
continue;
}
if (array_key_exists($ref, $data)) {
if (array_key_exists($ref, $data) and $data[$ref] !== '' and $data[$ref] !== null) {
$params[$key] = $data[$ref];
}
}
@ -94,12 +94,11 @@ class Subscription extends AbstractEndPoint
}
return $mappedData;
}
protected function datosVenta(Venta $venta): string
protected function datosVenta(Venta $venta): array
{
$datos = [
return [
'proyecto' => $venta->proyecto()->descripcion,
'unidades' => $venta->propiedad()->summary()
];
return json_encode($datos);
}
}