/// <summary> /// Search for proposals using pql query /// Documentation https://developers.google.com/adexchangebuyer/v1.4/reference/proposals/search /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated AdExchangeBuyer service.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>GetOrdersResponseResponse</returns> public static GetOrdersResponse Search(AdExchangeBuyerService service, ProposalsSearchOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } // Building the initial request. var request = service.Proposals.Search(); // Applying optional parameters to the request. request = (ProposalsResource.SearchRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Proposals.Search failed.", ex); } }
/// <summary> /// Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission. /// Documentation https://developers.google.com/adexchangebuyer/v1.4/reference/creatives/list /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated AdExchangeBuyer service.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>CreativesListResponse</returns> public static CreativesList List(AdExchangeBuyerService service, CreativesListOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } // Building the initial request. var request = service.Creatives.List(); // Applying optional parameters to the request. request = (CreativesResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Creatives.List failed.", ex); } }