示例#1
0
        public Response SavePolicyDetailsRequest(Dictionary <string, object> parameters)
        {
            try
            {
                var insReq  = new InsuranceRequest();
                var sess    = new SessionRequest();
                var vehicle = new VehicleRequest();
                var client  = new ClientRequest();
                var policy  = new PolicyRequest();

                sess.Username              = (String)parameters["username"];
                sess.AuthenticationKey     = (String)parameters["AuthenticationKey"];
                sess.Bordereaux            = (bool)parameters["bordereaux"];
                sess.Account               = (String)parameters["account"];
                sess.GuaranteeWarrantyDate = (DateTime)parameters["guarenteewarrantydate"];
                sess.PaidByCard            = (bool)parameters["paidbycard"];
                sess.DeliveryDate          = (DateTime)parameters["deliverydate"];
                sess.LoanProvided          = (bool)parameters["loanprovided"];

                client.FirstName   = (String)parameters["firstname"];
                client.Surname     = (String)parameters["surname"];
                client.Title       = (String)parameters["title"];
                client.HouseNumber = (String)parameters["housenumber"];
                client.Address     = (String)parameters["address"];
                client.Postcode    = (String)parameters["postcode"];
                client.Email       = (String)parameters["email"];
                client.Telephone   = (String)parameters["telephone"];
                client.IsCompany   = (bool)parameters["iscompany"];

                policy.Description  = (String)parameters["description"];
                policy.Plan         = (String)parameters["plan"];
                policy.GrossPremium = (decimal)parameters["grosspremium"];
                policy.Product      = (String)parameters["product"];
                policy.CoverPeriod  = (int)parameters["coverperiod"];

                vehicle.Make           = (String)parameters["make"];
                vehicle.Model          = (String)parameters["model"];
                vehicle.Registration   = (String)parameters["registration"];
                vehicle.Price          = (decimal)parameters["price"];
                vehicle.Mileage        = (int)parameters["mileage"];
                vehicle.DateRegistered = (DateTime)parameters["dateregistered"];
                vehicle.EngineSize     = (int)parameters["enginesize"];
                vehicle.Fuel           = (String)parameters["fuel"];
                vehicle.NewVehicle     = (bool)parameters["newvehicle"];
                vehicle.Motorcycle     = (bool)parameters["motorcycle"];

                insReq.Session = sess;
                insReq.Client  = client;
                insReq.Policy  = policy;
                insReq.Vehicle = vehicle;

                var response = insuranceWebService.SavePolicyDetailsRequest(insReq);
                return(MethodRespToObject(response));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.InnerException.Message);
                return(null);
            }
        }
示例#2
0
 public Response ReprintPolicyRequest(Dictionary <string, object> parameters)
 {
     try
     {
         var insReq   = new InsuranceRequest();
         var sess     = new SessionRequest();
         var document = new DocumentRequest();
         sess.Username = (String)parameters["username"];
         sess.Password = "";
         document.CertificateNumber       = (String)parameters["certificatenumber"];
         document.PrintCertificate        = (bool)parameters["printcertificate"];
         document.PrintPolicySummary      = (bool)parameters["printpolicysummary"];
         document.PrintTermsandConditions = (bool)parameters["printtermsandconditions"];
         document.PrintStatementofPrice   = (bool)parameters["printstatementofprice"];
         document.PrintDirectDebit        = (bool)parameters["printdirectdebit"];
         insReq.Documents = document;
         insReq.Session   = sess;
         var response = insuranceWebService.ReprintPolicyRequest(insReq);
         return(MethodRespToObject(response));
     }
     catch (Exception e)
     {
         Console.WriteLine(e.InnerException.Message);
         return(null);
     }
 }
        static void hMain(string[] args)
        {
            InsuranceWebService insuranceWebService = new InsuranceWebService();
            var insReq = new InsuranceRequest();
            var sess   = new SessionRequest();
            var doc    = new DocumentRequest();

            sess.Username               = "";
            sess.Password               = "";
            doc.CertificateNumber       = "";
            doc.PrintCertificate        = true;
            doc.PrintPolicySummary      = true;
            doc.PrintTermsandConditions = true;
            doc.PrintStatementofPrice   = true;
            doc.PrintDirectDebit        = true;
            insReq.Session              = sess;
            insReq.Documents            = doc;


            var response = insuranceWebService.ReprintPolicyRequest(insReq);

            if (response.Success)
            {
                Console.WriteLine("Success");
            }
            else
            {
                Console.WriteLine("Fail");
            }
            Console.ReadKey();
        }
