question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ListOrdersForCustomerAsync - ListFilter<Customer> parameter

See original GitHub issue

Hi, v5.03 I’m trying to get all orders from a customer and I get 0 records, looking at the code, shouldn’t this function receive aListFilter<Order>instead of a ListFilter<Customer>?

public virtual async Task<IEnumerable<Order>> ListOrdersForCustomerAsync(long customerId, ListFilter<Customer> filter = null)
        {
            var req = PrepareRequest($"customers/{customerId}/orders.json");
            
            if (filter != null)
            {
                req.QueryParams.AddRange(filter.ToQueryParameters());
            }
            
            var response = await ExecuteRequestAsync<List<Order>>(req, HttpMethod.Get, rootElement: "orders");
            return response.Result;
        }

Thank you

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nozzlegearcommented, Mar 6, 2020

Published in 5.0.4, you should now be able to use a CustomerOrderListFilter to set the status. Note that this class does not have a Fields or Limit property because Shopify’s docs don’t indicate that the endpoint supports any of them.

0reactions
ernestogianonicommented, Mar 5, 2020

Great, thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found