/// <summary> /// Adds, updates, or removes ad groups. /// <p class="note"><b>Note:</b> {@link AdGroupOperation} does not support the /// {@code REMOVE} operator. To remove an ad group, set its /// {@link AdGroup#status status} to {@code REMOVED}.</p> /// /// @param operations List of unique operations. The same ad group cannot be /// specified in more than one operation. /// @return The updated adgroups. /// </summary> public async Task <AdGroupReturnValue> MutateAsync(IEnumerable <AdGroupOperation> operations) { var binding = new AdGroupServiceSoapBinding("https://adwords.google.com/api/adwords/cm/v201609/AdGroupService", _config.AccessToken, _config.Timeout, _config.EnableGzipCompression, _netUtil, _logger); var inData = new SoapData <AdGroupServiceRequestHeader, AdGroupServiceMutate>(); inData.Header = new AdGroupServiceRequestHeader(); AssignHeaderValues(inData.Header); inData.Body = new AdGroupServiceMutate(); inData.Body.Operations = new List <AdGroupOperation>(operations); var outData = await binding.MutateAsync(inData).ConfigureAwait(false); return(outData.Body.Rval); }