public PaymentProposalSummaryAPIResponse FetchRenewedClientPoliciesInfo(PaymentServiceModel objPaymentModel) { PaymentProposalSummaryAPIRequest objObject = new PaymentProposalSummaryAPIRequest(); objObject = MappingToRenewalClientServiceObject(objPaymentModel); string URl = "http://secure.AIA.com:8080/Lif_Ind_Rnwl_Sending/"; string result = GetPostParametersToAPI("jersey", "renewedClientsPolicies", URl, objObject); PaymentProposalSummaryAPIResponse objRenewedPoliciesResponse = new PaymentProposalSummaryAPIResponse(); Newtonsoft.Json.JsonSerializerSettings settings = new Newtonsoft.Json.JsonSerializerSettings(); objRenewedPoliciesResponse = Newtonsoft.Json.JsonConvert.DeserializeObject <PaymentProposalSummaryAPIResponse>(result, settings); return(objRenewedPoliciesResponse); }
public PaymentServiceModel FetchRenewedPolicies(PaymentServiceModel objPaymentModel) { List <RenewedPolicies> Renewedpolicies = new List <RenewedPolicies>(); PaymentProposalSummaryAPIResponse objResponse = FetchRenewedClientPoliciesInfo(objPaymentModel); if (objResponse.Status == "Success") { foreach (var item in objResponse.output) { RenewedPolicies objclientInfo = new RenewedPolicies(); objclientInfo.PaymentRenewedFirstName = item.firstName; objclientInfo.PaymentRenewedLastName = item.lastName; objclientInfo.PaymentRenewedMobile = item.mobileTelNo; objclientInfo.PaymentRenewedHome = item.homeTelNo; objclientInfo.PaymentRenewedWork = item.workTelNo; objclientInfo.PaymentRenewedStarClassification = "4"; Renewedpolicies.Add(objclientInfo); } } objPaymentModel.ObjPaymentRenewedPoliciesPool = Renewedpolicies; return(objPaymentModel); }