#meteograms_api

1 messages ¡ Page 1 of 1 (latest)

onyx ventureBOT
#

👋 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/1501701819733250088

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

timid notch
#

What I am after is something like:

        const subscription = await stripe.subscriptions.retrieve('sub_1PRrRTq2YAfYkRHkIcPWRyQ1');
        const customerId = subscription.customer;
        const events = await stripe.billing.meterEvents.list({
            customer: customerId,
            limit: 10,
        });
        logger.info('events:', JSON.stringify(events.data));
#

But such a method doesn't seem to exist?

mystic sparrow
#

hello! yes i don't think that method exists

#

can you tell me more about your use case?

timid notch
#

I want to be able to drill down into a particular customer's recent usage. But in the dashboard, you can only go to the meter to see events from all customers, not filtered down to a specific customer/subcription. So I was looking to code something.

#

i.e. in the dashboard there is "view meter details", but that just gives recent events from all customers, not the customer I want to look at

mystic sparrow
#

seems like that's exactly what you're looking for

timid notch
#

OK thanks, I will check it out.

mystic sparrow
#

of course! lmk if you have any issues with it