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();
        }
Пример #2
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);
     }
 }