Hi Support,
I'm using .net core library "Google.Ads.GoogleAds" Version="10.0.0".  
I want to PAUSE a specific AdGroupCriterion (Listing Group Unit) 
and AdGroupCriterionStatus.Paused not working

[image: demo.JPG]

*my code:*

var adGroupCriterionService = 
client.GetService(Services.V8.AdGroupCriterionService);

                var operations = new List<AdGroupCriterionOperation>();

                var newAdGroupCriterionRoot = new AdGroupCriterion
                {
                    Status = AdGroupCriterionStatus.Enabled,
                    ListingGroup = new ListingGroupInfo
                    {
                        Type = ListingGroupType.Subdivision
                    },
                    ResourceName = 
ResourceNames.AdGroupCriterion(customerId, adGroupId, -1)
                };

                operations.Add(new AdGroupCriterionOperation()
                {
                    Create = newAdGroupCriterionRoot
                });

                string adGroupCriterionResourceNameRoot = 
newAdGroupCriterionRoot.ResourceName;

                var adGroupCriterion1 = new AdGroupCriterion
                {
                    Status = AdGroupCriterionStatus.Enabled,
                    ListingGroup = new ListingGroupInfo
                    {
                        ParentAdGroupCriterion = 
adGroupCriterionResourceNameRoot,
                        Type = ListingGroupType.Unit,

                        CaseValue = new ListingDimensionInfo()
                        {
                            ProductItemId = new ProductItemIdInfo()
                            {
                                Value = "offer_1"
                            }
                        }
                    },
                    ResourceName = 
ResourceNames.AdGroupCriterion(customerId, adGroupId, -2)
                };

                operations.Add(new AdGroupCriterionOperation()
                {
                    Create = adGroupCriterion1
                });

                var adGroupCriterion2 = new AdGroupCriterion
                {
                    Status = AdGroupCriterionStatus.Enabled,
                    ListingGroup = new ListingGroupInfo
                    {
                        ParentAdGroupCriterion = 
adGroupCriterionResourceNameRoot,
                        Type = ListingGroupType.Unit,

                        CaseValue = new ListingDimensionInfo()
                        {
                            ProductItemId = new ProductItemIdInfo()
                            {
                                Value = "offer_2"
                            }
                        }
                    },
                    ResourceName = 
ResourceNames.AdGroupCriterion(customerId, adGroupId, -3)
                };

                operations.Add(new AdGroupCriterionOperation()
                {
                    Create = adGroupCriterion2
                });

                var adGroupCriterionOther = new AdGroupCriterion
                {
                    Status = AdGroupCriterionStatus.Paused,
                    ListingGroup = new ListingGroupInfo
                    {
                        ParentAdGroupCriterion = 
adGroupCriterionResourceNameRoot,
                        Type = ListingGroupType.Unit,

                        CaseValue = new ListingDimensionInfo()
                        {
                            ProductItemId = new ProductItemIdInfo()
                        }
                    },
                    ResourceName = 
ResourceNames.AdGroupCriterion(customerId, adGroupId, -4)
                };

                operations.Add(new AdGroupCriterionOperation()
                {
                    Create = adGroupCriterionOther
                });

                var response = 
adGroupCriterionService.MutateAdGroupCriteria(customerId.ToString(), 
operations);

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c90e4385-0962-49d7-9c68-de0dca201de2n%40googlegroups.com.

Reply via email to