Enqueue ventas para enviar a Toku
This commit is contained in:
@ -94,6 +94,21 @@ class Subscription extends AbstractEndPoint
|
||||
}
|
||||
return compact('existingSubscriptions', 'missingVentas');
|
||||
}
|
||||
public function queue(int $venta_id): bool
|
||||
{
|
||||
try {
|
||||
$venta = $this->ventaService->getById($venta_id);
|
||||
} catch (Read $exception) {
|
||||
$this->logger->warning($exception);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
$subscription = $this->subscriptionRepsitory->fetchByVenta($venta_id);
|
||||
return false;
|
||||
} catch (EmptyResult) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public function save(array $data): bool
|
||||
{
|
||||
|
Reference in New Issue
Block a user