#nukesforbreakfast_api

1 messages ¡ Page 1 of 1 (latest)

left magnetBOT
#

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

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

dawn foxBOT
velvet quarry
proven bane
#

List Invoice Items API doesn't support search by metadata or period. It only supports listing the invoice items by when it is created.

I'm afraid we don't have any API support searching invoice item by period or metadata.

#

Can you share what you're trying to do?

velvet quarry
#

yes

#

so I have a billing system I'm trying to port to stripe where we bill for false alarm activations. I want to tie each false alarm activation that should generate a fine to an invoice item. I was planning on doing that via metadata within the invoice item itself, so that I would not need a separate data storage to tie false alarm IDs to a invoice item.

However, due to the nature of the way the alarm ordinances are structured, a City deciding to waive an old alarm on appeal could cascade forward and change invoice items that came after the one that was waived. So I need a way to query the invoice items based on their period value, so I can find all the invoice items that come after a waived one in order to either delete them if the invoice is draft, or issue credit notes if the invoice is finalized.

#

I see the invoice itself has a search endpoint.

#

can a metadata value be an array, or can it only be a string?

proven bane
#

Thanks for sharing! Invoice Item doesn't have a search endpoint, only an Invoice does.

For your use case, the only way will be saving the metadata and period of an invoice item within your database and search within it.

can a metadata value be an array, or can it only be a string?
Metadata value should be a string

velvet quarry
#

damn alright, I will have to do something else in order to make it work. Either storing the pointers and information in my own DB or querying the Stripe API in some other fashion.

#

Thanks for confirming.