#barkofdelight

1 messages · Page 1 of 1 (latest)

neon obsidianBOT
open sandal
#

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?

orchid gale
#

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

open sandal
#

Instead of looking at the length can you grab a specific example I can look at?

orchid gale
#

Sure....but the return array is going to be huge, is that ok?

open sandal
#

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

orchid gale
#

oh got it.

#

in_1NIblzCvz3BN9BltSvvYHRpo shows in the search set but not in the list set.

open sandal
#

Thanks looking

#

Can you also share one that appears in both actually?

orchid gale
#

Sure.

#

in_1NqLU0Cvz3BN9BltQUMbelaC

open sandal
#

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....

orchid gale
#

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...)

open sandal
#

Okay well for Invoices I just tested and indeed the List doesn't return Invoices with a test clock

orchid gale
#

It's user_hidden_in_lists that I see in the CLI. It doesn't appear in python.

open sandal
#

Where do you see that exactly?

#

And do you have an example Product that you see from Searching but not Listing?

orchid gale
#

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.

open sandal
#

Thanks looking

#

And one that does appear in both if you don't mind?

orchid gale
#

prod_Nwa7BIoctvZ6kF

open sandal
#

Hmm okay did you have Products imported into this account from somewhere?

orchid gale
#

Nope, they were all made through the dashboard interface.

open sandal
#

Ah I see

#

They were created in-line

#

For one-off use via an Invoice Item

#

I'm surprised you can Search those...

orchid gale
#

So you think list is correct but search is not?

open sandal
#

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.

orchid gale
#

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.)

open sandal
#

Yeah that's totally fair

#

I'll include it in my feedback

orchid gale
#

Thanks much for looking into this.

#

(BTW, it's also happening for Prices)

open sandal
#

Thanks for flagging

#

I'll certainly report this and hopefully we will get it fixed up rather quickly