Invoiced/invoiced-go

Saving existing customer object fails if they have read only fields (statement_pdf_url, created_at)

kbrackbill opened this issue · 1 comments

If a customer has a statement_pdf_url, calling customer.Save() fails with {"type":"invalid_request","message":"Mass assignment of statement_pdf_url on Customer is not allowed","param":""}

I looked at the java api client and it looks like there statement_pdf_url and created_at are not included in the json that's sent to the server when updating the customer.

Given that I'm able to work around the issue by assigning "" to statement_pdf_url and 0 to created_at since they are omitempty so that keeps them from being serialized, but it would be nice to have this work correctly by default.

Resolved in #18