public CardBrandsResponse GetCardBrandsResponse(CardBrandsRequest request)
        {
            string response = "";
            Dictionary <string, string> responseMap = doRequest(getURL(request), "GET");

            responseMap.TryGetValue(MESSAGE, out response);
            return(Serializer <CardBrandsResponse> .Deserialize(response));
        }
        public void TestService()
        {
            CardBrandsRequest request = new CardBrandsRequest {
                Country = "US", Language = "en"
            };
            var response = service.GetCardBrandsResponse(request);

            Assert.IsNotNull(response.CardBrands);
            Assert.IsTrue(response.CardBrands.Count > 0);
            Assert.IsTrue(!string.IsNullOrWhiteSpace(response.CardBrands[0].Name));
        }
        private String getURL(CardBrandsRequest request)
        {
            string url;

            if (this.environment == Environments.Environment.PRODUCTION)
            {
                url = PRODUCTION_URL;
            }
            else if (this.environment == Environments.Environment.MTF)
            {
                url = MTF_URL;
            }
            else
            {
                url = SANDBOX_URL;
            }

            url = URLUtil.AddQueryParameter(url, "language", request.Language, false, null);
            url = URLUtil.AddQueryParameter(url, "country", request.Country, false, null);

            return(url);
        }