public ResponseModel CreateShipmentAWB(int orderID, string itemIDs) { HSOrderCaller hSOrderCaller = new HSOrderCaller(); ResponseModel objResponseModel = new ResponseModel(); ReturnShipmentDetails returnShipmentDetails = new ReturnShipmentDetails(); int statusCode = 0; string statusMessage = ""; try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); returnShipmentDetails = hSOrderCaller.InsertShipmentAWB(new HSOrderService(_connectionString), orderID, itemIDs, authenticate.TenantId, authenticate.UserMasterID, _ClientAPIUrl); statusCode = string.IsNullOrEmpty(returnShipmentDetails.ItemIDs) ? (int)EnumMaster.StatusCode.RecordNotFound : (int)EnumMaster.StatusCode.Success; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = returnShipmentDetails; } catch (Exception) { throw; } return(objResponseModel); }
public ResponseModel GetItemDetailByOrderID(int orderID) { HSOrderCaller hSOrderCaller = new HSOrderCaller(); ResponseModel objResponseModel = new ResponseModel(); OrdersItemDetails ordersItems = new OrdersItemDetails(); int statusCode = 0; string statusMessage = ""; try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); ordersItems = hSOrderCaller.GetItemDetailByOrderID(new HSOrderService(_connectionString), orderID, authenticate.TenantId, authenticate.UserMasterID); statusCode = ordersItems.OrdersItems.Count > 0 ? (int)EnumMaster.StatusCode.Success : (int)EnumMaster.StatusCode.RecordNotFound; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = ordersItems; } catch (Exception) { throw; } return(objResponseModel); }
public ResponseModel CheckCourierAvailibilty([FromBody] HSChkCourierAvailibilty hSChkCourierAvailibilty) { HSOrderCaller hSOrderCaller = new HSOrderCaller(); ResponseModel objResponseModel = new ResponseModel(); ResponseCourierAvailibilty responseCourierAvailibilty = new ResponseCourierAvailibilty(); int statusCode = 0; string statusMessage = ""; try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); responseCourierAvailibilty = hSOrderCaller.CheckPinCodeForCourierAvailibilty(new HSOrderService(_connectionString), hSChkCourierAvailibilty, authenticate.TenantId, authenticate.UserMasterID, _ClientAPIUrl); statusCode = responseCourierAvailibilty.StatusCode != "" ? (int)EnumMaster.StatusCode.Success : (int)EnumMaster.StatusCode.RecordNotFound; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = responseCourierAvailibilty; } catch (Exception) { throw; } return(objResponseModel); }
public ResponseModel GeneratePaymentLink([FromBody] SentPaymentLink objRequest) { int obj = 0; HSOrderCaller hSOrderCaller = new HSOrderCaller(); ResponseModel objResponseModel = new ResponseModel(); int statusCode = 0; string statusMessage = ""; try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); obj = hSOrderCaller.GeneratePaymentLink(new HSOrderService(_connectionString), objRequest, _ClientAPIUrlForGenerateToken, _ClientAPIUrlForGeneratePaymentLink, authenticate.TenantId, authenticate.UserMasterID, authenticate.ProgramCode); statusCode = obj == 0 ? (int)EnumMaster.StatusCode.RecordNotFound : (int)EnumMaster.StatusCode.Success; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = obj; } catch (Exception) { throw; } return(objResponseModel); }
public ResponseModel GetShoppingBagDetails(OrdersDataRequest ordersDataRequest) { ShoppingBagResponseDetails shoppingBagResponseDetails = new ShoppingBagResponseDetails(); HSOrderCaller storecampaigncaller = new HSOrderCaller(); ResponseModel objResponseModel = new ResponseModel(); int statusCode = 0; string statusMessage = ""; try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); shoppingBagResponseDetails = storecampaigncaller.GetShoppingBagDetails(new HSOrderService(_connectionString), authenticate.TenantId, authenticate.UserMasterID, ordersDataRequest); statusCode = shoppingBagResponseDetails.TotalShoppingBag.Equals(0) ? (int)EnumMaster.StatusCode.RecordNotFound : (int)EnumMaster.StatusCode.Success; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = shoppingBagResponseDetails; } catch (Exception) { throw; } return(objResponseModel); }
public ResponseModel UpdateModuleConfiguration([FromBody] ModuleConfiguration moduleConfiguration) { int UpdateCount = 0; HSOrderCaller hSOrderCaller = new HSOrderCaller(); ResponseModel objResponseModel = new ResponseModel(); int statusCode = 0; string statusMessage = ""; try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); UpdateCount = hSOrderCaller.UpdateModuleConfiguration(new HSOrderService(_connectionString), moduleConfiguration, authenticate.UserMasterID); statusCode = UpdateCount.Equals(0) ? (int)EnumMaster.StatusCode.RecordNotFound : (int)EnumMaster.StatusCode.Success; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = UpdateCount; } catch (Exception) { throw; } return(objResponseModel); }
public ResponseModel GetShipmentAssignedDetails(ShipmentAssignedFilterRequest shipmentAssignedFilter) { ShipmentAssignedDetails assignedDetails = new ShipmentAssignedDetails(); HSOrderCaller hSOrderCaller = new HSOrderCaller(); ResponseModel objResponseModel = new ResponseModel(); int statusCode = 0; string statusMessage = ""; try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); assignedDetails = hSOrderCaller.GetShipmentAssignedDetails(new HSOrderService(_connectionString), authenticate.TenantId, authenticate.UserMasterID, shipmentAssignedFilter); statusCode = assignedDetails.TotalCount == 0 ? (int)EnumMaster.StatusCode.RecordNotFound : (int)EnumMaster.StatusCode.Success; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = assignedDetails; } catch (Exception) { throw; } return(objResponseModel); }