private Xrae.UnderwritingProfile GetProfile() { int bDay = System.Convert.ToInt32(this.sltBDay.Value.ToString().Trim()); //int bDay = System.Convert.ToInt32("15"); int bMonth = System.Convert.ToInt32(this.sltBMonth.Value.ToString().Trim()); int bYear = System.Convert.ToInt32(this.sltByear.Value.ToString().Trim()); object sexMale = null; var smoker = false; if (this.rdSmokerN.Attributes["checked"] != null) { smoker = false; } if (this.rdSmokerY.Attributes["checked"] != null) { smoker = true; } if (this.rdSexMale.Attributes["checked"] != null) { sexMale = Xrae.Gender.Male; } if (this.rdSexFemale.Attributes["checked"] != null) { sexMale = Xrae.Gender.Female; } int faceAmount = System.Convert.ToInt32(txtFaceAmount.Text.Trim()); //create api underwriting profile instance var profile = new Xrae.UnderwritingProfile { DateOfBirth = new Xrae.DateLongType { Month = bMonth, Day = bDay, Year = bYear }, Gender = (Xrae.Gender)sexMale, TobaccoUse = new Xrae.TobaccoProfile { EverUse = smoker }, PolicyDetails = new Xrae.PolicyProfile { FaceAmount = faceAmount, ProductType = Xrae.ProductType.Term, TermLengths = new int[1] { 15 } }, //PhysicalBuild = new Xrae.BuildProfile { HeightFeet = 5, HeightInches = 6, WeightPounds = 232 }, }; var proxyCL = new Xrae.XraeDirectApiClient(); var profileCL = proxyCL.GetCaseByKey("B035CBDD7E4F2F60"); var param = new Xrae.UpdateCaseRequest { CaseKey = "B035CBDD7E4F2F60", //use key returned by AddCase operation, //only required if changed SubjectProfile = profile }; Xrae.UpdateCaseResult resultCL = proxyCL.UpdateCase(param); return(profile); }
private Xrae.GetUnderwritingResult GetUWInfo() { // Xrae.UnderwritingProfile profile = GetProfile(); Xrae.UnderwritingProfile profile = null; ////create xrae api client proxy instance var proxy = new Xrae.XraeDirectApiClient(); ////call api operation – first parameter is account key Xrae.GetUnderwritingResult resultUW = proxy.GetQuickUnderwriting("C53EBC72", profile); return(resultUW); }
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"; } }
public Xrae.GetTermPricingResult RequestQuotesFromApi() { Xrae.GetTermPricingResult result; var proxy = new Xrae.XraeDirectApiClient(); var quoteProfile = new Xrae.UnderwritingProfile { DateOfBirth = new Xrae.DateLongType { Month = 1, Day = 1, Year = 1988 }, Gender = Xrae.Gender.Male, TobaccoUse = new Xrae.TobaccoProfile { EverUse = false }, PolicyDetails = new Xrae.PolicyProfile { FaceAmount = 500000, ProductType = Xrae.ProductType.Term, TermLengths = new int[1] { 15 } // filter just }, FamilyHistory = new Xrae.FamilyProfile { FatherConditionHistory = new Xrae.FatherProfile { //Cancer = new Xrae.FatherCancerProfile { DeathAge = 54 } //Cardiovascular = new Xrae.FatherCardiovascularProfile { DeathAge = 54 } //Stroke = new Xrae.FatherStrokeProfile { DeathAge = 54 } //Cardiovascular = new Xrae.FatherCardiovascularProfile { DeathAge = 54 } Diabetes = new Xrae.FatherDiabetesProfile { DeathAge = 40 } }, MotherConditionHistory = new Xrae.MotherProfile { Diabetes = new Xrae.MotherDiabetesProfile { DeathAge = 54 } } } }; var request = new Xrae.GetTermPricingRequest { AccountKey = "C53EBC72", StateOfIssue = Xrae.StateAbbreviation.IL, SubjectProfile = quoteProfile, }; //var param = new Xrae.AddCaseRequest //{ // AccountKey = "C53EBC72", // ClientName = "John Doe", // CaseComments = "LifeEAse quotes", // SubjectProfile = quoteProfile, // StateOfIssue = Xrae.StateAbbreviation.IL, //}; //var caseProf = proxy.AddCase(param); // var key = caseProf.CaseKey // var carriers = new string[] { "pru", "amg", "ban", "sbl", "prc", "pro", "ing" }; var carriers = new string[] { "met", "pru", "ing", "pro", "oma", "amg", "gen", "ava", "lfg", "ban", "prc", "sbl", "jhk" }; var paramCarriers = new Xrae.GetPricingRequestCarriers { Carriers = carriers }; return(result = proxy.GetQuickTermPricingForCarriers(request, paramCarriers)); // (caseProf.CaseKey, new Xrae.GetPricingRequestCarriers { Carriers = carriers }); }
private Xrae.UnderwritingProfile GetProfileNormal() { int bDay = System.Convert.ToInt32(this.sltBDay.Value.ToString().Trim()); //int bDay = System.Convert.ToInt32("15"); int bMonth = System.Convert.ToInt32(this.sltBMonth.Value.ToString().Trim()); int bYear = System.Convert.ToInt32(this.sltByear.Value.ToString().Trim()); object sexMale = null; var smoker = false; if (this.rdSmokerN.Attributes["checked"] != null) { smoker = false; } if (this.rdSmokerY.Attributes["checked"] != null) { smoker = true; } if (this.rdSexMale.Attributes["checked"] != null) { sexMale = Xrae.Gender.Male; } if (this.rdSexFemale.Attributes["checked"] != null) { sexMale = Xrae.Gender.Female; } int faceAmount = System.Convert.ToInt32(txtFaceAmount.Text.Trim()); ////create api underwriting profile instance var profile = new Xrae.UnderwritingProfile { DateOfBirth = new Xrae.DateLongType { Month = bMonth, Day = bDay, Year = bYear }, Gender = (Xrae.Gender)sexMale, TobaccoUse = new Xrae.TobaccoProfile { EverUse = smoker }, PolicyDetails = new Xrae.PolicyProfile { FaceAmount = faceAmount, ProductType = Xrae.ProductType.Term, TermLengths = new int[1] { 15 } }, //PhysicalBuild = new Xrae.BuildProfile { HeightFeet = 5, HeightInches = 6, WeightPounds = 232 }, //Cholesterol = new Xrae.CholesterolProfile //{ // EverMedication = true, // MedicationHistory = new Xrae.CholesterolMedication { CurrentlyUse = true } //},// taking cholesterol medication //BloodPressure = new Xrae.BloodPressureProfile //{ // EverMedication = true, // MedicationHistory = new Xrae.BloodPressureMedication { CurrentlyUse = true } //}, // taking hypertesion medication //MedicalConditions = new Xrae.MedicalProfile //{ // //CancerLung = new Xrae.CancerLungProfile { LastTreatmentDate} // //DiabetesType1 = new Xrae.DiabetesType1Profile { CurrentlyTreated = true }, // //DiabetesType2 = new Xrae.DiabetesType2Profile { CurrentlyTreated = true }, // // ,Alzheimers = new Xrae.AlzheimersProfile { } //}, //FamilyHistory = new Xrae.FamilyProfile //{ // FatherConditionHistory = new Xrae.FatherProfile // { // //Cancer = new Xrae.FatherCancerProfile { DeathAge = 54 } // //Cardiovascular = new Xrae.FatherCardiovascularProfile { DeathAge =54} // //Stroke = new Xrae.FatherStrokeProfile { DeathAge = 54} // Diabetes = new Xrae.FatherDiabetesProfile { DeathAge =54} // } // //, MotherConditionHistory = new Xrae.MotherProfile //} }; return(profile); }