Exemplo n.º 1
0
        /// <summary>
        /// Returns a list of bidding strategies that match the query.
        ///
        /// @param query The SQL-like AWQL query string.
        /// @throws ApiException when there are one or more errors with the request.
        /// </summary>
        public async Task <BiddingStrategyPage> QueryAsync(string query)
        {
            var binding = new BiddingStrategyServiceSoapBinding("https://adwords.google.com/api/adwords/cm/v201609/BiddingStrategyService", _config.AccessToken, _config.Timeout, _config.EnableGzipCompression, _netUtil, _logger);
            var inData  = new SoapData <BiddingStrategyServiceRequestHeader, BiddingStrategyServiceQuery>();

            inData.Header = new BiddingStrategyServiceRequestHeader();
            AssignHeaderValues(inData.Header);
            inData.Body       = new BiddingStrategyServiceQuery();
            inData.Body.Query = query;
            var outData = await binding.QueryAsync(inData).ConfigureAwait(false);

            return(outData.Body.Rval);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Applies the list of mutate operations.
        ///
        /// @param operations the operations to apply
        /// @return the modified list of BiddingStrategy
        /// @throws ApiException
        /// </summary>
        public async Task <BiddingStrategyReturnValue> MutateAsync(IEnumerable <BiddingStrategyOperation> operations)
        {
            var binding = new BiddingStrategyServiceSoapBinding("https://adwords.google.com/api/adwords/cm/v201609/BiddingStrategyService", _config.AccessToken, _config.Timeout, _config.EnableGzipCompression, _netUtil, _logger);
            var inData  = new SoapData <BiddingStrategyServiceRequestHeader, BiddingStrategyServiceMutate>();

            inData.Header = new BiddingStrategyServiceRequestHeader();
            AssignHeaderValues(inData.Header);
            inData.Body            = new BiddingStrategyServiceMutate();
            inData.Body.Operations = new List <BiddingStrategyOperation>(operations);
            var outData = await binding.MutateAsync(inData).ConfigureAwait(false);

            return(outData.Body.Rval);
        }