#lionel_unexpected

1 messages ยท Page 1 of 1 (latest)

grizzled kilnBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1247923933202612345

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

fossil summit
rare karma
#

I get this screenshot via the command line.
And if I use my following code

$prices = Price::all(['product' => $product->id, 'active' => true]);

      foreach ($prices->data as $price) {
        echo "  Price ID: " . $price->id . "\n";
        echo "  Billing Scheme: " . $price->billing_scheme . "\n";
        echo "  Recurring Interval: " . ($price->recurring ? $price->recurring->interval : 'N/A') . "\n";
        echo "  Unit Amount: " . ($price->unit_amount !== null ? $price->unit_amount : 'N/A') . "\n";

        if ($price->billing_scheme === 'tiered') {
          echo "  Tiers: \n";
          var_dump($price->tiers);

I get null for my var_dump... What am I missing?

#

You'll notice I do not use the same price ID that you used

fossil summit
rare karma
#

...ok, without your help I think I would have searched this for a while ๐Ÿ˜…
Thanks !

#

It seems to work, I can continue my investigations