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

fix(Invoice Ninja Node): Fix emailing and marking invoice as paid / sent #9589

Merged

Conversation

CodeShakingSheep
Copy link
Contributor

@CodeShakingSheep CodeShakingSheep commented Jun 2, 2024

Summary

This PR fixes the following 2 actions for InvoiceNinja API v5 which aren't working properly.

  • Emailing an invoice (from the "Create invoice" node)
  • Marking an invoice as paid

The background of this is that API v5 introduced query string parameters for these actions send_email and paid / amount_paid. See https://api-docs.invoicing.co/#post-/api/v1/invoices. Compared to that API v4 used differently named body params for these actions.

Additionally this PR adds mark_sent as query param to be able to mark an invoice as sent after creating it (which I personally need a lot). Also, I fixed a small typo in the description for emailing an quote.

At first, I was making these changes just having API v5 in mind before I realized that this node still needs to support API v4. So, afterwards I reverted the what I believed to be breaking changes and only extended the existing logic to make it compatible with API v5.

Related tickets and issues

None available. I just used the InvoiceNinja node and figured that marking an invoice as paid or sent isn't working and neither emailing an invoice (directly form the "Create invoice" node).

Review / Merge checklist

  • PR title and summary are descriptive
  • Tests included

@CodeShakingSheep CodeShakingSheep changed the title fix(Invoice Ninja node): Fix emailing and marking invoice as paid / sent fix(Invoice Ninja Node): Fix emailing and marking invoice as paid / sent Jun 2, 2024
@n8n-assistant n8n-assistant bot added community Authored by a community member node/improvement New feature or request in linear Issue or PR has been created in Linear for internal review labels Jun 2, 2024
Joffcom
Joffcom previously approved these changes Jul 1, 2024
Copy link
Member

@Joffcom Joffcom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, Thanks for this.

@netroy netroy merged commit 908ddd8 into n8n-io:master Jul 4, 2024
8 of 10 checks passed
@janober
Copy link
Member

janober commented Jul 10, 2024

Got released with n8n@1.50.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Authored by a community member in linear Issue or PR has been created in Linear for internal review node/improvement New feature or request Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants