I am using the PHP Library to add a label to an adGroup but having some
problems with the operation:
$ad_group_id = '123456';
$labels = array('78910');
operations = array();
foreach($labels as $label_id){
$adGroupLabel = new AdGroupLabel();
$adGroupLabel->setAdGroupId($ad_group_id);
$adGroupLabel->setLabelId($label_id);
$operation = new AdGroupLabelOperation();
$operation->setOperand($adGroupLabel);
$operation->setOperator(Operator::ADD);
$operations[] = $operation;
}
$result = $adGroupService->mutate($operations);
But I get the error
Unmarshalling Error: cvc-elt.4.3: Type 'ns1:AdGroupLabelOperation' is not
validly derived from the type definition, 'AdGroupOperation', of element
'ns1:operations'.
Sadly there are very few examples of this so hopefully I can find some
insight in sharing my problem.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/875e0199-a3b7-4869-b190-00daa1c1937d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.