#meteograms_code

1 messages ¡ Page 1 of 1 (latest)

fervent impBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1400431722927099995

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

wintry sapphire
#

hi there!

agile heron
#

hi!

wintry sapphire
#

But now stripe.invoices.retrieveUpcoming() is no longer available, I am using stripe.invoices.createPreview().
yes, that makes sense

#

so you are saying that this expand [ 'lines.data.price.tiers' ] worked with retrieveUpcoming but not with createPreview?

agile heron
#

It doesn't complain about it in the call, but there seems to be no firstItem.price... only firstItem.pricing

#

If I understand correctly, the previous expand should act on what ends up in firstItem.price ... but that doesn't exist anymore in the returned data?

wintry sapphire
#

however expand only support expending 4 or 5 levels, so I don't think this would work.

agile heron
#

Nope, I get: You cannot expand more than 4 levels of a property. Property: lines.data.pricing.price_details.price.tiers

wintry sapphire
#

yes, that's what I thought. so it looks like you can't use expand in this case, and instead you'll need to make one extra API call to retrive the Price itself (with the tiers)