#DC_Sam-python-search

1 messages · Page 1 of 1 (latest)

pulsar iris
#

Hey, can you share the code?

arctic canopy
#

Sure sorry:

        def list_products():
            query = f"active:'true' AND metadata['xxx']:'{xxx}'"
            logger.info(query)
            return stripe.Product.search(
                query=query,
            )
#

Pretty simple stuff really, and the initialization for the stripe client happens a bit earlier in the code

pulsar iris
#

Which version of stripe-python are you using?

arctic canopy
#

live environment is stripe==2.65.0, local is just latest

pulsar iris
#

Trying to invoke a method that doesn't exist on the Product object. Update and it'll work

arctic canopy
#

Uh okay of course! Had no idea we had such a gap in versions! I'll just migrate it then, thanks!