public void Patch(string id, [FromBody] MergePatchShipmentMethodTypeDto value) { try { ShipmentMethodTypesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _shipmentMethodTypeApplicationService.When(value as IMergePatchShipmentMethodType); } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(MergePatchShipmentMethodTypeDto c) { var idObj = (c as IMergePatchShipmentMethodType).ShipmentMethodTypeId; var uriParameters = new ShipmentMethodTypeUriParameters(); uriParameters.Id = idObj; var req = new ShipmentMethodTypePatchRequest(uriParameters, (MergePatchShipmentMethodTypeDto)c); var resp = await _ramlClient.ShipmentMethodType.Patch(req); ShipmentMethodTypeProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(MergePatchShipmentMethodTypeDto c) { WhenAsync(c).GetAwaiter().GetResult(); }