// preauthorizations static void getPreauthorizations() { Paymill.ApiKey = Properties.Settings.Default.ApiKey; Paymill.ApiUrl = Properties.Settings.Default.ApiUrl; PreauthorizationService preauthorizationService = Paymill.GetService <PreauthorizationService>(); Console.WriteLine("Waiting request list preauthorizations..."); List <Preauthorization> lstPreauthorizations = preauthorizationService.GetPreauthorizations(); foreach (Preauthorization preauthorization in lstPreauthorizations) { Console.WriteLine(String.Format("PreauthorizationID:{0}", preauthorization.Id)); } Console.Read(); }
static void getPreauthorizationsWithParameters() { Paymill.ApiKey = Properties.Settings.Default.ApiKey; Paymill.ApiUrl = Properties.Settings.Default.ApiUrl; PreauthorizationService preauthorizationService = Paymill.GetService <PreauthorizationService>(); Console.WriteLine("Waiting request list preauthorizations..."); Filter filter = new Filter(); filter.Add("count", 1); filter.Add("offset", 2); List <Preauthorization> lstPreauthorizations = preauthorizationService.GetPreauthorizations(filter); foreach (Preauthorization preauthorization in lstPreauthorizations) { Console.WriteLine(String.Format("PreauthorizationID:{0}", preauthorization.Id)); } Console.Read(); }