Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.

Conversation

@ghost
Copy link

@ghost ghost commented Sep 12, 2019

The payment date of the batch payment should be passed as a string in the format yyyy-MM-dd according to the Xero API docs page however as it was being parsed as a date, it was subject to the timezone difference between the API user and Xero, so if you parsed a date object without a timepart, you could end up with yesterday's date being set for the payment date.

See https://developer.xero.com/documentation/api/batch-payments#PUT

Example request and response where using the current version published on nuget, sets the date incorrectly.

batch payment request.xml.txt
response.json.txt

The payment date of the batch payment should be passed as a string in the format yyyy-MM-dd according to the Xero API docs page however as it was being parsed as a date, it was subject to the timezone difference between the API user and Xero, so if you parsed a date object without a timepart, you could end up with yesterday's date being set for the payment date.

See https://developer.xero.com/documentation/api/batch-payments#PUT
@MJMortimer
Copy link
Contributor

Thanks for this @LukeKirbyDG, props on including some tests

@MJMortimer MJMortimer merged commit 89ac0c3 into XeroAPI:master Apr 27, 2020
@ghost ghost deleted the bugfix-batchpayments branch April 29, 2020 14:51
@ghost ghost restored the bugfix-batchpayments branch April 29, 2020 14:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant