public async Task WhenAsync(MergePatchShipmentReceiptMvoDto c) { var idObj = ShipmentReceiptMvoProxyUtils.ToIdString((c as IMergePatchShipmentReceiptMvo).ShipmentReceiptId); var uriParameters = new ShipmentReceiptMvoUriParameters(); uriParameters.Id = idObj; var req = new ShipmentReceiptMvoPatchRequest(uriParameters, (MergePatchShipmentReceiptMvoDto)c); var resp = await _ramlClient.ShipmentReceiptMvo.Patch(req); ShipmentReceiptMvoProxyUtils.ThrowOnHttpResponseError(resp); }
public async Task <IShipmentReceiptMvoState> GetAsync(ShipmentReceiptId shipmentReceiptId) { IShipmentReceiptMvoState state = null; var idObj = ShipmentReceiptMvoProxyUtils.ToIdString(shipmentReceiptId); var uriParameters = new ShipmentReceiptMvoUriParameters(); uriParameters.Id = idObj; var req = new ShipmentReceiptMvoGetRequest(uriParameters); var resp = await _ramlClient.ShipmentReceiptMvo.Get(req); ShipmentReceiptMvoProxyUtils.ThrowOnHttpResponseError(resp); state = (resp.Content == null) ? null : resp.Content.ToShipmentReceiptMvoState(); return(state); }
public async Task WhenAsync(DeleteShipmentReceiptMvoDto c) { var idObj = ShipmentReceiptMvoProxyUtils.ToIdString((c as IDeleteShipmentReceiptMvo).ShipmentReceiptId); var uriParameters = new ShipmentReceiptMvoUriParameters(); uriParameters.Id = idObj; var q = new ShipmentReceiptMvoDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.ShipmentVersion); var req = new ShipmentReceiptMvoDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.ShipmentReceiptMvo.Delete(req); ShipmentReceiptMvoProxyUtils.ThrowOnHttpResponseError(resp); }