Ejemplo n.º 1
0
        private void FixedProfileQuotes()
        {
            Xrae.GetTermPricingResult result = new Xrae.GetTermPricingResult();
            var profile = new Xrae.UnderwritingProfile
            {
                DateOfBirth = new Xrae.DateLongType {
                    Month = 9, Day = 19, Year = 1969
                },
                Gender     = Xrae.Gender.Male,
                TobaccoUse = new Xrae.TobaccoProfile {
                    EverUse = false
                },
                PolicyDetails = new Xrae.PolicyProfile {
                    FaceAmount = 500000, ProductType = Xrae.ProductType.Term
                },
                MedicalConditions = new Xrae.MedicalProfile
                {
                    DiabetesType1 = new Xrae.DiabetesType1Profile
                    {
                    }
                },
                FamilyHistory = new Xrae.FamilyProfile
                {
                    FatherConditionHistory = new Xrae.FatherProfile
                    {
                    }
                }
            };
            var request = new Xrae.GetTermPricingRequest
            {
                AccountKey = "C53EBC72",
                //    StateOfIssue = Xrae.StateAbbreviation.AL,
                SubjectProfile = profile,
            };
            var proxy = new Xrae.XraeDirectApiClient();

            result = proxy.GetQuickTermPricing(request);
            //var result2 = proxy.GetQuickUnderwritingUI("C53EBC72", profile);
            var message = "Got quotes";

            if (result.HasResults)
            {
                message = "have quotes";
            }
        }
Ejemplo n.º 2
0
        private Xrae.GetTermPricingResult GetQuickInfo()
        {
            //create api underwriting profile instance
            var profile = GetProfileNormal();
            ////create xrae api client proxy instance
            var proxy = new Xrae.XraeDirectApiClient();

            //  var proxyCL =new Xrae.XraeDirectApiClient();
            ////call api operation – first parameter is account key
            //  Xrae.GetUnderwritingResult resultUW = proxy.GetQuickUnderwriting("C53EBC72", profile);

            //---------------------------------
            //var param = new Xrae.AddCaseRequest
            //{
            //    AccountKey = "C53EBC72",  // iPipeline provided key,
            //    ClientName = "John Smith",
            //    CaseComments = "",
            //    SubjectProfile = profile
            //};

            ////////create xrae api client proxy instance
            //////var proxy = new Xrae.XraeDirectApiClient();

            //////////call api operation
            //Xrae.AddCaseResult resultCase = proxy.AddCase(param);


            //var key = resultCase.CaseKey; //  AQUI REGRESA LA CLAVE DEL CASO CORRECTAMENTE EN ESTADO ACEPTED

            //Xrae.GetUnderwritingResult result2 = proxy.GetCaseUnderwriting(key);

            //-----------------------------------------------------------------
            int state = System.Convert.ToInt32(sltState.Value.ToString().Trim()) - 1;

            //var profile = new Xrae.UnderwritingProfile
            //{
            //    DateOfBirth = new Xrae.DateLongType { Month = 9, Day = 19, Year = 1969 },
            //    Gender = Xrae.Gender.Male,
            //    TobaccoUse = new Xrae.TobaccoProfile { EverUse = false },
            //    PolicyDetails = new Xrae.PolicyProfile { FaceAmount = 500000, ProductType = Xrae.ProductType.Term },

            //};
            var request = new Xrae.GetTermPricingRequest
            {
                AccountKey = "C53EBC72",
                //StateOfIssue = Xrae.StateAbbreviation.AL,
                SubjectProfile = profile,
            };

            var result = proxy.GetQuickTermPricing(request);

            ////Xrae.GetTermPricingResult result = proxy.GetCaseTermPricing(key);
            //Xrae.GetTermPricingResult result = null;
            //if (Session["carrierList"]!= null)
            //{
            //    var carriers = Session["carrierList"] as string[];
            //    Xrae.GetPricingRequestCarriers fCarriers = new Xrae.GetPricingRequestCarriers
            //    {
            //        Carriers = carriers
            //    };
            //    result = proxy.GetQuickTermPricingForCarriers(request, fCarriers);

            //}
            //else
            //result = proxy.GetQuickTermPricing(request);

            //result = proxyCL.GetCaseTermPricing("B035CBDD7E4F2F60");
            //if (Session["UWresults"] != null)
            //{
            //    Xrae.GetUnderwritingResult UWResults = Session["UWresults"] as Xrae.GetUnderwritingResult;
            //    var paramPrice = new Xrae.GetULPricingRequest
            //    {
            //        PaymentMode = Xrae.UL_PaymentMode.Monthly,
            //        SortType = Xrae.UL_SortType.Alphabetical
            //    };
            //    Xrae.GetULPricingResult resultUL = proxy.GetULCasePricingEx(key, paramPrice, UWResults);
            //}
            //Xrae.GetTermPricingResult result2 = proxy.GetCaseTermPricing(key);
            ////create xrae api client proxy instance
            ////var proxy = new Xrae.XraeDirectApiClient();

            ////call api operation – first parameter is account key
            //Xrae.GetTermPricingResult result = proxy.GetQuickTermPricingForCarriers(request, fCarriers);
            return(result);
        }