Esempio n. 1
0
        public async Task <ParentOrder[]> GetParentOrders(string productCode,
                                                          int?count = null, int?before = null, int?after = null,
                                                          ParentOrderState parentOrderState   = ParentOrderState.Active,
                                                          CancellationToken cancellationToken = default(CancellationToken))
        {
            var query = new Dictionary <string, object>
            {
                { "product_code", productCode },
                { "parent_order_state", parentOrderState.GetEnumMemberValue() }
            };

            if (count != null)
            {
                query["count"] = count.Value;
            }
            if (before != null)
            {
                query["before"] = before.Value;
            }
            if (after != null)
            {
                query["after"] = after.Value;
            }

            return(await Get <ParentOrder[]>(GetParentOrdersApiPath, query, cancellationToken : cancellationToken).ConfigureAwait(false));
        }
Esempio n. 2
0
        public async Task <ParentOrder[]> GetParentOrders(ProductCode productCode,
                                                          int?count = null, int?before = null, int?after = null,
                                                          ParentOrderState parentOrderState = ParentOrderState.Active)
        {
            var query = new Dictionary <string, object>
            {
                { "product_code", productCode.GetEnumMemberValue() },
                { "parent_order_state", parentOrderState.GetEnumMemberValue() }
            };

            if (count != null)
            {
                query["count"] = count.Value;
            }
            if (before != null)
            {
                query["before"] = before.Value;
            }
            if (after != null)
            {
                query["after"] = after.Value;
            }

            return(await Get <ParentOrder[]>(GetParentOrdersApiPath, query));
        }