Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid type for variable 'due_date'. Required value type is date and passed type was NoneType at ['due_date'] #67

Open
felipecao opened this issue May 7, 2024 · 0 comments

Comments

@felipecao
Copy link

Hello, everyone! And thanks for the amazing work building this SDK!

While developing an integration with apideck in Python, I noticed an inconsistency between the SDK and the API when trying to create a Bill.

I've tried issuing a POST https://unify.apideck.com/accounting/bills without a due date and it works fine. Nevertheless, if I try to do the same via the SDK, I get an error message saying apideck.exceptions.ApiTypeError: Invalid type for variable 'due_date'. Required value type is date and passed type was NoneType at ['due_date'].

On top of that, if I take a look at the documentation available for due_date within bill.py, it says the following: due_date (date): The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD.. [optional] # noqa: E501

I must say I'm a bit confused, not knowing whether a due date is actually mandatory or not when creating a bill. Could you please clarify that?

I've put together a small demo project to reproduce the error: https://github.com/felipecao/apideck-due-date-error-demo

Thanks! Wishing y'all a great week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant