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

Add support for the IncludeOnline parameter in Attachment saving #45

Merged
merged 2 commits into from
Jul 3, 2017

Conversation

davefinster
Copy link
Contributor

@davefinster davefinster commented Jul 3, 2017

There was no observed way to utilise the parameter IncludeOnline when saving an attachment to an invoice, nor any way for the existing Save method to collect a value for it. As such, I've added a parameter to the save function that defaults to false (including when undefined) which should maintain API compatibility. The Xero API defaults to false for this parameter, hence the part in putOrPost only sets it if true.

@jordanwalsh23
Copy link
Contributor

Thanks for this. Reviewing the changes now.

I think it's probably more appropriate to start an options object on the attachments rather than including the include variable directly.

I'll update as I need to change some tests anyway.

@jordanwalsh23
Copy link
Contributor

Merged in PR #46. Note i've changed the format to be an options object instead. Please check the docs for the correct formatting.

Thanks for the contribution.

@jordanwalsh23
Copy link
Contributor

[email protected]

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

Successfully merging this pull request may close these issues.

2 participants