private string GetURL(AtmLocationRequestOptions options) { string url; if (this.environment == Environments.Environment.PRODUCTION) { url = PRODUCTION_URL; } else { url = SANDBOX_URL; } url = URLUtil.AddQueryParameter(url, "PageOffset", options.getPageOffset().ToString(), false, null); url = URLUtil.AddQueryParameter(url, "PageLength", options.getPageLength().ToString(), false, null); url = URLUtil.AddQueryParameter(url, "AddressLine1", options.AddressLine1, true, ""); url = URLUtil.AddQueryParameter(url, "AddressLine2", options.AddressLine2, true, ""); url = URLUtil.AddQueryParameter(url, "City", options.City, true, ""); url = URLUtil.AddQueryParameter(url, "CountrySubdivision", options.CountrySubdivision, true, ""); url = URLUtil.AddQueryParameter(url, "PostalCode", options.PostalCode, true, ""); url = URLUtil.AddQueryParameter(url, "Country", options.Country, true, ""); url = URLUtil.AddQueryParameter(url, "Latitude", options.Latitude.ToString(), true, "0"); url = URLUtil.AddQueryParameter(url, "Longitude", options.Longitude.ToString(), true, "0"); url = URLUtil.AddQueryParameter(url, "DistanceUnit", options.DistanceUnit, true, ""); url = URLUtil.AddQueryParameter(url, "Radius", options.Radius.ToString(), true, "0"); url = URLUtil.AddQueryParameter(url, "SupportEMV", options.SupportEMV.ToString(), true, "-1"); return(url); }
private string GetURL(AtmLocationRequestOptions options) { string url; if (this.environment == Environments.Environment.PRODUCTION) { url = PRODUCTION_URL; } else { url = SANDBOX_URL; } url = URLUtil.AddQueryParameter(url, "PageOffset", options.getPageOffset().ToString(), false, null); url = URLUtil.AddQueryParameter(url, "PageLength", options.getPageLength().ToString(), false, null); url = URLUtil.AddQueryParameter(url, "AddressLine1", options.AddressLine1, true, ""); url = URLUtil.AddQueryParameter(url, "AddressLine2", options.AddressLine2, true, ""); url = URLUtil.AddQueryParameter(url, "City", options.City, true, ""); url = URLUtil.AddQueryParameter(url, "CountrySubdivision", options.CountrySubdivision, true, ""); url = URLUtil.AddQueryParameter(url, "PostalCode", options.PostalCode, true, ""); url = URLUtil.AddQueryParameter(url, "Country", options.Country, true, ""); url = URLUtil.AddQueryParameter(url, "Latitude", options.Latitude.ToString(), true, "0"); url = URLUtil.AddQueryParameter(url, "Longitude", options.Longitude.ToString(), true, "0"); url = URLUtil.AddQueryParameter(url, "DistanceUnit", options.DistanceUnit, true, ""); url = URLUtil.AddQueryParameter(url, "Radius", options.Radius.ToString(), true, "0"); url = URLUtil.AddQueryParameter(url, "SupportEMV", options.SupportEMV.ToString(), true, "-1"); return url; }
public Atms GetAtms(AtmLocationRequestOptions options) { string response = ""; Dictionary<string, string> responseMap = doRequest(GetURL(options), "GET", null); responseMap.TryGetValue(MESSAGE, out response); return Serializer<Atms>.Deserialize(response); }
public Atms GetAtms(AtmLocationRequestOptions options) { string response = ""; Dictionary <string, string> responseMap = doRequest(GetURL(options), "GET", null); responseMap.TryGetValue(MESSAGE, out response); return(Serializer <Atms> .Deserialize(response)); }
public void Init() { service = new AtmLocationService(testUtils.GetConsumerKey(), testUtils.GetPrivateKey(), Environments.Environment.SANDBOX); options = new AtmLocationRequestOptions(0, 25); }