Exemple #1
0
        public HttpResponseMessage PostShipmentState(Guid key, ShipmentStateRequestModel requestModel)
        {
            var createdShipmentState = _shipmentService.AddShipmentState(
                key, RetrieveShipmentStatus(requestModel.ShipmentStatus));

            if (!createdShipmentState.IsSuccess)
            {
                return(new HttpResponseMessage(HttpStatusCode.Conflict));
            }

            var response = Request.CreateResponse(HttpStatusCode.Created,
                                                  createdShipmentState.Entity.ToShipmentStateDto());

            return(response);
        }