Ejemplo n.º 1
0
        public PaymentProposalSummaryAPIRequest MappingToRenewalClientServiceObject(PaymentServiceModel objPaymentModel)
        {
            PaymentProposalSummaryAPIRequest objObject = new PaymentProposalSummaryAPIRequest();

            objObject.agentCode   = "AGE000000004121";
            objObject.companyCode = "00003";
            //objObject.fromDate = "01-01-2014";
            //objObject.toDate = "31-12-2015";
            //objObject.fromDate = Convert.ToString(DateTime.Now.AddMonths(-10).Date);
            //objObject.toDate =Convert.ToString(DateTime.Now.Date);
            objObject.renewalFlag = "RENEWED";
            return(objObject);
        }
Ejemplo n.º 2
0
        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);
        }