using System; using System.Collections.Generic; using iBilling.Client; namespace iBilling.Samples { public class Scenario6 { public static void Main(string[] args){ //Set up clients' settings; Dictionary config = new Dictionary(); config[SessionConnection.PROCESSOR_HOST] = "http://server.ibillingclient.org/ibilling/xmlhttps"; config["debug"] = true; //Login; Session session = Session.Login(2000, "welcome", config); //Find payment plan; PaymentPlan paymentPlan = session.LoadPaymentPlan("csharp.pp-1"); //Execute delete last 6 charges; paymentPlan.RemoveRange(5, 6); //Mark object for persistence; session.Save(paymentPlan); //Synchronize changes with the server; try{ session.Synchronize(); } catch(Exception ex){ //Be sure to properly handle exception, this is just a sample solution; Console.WriteLine(ex.Message); return ; } //Logout; session.Logout(); } } }