public IHttpActionResult RetrieveServiceRequest([FromUri] string srReferenceNo) { JioRetrieveServiceResponse jioRetrieveServiceResponse = default(JioRetrieveServiceResponse); jioRetrieveServiceResponse = JioFactorySingleton.Instance.JioServiceFacade.RetrieveServiceRequest(srReferenceNo); if (jioRetrieveServiceResponse == null) { return(NotFound()); } return(Ok <JioRetrieveServiceResponse>(jioRetrieveServiceResponse)); }
public JioRetrieveServiceResponse RetrieveServiceRequest(string srReferenceNo) { var clientRequest = new CustomerProblemManagement.retrieveCustomerProblemRequest(); clientRequest.customerProblem = new CustomerProblemManagement.CustomerProblem() { referenceNumber = srReferenceNo }; var client = new CustomerProblemManagement.CustomerProblemManagementV2dot7Client(); var retrieveProblem = client.retrieveCustomerProblem(clientRequest); JioRetrieveServiceResponse response = default(JioRetrieveServiceResponse); if (retrieveProblem != null && retrieveProblem.customerProblem != null) { response = new JioRetrieveServiceResponse() { PartyId = retrieveProblem.customerProblem.Customer != null ? retrieveProblem.customerProblem.Customer.partyId : string.Empty, Status = retrieveProblem.customerProblem.statusDescription, ResolutionDate = retrieveProblem.customerProblem.TroubleTicket != null ? retrieveProblem.customerProblem.TroubleTicket.serviceRestoredDate : (DateTime?)null }; } return(response); }