public async Task <CustomerOrderDetailResponse> GetCustomerOrderDetail(CustomerOrderDetailRequest request)
        {
            var customerOrderDetailResonse = new CustomerOrderDetailResponse();
            var customer = _customerDetailProvider.GetCustomer(request.User);

            if (request.CustomerId != customer.customerId)
            {
                return(null);
            }

            customerOrderDetailResonse.customer = customer;

            var orderDetail = await Task.Run(() => _customerOrderRepository.GetOrder(request.CustomerId));

            if (orderDetail != null)
            {
                orderDetail.deliveryAddress      = customer.houseNumber + "," + customer.street + "," + customer.town + "," + customer.postcode;
                orderDetail.orderDate            = DateTime.Parse(orderDetail.orderDate).ToString("dd-MMM-yyyy");
                orderDetail.deliveryExpected     = DateTime.Parse(orderDetail.deliveryExpected).ToString("dd-MMM-yyyy");
                customerOrderDetailResonse.order = orderDetail;
            }


            return(customerOrderDetailResonse);
        }
        public IActionResult GetCustomerOrderDetail(CustomerOrderDetailRequest request, [FromHeader] object obj)
        {
            //try {
            //    credentialValidator.CheckCredentials(this.Request.Headers);
            //}
            //catch (Exception ex) {
            //    Services.Create<ILog>().LogFormat("Unauthorized request.Exception:{0}", LogLevel.Warning, ex);
            //    return Unauthorized();
            //}

            CustomerOrderDetailResponse response = orderOperations.GetCustomerOrderDetails(request);

            if (response == null)
            {
                return(NotFound());
            }
            return(new JsonResult(response));
        }