#barkofdelight
1 messages · Page 1 of 1 (latest)
Hello
Hmmm are you passing any parameters into your List request?
Do you have an example Product you see when you Search versus when you List?
Yeah I'll paste in an example here....
>>> len(stripe.Invoice.list( limit=100).data)
30
>>> len(stripe.Invoice.search(query='currency:"usd"', limit=100).data)
37
Similar things happen with Products and Prices
Instead of looking at the length can you grab a specific example I can look at?
Sure....but the return array is going to be huge, is that ok?
I just need one example of an Invoice or Product that shows up when you Search but doesn't show up when you List
Just the ID of the object
oh got it.
in_1NIblzCvz3BN9BltSvvYHRpo shows in the search set but not in the list set.
Okay I'm pretty sure this has to do with the fact that the initial Invoice involves a test clock but let me confirm
Though that wouldn't really make sense for Products actually....
I have one clue....
In the case of Products, when I use the CLI, there's an extra field which shows up, called user_hide_in_lists (this is from memory...)
Okay well for Invoices I just tested and indeed the List doesn't return Invoices with a test clock
It's user_hidden_in_lists that I see in the CLI. It doesn't appear in python.
Where do you see that exactly?
And do you have an example Product that you see from Searching but not Listing?
If I use the built-in CLI on the dashboard and query for Products.
Yes I can get you that...
>>> s2 = set([i.id for i in stripe.Product.list(active=False, limit=100).data])
>>> set.difference(s1, s2)
{'prod_OVjv6xE4RnOQfZ', 'prod_OfAj2ay982uJY9', 'prod_OVjxw9ersTKe2J', 'prod_OfAluFBbKvujYg', 'prod_OdxweRsOzSH22U', 'prod_OY7CAd5Y9uPqHI'}
Those products appear in a search but not a list.
prod_Nwa7BIoctvZ6kF
Hmm okay did you have Products imported into this account from somewhere?
Nope, they were all made through the dashboard interface.
Ah I see
They were created in-line
For one-off use via an Invoice Item
I'm surprised you can Search those...
So you think list is correct but search is not?
Okay yeah just chatted with a colleague briefly and they agree that we shouldn't be surfacing either of these cases via Search really
I'll be filing some feedback internally
But yeah, the List API is the reliable API here for Invoices or Products where they are relevant to be listed... Products that were created in-line for one-time use are expected to not be surfaced. Similary, it is expected that you wouldn't list out Invoices associated with a test clock as they would potentially have weird timing due to the nature of test clocks.
I suppose you could add an additional flag to search to include these weird cases, or add it to the query flag. (Like I mentioned, the CLI is revealing this extra field in the case of Products probably by accident.)