Пример #1
0
 public void Patch(string id, [FromBody] MergePatchOrderShipmentDto value)
 {
     try {
         OrderShipmentsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _orderShipmentApplicationService.When(value as IMergePatchOrderShipment);
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(MergePatchOrderShipmentDto c)
        {
            var idObj         = OrderShipmentProxyUtils.ToIdString((c as IMergePatchOrderShipment).OrderShipmentId);
            var uriParameters = new OrderShipmentUriParameters();

            uriParameters.Id = idObj;

            var req  = new OrderShipmentPatchRequest(uriParameters, (MergePatchOrderShipmentDto)c);
            var resp = await _ramlClient.OrderShipment.Patch(req);

            OrderShipmentProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(MergePatchOrderShipmentDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }