$asset = new Asset([
'name' => $data->callout_name,
'type' => AssetType::CALLOUT,
'callout_asset' => new CalloutAsset(['callout_text' => $data->callout_text])
]);
// Creates an asset operation.
$assetOperation = new AssetOperation();
$assetOperation->setCreate($asset);
// Issues a mutate request to add the asset.
$assetServiceClient = $googleAdsClient->getAssetServiceClient();
$response = $assetServiceClient->mutateAssets(
$accountId,
[$assetOperation]
);
$callOutQuery = "SELECT asset.callout_asset.callout_text FROM asset";
$stream = $googleAdsServiceClient->searchStream($accountId, $callOutQuery);
foreach ($stream->iterateAllElements() as $googleAdsRow) {
$newCompete = new \StdClass();
$newCompete->callout_asset_text = $googleAdsRow->getAsset()->getCallOutAsset()->getCallOutText();
array_push($callOutText, $newCompete);
}
Any idea why?
I created CallOUT and it dont show any error, is this CallOut Asset is Accounts Level ?