public static GenericPagedResult <VariationGroup> SearchVariationGroups(VariationSearchType searchType, String searchText, Int32 pageNumber, Int32 entriesPerPage, Guid ApiToken, String ApiServer) { return(Newtonsoft.Json.JsonConvert.DeserializeObject <GenericPagedResult <VariationGroup> >(Factory.GetResponse("Stock/SearchVariationGroups", "searchType=" + searchType + "&searchText=" + searchText + "&pageNumber=" + pageNumber + "&entriesPerPage=" + entriesPerPage + "", ApiToken, ApiServer), new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore })); }
public static GenericPagedResult<VariationGroup> SearchVariationGroups(VariationSearchType searchType, String searchText, Int32 pageNumber, Int32 entriesPerPage, String ApiToken, String ApiServer) { return Newtonsoft.Json.JsonConvert.DeserializeObject<GenericPagedResult<VariationGroup>>(Factory.GetResponse("Stock/SearchVariationGroups", "searchType=" + Newtonsoft.Json.JsonConvert.SerializeObject(searchType) + "&searchText=" + searchText + "&pageNumber=" + pageNumber + "&entriesPerPage=" + entriesPerPage + "", ApiToken, ApiServer), new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }); }
/// <summary> /// Use this call to search for a variation group /// </summary> /// <param name="searchType">The search method to use</param> /// <param name="searchText">The search term (either in part of full)</param> /// <param name="pageNumber">The page number (e.g. 1).</param> /// <param name="entriesPerPage">The number of entries to return per page.</param> /// <returns>A paged list of search results</returns> public GenericPagedResult <VariationGroup> SearchVariationGroups(VariationSearchType searchType, String searchText, Int32 pageNumber, Int32 entriesPerPage) { var response = GetResponse("Stock/SearchVariationGroups", "searchType=" + searchType.ToString() + "&searchText=" + System.Net.WebUtility.UrlEncode(searchText) + "&pageNumber=" + pageNumber + "&entriesPerPage=" + entriesPerPage + ""); return(JsonFormatter.ConvertFromJson <GenericPagedResult <VariationGroup> >(response)); }