XeroAPI / Xero-Java

Official Java client for use with Xero API
MIT License
78 stars 88 forks source link

Xero Api Bug - JAVA SDK: String ifModifiedSince #294

Closed fatihsevimtc closed 2 years ago

fatihsevimtc commented 3 years ago

SDK you're using (please complete the following information):

Describe the bug For PayrollAu Api, date/time filtering does not work in your java SDK but on your API Explorer. It produces variable-type mismatch errors.

In your source code, the type of variable is: "String ifModifiedSince"

but in ( HttpHeaders extends GenericData ) it is required as List as indicate here: "private List ifModifiedSince" and the variable name is colliding with google's variable name..if you change your variable name or make the type compatible with the one in HttpHeader, the issue will be resolved I guess..please advise if you need any further details or some screenshots, but your timely response will be highly appreciated.

Screenshot from 2021-07-13 14-29-20 Screenshot from 2021-07-13 14-30-09

rdemarco-xero commented 3 years ago

Hi @fatihperth, thanks for bringing this to our attention!

It appears the route cause stems back to our AU Payroll API spec not indicating the param format is date-time. We will get this change implemented in our next release.

Apologies for the inconvenience.

fatihsevimtc commented 3 years ago

Hi @rdemarco-xero, thanks for the response..now 2 quick questions:

  1. When is the new release going to be out? Because I need it ASAP.
  2. The ifModifiedSince is not available in your UK payroll api at all, there is one field called "filter" only? How can i filter based on ifModifiedSince? UK Payroll APi

Many Thanks Fatih

rdemarco-xero commented 2 years ago

Hi @fatihperth , version 4.13.0 has the fix for ifModifiedSince which is now a Java OffsetDateTime.

UK Payroll does not support this header param so the only solution currently would be to retrieve all the employees and then filter by UpdatedDateUTC in your own application.