amcintosh / freshbooks-java-sdk

FreshBooks API wrapper
MIT License
2 stars 2 forks source link

Support Credit Notes endpoint #2

Open amcintosh opened 3 years ago

amcintosh commented 3 years ago

See https://www.freshbooks.com/api/credits

raernon commented 3 years ago

I think the official documentation of this endpoint is so wretched, that I'am unable to resolve the discrepancies. For example: Get Single Client Note response gives back an array of CreditNotes?! {"response": {"result": {"credit_notes": [{...?! Or: Create Credit Note: there's no ANY consistency between the sample request and response :( Or: there is a "currency_code" field in the Create request, but it can't be found neither in create response, neither in response of get single credit note, netither in response of list credit notes. Or: What is the difference between the Credit Note and the Credit Line? The sample responses doesn't reflect the hierarchy between them. I've implemented the API after the sample responses, but they are not in consistency with the textual form of API and the tests are fail... I've tried to search for help in the nodejs implementation of Credit Notes, but as far as I can see, the credit notes are not implemented in nodejs either?! What's next?

amcintosh commented 3 years ago

I looked over the documentation and ya, it is a mess. Maybe this is one to leave for now.

If you are interested though, the nodejs implementation literally just added credit notes this morning: https://github.com/freshbooks/freshbooks-nodejs-sdk/pull/136