예제 #1
0
 /// <summary>
 /// Posts a consumption and sets the optional consumption id to a specific value
 /// </summary>
 static void AddConsumption()
 {
     Client client = new Client(account, secret, debug);
     Consumption consumption = new Consumption("123", "ABCD");
     consumption.Id = "IDX";
     int response = client.Add(consumption);
     Console.WriteLine("Call complete, status code: " + response);
 }
예제 #2
0
        /// <summary>
        /// Bulk posts consumptions
        /// </summary>
        static void BulkAddConsumptions()
        {
            Client client = new Client(account, secret, debug);
            List<Consumption> consumptions = new List<Consumption>();

            Consumption c1 = new Consumption("1", "A");
            consumptions.Add(c1);

            Consumption c2 = new Consumption("2", "B");            
            consumptions.Add(c2);
            
            int response = client.Add(consumptions);            
            Console.WriteLine("Call complete, status code: " + response);
        }