You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's probably because we switched from Jibx, which was unsupported and broken on Java 8, to JAXB which is much more widely used. Feel free to submit a pull request to this project or more likely the XeroAPI-Schemas project if you can figure out why that's happening and determine it shouldn't be. Unfortunately, I'm unlikely to have time to look at this myself.
I think I may have an idea why this does not work.
I can do either of the below and it has absolutely no effect on the created invoice.
invoice.getLineAmountTypes.add("Inclusive");
invoice.getLineAmountTypes().set(0,"Inclusive");
If your invoice default is "Exclusive" in Xero they will still be created that way (and this setting appears to be the API default also, regardless of what you set in Xero settings unfortunately).
Activity
benmccann commentedon Aug 4, 2015
The client library is generated from https://github.com/XeroAPI/XeroAPI-Schemas. Maybe they removed it?
jbroberg commentedon Aug 4, 2015
Looks like it is still there:
https://github.com/XeroAPI/XeroAPI-Schemas/blob/master/v2.00/Invoice.xsd
https://github.com/XeroAPI/XeroAPI-Schemas/search?utf8=%E2%9C%93&q=LineAmountTypes
benmccann commentedon Aug 4, 2015
Looks like it's still being generated, but slightly differently now. I see it in the latest version as
getLineAmountTypes()benmccann commentedon Aug 4, 2015
It's probably because we switched from Jibx, which was unsupported and broken on Java 8, to JAXB which is much more widely used. Feel free to submit a pull request to this project or more likely the XeroAPI-Schemas project if you can figure out why that's happening and determine it shouldn't be. Unfortunately, I'm unlikely to have time to look at this myself.
jbroberg commentedon Nov 19, 2015
I think I may have an idea why this does not work.
I can do either of the below and it has absolutely no effect on the created invoice.
invoice.getLineAmountTypes.add("Inclusive");
invoice.getLineAmountTypes().set(0,"Inclusive");
If your invoice default is "Exclusive" in Xero they will still be created that way (and this setting appears to be the API default also, regardless of what you set in Xero settings unfortunately).
It's not clear to me why lineAmountType is designated as a list in the schema (and as a result your code, which is generating based on the schema). It only set once per invoice for all line items. It's not a list in any schema example I have seen. I think this is a bug in the published schema:
https://github.com/XeroAPI/XeroAPI-Schemas/blob/20fd7ff2f81142269a18fc77ba908aeb975e9ebe/v2.00/BaseTypes.xsd#L150
If you agree I will go ahead and chase it up with the other project.
cheers
James