Comments (19)
Hi Oxana,
I am looking at this right now on my fork.
from xeroizer.
If you update TrackingCategoryChildModel to use TrackingCategories as its xml_root_name, then this error no longer occurs, but the tracking categories are ignored.
This is due to the serialization defect as mentioned above. Xeroizer sends xml that looks like this (note the duplicate TrackingCategories
nodes):
<ExampleNodes>
<ExampleNode>
<TrackingCategories>
<TrackingCategories>
<TrackingCategory>
<Name>State</Name>
<Option>WA</Option>
</TrackingCategory>
</TrackingCategories>
</TrackingCategories>
</ExampleNode>
</ExampleNodes>
from xeroizer.
@waynerobinson, this commit and the one prior describe the defect.
Can you verify?
from xeroizer.
Hi Ben
Yup, will have a look at this today/tomorrow.
Wayne
On Tuesday, 21 February 2012 at 9:30 AM, Ben Biddington wrote:
@waynerobinson, these two commits show the defect.
Can you verify?
Reply to this email directly or view it on GitHub:
#30 (comment)
from xeroizer.
Actually I am wrong about the name of the node -- Tracking is perfectly acceptable. It is just the duplication that appears to cause the PostDataInvalidException
error.
[UPDATED]
Yep: totally wrong. The TrackingCategories node is only used by the TrackingCategories endpoint. The Tracking node is used whenever tracking is embedded within another resource.
from xeroizer.
That's what I thought to. I'm confused as to why this duplication is occurring so I need to do some testing.
On Tuesday, 21 February 2012 at 9:45 AM, Ben Biddington wrote:
Actually I am wrong about the name of the node -- Tracking is perfectly acceptable. It is just the duplication that appears to cause the
PostDataInvalidException
error.
Reply to this email directly or view it on GitHub:
#30 (comment)
from xeroizer.
from xeroizer.
Any clues?
from xeroizer.
Sorry, still haven't had a chance to look at this and will be away
this weekend… on a BOAT.
On 24/02/2012, at 8:55 AM, Ben Biddington
[email protected]
wrote:
Any clues?
Reply to this email directly or view it on GitHub:
#30 (comment)
from xeroizer.
Hey @waynerobinson, any progress?
from xeroizer.
I've been working on a few Xeroizer-related things in the past few days and
I'll get to this specific issue soon.
Cheers
Wayne
On Thursday, April 12, 2012, Ben Biddington wrote:
Hey @waynerobinson, any progress?
Reply to this email directly or view it on GitHub:
#30 (comment)
from xeroizer.
Sorry it took so long, but this has now been resolved in the lastest API release.
Cheers
Wayne
from xeroizer.
Nice one, thanks.
Although I am getting two unit test failures from d53af49:
Error: test: JournalLine should journal_line tracking specified correctly. (JournalLineTest)
NoMethodError: undefined method `add_tracking_category' for nil:NilClass
Error: test: LineItem should line_item tracking specified correctly. (LineItemTest)
NoMethodError: undefined method `add_tracking' for nil:NilClass
Any tips?
from xeroizer.
Not sure, I don't get these errors when I run the tests:
bundle exec rake test:unit
Is your bundle up-to-date?
from xeroizer.
Yep, also just tried bundle update
. Do you have this is in CI anywhere?
from xeroizer.
CI? Continuous Integration?
I don't have this library in a continuous integration test suite anywhere.
This tests fine on ruby 1.8.7, but I've found an error with these test cases on 1.9.2. Not sure what is causing them but will investigate.
from xeroizer.
Yep, I get the same behavior.
from xeroizer.
There was a ruby 1.9 inconsistency issue with code in the following format:
record = nil
records.each { |record| record = blah }
return record
In 1.8, the record value inside the block would be operating on the version of record outside the block, in 1.9, these variables are scoped locally to the block.
I have fixed the code where that was important, and I believe it is the only section that required that 1.8 feature.
from xeroizer.
Cheers, @waynerobinson
from xeroizer.
Related Issues (20)
- Question: Does Xeroizer support OAuth 2? HOT 2
- `.sent_to_contact` on Invoices is undefined HOT 3
- Update the readme/documentation to include Oauth2Application HOT 2
- Xero Deprecation Notice - OAuth 1.0a HOT 1
- Timeout option not set correctly on OAuth 2 client HOT 3
- invoice.save returns false but invoice.errors is empty HOT 15
- New gem release? HOT 6
- How to get all the Items from Xero account HOT 1
- NameError: uninitialized constant Xeroizer::OAuth2Application HOT 4
- Double raise for expired tokens? HOT 2
- GET ERROR WHE do any object.save HOT 2
- trying to run tests as a developer... HOT 5
- syntax error, unexpected ',' in branding_theme.rb HOT 1
- Line Amount can not explicity be set to 0.00 if there is a discount
- Missing require somewhere: "uninitialized constant ActiveSupport::XmlMini::IsolatedExecutionState" when used outside of Rails HOT 3
- AuthorizationUnsuccessful error HOT 2
- ApiExceptions result in parse error
- Saving Quotes
- BankAccount Model Not Available?
- How to revoke token / delete current_connection HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xeroizer.