diff --git a/src/main/kotlin/com/nylas/models/CreateWebhookRequest.kt b/src/main/kotlin/com/nylas/models/CreateWebhookRequest.kt index 3e4c7b8c..943da6dc 100644 --- a/src/main/kotlin/com/nylas/models/CreateWebhookRequest.kt +++ b/src/main/kotlin/com/nylas/models/CreateWebhookRequest.kt @@ -14,8 +14,8 @@ data class CreateWebhookRequest( /** * The url to send webhooks to. */ - @Json(name = "callback_url") - val callbackUrl: String, + @Json(name = "webhook_url") + val webhookUrl: String, /** * A human-readable description of the webhook destination. */ @@ -30,11 +30,11 @@ data class CreateWebhookRequest( /** * A builder for creating a [CreateWebhookRequest]. * @param triggerTypes Select the event that triggers the webhook. - * @param callbackUrl The url to send webhooks to. + * @param webhookUrl The url to send webhooks to. */ data class Builder( private val triggerTypes: List, - private val callbackUrl: String, + private val webhookUrl: String, ) { private var description: String? = null private var notificationEmailAddress: String? = null @@ -57,6 +57,6 @@ data class CreateWebhookRequest( * Build the [CreateWebhookRequest]. * @return The created [CreateWebhookRequest]. */ - fun build() = CreateWebhookRequest(triggerTypes, callbackUrl, description, notificationEmailAddress) + fun build() = CreateWebhookRequest(triggerTypes, webhookUrl, description, notificationEmailAddress) } } diff --git a/src/main/kotlin/com/nylas/models/UpdateWebhookRequest.kt b/src/main/kotlin/com/nylas/models/UpdateWebhookRequest.kt index 2464230b..3b72d0af 100644 --- a/src/main/kotlin/com/nylas/models/UpdateWebhookRequest.kt +++ b/src/main/kotlin/com/nylas/models/UpdateWebhookRequest.kt @@ -14,8 +14,8 @@ data class UpdateWebhookRequest( /** * The url to send webhooks to. */ - @Json(name = "callback_url") - val callbackUrl: String? = null, + @Json(name = "webhook_url") + val webhookUrl: String? = null, /** * A human-readable description of the webhook destination. */ @@ -32,7 +32,7 @@ data class UpdateWebhookRequest( */ class Builder { private var triggerTypes: List? = null - private var callbackUrl: String? = null + private var webhookUrl: String? = null private var description: String? = null private var notificationEmailAddress: String? = null @@ -45,10 +45,10 @@ data class UpdateWebhookRequest( /** * Set the url to send webhooks to. - * @param callbackUrl The url to send webhooks to. + * @param webhookUrl The url to send webhooks to. * @return The builder. */ - fun callbackUrl(callbackUrl: String?) = apply { this.callbackUrl = callbackUrl } + fun webhookUrl(webhookUrl: String?) = apply { this.webhookUrl = webhookUrl } /** * Set a human-readable description of the webhook destination. @@ -68,6 +68,6 @@ data class UpdateWebhookRequest( * Build the [UpdateWebhookRequest]. * @return The created [UpdateWebhookRequest]. */ - fun build() = UpdateWebhookRequest(triggerTypes, callbackUrl, description, notificationEmailAddress) + fun build() = UpdateWebhookRequest(triggerTypes, webhookUrl, description, notificationEmailAddress) } } diff --git a/src/main/kotlin/com/nylas/models/Webhook.kt b/src/main/kotlin/com/nylas/models/Webhook.kt index 3d47c722..7371edcb 100644 --- a/src/main/kotlin/com/nylas/models/Webhook.kt +++ b/src/main/kotlin/com/nylas/models/Webhook.kt @@ -14,8 +14,8 @@ data class Webhook( /** * The url to send webhooks to. */ - @Json(name = "callback_url") - val callbackUrl: String, + @Json(name = "webhook_url") + val webhookUrl: String, /** * Select the event that triggers the webhook. */ diff --git a/src/main/kotlin/com/nylas/models/WebhookWithSecret.kt b/src/main/kotlin/com/nylas/models/WebhookWithSecret.kt index 3b7a3260..a94402cb 100644 --- a/src/main/kotlin/com/nylas/models/WebhookWithSecret.kt +++ b/src/main/kotlin/com/nylas/models/WebhookWithSecret.kt @@ -14,8 +14,8 @@ data class WebhookWithSecret( /** * The url to send webhooks to. */ - @Json(name = "callback_url") - val callbackUrl: String, + @Json(name = "webhook_url") + val webhookUrl: String, /** * A secret value used to encode the X-Nylas-Signature header on webhook requests. */