示例#4
0
 public Response MTAPolicyByInsuranceRequest(Dictionary <string, object> parameters)
 {
     try
     {
         var insReq = new InsuranceRequest();
         var sess = new SessionRequest(); var mta = new AdjustRequest();
         sess.Username          = (String)parameters["username"];
         sess.Password          = "";
         sess.AuthenticationKey = (String)parameters["authenticationKey"];
         mta.AccountID          = (String)parameters["accountid"];
         mta.Contact            = (String)parameters["contact"];
         mta.Details            = (String)parameters["details"];
         mta.PolicyNumber       = (String)parameters["policynumber"];
         mta.MTAReason          = (String)parameters["mtareason"];
         mta.DealerName         = (String)parameters["dealername"];
         mta.Surname            = (String)parameters["surname"];
         insReq.MTA             = mta;
         insReq.Session         = sess;
         var response = insuranceWebService.MTAPolicyByInsuranceRequest(insReq);
         return(MethodRespToObject(response));
     }
     catch (Exception e)
     {
         Console.WriteLine(e.InnerException.Message);
         return(null);
     }
 }
        static void DMain(string[] args)
        {
            InsuranceWebService insuranceWebService = new InsuranceWebService();
            var mta    = new AdjustRequest();
            var insReq = new InsuranceRequest();
            var sess   = new SessionRequest();

            sess.Username          = "";
            sess.Password          = "";
            sess.AuthenticationKey = "";
            mta.AccountID          = "";
            mta.Contact            = "";
            mta.DealerName         = "";
            mta.Details            = "";
            mta.PolicyNumber       = "";
            mta.MTAReason          = "";
            mta.Surname            = "";
            mta.RequestValidation  = true;
            mta.PhoenixMTA         = null;
            insReq.Session         = sess;
            insReq.MTA             = mta;

            var response = insuranceWebService.MTAPolicyByInsuranceRequest(insReq);

            if (response.Success)
            {
                Console.WriteLine("Success");
            }
            else
            {
                Console.WriteLine("Fail");
            }
            Console.ReadKey();
        }
示例#6
0
        public Response GetProductListRequest(Dictionary <string, object> parameters)
        {
            try
            {
                var insReq  = new InsuranceRequest();
                var sess    = new SessionRequest();
                var vehicle = new VehicleRequest();


                sess.Username              = (String)parameters["username"];
                sess.Password              = "";
                sess.AuthenticationKey     = (String)parameters["authenticationKey"];
                sess.GuaranteeWarrantyDate = (DateTime)parameters["guarenteewarrantydate"];
                sess.DeliveryDate          = (DateTime)parameters["deliverydate"];
                sess.LoanProvided          = (bool)parameters["loanprovided"];
                vehicle.Price              = (decimal)parameters["price"];

                insReq.Session = sess;
                insReq.Vehicle = vehicle;

                var response = insuranceWebService.GetProductListRequest(insReq);
                return(MethodRespToObject(response));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.InnerException.Message);
                return(null);
            }
        }
示例#7
0
        public Response CancelPolicyByInsurance(Dictionary <string, object> parameters)
        {
            try
            {
                var insReq = new InsuranceRequest();
                var sess   = new SessionRequest();
                var cancel = new CancelRequest();
                sess.Username = (String)parameters["username"];
                sess.Password = "";

                sess.AuthenticationKey    = (String)parameters["AuthenticationKey"];
                cancel.AccountID          = (String)parameters["accountid"];
                cancel.CancellationReason = (String)parameters["cancellationreason"];
                cancel.CertificateNumber  = (String)parameters["certificatenumber"];
                cancel.ContactEmail       = (String)parameters["contactemail"];
                cancel.DealerName         = (String)parameters["dealername"];
                cancel.Surname            = (String)parameters["surname"];
                cancel.RequestValidation  = (bool)parameters["requestvalidation"];
                cancel.RefundCustomer     = (String)parameters["refundcustomer"];

                cancel.PhoenixCancellation = null;

                insReq.Session      = sess;
                insReq.Cancellation = cancel;

                var response = insuranceWebService.CancelPolicyByInsuranceRequest(insReq);
                return(MethodRespToObject(response));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.InnerException.Message);
                return(null);
            }
        }
        static void TMain(string[] args)
        {
            InsuranceWebService insuranceWebService = new InsuranceWebService();
            var insReq = new InsuranceRequest();
            var sess   = new SessionRequest();
            var veh    = new VehicleRequest();

            sess.Username              = "";
            sess.Password              = "";
            sess.DeliveryDate          = new DateTime();
            sess.AuthenticationKey     = "";
            sess.GuaranteeWarrantyDate = new DateTime();
            sess.LoanProvided          = true;
            veh.Price      = 1;
            sess.Vehicle   = veh;
            insReq.Session = sess;
            insReq.Vehicle = veh;


            var response = insuranceWebService.GetProductListRequest(insReq);

            for (int i = 0; i < response.Plan.Length; i++)
            {
                Console.WriteLine(response.Plan[i]);
                Console.WriteLine(response.Description[i]);
            }
            Console.ReadKey();
        }
