Opcion de enviar update a los servicios externos

This commit is contained in:
Juan Pablo Vial
2025-05-16 19:14:20 -04:00
parent 105179b4ed
commit b7c5e4ebc3
9 changed files with 44 additions and 8 deletions

View File

@ -17,7 +17,8 @@ class Invoice extends AbstractEndPoint
{
public function __construct(ClientInterface $client,
protected Repository\Venta\MediosPago\Toku\Invoice $invoiceRepository,
protected Pago $pagoService, protected UF $ufService)
protected Pago $pagoService,
protected UF $ufService)
{
parent::__construct($client);
}

View File

@ -59,6 +59,9 @@ class Subscription extends AbstractEndPoint
$existingSubscriptions = [];
try {
$existingSubscriptions = $this->subscriptionRepsitory->fetchByVentas($ids);
array_walk($existingSubscriptions, function(&$subscription) {
$subscription->venta = $this->ventaService->getById($subscription->venta->id);
});
} catch (EmptyResult) {}
if (count($existingSubscriptions) === 0) {
$missingVentas = $ventas;