public List <string> BuildUrlPartial(string brand, string year, string dealerid)
        {
            List <string> modelsSeoName = new List <string>();
            List <string> unique        = 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++)
                {
                    if (!unique.Contains(deserialized[i].CategoryNames[0]))
                    {
                        unique.Add(deserialized[i].CategoryNames[0]);
                        string buildUrl  = deserialized[i].BuildURL;
                        int    index     = GetNthIndex(buildUrl, '/', 4);
                        string result    = buildUrl.Substring(index + 1);
                        string cleanedUp = result.Substring(0, result.IndexOf("/"));
                    }
                }
            }

            return(modelsSeoName);
        }
        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 string GetAllBuildUrls(string brand, string year, string dealerid)
        {
            List <string> modelsSeoName = new List <string>();
            List <string> unique        = new List <string>();

            RestAPIHelper.SetUrl(CPQEndpointBuilder.GetDealerExpModelsEnpointByBrandYear(brand, year, dealerid));
            RestAPIHelper.CreateGetRequest();
            string buildUrlsString = string.Empty;

            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 buildUrl = deserialized[i].BuildURL;
                    buildUrlsString += buildUrl + "\n";
                }
            }

            return(buildUrlsString);
        }