#Eranga
1 messages · Page 1 of 1 (latest)
In which scenarios, status could be null
Also the Status type has 6 values
But in the Stripe documentation it only has 5 https://stripe.com/docs/invoicing/overview#invoice-statuses
Could you help me figure out this?
I think the Doc is correct and TypeScript might be mis-configured
How about deleted status?
Did you mean that it will never be null and it will not have deleted status?
I am not sure myself and looking into it. My understanding is we don't have a deleted status for Invoice regardless of any server/client language
Cool, I read somewhere that draft invoices could be deleted. So maybe deleted status could be coming from that
I'll wait for your answer 👼
Yes it's this section https://stripe.com/docs/invoicing/overview#deleted but I can't find it
Cool, I'll delete a draft invoice and see.
For the null issue, shouldn't the typescript file be generated from the actual SDK code?
Can you tell me which file are you looking at, inside the Node JS SDK?
For now I am only looking at the types. So
https://github.com/stripe/stripe-node/blob/master/types/2022-08-01/Invoices.d.ts#L862
Another weird thing is that, I see the delete button for draft invoices only for some
Thanks! I found that Invoice which doesn't belong to Subscription can be deleted as the Doc says. But its Id should disappear, not moving it to an deleted status at all
It's standalone Invoice vs Subscription Invoice
Cool, what you meant is once deleted, it will be deleted forever, right?
So there is no deleted status at all
I believe so. Probably the TypeScript SDK is not up-to-date
Cool, thank you @smoky plover for your help.
I was going to create an issue, but looks like someone beat me to it
The API docs do not indicate that it should be possible for an invoice to have a null status, but the typings indicate that this is possibe: https://stripe.com/docs/api/invoices/object#invoice_obje...
But the Golang SDK also has deleted status
I'll add an issue for that