public string Post([FromBody] SetInventoryShipmentOrderParameters data) { if (!ModelState.IsValid) { throw new HttpResponseException(HttpStatusCode.BadRequest); } var param = data.Map().To <SetOrderParameters>(); _userIdentityProvider.SetUserIdentity(param); var result = _warehouseOrderService.CreateWarehouseOrder(param); result.EnsureSuccessWithHttpResponseException(HttpVerbs.Post); return(result.ResultingObject); }
public void Put(string id, [FromBody] SetInventoryShipmentOrderParameters data) { if (!ModelState.IsValid) { throw new HttpResponseException(HttpStatusCode.BadRequest); } var param = data.Map().To <UpdateInterWarehouseOrderParameters>(); _userIdentityProvider.SetUserIdentity(param); param.InventoryShipmentOrderKey = id; param.SetShipmentInformation.InventoryShipmentOrderKey = id; var result = _warehouseOrderService.UpdateInterWarehouseOrder(param); result.EnsureSuccessWithHttpResponseException(HttpVerbs.Put); }