Is your feature request related to a problem? Please describe.
Whenever a StripeObject subclass has the deleted property, it's optional and can ever only be True:
deleted: Optional[Literal[True]]
"""
Always true for a deleted object
"""
This means that if I want to check if a customer was deleted for example, I need to use getattr(customer, "deleted", False) instead of simply customer.deleted (because that would raise an AttributeError).
Describe the solution you'd like
Now that StripeObject isn't simply a subclass of dict anymore, can't the SDK simplify these sort of booleans? Turn them from optional booleans that can only be True to real booleans?
Describe alternatives you've considered
No response
Additional context
No response
Is your feature request related to a problem? Please describe.
Whenever a
StripeObjectsubclass has thedeletedproperty, it's optional and can ever only beTrue:This means that if I want to check if a customer was deleted for example, I need to use
getattr(customer, "deleted", False)instead of simplycustomer.deleted(because that would raise anAttributeError).Describe the solution you'd like
Now that
StripeObjectisn't simply a subclass ofdictanymore, can't the SDK simplify these sort of booleans? Turn them from optional booleans that can only beTrueto real booleans?Describe alternatives you've considered
No response
Additional context
No response