- The
integration field of the model should be optional because it is missing in some responses.
- The
notifications field can also be a str type. This may to be a bug on Paystack side because contrary to their documentation, what they actually return is notification: "[]".
In the meantime I just inherited the model with these modifications and it works:
class AlternativePaymentRequestModel(PaymentRequest):
integration: int | Integration | None = None
notifications: list[PaymentRequestNotification] | str
integrationfield of the model should be optional because it is missing in some responses.notificationsfield can also be astrtype. This may to be a bug on Paystack side because contrary to their documentation, what they actually return isnotification: "[]".In the meantime I just inherited the model with these modifications and it works: