Exemplo n.º 1
0
        private static void RetrieveAllAtms()
        {
            var atms    = new Atms(token);
            var atmlist = atms.GetAllAtms();

            // For async use this:
            // var atmlist = atms.GetAllAtmsAsync();
            Console.WriteLine("ATM Locations.");
            var x = 0;

            foreach (var atm in atmlist)
            {
                Console.WriteLine();
                if (x != 0 && x % 20 == 0)
                {
                    Console.WriteLine("Type any key to retrieve another 20");
                    Console.ReadLine();
                }
                x++;
                Console.WriteLine("{0}. {1}", x, atm.Landmark);
                Console.WriteLine("Address: {0}, {1}", atm.Address, atm.PostalCode);
                Console.WriteLine("Coordinate: {0}, {1}", atm.Latitude, atm.Longitude);
                Console.WriteLine("Note: {0}", atm.Note);
                Console.WriteLine("Note Details: {0}", atm.NoteDetails);
            }
        }
Exemplo n.º 2
0
        public void TestByCity()
        {
            options.City    = "CHICAGO";
            options.Country = "USA";
            Atms atms = service.GetAtms(options);

            Assert.IsTrue(atms != null && atms.Atm.Count > 0);
        }
Exemplo n.º 3
0
        public void TestByCountrySubdivision()
        {
            options.CountrySubdivision = "IL";
            options.Country            = "USA";
            Atms atms = service.GetAtms(options);

            Assert.IsTrue(atms != null && atms.Atm.Count > 0);
        }
Exemplo n.º 4
0
        public void TestByAddress()
        {
            options.AddressLine1 = "BLK 1 ROCHOR ROAD UNIT 01-640 ROCHOR ROAD";
            options.Country      = "SGP";
            Atms atms = service.GetAtms(options);

            Assert.IsTrue(atms != null && atms.Atm.Count > 0);
        }
Exemplo n.º 5
0
        public void TestGetByAlphaNumericPostalCode()
        {
            options.PostalCode = "60606-6301";
            options.Country    = "USA";
            Atms atms = service.GetAtms(options);

            Assert.IsTrue(atms != null && atms.Atm.Count > 0);
        }
Exemplo n.º 6
0
        public void TestGetByForeignPostalCode()
        {
            options.PostalCode = "068897";
            options.Country    = "SGP";
            Atms atms = service.GetAtms(options);

            Assert.IsTrue(atms != null && atms.Atm.Count > 0);
        }
Exemplo n.º 7
0
        public void TestBySupportEMV()
        {
            options.SupportEMV = AtmLocationRequestOptions.SUPPORT_EMV_YES;
            options.Latitude   = 1.2833;
            options.Longitude  = 103.8499;
            Atms atms = service.GetAtms(options);

            Assert.IsTrue(atms != null && atms.Atm.Count > 0);
        }
Exemplo n.º 8
0
        public void TestByLatLong()
        {
            options.Latitude     = 1.2833;
            options.Longitude    = 103.8499;
            options.Radius       = 5;
            options.DistanceUnit = AtmLocationRequestOptions.KILOMETER;
            Atms atms = service.GetAtms(options);

            Assert.IsTrue(atms != null && atms.Atm.Count > 0);
        }