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 <IShipmentReceiptMvoEvent> GetStateEventAsync(ShipmentReceiptId shipmentReceiptId, long version) { var idObj = ShipmentReceiptMvoProxyUtils.ToIdString(shipmentReceiptId); var uriParameters = new ShipmentReceiptMvoStateEventUriParameters(); uriParameters.Id = idObj; uriParameters.Version = version.ToString(); var req = new ShipmentReceiptMvoStateEventGetRequest(uriParameters); var resp = await _ramlClient.ShipmentReceiptMvoStateEvent.Get(req); ShipmentReceiptMvoProxyUtils.ThrowOnHttpResponseError(resp); return(resp.Content); }
public async Task <IShipmentReceiptMvoState> GetHistoryStateAsync(ShipmentReceiptId shipmentReceiptId, long version) { var idObj = ShipmentReceiptMvoProxyUtils.ToIdString(shipmentReceiptId); var uriParameters = new ShipmentReceiptMvoHistoryStateUriParameters(); uriParameters.Id = idObj; uriParameters.Version = version.ToString(); var req = new ShipmentReceiptMvoHistoryStateGetRequest(uriParameters); var resp = await _ramlClient.ShipmentReceiptMvoHistoryState.Get(req); ShipmentReceiptMvoProxyUtils.ThrowOnHttpResponseError(resp); return((resp.Content == null) ? null : resp.Content.ToShipmentReceiptMvoState()); }
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); }