private JsonResponseModel EditSearch(HttpStatusCode expectedStatusCode, MemberSearch search, bool isAlert, string deviceToken) { var model = new MemberSearchRequestModel { Name = search.Name, IsAlert = isAlert, Criteria = search.Criteria, DeviceToken = deviceToken, }; return(Deserialize <JsonResponseModel>(Put(expectedStatusCode, GetSearchUrl(search.Id), JsonContentType, Serialize(model, new MemberSearchModelJavaScriptConverter())))); }
private JsonResponseModel NewSearch(MemberSearch search, bool isAlert, string deviceToken) { var model = new MemberSearchRequestModel { Name = search.Name, IsAlert = isAlert, Criteria = search.Criteria, DeviceToken = deviceToken, }; return(Deserialize <JsonResponseModel>(Post(GetSearchesUrl(deviceToken), JsonContentType, Serialize(model, new MemberSearchCriteriaJavaScriptConverter(_locationQuery, _industriesQuery))))); }
private JsonResponseModel EditSearch(MemberSearch search, bool isAlert, string deviceToken) { var model = new MemberSearchRequestModel { Name = search.Name, IsAlert = isAlert, Criteria = search.Criteria, DeviceToken = deviceToken, }; var converters = new JavaScriptConverter[] { new MemberSearchModelJavaScriptConverter(), new MemberSearchCriteriaJavaScriptConverter(_locationQuery, _industriesQuery), }; return(Deserialize <JsonResponseModel>(Put(GetSearchUrl(search.Id), JsonContentType, Serialize(model, converters)))); }