public List <string> GetAllModelsColorApiResponse(string brand, string year, string dealerid) { List <string> modelsSeoName = new List <string>(); RestAPIHelper.SetUrl(CPQEndpointBuilder.GetDealerExpModelsEnpointByBrandYear(brand, year, dealerid)); RestAPIHelper.CreateGetRequest(); if (GetResponseStatusCode() == API_SUCCESS_RESPONSE_CODE) { var deserialized = SimpleJson.SimpleJson.DeserializeObject <List <Variant> >(RestAPIHelper.GetResponse().Content); for (int i = 0; i < deserialized.Count; i++) { string fullBuildUrl = deserialized[i].BuildURL; int index = GetNthIndex(fullBuildUrl, '/', 4); string partialBuildUrl = fullBuildUrl.Substring(index + 1); string modelColorUrl = partialBuildUrl.Substring(0, partialBuildUrl.IndexOf("/")); modelsSeoName.Add(modelColorUrl); } } return(modelsSeoName); }
public void WhenICallTheGetMethod() { RestAPIHelper.CreateGetRequest(); }
public void CreateGetRequest() { restHelper.CreateGetRequest(); }