Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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());
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }