Invoice.id is shouldn't be optional
See original GitHub issueDescribe the bug
According to https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-id, invoice.id
should be required.
As I am upgrading to v10.0.0, it looks like it was made optional
To Reproduce
Perform any operation on an invoice and get an incorrectly typed object as the response.
Expected behavior
This should be a required property so I don’t have to litter my code with unnecessary run-time undefined checks.
Code snippets
No response
OS
macOS
Node version
All Node Version
Library version
stripe-node v10.0.0
API version
2022-08-01
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:7 (2 by maintainers)
Top Results From Across the Web
What Is An Invoice Number And How To Generate It - Deskera
In this format, the invoice ID begins with the customer number, followed by the date (again, optional), and ends with the sequence number....
Read more >Invoice number - What is an invoice number? | SumUp Invoices
Invoice numbers are a mandatory invoice field. They should be assigned sequentially, meaning that the number of each new invoice increases.
Read more >Validation Rules for Invoice Files - WWAWiki
Payor reference should not be blank but can be optional if Invoice type in 'M'(Miscellaneous). Addition validation for BLUEANCHOR. Validate CustomerOffice if ...
Read more >How to Assign Invoice Numbers? - Indy
An invoice number is assigned to each invoice you send to clients to make it easy to track. It is typically a unique...
Read more >Solved: Duplicate Invoice numbers - QuickBooks - Intuit
Currently, there isn't an option in place to warn if duplicate customer invoice number is used with the popup message window in QBO...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’re working on the issue with the product team. Apologies for the delay. The resource represents both Invoice and UpcomingInvoice, where the ID is optional. That’s why it was made optional and the fix is not as easy as reverting the change.
Any update on this issue ? The type is still optional for v11.1.0 : https://github.com/stripe/stripe-node/blob/v11.1.0/types/2022-11-15/Invoices.d.ts#L43