示例#9
0
        static void sadMain(string[] args)
        {
            InsuranceWebService insuranceWebService = new InsuranceWebService();
            var insRequest = new InsuranceRequest();
            var mySession  = new SessionRequest();
            var myPolicy   = new PolicyRequest();
            var myClient   = new ClientRequest();
            var myVehicle  = new VehicleRequest();

            mySession.Username              = "";
            mySession.AuthenticationKey     = "";
            mySession.Bordereaux            = false;
            mySession.Account               = "";
            mySession.GuaranteeWarrantyDate = new DateTime();
            mySession.PaidByCard            = true;
            mySession.DeliveryDate          = new DateTime();
            mySession.LoanProvided          = false;

            myClient.FirstName   = "";
            myClient.Surname     = "";
            myClient.Title       = "";
            myClient.HouseNumber = "";
            myClient.Address     = "";
            myClient.Postcode    = "";
            myClient.Email       = "";
            myClient.Telephone   = "";
            myClient.IsCompany   = false;

            myPolicy.Description  = "";
            myPolicy.Plan         = "";
            myPolicy.GrossPremium = 0;
            myPolicy.Product      = "";
            myPolicy.CoverPeriod  = 0;

            myVehicle.Make           = "";
            myVehicle.Model          = "";
            myVehicle.Registration   = "";
            myVehicle.Price          = 0;
            myVehicle.Mileage        = 0;
            myVehicle.DateRegistered = new DateTime();
            myVehicle.EngineSize     = 0;
            myVehicle.Fuel           = "";
            myVehicle.NewVehicle     = false;
            myVehicle.Motorcycle     = false;


            insRequest.Session = mySession;
            insRequest.Vehicle = myVehicle;
            insRequest.Client  = myClient;
            insRequest.Policy  = myPolicy;

            var response = insuranceWebService.GetIncludedMakesRequest(insRequest);

            foreach (var p in response.GetVehicleList)
            {
                Console.WriteLine(p);
            }
            Console.ReadKey();
        }
示例#10
0
        public List <InsuranceRequest> FillInsurance(List <Journey> currentjourney, int pasajeros, DoAirPriceFeeResponse doAirPriceFeeResponse, int Type)
        {
            List <InsuranceRequest>        insurancelot = new List <InsuranceRequest>();
            IEnumerable <InsuranceRequest> auxinsurelot;

            var date = (currentjourney[0].STD - currentjourney[1].STD).TotalDays;
            InsuranceRequest insurance;


            foreach (var item in doAirPriceFeeResponse.Fee.InsuranceFees)
            {
                insurance = new InsuranceRequest()
                {
                    code             = item.Code,
                    passengerNumbers = fillVippassanger(pasajeros)
                };
                insurancelot.Add(insurance);
            }

            switch (Type)
            {
            case 1:
                auxinsurelot = insurancelot.Where(j => j.code != "SAS");     //Lost
                break;

            case 2:
                auxinsurelot = insurancelot.Where(j => j.code != "SEA");     //Nulled
                break;

            case 3:
                auxinsurelot = insurancelot.Where(j => j.code != "SEM");     //Medic
                break;

            default:
                auxinsurelot = insurancelot;    //All
                break;
            }
            if (Type != 4)
            {
                foreach (var item in auxinsurelot.ToList())
                {
                    insurancelot.Remove(item);
                }
            }

            return(insurancelot);
        }
