#ChineseWeebster

1 messages · Page 1 of 1 (latest)

sturdy egretBOT
spare lichen
#

Hi there! What have you tried so far?

eager furnace
#

I've tried converting the response to a generic dict but got name 'default_price' is not defined

spare lichen
#

Creating the product should return a product object. Are you able to log the result of Product.create?

eager furnace
#

Yes

spare lichen
#

Okay, are you able to inspect the product object? Does it contain a value for default_price?

eager furnace
#

Yes, it shouldn't be null, but I haven't been using py for terribly long

spare lichen
#

I don't think you need to convert it to a dict. Are you storing the results of your create call into a variable? If so, you should then be able to use variable_name.default_price to access that ID

eager furnace
#

I'll try that one more time

spare lichen
#

I may not have the syntax correct though 🤔

eager furnace
#

what had me most confused was that only the ID appeared in dot notation previews as stripe_id, but hardly any other properties also do

#

Ok, yeah, that dot notation works, but I guess vs code is at fault for not scraping the rest of the properties 🤷‍♂️