Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShopifyListFilterOptions does not properly filter to specific order ids. #17

Closed
nozzlegear opened this issue Nov 24, 2015 · 1 comment
Closed
Labels

Comments

@nozzlegear
Copy link
Owner

The ShopifyListFilterOptions class has broken (or been broken). When trying to count or list orders that are filtered to specific ids, ShopifyOrderService will send out a URL that looks like this:

https://my-shop.myshopify.com/admin/orders.json?Ids=System.Collections.Generic.List%601%5BSystem.Int64%5D&status=any&limit=250&page=1&fields=id%2Cnote

There are two problems here:

  1. Obviously, the list of ids isn't being serialized.
  2. The Ids parameter should be ids.
@nozzlegear nozzlegear added the bug label Nov 24, 2015
nozzlegear pushed a commit that referenced this issue Nov 25, 2015
@nozzlegear
Copy link
Owner Author

This bug was also affecting ShopifyProductService.ListAsync and ShopifyProductService.CountAsync. Fixed it by creating and overriding a Parameterizable.ToSingleParameter method for both ShopifyOrderFilterOptions and ShopifyProductFilterOptions that specifically looks for the Ids property and converts it to a querystring value when parameterizing.

I was hoping to instead use the property's Type.IsArray and leave .ToParameters generic without overrides, but Type.IsArray wouldn't reliably work on IEnumerable<T> — only on actual [] arrays.

nozzlegear pushed a commit that referenced this issue Dec 4, 2018
Merging nozzlegear/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant