Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for PATCH updates #5

Closed
aidan-casey opened this issue Aug 21, 2020 · 5 comments
Closed

Add support for PATCH updates #5

aidan-casey opened this issue Aug 21, 2020 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@aidan-casey
Copy link
Member

Patch updates would be a huge benefit to this library. Instead of having to send the entire contact back to Autotask, certain fields could be updated.

To do this we would probably have to implement some breaking changes. For example, it would be ideal if our API defaulted to using PATCH on the update() method and implemented a new replace() method which uses a PUT request.

The other problem we face is implementation of partial updates on a strongly typed entity. Partial updates would probably need to equate to a less strongly typed class.

@optmsp
Copy link

optmsp commented Jan 14, 2021

Is there an ETA on this feature? I agree, it would be great.

@aidan-casey
Copy link
Member Author

@optmsp - Still working out some details on how this will be implemented. Because of how strict we are with DTOs, it will require some sort of flexibility to send the patch request. I'm not really keen on creating a new type of DTO to do this.

I'd really like to get the next version shipped soon, but need to work out some of the details behind how that is engineered.

@optmsp
Copy link

optmsp commented Jan 20, 2021

@optmsp - Still working out some details on how this will be implemented. Because of how strict we are with DTOs, it will require some sort of flexibility to send the patch request. I'm not really keen on creating a new type of DTO to do this.

I'd really like to get the next version shipped soon, but need to work out some of the details behind how that is engineered.

Okay, thanks for the update. Is this a lot of work? I ask because I have a developer working on another project and we switched to this code and away from the OpenDNS Autotask library. We like this library but having a PATCH would be great, esp since it bypasses a lot of little issues when doing updates..

If it's "not a ton of work but not a priority" then we may be able to assist in the near future. If it's substantial work, then we may have to slowly work through it like you. :)

@aidan-casey
Copy link
Member Author

@optmsp - The biggest thing we need to decide now is whether or not we will continue supporting strictly typed entities as we have. This has caused some problems with the Autotask API since they have been very free with making changes to field names, etc.

Some other options we have are changing requests and responses to arrays or changing create, put, and patch requests to accepting arrays and returning DTOs. Any feedback on how your experience has been here would be appreciated. 👍🏼

@JasonEde
Copy link

We are needing this patch as we're having problems updating tickets for one of our clients and it appears it's to do with it thinking we're trying to change the company details, where we're not and just changing the status.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants