#JohnTheFrog

1 messages ยท Page 1 of 1 (latest)

naive roseBOT
south python
#

Nevermind

terse forge
#

Hi there!

south python
#

I see now in docs that I need to expand it

#

strange, it was working before without doing it...

terse forge
#

I see now in docs that I need to expand it
Yes, that's correct!

south python
#
            $this->client->prices->retrieve('price_1Mw1jnGoLmBCnzj7w6UGdtDI', [
                'expand' => [ 'tiers' ]
            ])

It works now. No idea why I didn't have to do it this way before tho

terse forge
south python
#

How can I expand tiers when calling upcoming invoice endpoint?

#

This property cannot be expanded (tiers).

terse forge
#

Well the invoice doesn't contain a price directly. So you may need to use expand like this (not tested): lines.data.price.tiers

south python
#

Thanks ๐Ÿ™‚

#

It works now

terse forge
#

Happy to help ๐Ÿ™‚

south python
#

I actually had an update of the API to 2022-11-15 lately. I believe the autoexpand does not only touches the Charges but also prices at least when calling upcoming invoice endpoint