/// <summary>
        /// The example refers to the process of getting all telematics vendors.
        /// </summary>
        public void GetAllVendors()
        {
            // Create the manager with the api key
            var route4Me = new Route4MeManager(ActualApiKey);

            var vendorParameters = new TelematicsVendorParameters();

            // Run the query
            var vendors = route4Me.GetAllTelematicsVendors(
                vendorParameters,
                out string errorString);

            PrintExampleTelematicsVendor(vendors, errorString);
        }
Exemple #2
0
        public void GetVendor()
        {
            var route4Me = new Route4MeManager(ActualApiKey);

            var vendors = route4Me.GetAllTelematicsVendors(
                new TelematicsVendorParameters(),
                out string errorString);

            int randomNumber = (new Random()).Next(0, vendors.Vendors.Length - 1);

            string randomVendorID = vendors.Vendors[randomNumber].ID;

            var vendorParameters = new TelematicsVendorParameters()
            {
                VendorID = Convert.ToUInt32(randomVendorID)
            };

            var vendor = route4Me.GetTelematicsVendor(vendorParameters, out errorString);

            PrintExampleTelematicsVendor(vendor, errorString);
        }