Exemplo n.º 1
0
        public async Task WhenAsync(MergePatchOrderItemShipGroupAssociationMvoDto c)
        {
            var idObj         = OrderItemShipGroupAssociationMvoProxyUtils.ToIdString((c as IMergePatchOrderItemShipGroupAssociationMvo).OrderItemShipGroupAssociationId);
            var uriParameters = new OrderItemShipGroupAssociationMvoUriParameters();

            uriParameters.Id = idObj;

            var req  = new OrderItemShipGroupAssociationMvoPatchRequest(uriParameters, (MergePatchOrderItemShipGroupAssociationMvoDto)c);
            var resp = await _ramlClient.OrderItemShipGroupAssociationMvo.Patch(req);

            OrderItemShipGroupAssociationMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }
Exemplo n.º 2
0
        public async Task <IOrderItemShipGroupAssociationMvoState> GetHistoryStateAsync(OrderItemShipGroupAssociationId orderItemShipGroupAssociationId, long version)
        {
            var idObj         = OrderItemShipGroupAssociationMvoProxyUtils.ToIdString(orderItemShipGroupAssociationId);
            var uriParameters = new OrderItemShipGroupAssociationMvoHistoryStateUriParameters();

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

            var req  = new OrderItemShipGroupAssociationMvoHistoryStateGetRequest(uriParameters);
            var resp = await _ramlClient.OrderItemShipGroupAssociationMvoHistoryState.Get(req);

            OrderItemShipGroupAssociationMvoProxyUtils.ThrowOnHttpResponseError(resp);
            return((resp.Content == null) ? null : resp.Content.ToOrderItemShipGroupAssociationMvoState());
        }
Exemplo n.º 3
0
        public async Task <IOrderItemShipGroupAssociationMvoEvent> GetStateEventAsync(OrderItemShipGroupAssociationId orderItemShipGroupAssociationId, long version)
        {
            var idObj         = OrderItemShipGroupAssociationMvoProxyUtils.ToIdString(orderItemShipGroupAssociationId);
            var uriParameters = new OrderItemShipGroupAssociationMvoStateEventUriParameters();

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

            var req  = new OrderItemShipGroupAssociationMvoStateEventGetRequest(uriParameters);
            var resp = await _ramlClient.OrderItemShipGroupAssociationMvoStateEvent.Get(req);

            OrderItemShipGroupAssociationMvoProxyUtils.ThrowOnHttpResponseError(resp);
            return(resp.Content);
        }
Exemplo n.º 4
0
        public async Task <IOrderItemShipGroupAssociationMvoState> GetAsync(OrderItemShipGroupAssociationId orderItemShipGroupAssociationId)
        {
            IOrderItemShipGroupAssociationMvoState state = null;
            var idObj         = OrderItemShipGroupAssociationMvoProxyUtils.ToIdString(orderItemShipGroupAssociationId);
            var uriParameters = new OrderItemShipGroupAssociationMvoUriParameters();

            uriParameters.Id = idObj;

            var req = new OrderItemShipGroupAssociationMvoGetRequest(uriParameters);

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

            OrderItemShipGroupAssociationMvoProxyUtils.ThrowOnHttpResponseError(resp);
            state = (resp.Content == null) ? null : resp.Content.ToOrderItemShipGroupAssociationMvoState();
            return(state);
        }
Exemplo n.º 5
0
        public async Task <IEnumerable <IOrderItemShipGroupAssociationMvoState> > GetAsync(ICriterion filter, IList <string> orders = null, int firstResult = 0, int maxResults = int.MaxValue, IList <string> fields = null)
        {
            IEnumerable <IOrderItemShipGroupAssociationMvoState> states = null;
            var q = new OrderItemShipGroupAssociationMvosGetQuery();

            q.FirstResult = firstResult;
            q.MaxResults  = maxResults;
            q.Sort        = OrderItemShipGroupAssociationMvoProxyUtils.GetOrdersQueryValueString(orders);
            q.Fields      = OrderItemShipGroupAssociationMvoProxyUtils.GetReturnedFieldsQueryValueString(fields, QueryFieldValueSeparator);
            q.Filter      = OrderItemShipGroupAssociationMvoProxyUtils.GetFilterQueryValueString(filter);
            var req = new OrderItemShipGroupAssociationMvosGetRequest();

            req.Query = q;
            var resp = await _ramlClient.OrderItemShipGroupAssociationMvos.Get(req);

            OrderItemShipGroupAssociationMvoProxyUtils.ThrowOnHttpResponseError(resp);
            states = (resp.Content == null) ? null : resp.Content.Select(e => e.ToOrderItemShipGroupAssociationMvoState());
            return(states);
        }
Exemplo n.º 6
0
        public async Task WhenAsync(DeleteOrderItemShipGroupAssociationMvoDto c)
        {
            var idObj         = OrderItemShipGroupAssociationMvoProxyUtils.ToIdString((c as IDeleteOrderItemShipGroupAssociationMvo).OrderItemShipGroupAssociationId);
            var uriParameters = new OrderItemShipGroupAssociationMvoUriParameters();

            uriParameters.Id = idObj;

            var q = new OrderItemShipGroupAssociationMvoDeleteQuery();

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

            var req = new OrderItemShipGroupAssociationMvoDeleteRequest(uriParameters);

            req.Query = q;

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

            OrderItemShipGroupAssociationMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }
Exemplo n.º 7
0
        public async virtual Task <long> GetCountAsync(ICriterion filter)
        {
            var q = new OrderItemShipGroupAssociationMvosCountGetQuery();

            q.Filter = OrderItemShipGroupAssociationMvoProxyUtils.GetFilterQueryValueString(filter);
            var req = new OrderItemShipGroupAssociationMvosCountGetRequest();

            req.Query = q;
            var resp = await _ramlClient.OrderItemShipGroupAssociationMvosCount.Get(req);

            OrderItemShipGroupAssociationMvoProxyUtils.ThrowOnHttpResponseError(resp);
            string str = await resp.RawContent.ReadAsStringAsync();

            if (str.StartsWith("\""))
            {
                str = str.Substring(1);
            }
            if (str.EndsWith("\""))
            {
                str = str.Substring(0, str.Length - 1);
            }
            return(long.Parse(str));
        }