public async Task WhenAsync(MergePatchWarehouseDto c) { var idObj = (c as IMergePatchWarehouse).WarehouseId; var uriParameters = new WarehouseUriParameters(); uriParameters.Id = idObj; var req = new WarehousePatchRequest(uriParameters, (MergePatchWarehouseDto)c); var resp = await _ramlClient.Warehouse.Patch(req); WarehouseProxyUtils.ThrowOnHttpResponseError(resp); }
public async Task <IWarehouseState> GetAsync(string warehouseId) { IWarehouseState state = null; var idObj = warehouseId; var uriParameters = new WarehouseUriParameters(); uriParameters.Id = idObj; var req = new WarehouseGetRequest(uriParameters); var resp = await _ramlClient.Warehouse.Get(req); WarehouseProxyUtils.ThrowOnHttpResponseError(resp); state = (resp.Content == null) ? null : resp.Content.ToWarehouseState(); return(state); }
public async Task WhenAsync(DeleteWarehouseDto c) { var idObj = (c as IDeleteWarehouse).WarehouseId; var uriParameters = new WarehouseUriParameters(); uriParameters.Id = idObj; var q = new WarehouseDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.Version); var req = new WarehouseDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.Warehouse.Delete(req); WarehouseProxyUtils.ThrowOnHttpResponseError(resp); }