public IActionResult Transactional_TrainFare_Enquiry([FromBody] TransactionalTrainFareRequest Request) //parameter will be as like /N
        {
            object        response = "";
            ErrorResponse error    = new ErrorResponse();

            if (!ModelState.IsValid || string.IsNullOrEmpty(Request.trainNo) || string.IsNullOrEmpty(Request.journyDate) || string.IsNullOrEmpty(Request.trainFrom) || string.IsNullOrEmpty(Request.trainTo) || string.IsNullOrEmpty(Request.trainClass) || string.IsNullOrEmpty(Request.quota))
            {
                return(Ok(new Application_ResponseWrapper()
                {
                    ResponseCode = "1000", ResponseMessage = "Invalid model", Status = "failed", ResponseResult = ""
                }));
            }
            if (string.IsNullOrEmpty(_irctcUrl) || string.IsNullOrEmpty(_irctc_userName) || string.IsNullOrEmpty(_irctc_password))
            {
                return(Ok(new Application_ResponseWrapper()
                {
                    ResponseCode = "1001", ResponseMessage = "No IRCTC configuration found", Status = "failed"
                }));
            }
            _irctcUrl = _irctcUrl + "taenqservices/avlFareenquiry/" + Request.trainNo + "/" + Request.journyDate + "/" + Request.trainFrom + "/" + Request.trainTo + "/" + Request.trainClass + "/" + Request.quota + "/Y";
            try
            {
                CommunicationLog("OxiRail", "availablePayFareenquiry OUT->>" + JsonConvert.SerializeObject(Request).ToString(), Request.userSession);
                switch (Convert.ToInt32(Request.request.enquiryType))
                {
                case 1:
                {
                    FareEnquiry_Response_Type1 Response = new FareEnquiry_Response_Type1();
                    response = _booking.FindTransactionalFareEnquiry(_irctcUrl, Request.request, Request.userSession, _authInfo);
                    Response = (FareEnquiry_Response_Type1)JsonConvert.DeserializeObject(response.ToString(), typeof(FareEnquiry_Response_Type1));
                    if (Response.bkgCfg != null)
                    {
                        error.Dispose();

                        CommunicationLog("OxiRail", "availablePayFareenquiry IN->>" + JsonConvert.SerializeObject(Response).ToString(), Request.userSession);
                        return(Ok(new Application_ResponseWrapper()
                            {
                                ResponseCode = "0", ResponseMessage = "success", Status = "success", ResponseResult = Response
                            }));
                    }
                    else
                    {
                        error = (ErrorResponse)JsonConvert.DeserializeObject(response.ToString(), typeof(ErrorResponse));
                        CommunicationLog("OxiRail", "availableFareenquiry IN->>" + JsonConvert.SerializeObject(error).ToString(), Request.userSession);
                        return(Ok(new Application_ResponseWrapper()
                            {
                                ResponseCode = "1000", ResponseMessage = error.errorMessage, Status = "Error", ResponseResult = ""
                            }));
                    }
                }

                case 2:
                {
                    FareEnquiry_Response_Type2 Response = new FareEnquiry_Response_Type2();
                    response = _booking.FindFareEnquiry(_irctcUrl, Request.request, Request.userSession, _authInfo);
                    Response = (FareEnquiry_Response_Type2)JsonConvert.DeserializeObject(response.ToString(), typeof(FareEnquiry_Response_Type2));
                    if (Response.bkgCfg != null)
                    {
                        error.Dispose();
                        CommunicationLog("OxiRail", "availablePayFareenquiry IN->>" + JsonConvert.SerializeObject(Response).ToString(), Request.userSession);
                        return(Ok(new Application_ResponseWrapper()
                            {
                                ResponseCode = "0", ResponseMessage = "success", Status = "success", ResponseResult = Response
                            }));
                    }
                    else
                    {
                        error = (ErrorResponse)JsonConvert.DeserializeObject(response.ToString(), typeof(ErrorResponse));
                        CommunicationLog("OxiRail", "availableFareenquiry IN->>" + JsonConvert.SerializeObject(error).ToString(), Request.userSession);
                        return(Ok(new Application_ResponseWrapper()
                            {
                                ResponseCode = "1000", ResponseMessage = error.errorMessage, Status = "Error", ResponseResult = ""
                            }));
                    }
                }

                default:
                {
                    long orderId = 0;
                    FareEnquiry_Response_Type3 Response = new FareEnquiry_Response_Type3();
                    response = _booking.FindFareEnquiry(_irctcUrl, Request.request, Request.userSession, _authInfo);
                    Response = (FareEnquiry_Response_Type3)JsonConvert.DeserializeObject(response.ToString(), typeof(FareEnquiry_Response_Type3));
                    if (Response.bkgCfg != null)
                    {
                        error.Dispose();
                        if (Request.payment_Flag == "1")
                        {
                            var myObject = (passengerList)JsonConvert.DeserializeObject(Request.request.passengerList.ToString(), typeof(passengerList));
                            if (myObject == null)
                            {
                                passengerList[] psngerArray = (passengerList[])Request.request.passengerList;
                                passengerList   p           = psngerArray[0];
                                orderId = Order(p, Response, Request, psngerArray);
                            }
                            else
                            {
                                orderId = Order(myObject, Response, Request, null);
                            }
                        }
                        CommunicationLog("OxiRail", "availablePayFareenquiry IN->>" + JsonConvert.SerializeObject(Response).ToString(), Request.userSession);
                        return(Ok(new Application_ResponseWrapper()
                            {
                                ResponseCode = "0", ResponseMessage = "success with OrderId:(" + orderId + ")", Status = "success", ResponseResult = Response
                            }));
                    }
                    else
                    {
                        error = (ErrorResponse)JsonConvert.DeserializeObject(response.ToString(), typeof(ErrorResponse));
                        CommunicationLog("OxiRail", "availableFareenquiry IN->>" + JsonConvert.SerializeObject(error).ToString(), Request.userSession);
                        return(Ok(new Application_ResponseWrapper()
                            {
                                ResponseCode = "1000", ResponseMessage = error.errorMessage, Status = "Error", ResponseResult = ""
                            }));
                    }
                }
                }
            }
            catch (Exception e)
            {
                error.Dispose();
                CommunicationLog("OxiRail", "availablePayFareenquiry IN->>" + e.ToString(), Request.userSession);
                return(Ok(new Application_ResponseWrapper()
                {
                    ResponseCode = "1000", ResponseMessage = "Api_Error  or IRCTC Service Down", Status = "Error", ResponseResult = e
                }));
            }
        }