AdGroupOperation': [{u'operator': u'SET', u'operand': {u'status': u'ENABLED', u'id': u'3882381859', u'xsi_type': u'AdGroup'}
As a result I get back:
OrderedDict([(u'result', OrderedDict([(u'AdGroup', OrderedDict([(u'id', u'3882381859'), (u'campaignId', u'15923719'), (u'campaignName', u'[a:Rico_S&C_DE][n:GSN][l:DE][c:Kleidung&Accessoires_Product][k:k]'), (u'name', u'Kleidung:Boss_Orange'), (u'status', u'ENABLED'), (u'settings', [OrderedDict([(u'@xmlns:xsi', u'http://www.w3.org/2001/XMLSchema-instance'), (u'@xsi:type', u'TargetingSetting'), (u'Setting.Type', u'TargetingSetting'), (u'details', [OrderedDict([(u'criterionTypeGroup', u'USER_INTEREST_AND_LIST'), (u'targetAll', u'true')]), OrderedDict([(u'criterionTypeGroup', u'VERTICAL'), (u'targetAll', u'false')]), OrderedDict([(u'criterionTypeGroup', u'GENDER'), (u'targetAll', u'false')]), OrderedDict([(u'criterionTypeGroup', u'AGE_RANGE'), (u'targetAll', u'true')]), OrderedDict([(u'criterionTypeGroup', u'PLACEMENT'), (u'targetAll', u'false')]), OrderedDict([(u'criterionTypeGroup', u'PARENT'), (u'targetAll', u'false')])])]), OrderedDict([(u'@xmlns:xsi', u'http://www.w3.org/2001/XMLSchema-instance'), (u'@xsi:type', u'ExplorerAutoOptimizerSetting'), (u'Setting.Type', u'ExplorerAutoOptimizerSetting'), (u'optIn', u'false')])]), (u'labels', [OrderedDict([(u'@xmlns:xsi', u'http://www.w3.org/2001/XMLSchema-instance'), (u'@xsi:type', u'TextLabel'), (u'id', u'425651059'), (u'name', u'pausiert (22.01.2016)'), (u'status', u'ENABLED'), (u'attribute', OrderedDict([(u'@xsi:type', u'DisplayAttribute'), (u'LabelAttribute.Type', u'DisplayAttribute'), (u'backgroundColor', u'#99FFFF')])), (u'Label.Type', u'TextLabel')]), OrderedDict([(u'@xmlns:xsi', u'http://www.w3.org/2001/XMLSchema-instance'), (u'@xsi:type', u'TextLabel'), (u'id', u'241157539'), (u'name', u'processed_by_script'), (u'status', u'ENABLED'), (u'attribute', OrderedDict([(u'@xsi:type', u'DisplayAttribute'), (u'LabelAttribute.Type', u'DisplayAttribute'), (u'backgroundColor', u'#990000')])), (u'Label.Type', u'TextLabel')])]), (u'biddingStrategyConfiguration', OrderedDict([(u'biddingStrategyId', u'1358124216'), (u'biddingStrategyName', u'Kleidung & Accessoire'), (u'biddingStrategyType', u'TARGET_ROAS'), (u'biddingStrategySource', u'CAMPAIGN'), (u'bids', OrderedDict([(u'@xmlns:xsi', u'http://www.w3.org/2001/XMLSchema-instance'), (u'@xsi:type', u'CpcBid'), (u'Bids.Type', u'CpcBid'), (u'bid', OrderedDict([(u'ComparableValue.Type', u'Money'), (u'microAmount', u'40000')])), (u'cpcBidSource', u'ADGROUP')]))]))]))])), (u'index', u'0')])
where the biddingStrategyConfiguration.bids is:
result['biddingStrategyConfiguration']['bids']
OrderedDict([(u'@xmlns:xsi', u'http://www.w3.org/2001/XMLSchema-instance'), (u'@xsi:type', u'CpcBid'), (u'Bids.Type', u'CpcBid'), (u'bid', OrderedDict([(u'ComparableValue.Type', u'Money'), (u'microAmount', u'40000')])),
which is a dictionary and not an array as indicated here https://developers.google.com/adwords/api/docs/reference/v201605/AdGroupService.BiddingStrategyConfiguration#bids
Is this a bug?
Please find attached the suds logs.
Ps:
Somewhat related - I have a simular issue when getting back the results from a job:
""""
response = batch_job_helper.ParseResponse(response_xml)
resp = response['mutateResponse']['rval']
if isinstance(resp, dict): # Expecting an array but sometimes we get a dict!
resp = [resp]
""""