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

Concerned about mistakes inside of Xero's Python SDK Documentation #118

Open
adrenaline681 opened this issue Jul 24, 2023 · 2 comments
Open

Comments

@adrenaline681
Copy link

Hello Xero API team,

I've been working with the Xero API recently and came across a couple of inconsistencies that I wanted to bring to your attention.

Issue 1: update_manual_journal Method

In the documentation, the update_manual_journal method requires a ManualJournals object as an argument, which itself requires an array of ManualJournal objects. However, the method's description states "Updates a specific manual journal".
This implies it should only be updating one journal at a time, which is inconsistent with the requirement for an array of journals.

Here's the code snippet from the documentation which errors out due to providing an array instead of a single journal:

manualJournals = ManualJournals(manual_journals = [manual_journal])
api_response = api_instance.update_manual_journal(xero_tenant_id, manual_journal_id, manualJournals)

Issue 2: update_or_create_manual_journals Method

The method name update_or_create_manual_journals suggests that it can handle multiple manual journals. However, the description states: "Updates or creates a single manual journal", and my testing confirms that it indeed only processes one journal at a time.

Not only that but similar to the 1st issue, the example in the documentation is wrong and errors out.

Here's the code snippet from the documentation:

manualJournals = ManualJournals(manual_journals = [manual_journal])
api_instance.update_or_create_manual_journals(xero_tenant_id, manualJournals, summarize_errors)

This can be misleading and confusing for developers. It would be great if you could clarify these inconsistencies or consider adjusting the method naming to better match the behavior described in the API documentation.

Thank you for your attention to these matters!

@github-actions
Copy link

PETOSS-321

@github-actions
Copy link

Thanks for raising an issue, a ticket has been created to track your request

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