示例#11
0
        public Response ValidateLogin(Dictionary <string, object> parameters)
        {
            try
            {
                var insReq = new InsuranceRequest();

                string Username          = (String)parameters["username"];
                string Password          = "";
                string AuthenticationKey = (String)parameters["authenticationkey"];

                var response = insuranceWebService.ValidateLogin(Username, Password, AuthenticationKey);
                return(MethodRespToObject(response));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.InnerException.Message);
                return(null);
            }
        }
示例#12
0
 public Response ChangePassword(Dictionary <string, object> parameters)
 {
     try
     {
         var insReq = new InsuranceRequest();
         var sess   = new SessionRequest
         {
             Username    = (String)parameters["username"],
             Password    = (String)parameters["password"],
             NewPassword = (String)parameters["newpassword"]
         };
         insReq.Session = sess;
         var response = insuranceWebService.ChangePasswordRequest(insReq);
         return(MethodRespToObject(response));
     }
     catch (Exception e)
     {
         Console.WriteLine(e.InnerException.Message);
         return(null);
     }
 }
示例#13
0
        public Response GetSavedDetailsListRequest(Dictionary <string, object> parameters)
        {
            try
            {
                var insReq = new InsuranceRequest();
                var sess   = new SessionRequest();


                sess.Username = (String)parameters["username"];
                sess.Password = "";

                insReq.Session = sess;

                var response = insuranceWebService.GetSavedDetailsListRequest(insReq);
                return(MethodRespToObject(response));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.InnerException.Message);
                return(null);
            }
        }
示例#14
0
 public Response GetReprintListRequest(Dictionary <string, object> parameters)
 {
     try
     {
         var insReq = new InsuranceRequest();
         var sess   = new SessionRequest
         {
             Username          = (String)parameters["username"],
             Password          = "",
             AuthenticationKey = (String)parameters["authenticationkey"],
             SearchDate        = (DateTime)parameters["searchdate"]
         };
         insReq.Session = sess;
         var response = insuranceWebService.GetReprintListRequest(insReq);
         return(MethodRespToObject(response));
     }
     catch (Exception e)
     {
         Console.WriteLine(e.InnerException.Message);
         return(null);
     }
 }
        static void nMain(string[] args)
        {
            InsuranceWebService insuranceWebService = new InsuranceWebService();
            var cancel = new CancelRequest();
            var insReq = new InsuranceRequest();
            var sess   = new SessionRequest();

            sess.Username             = "";
            sess.Password             = "";
            sess.AuthenticationKey    = "";
            cancel.AccountID          = "";
            cancel.CancellationReason = "";
            cancel.CertificateNumber  = "";
            cancel.ContactEmail       = "";
            cancel.DealerName         = "";

            //Always Null
            cancel.PhoenixCancellation = null;
            cancel.RequestValidation   = true;
            cancel.RefundCustomer      = ""; //Set As required
            cancel.Surname             = "";
            insReq.Session             = sess;
            insReq.Cancellation        = cancel;

            var response = insuranceWebService.CancelPolicyByInsuranceRequest(insReq);

            if (response.Success)
            {
                Console.WriteLine("Success");
            }
            else
            {
                Console.WriteLine("Fail");
            }
            Console.ReadKey();
        }
示例#16
0
        public Response CreateAndHandlePI(Dictionary <string, object> parameters)
        {
            try
            {
                var insReq = new InsuranceRequest();

                var vehicle = new VehicleRequest();
                var client  = new ClientRequest();

                var policy = new PolicyRequest();
                var sess   = new SessionRequest
                {
                    Username          = (String)parameters["username"],
                    AuthenticationKey = (String)parameters["AuthenticationKey"],
                    Account           = (String)parameters["account"],
                    DeliveryDate      = (DateTime)parameters["deliverydate"]
                };

                client.FirstName   = (String)parameters["firstname"];
                client.Surname     = (String)parameters["surname"];
                client.Title       = (String)parameters["title"];
                client.HouseNumber = (String)parameters["housenumber"];
                client.Address     = (String)parameters["address"];
                client.Postcode    = (String)parameters["postcode"];
                client.Email       = (String)parameters["email"];
                client.Telephone   = (String)parameters["telephone"];
                client.Employer    = (String)parameters["employer"];
                client.Mobile      = (String)parameters["mobile"];
                client.Occupation  = (String)parameters["occupation"];

                policy.Description  = (String)parameters["description"];
                policy.Plan         = (String)parameters["plan"];
                policy.GrossPremium = (decimal)parameters["grosspremium"];
                policy.Product      = (String)parameters["product"];
                policy.CoverPeriod  = (int)parameters["coverperiod"];
                policy.StartDate    = (DateTime)parameters["startdate"];

                vehicle.Make           = (String)parameters["make"];
                vehicle.Model          = (String)parameters["model"];
                vehicle.Registration   = (String)parameters["registration"];
                vehicle.Price          = (decimal)parameters["price"];
                vehicle.Mileage        = (int)parameters["mileage"];
                vehicle.DateRegistered = (DateTime)parameters["dateregistered"];
                vehicle.EngineSize     = (int)parameters["enginesize"];
                vehicle.Fuel           = (String)parameters["fuel"];
                vehicle.NewVehicle     = (bool)parameters["newvehicle"];
                vehicle.Motorcycle     = (bool)parameters["motorcycle"];

                insReq.Session = sess;
                insReq.Client  = client;
                insReq.Policy  = policy;
                insReq.Vehicle = vehicle;

                var response = insuranceWebService.CreateAndHandlePI(insReq);
                return(MethodRespToObject(response));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.InnerException.Message);
                return(null);
            }
        }
