Ha how did you know I was using the wrapper (thanks for making that, it’s
saved me a boat load of time!)?
And yes, exactly what you have just said is how I assume my code is working
as well (I didn’t actually get a chance to check).
I also couldn’t work out in the time I had where in the wrapper code the
modelled bills are transformed into Json. From past experience, and
depending on how you have done it, you can put DataAttributes over each
item that state what to do if no value if defined on a property ie don’t
transmit it at all!On 1 April 2015 at 23:14, Nic Wise nicw@fastchicken.co.nz wrote:
And here’s the json I’m sending:
to: /v2/bills
{“bill”:{“project”:“/v2/projects/135061”,“contact”:“/v2/contacts/1904514”,“category”:“/v2/categories/285”,“reference”:“Hdjd”,“dated_on”:“2015-04-02”,“due_on”:“2015-04-02”,“total_value”:22,“paid_value”:0,“due_value”:0,“second_sales_tax_rate”:0,“recurring”:“”,“status”:null,“rebill_type”:null,“rebill_factor”:0,“comments”:“”,“depreciation_schedule”:null,“attachment”:null,“updated_at”:“”,“created_at”:“”}}
(normally I have an attachment, but… its too big to show )
On 2 April 2015 at 10:55, Nic Wise nicw@fastchicken.co.nz wrote:
I’ve just had a look - and it also looks like Jon is using my .NET
wrapper
I’m not setting paid_value in mobileAgent, so I suspect that it’s coming
thru in the JSON like this:
paid_value: 0
rather than being omitted completely. And only on bills apparently?
On 2 April 2015 at 10:46, Nic Wise nicw@fastchicken.co.nz wrote:
If it’s any consolation (it’s not) I have the same issue with
MobileAgent. Been working for a LONG time, but now:
: {“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}
I’ll try to get the full json request out. This is something which I’ve
had 2 customers email me about in the past 24 hours.
On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:
Hi Jon,
I’m not aware of our code validations being changed. I can dig into
that, but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.
In the meantime, please provide us with a specific example of a request
where everything does seem valid and you’re still seeing an error. We’ll
then be able to tie that directly to a log and figure out precisely what’s
going on under the hood.
If you’re worried about posting this in public, you could follow-up on
the email you’ve sent to support@freeagent.com?
Thanks,
Dave
On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:
Dave,
It shouldn’t have anything to do with contacts and projects as I’m
testing it against many at my end and none of them work.
Surely the Paid_Value is part of the problem or is that a red herring?
Have you tightened up some code regarding updating bills and it’s tolerance
to this value being passed when obviously it shouldn’t be? As that is what
my code is doing.
Thanks
Jon
On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:
Hi Jon,
Reading through the logs, it looks like that error can be triggered
if you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a contact
and project, but the supplied project doesn’t actually belong to the
contact you’ve specified.
Could you check to see whether this is the case with your integration?
If not, would you be able to provide some specifics about the POST
request you’re sending to trigger that error, please?
Useful debugging information is listed here.
Redirecting to Google Groups
Thanks,
Dave J
On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:
For some reason this morning I am now receiving the following error.
[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]
I have made now changes to my code.
–
Jon Free
WasteSource
07931 925257 | 0117 205 0259
wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource
Loft 3, Tobacco Factory, Bristol, BS3 1TF
Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.
–
You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.
–
Jon Free
WasteSource
07931 925257 | 0117 205 0259
wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesource https://twitter.com/#!/WasteSource
Loft 3, Tobacco Factory, Bristol, BS3 1TF
Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.
–
You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.
–
David Jones
Senior Support Engineer
FreeAgent
–
You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.
–
Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/
–
Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/
–
Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/
–
You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.
Jon Free
WasteSource
07931 925257 | 0117 205 0259
wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @wastesource
https://twitter.com/#!/WasteSource
Loft 3, Tobacco Factory, Bristol, BS3 1TF
Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.