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); }
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)); }