EasyPost / easypost-java

EasyPost Shipping API Client Library for Java
https://easypost.com/docs/api
MIT License
54 stars 37 forks source link

[Feat]: Disable Webhooks #247

Closed yasnmert closed 1 year ago

yasnmert commented 1 year ago

Feature Request Is New

Description of the feature

Wehbooks have the feature to disable it automatically, but we do not have a chance to manually disable it. Could you add the feature to disable webhooks?

nwithan8 commented 1 year ago

Hello, thanks for reaching out!

We've had some internal discussions about toggling webhooks from our client libraries before. We will take this under consideration now that we have a user requesting the feature.

We'll let you know of any updates!

yasnmert commented 1 year ago

The reason why we want this feature is actually we are wondering how it will behave after activating the webhook. When the webhooks are deleted, the events remain in the pending status and when a new webhook is created again, these events are not triggered and we have added special development to it.

But since we can't test its deactive state, we don't know its behavior. We estimate that events coming to a hook that is deactive will remain in the pending status. But when we reactivate the webhook, we don't know if the events that came while it was disabled will be triggered again. Could you give information about how the Behavior of the Events will be in this case?

Justintime50 commented 1 year ago

Hey @yasnmert, this is a great feature request. At the present, we are unable to add this to the client library here because it's not yet supported at the API level (our support team can enable/disable webhooks for you). We think it's a worthwhile thing to pursue and would love if you could submit a formal API feature request to our support team at support@easypost.com. They can help get this in front of the right people.

Events will only occur if a valid webhook is enabled meaning that if events are triggered during the time there are no webhooks, then events will not get delivered; however, event statuses will continue to update if there is actual movement on the Event in question. Once a webhook has been registered or re-enabled (support can disable/enable webhooks for you), then events will attempt to deliver to that webhook for any future status changes.

All this to say, if you'd like to test this behavior our support team is able to disable/enable on your behalf and could assist with this. A disabled webhook should not get events during the time it's disabled. Once re-enabled, future event statuses should attempt to deliver to that webhook.

I'm going to close this issue for now since it's not related to the client library. If we do build out the ability to enable/disable webhooks via our API, we'd love for you to reopen this in the future and we can get this added to our client libs so it's easy for you to use.

yasnmert commented 1 year ago

I truly appreciate your assistance. Thanks.