I'm using the Adwords PHP SDK, trying to update fields of 
MultiAssetResponsiveDisplayAds. In this test, I'm just trying to update the 
long headline. The error I get is that I'm not setting all the other 
fields, but I don't want to change any other field. Sample code below and 
error output as well.

*Code:*
$adService = $adWordsServices->get($session, AdService::class);

$multiAssetResponsiveDisplayAd = new MultiAssetResponsiveDisplayAd();
$multiAssetResponsiveDisplayAd->setId($ad_id);

$longHeadlineTextAsset = new TextAsset();
$long_headline = 'New Long Headline';
$longHeadlineTextAsset->setAssetText($long_headline);
$multiAssetResponsiveDisplayAd->setLongHeadline(new 
AssetLink($longHeadlineTextAsset));

$operation = new AdOperation();
$operation->setOperand($multiAssetResponsiveDisplayAd);
$operation->setOperator(Operator::SET);
$operations[] = $operation;

// Updates the ad on the server.
$result = $adService->mutate($operations);
$updatedAd = $result->getValue()[0];

return "Ad Has been Updated";


*Error Message:*

CollectionSizeError.TOO_FEW @ operations[0].operand.headlines, 
CollectionSizeError.TOO_FEW @ operations[0].operand.descriptions, 
RequiredError.REQUIRED @ operations[0].operand.marketingImages, 
RequiredError.REQUIRED @ operations[0].operand.squareMarketingImages, 
AdError.EMPTY_FIELD @ operations[0].operand.finalUrls


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/3c0c44a6-53c5-4025-b5f3-768ebce697acn%40googlegroups.com.

Reply via email to