function set_adgroup_status($adgroup_id, $status) { $adGroup = new AdGroup(); $adGroup->setId($adgroup_id); $adGroup->setStatus($status);
$operation = new AdGroupOperation(); $operation->setOperand($adGroup); $operation->setOperator(Operator::SET); return $operation; } Why does processing this operation result in all these errors? <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type=" OperatorError"> <fieldPath>operations[2]</fieldPath> <fieldPathElements> <field>operations</field> <index>2</index> </fieldPathElements> <trigger/> <errorString>OperatorError.OPERATOR_NOT_SUPPORTED</errorString> <ApiError.Type>OperatorError</ApiError.Type> <reason>OPERATOR_NOT_SUPPORTED</reason> </errors> <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type=" RequiredError"> <fieldPath>operations[2].operator</fieldPath> <fieldPathElements> <field>operations</field> <index>2</index> </fieldPathElements> <fieldPathElements> <field>operator</field> </fieldPathElements> <trigger/> <errorString>RequiredError.REQUIRED</errorString> <ApiError.Type>RequiredError</ApiError.Type> <reason>REQUIRED</reason> </errors> <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type=" RequiredError"> <fieldPath>operations[2].operand</fieldPath> <fieldPathElements> <field>operations</field> <index>2</index> </fieldPathElements> <fieldPathElements> <field>operand</field> </fieldPathElements> <trigger/> <errorString>RequiredError.REQUIRED</errorString> <ApiError.Type>RequiredError</ApiError.Type> <reason>REQUIRED</reason> </errors> <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type=" RequiredError"> <fieldPath>operations[2].operator</fieldPath> <fieldPathElements> <field>operations</field> <index>2</index> </fieldPathElements> <fieldPathElements> <field>operator</field> </fieldPathElements> <trigger/> <errorString>RequiredError.REQUIRED</errorString> <ApiError.Type>RequiredError</ApiError.Type> <reason>REQUIRED</reason> </errors> <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type=" RequiredError"> <fieldPath>operations[2].operand</fieldPath> <fieldPathElements> <field>operations</field> <index>2</index> </fieldPathElements> <fieldPathElements> <field>operand</field> </fieldPathElements> <trigger/> <errorString>RequiredError.REQUIRED</errorString> <ApiError.Type>RequiredError</ApiError.Type> <reason>REQUIRED</reason> </errors> I then checked the operator object: object(Google\AdsApi\AdWords\v201710\cm\AdGroupOperation)#95 (4) { ["operand":protected]=> object(Google\AdsApi\AdWords\v201710\cm\AdGroup)#96 (16) { ["id":protected]=> string(11) "60706718824" ["campaignId":protected]=> NULL ["campaignName":protected]=> NULL ["name":protected]=> NULL ["status":protected]=> string(6) "PAUSED" ["settings":protected]=> NULL ["labels":protected]=> NULL ["forwardCompatibilityMap":protected]=> NULL ["biddingStrategyConfiguration":protected]=> NULL ["contentBidCriterionTypeGroup":protected]=> NULL ["baseCampaignId":protected]=> NULL ["baseAdGroupId":protected]=> NULL ["trackingUrlTemplate":protected]=> NULL ["urlCustomParameters":protected]=> NULL ["adGroupType":protected]=> NULL ["adGroupAdRotationMode":protected]=> NULL } ["operator":protected]=> string(3) "SET" ["OperationType":protected]=> NULL ["parameterMap":"Google\AdsApi\AdWords\v201710\cm\Operation":private]=> array(1) { ["Operation.Type"]=> string(13) "OperationType" } } Any ideas? Thanks! -- Want to sell on Amazon, Walmart, and Jet? FeedAMP <http://feedonomics.com/feedamp-feedonomics-automated-marketplaces/>™ lets you easily sync orders back to your Shopify, BigCommerce, Magento, or Woocommerce store. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. 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/060e0a54-ac3b-4698-a06d-202d2ad00745%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.