Giter Club home page Giter Club logo

Comments (5)

stephangroen avatar stephangroen commented on July 19, 2024

The Moneybird API is designed to behave like this, so the client mirrors it: http://developer.moneybird.com/api/contacts/#delete_contacts_id

Deleting a contact returns a 200 OK status with the full object, where you might expected either a failure (in case of no removal) of a 204 response. I don't think we should change the client to behave differently. You could contact Moneybird and ask them about this design and their solution to detect removal. I think at this time you cannot without an extra call.

from moneybird-php-client.

EraYaN avatar EraYaN commented on July 19, 2024

I have, I'm awaiting their response. It just seems so wasteful. Besides there are quite some inconsistencies in the API anyway, so who knows.

from moneybird-php-client.

EraYaN avatar EraYaN commented on July 19, 2024

Verbatim:

<snip>
Bedankt voor je email. Het is nu inderdaad niet handig om te achterhalen of het verwijderen van een contact geslaagd is. Ik heb hiervoor zojuist de nodige wijzigingen gemaakt in onze API zodat we voortaan een 422 met foutmelding teruggeven als het verwijderen mislukt. Dit zal waarschijnlijk morgen live gaan.
<snip>

So a 422 response when the action fails.

from moneybird-php-client.

stephangroen avatar stephangroen commented on July 19, 2024

When we do #55 we will be able to check the ApiException on code 422.

from moneybird-php-client.

stephangroen avatar stephangroen commented on July 19, 2024

Seems already done by you in #54 :)

from moneybird-php-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.