在分支實驗中,他們正在重寫API。看起來BatchJobHelper仍在丟失(當前寫這篇文章),see my issue in github requesting it。
對於獲得BatchJobs,您應該使用BatchJobService類,該類是從adword服務實例化的。這是一個示例代碼片段:
$batch_job_service = $adWordsServices->get($session, 'BatchJobService', 'v201605', 'cm');
try
{
/** @var BatchJobReturnValue $result */
$result = $batch_job_service->mutate($operations);
}
catch(ApiException $e)
{
echo $e->getMessage() . PHP_EOL;
}
if(!empty($result) && $result instanceof Google\AdsApi\AdWords\v201605\cm\BatchJobReturnValue)
{
$batch_job = reset($result->getValue());
}
else
{
echo 'Result is empty or no valid';
}