Ejemplo n.º 1
0
        public async Task WhenAsync(MergePatchItemIssuanceMvoDto c)
        {
            var idObj         = ItemIssuanceMvoProxyUtils.ToIdString((c as IMergePatchItemIssuanceMvo).ShipmentItemIssuanceId);
            var uriParameters = new ItemIssuanceMvoUriParameters();

            uriParameters.Id = idObj;

            var req  = new ItemIssuanceMvoPatchRequest(uriParameters, (MergePatchItemIssuanceMvoDto)c);
            var resp = await _ramlClient.ItemIssuanceMvo.Patch(req);

            ItemIssuanceMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }
Ejemplo n.º 2
0
        public async Task <IItemIssuanceMvoEvent> GetStateEventAsync(ShipmentItemIssuanceId shipmentItemIssuanceId, long version)
        {
            var idObj         = ItemIssuanceMvoProxyUtils.ToIdString(shipmentItemIssuanceId);
            var uriParameters = new ItemIssuanceMvoStateEventUriParameters();

            uriParameters.Id      = idObj;
            uriParameters.Version = version.ToString();

            var req  = new ItemIssuanceMvoStateEventGetRequest(uriParameters);
            var resp = await _ramlClient.ItemIssuanceMvoStateEvent.Get(req);

            ItemIssuanceMvoProxyUtils.ThrowOnHttpResponseError(resp);
            return(resp.Content);
        }
Ejemplo n.º 3
0
        public async Task <IItemIssuanceMvoState> GetHistoryStateAsync(ShipmentItemIssuanceId shipmentItemIssuanceId, long version)
        {
            var idObj         = ItemIssuanceMvoProxyUtils.ToIdString(shipmentItemIssuanceId);
            var uriParameters = new ItemIssuanceMvoHistoryStateUriParameters();

            uriParameters.Id      = idObj;
            uriParameters.Version = version.ToString();

            var req  = new ItemIssuanceMvoHistoryStateGetRequest(uriParameters);
            var resp = await _ramlClient.ItemIssuanceMvoHistoryState.Get(req);

            ItemIssuanceMvoProxyUtils.ThrowOnHttpResponseError(resp);
            return((resp.Content == null) ? null : resp.Content.ToItemIssuanceMvoState());
        }
Ejemplo n.º 4
0
        public async Task <IItemIssuanceMvoState> GetAsync(ShipmentItemIssuanceId shipmentItemIssuanceId)
        {
            IItemIssuanceMvoState state = null;
            var idObj         = ItemIssuanceMvoProxyUtils.ToIdString(shipmentItemIssuanceId);
            var uriParameters = new ItemIssuanceMvoUriParameters();

            uriParameters.Id = idObj;

            var req = new ItemIssuanceMvoGetRequest(uriParameters);

            var resp = await _ramlClient.ItemIssuanceMvo.Get(req);

            ItemIssuanceMvoProxyUtils.ThrowOnHttpResponseError(resp);
            state = (resp.Content == null) ? null : resp.Content.ToItemIssuanceMvoState();
            return(state);
        }
Ejemplo n.º 5
0
        public async Task WhenAsync(DeleteItemIssuanceMvoDto c)
        {
            var idObj         = ItemIssuanceMvoProxyUtils.ToIdString((c as IDeleteItemIssuanceMvo).ShipmentItemIssuanceId);
            var uriParameters = new ItemIssuanceMvoUriParameters();

            uriParameters.Id = idObj;

            var q = new ItemIssuanceMvoDeleteQuery();

            q.CommandId   = c.CommandId;
            q.RequesterId = c.RequesterId;
            q.Version     = Convert.ToString(c.ShipmentVersion);

            var req = new ItemIssuanceMvoDeleteRequest(uriParameters);

            req.Query = q;

            var resp = await _ramlClient.ItemIssuanceMvo.Delete(req);

            ItemIssuanceMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }