示例#1
0
 /// <summary>
 /// Gets a list of the customer's orders.
 /// </summary>
 /// <param name="customerId">The id of the customer to list orders for.</param>
 /// <param name="filter">Options for filtering the result.</param>
 /// <param name="cancellationToken">Cancellation Token</param>
 /// <remarks>
 /// Previously this was part of the OrderService, and was documented under the Orders API in Shopify.
 /// Shopify appears to have moved it to the Customers API.
 /// https://shopify.dev/docs/admin-api/rest/reference/customers/customer#orders-2020-01
 /// This list does not appear to be paginated.
 /// </remarks>
 public virtual async Task <IEnumerable <Order> > ListOrdersForCustomerAsync(long customerId, CustomerOrderListFilter filter = null, CancellationToken cancellationToken = default)
 {
     return(await ExecuteGetAsync <List <Order> >($"customers/{customerId}/orders.json", "orders", filter, cancellationToken));
 }
示例#2
0
 /// <summary>
 /// Gets a list of the customer's orders.
 /// </summary>
 /// <param name="customerId">The id of the customer to list orders for.</param>
 /// <param name="filter">Options for filtering the result.</param>
 /// <remarks>
 /// Previously this was part of the OrderService, and was documented under the Orders API in Shopify.
 /// Shopify appears to have moved it to the Customers API.
 /// https://shopify.dev/docs/admin-api/rest/reference/customers/customer#orders-2020-01
 /// This list does not appear to be paginated.
 /// </remarks>
 public virtual async Task <IEnumerable <Order> > ListOrdersForCustomerAsync(long customerId, CustomerOrderListFilter filter = null)
 {
     return(await ExecuteGetAsync <List <Order> >($"customers/{customerId}/orders.json", "orders", filter));
 }