From 7e6ad7d553c59eddd1037920e9fb0b6019eb07d9 Mon Sep 17 00:00:00 2001 From: Blag Date: Wed, 25 Oct 2023 11:37:57 -0400 Subject: [PATCH] rotateSecret should be POST rotateSecret is currently PUT, whereas it should be POST --- src/main/kotlin/com/nylas/resources/Webhooks.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/nylas/resources/Webhooks.kt b/src/main/kotlin/com/nylas/resources/Webhooks.kt index d77ac43a..5e6d1819 100644 --- a/src/main/kotlin/com/nylas/resources/Webhooks.kt +++ b/src/main/kotlin/com/nylas/resources/Webhooks.kt @@ -80,7 +80,7 @@ class Webhooks(client: NylasClient) : Resource(client, Webhook::class.j fun rotateSecret(webhookId: String): Response { val path = String.format("v3/webhooks/%s/rotate-secret", webhookId) val responseType = Types.newParameterizedType(Response::class.java, WebhookWithSecret::class.java) - return client.executePut(path, responseType) + return client.executePost(path, responseType) } /**