示例#17
0
        static void aMain(string[] args)
        {
            InsuranceWebService insuranceWebService = new InsuranceWebService();
            var insRequest = new InsuranceRequest();
            var mySession  = new SessionRequest();
            var myBank     = new BankRequest();
            var myPolicy   = new PolicyRequest();
            var myClient   = new ClientRequest();
            var myVehicle  = new VehicleRequest();
            var myLoan     = new LoanRequest();

            mySession.Username              = "";
            mySession.AuthenticationKey     = "";
            mySession.Bordereaux            = false;
            mySession.Account               = "";
            mySession.GuaranteeWarrantyDate = new DateTime();
            mySession.PaidByCard            = true;
            mySession.DeliveryDate          = new DateTime();
            mySession.LoanProvided          = false;

            myClient.FirstName   = "";
            myClient.Surname     = "";
            myClient.Title       = "";
            myClient.HouseNumber = "";
            myClient.Address     = "";
            myClient.Postcode    = "";
            myClient.Email       = "";
            myClient.Telephone   = "";
            //Optional
            myClient.DateOfBirth = new DateTime();
            //END Optional
            myClient.IsCompany = false;

            myPolicy.Description  = "";
            myPolicy.Plan         = "";
            myPolicy.GrossPremium = 0;
            myPolicy.Product      = "";
            myPolicy.CoverPeriod  = 0;
            //Optional
            myPolicy.DatePISupplied        = new DateTime();
            myPolicy.ExternalReference     = "";
            myPolicy.DateCustomerConfirmed = new DateTime();
            //END Optional
            myPolicy.PaidByCard = false;

            myVehicle.Make           = "";
            myVehicle.Model          = "";
            myVehicle.Registration   = "";
            myVehicle.Price          = 0;
            myVehicle.Mileage        = 0;
            myVehicle.DateRegistered = new DateTime();
            myVehicle.EngineSize     = 0;
            myVehicle.MOTDate        = new DateTime();
            myVehicle.Fuel           = "";
            myVehicle.NewVehicle     = false;
            myVehicle.Motorcycle     = false;

            myBank.AccountName        = "";
            myBank.AccountNumber      = "";
            myBank.PaperlessDDI       = false;
            myBank.PayeeAddress       = "";
            myBank.PayeeFirstName     = "";
            myBank.PayeeSurname       = "";
            myBank.PayeeHouseNumber   = "";
            myBank.PayeePostcode      = "";
            myBank.PayeeTitle         = "";
            myBank.SortCode           = "";
            myBank.PolicyHolderPaying = false;

            //Optional
            myLoan.Advance        = 0;
            myLoan.AdvanceRentals = 0;
            myLoan.LoanPayment    = 0;
            myLoan.LoanTerm       = 0;
            //END Optional
            myLoan.BorrowerName = "";
            myLoan.Lender       = "";

            insRequest.Session = mySession;
            insRequest.Vehicle = myVehicle;
            insRequest.Client  = myClient;
            insRequest.Policy  = myPolicy;
            insRequest.Bank    = myBank;
            insRequest.Loan    = myLoan;

            var response = insuranceWebService.CreatePolicyByInsuranceRequest(insRequest);


            if (response.Success)
            {
                Console.WriteLine("Success");
            }
            else
            {
                Console.WriteLine("Fail");
            }
            Console.ReadKey();
        }
