Closed phayes closed 1 year ago
Hi. I'm sorry for the extremely delayed response. Which period do you mean?
If it's the "#/components/schemas/period"
it's only used in one place so splitting it won't help. There are some other period
fields in the spec but they seem to be appropriately typed to be non-nullable.
Closing as inactive, feel free to reopen.
Hi @pakrym-stripe ,
My apologies for not responding. The problem is here: https://stripe.com/docs/api/usage_records/subscription_item_summary_list
The period
field in UsageRecordSummary can have a null end-date or null start-date.
Sorry, I think I'm missing something. Are you saying that UsageRecordSummary shouldn't have nullable period start and end?
Hi @pakrym-stripe ,
Digging into this further, it looks like the issue has been fixed since I opened this last year. Closing!
It would be nice if
period
was split up into two types, one might be calledperiod
and the the otherclosed_period
.This would allow us to differentiate between :
period
type.closed_period
. Many instances of the existing period type could be moved into this type.Right now, null-checking on periods is super annoying, even when I can reasonable assume those values will not be null. However, making assumptions is a bad idea, so this should be represented by concrete types that explicitly delineate when the period is definitely closed, and the start and end non-null.