alifeinbinary / freshbooks-php-library

Automatically exported from code.google.com/p/freshbooks-php-library
0 stars 0 forks source link

_internalXMLContent() includes read-only fields in XML content #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use FreshBooks_Invoice::get() to get an existing invoice.
2. Call FreshBooks_Invoice::update() to update the invoice.

What is the expected output?
No errors will be returned by the FreshBooks site.

What do you see instead?
The FreshBooks server returns errors about the following fields:
 * amount
 * amount_outstanding
 * links
 * recurringId

This is because _internalXMLContent() in Invoice and BaseInvoice include
fields in the XML payload that are marked read-only in the FreshBooks API.
These fields should be excluded from what is sent to the server.

What version of the product are you using?
FreshBooks PHP 1.2

Original issue reported on code.google.com by Guy.Padd...@gmail.com on 17 Apr 2010 at 11:02

GoogleCodeExporter commented 8 years ago
I had the same problem while updating an invoice (only about the 
amount_outstanding and links though, not sure why). Thanks a lot for pointing 
out the issue, I was tired of figuring what that error was about...

Original comment by chenard....@gmail.com on 6 Jul 2010 at 8:50

GoogleCodeExporter commented 8 years ago

Original comment by xXBiohaz...@gmail.com on 14 Apr 2011 at 11:07