示例#18
0
        public Response CreatePolicyByInsuranceRequest(Dictionary <string, object> parameters)
        {
            try
            {
                var insReq  = new InsuranceRequest();
                var sess    = new SessionRequest();
                var vehicle = new VehicleRequest();
                var client  = new ClientRequest();
                var policy  = new PolicyRequest();
                var bank    = new BankRequest();
                var loan    = new LoanRequest();
                sess.Username              = (String)parameters["username"];
                sess.AuthenticationKey     = (String)parameters["sess.AuthenticationKey"];
                sess.Bordereaux            = (bool)parameters["bordereaux"];
                sess.Account               = (String)parameters["account"];
                sess.GuaranteeWarrantyDate = (DateTime)parameters["guarenteewarrantydate"];
                sess.PaidByCard            = (bool)parameters["paidbycard"];
                sess.DeliveryDate          = (DateTime)parameters["deliverydate"];
                sess.LoanProvided          = (bool)parameters["loanprovided"];

                client.FirstName             = (String)parameters["firstname"];
                client.Surname               = (String)parameters["surname"];
                client.Title                 = (String)parameters["title"];
                client.HouseNumber           = (String)parameters["housenumber"];
                client.Address               = (String)parameters["address"];
                client.Postcode              = (String)parameters["postcode"];
                client.Email                 = (String)parameters["email"];
                client.Telephone             = (String)parameters["telephone"];
                client.IsCompany             = (bool)parameters["iscompany"];
                client.DateOfBirth           = (DateTime)parameters["dateofbirth"];
                policy.Description           = (String)parameters["description"];
                policy.Plan                  = (String)parameters["plan"];
                policy.GrossPremium          = (decimal)parameters["grosspremium"];
                policy.Product               = (String)parameters["product"];
                policy.CoverPeriod           = (int)parameters["coverperiod"];
                policy.DatePISupplied        = (DateTime)parameters["datepisupplied"];
                policy.ExternalReference     = (String)parameters["externalreference"];
                policy.DateCustomerConfirmed = (DateTime)parameters["datecustomerconfirmed"];
                vehicle.Make                 = (String)parameters["make"];
                vehicle.Model                = (String)parameters["model"];
                vehicle.Registration         = (String)parameters["registration"];
                vehicle.Price                = (decimal)parameters["price"];
                vehicle.Mileage              = (int)parameters["mileage"];
                vehicle.DateRegistered       = (DateTime)parameters["dateregistered"];
                vehicle.EngineSize           = (int)parameters["enginesize"];
                vehicle.MOTDate              = (DateTime)parameters["motdate"];
                vehicle.Fuel                 = (String)parameters["fuel"];
                vehicle.NewVehicle           = (bool)parameters["newvehicle"];
                vehicle.Motorcycle           = (bool)parameters["motorcycle"];
                bank.AccountName             = (String)parameters["accountname"];
                bank.AccountNumber           = (String)parameters["accountnumber"];
                bank.PaperlessDDI            = (bool)parameters["paperlessddi"];
                bank.PayeeAddress            = (String)parameters["payeeaddress"];
                bank.PayeeFirstName          = (String)parameters["payeefirstname"];
                bank.PayeeSurname            = (String)parameters["payeesurname"];
                bank.PayeeAddress            = (String)parameters["payeehousenumber"];
                bank.PayeePostcode           = (String)parameters["payeepostcode"];
                bank.PayeeTitle              = (String)parameters["payeetitle"];
                bank.SortCode                = (String)parameters["sortcode"];
                bank.PolicyHolderPaying      = (bool)parameters["policyholderpaying"];
                loan.Advance                 = (decimal)parameters["advance"];
                loan.AdvanceRentals          = (int)parameters["advancerentals"];
                loan.LoanPayment             = (decimal)parameters["loanpayment"];
                loan.LoanTerm                = (int)parameters["loanterm"];
                loan.BorrowerName            = (String)parameters["borrowername"];
                loan.Lender                  = (String)parameters["lender"];
                insReq.Session               = sess;
                insReq.Client                = client;
                insReq.Policy                = policy;
                insReq.Vehicle               = vehicle;
                insReq.Bank                  = bank;
                insReq.Loan                  = loan;

                var response = insuranceWebService.CreatePolicyByInsuranceRequest(insReq);
                return(MethodRespToObject(response));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.InnerException.Message);
                return(null);
            }
        }