Enqueue ventas para enviar a Toku
This commit is contained in:
@ -261,6 +261,21 @@ class Toku extends Ideal\Service
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
public function queue(array $venta_ids): array
|
||||
{
|
||||
$queues = [];
|
||||
foreach ($venta_ids as $venta_id) {
|
||||
if ($this->subscription->queue($venta_id)) {
|
||||
$queues []= [
|
||||
'type' => 'request',
|
||||
'url' => "/api/external/toku/cuotas/{$venta_id}",
|
||||
'method' => 'post',
|
||||
'body' => []
|
||||
];
|
||||
}
|
||||
}
|
||||
return $queues;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $request
|
||||
|
Reference in New Issue
Block a user