private function refreshBatchesResult($listId, $batchesResult, &$batchesError)
    {
        $refreshedBatchsResults = [];
        foreach ($batchesResult as $key => $batch) {
            $jobId = $batch['JobID'];
            $batch = $this->synchronizer->getJob($listId, $jobId);
            // We need to array merge because Mailjet API doesn't send jobid in response.
            if ($batch[0]['Status'] == 'Error') {
                array_push($batchesError, array_merge(['JobID' => $jobId], $batch[0]));
            } else {
                array_push($refreshedBatchsResults, array_merge(['JobID' => $jobId], $batch[0]));
            }
        }
        return $refreshedBatchsResults;
    }
private function refreshBatchesResult($listId, $batchesResult, &$batchesError)
    {
        $refreshedBatchsResults = [];
        foreach ($batchesResult as $key => $batch) {
            $jobId = $batch['JobID'];
            $batch = $this->synchronizer->getJob($listId, $jobId);
            // We need to array merge because Mailjet API doesn't send jobid in response.
            if ($batch[0]['Status'] == 'Error') {
                array_push($batchesError, array_merge(['JobID' => $jobId], $batch[0]));
            } else {
                array_push($refreshedBatchsResults, array_merge(['JobID' => $jobId], $batch[0]));
            }
        }
        return $refreshedBatchsResults;
    }
private function refreshBatchesResult ( $ listId , $ batchesResult , & $ batchesError ) { $ refreshedBatchsResults = [ ] ; foreach ( $ batchesResult as $ key => $ batch ) { $ jobId = $ batch [ 'JobID' ] ; $ batch = $ this -> synchronizer -> getJob ( $ listId , $ jobId ) ; // We need to array merge because Mailjet API doesn't send jobid in response. if ( $ batch [ 0 ] [ 'Status' ] == 'Error' ) { array_push ( $ batchesError , array_merge ( [ 'JobID' => $ jobId ] , $ batch [ 0 ] ) ) ; } else { array_push ( $ refreshedBatchsResults , array_merge ( [ 'JobID' => $ jobId ] , $ batch [ 0 ] ) ) ; } } return $ refreshedBatchsResults ; }
Refresh all batch from Mailjet API
@param string $listId
@param array $batchesResult
@param &array $batchesError
@return array
Refresh all batch from Mailjet API