From 82baa1f8c953c787fb441077dc770fea78978077 Mon Sep 17 00:00:00 2001 From: Mostafa Rashed <17770919+mrashed-dev@users.noreply.github.com> Date: Mon, 18 Dec 2023 16:22:53 -0500 Subject: [PATCH] lint --- src/main/kotlin/com/nylas/models/SendRsvpQueryParams.kt | 2 +- src/main/kotlin/com/nylas/resources/Events.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/nylas/models/SendRsvpQueryParams.kt b/src/main/kotlin/com/nylas/models/SendRsvpQueryParams.kt index 345f1c28..3d7f988c 100644 --- a/src/main/kotlin/com/nylas/models/SendRsvpQueryParams.kt +++ b/src/main/kotlin/com/nylas/models/SendRsvpQueryParams.kt @@ -10,7 +10,7 @@ data class SendRsvpQueryParams( * The RSVP status for the event. Must be yes, no, or maybe */ @Json(name = "status") - val status: RsvpStatus + val status: RsvpStatus, ) : IQueryParams { /** diff --git a/src/main/kotlin/com/nylas/resources/Events.kt b/src/main/kotlin/com/nylas/resources/Events.kt index bf80e7a1..63dfd902 100644 --- a/src/main/kotlin/com/nylas/resources/Events.kt +++ b/src/main/kotlin/com/nylas/resources/Events.kt @@ -90,11 +90,11 @@ class Events(client: NylasClient) : Resource(client, Event::class.java) { * @return The send-rsvp response */ @Throws(NylasApiError::class, NylasSdkTimeoutError::class) - fun sendRsvp(identifier: String, requestBody: SendRsvpRequest, queryParams: SendRsvpQueryParams): DeleteResponse{ + fun sendRsvp(identifier: String, eventId: String, requestBody: SendRsvpRequest, queryParams: SendRsvpQueryParams): DeleteResponse { val path = String.format("v3/grants/%s/events/%s/send-rsvp", identifier, eventId) val adapter = JsonHelper.moshi().adapter(SendRsvpRequest::class.java) val serializedRequestBody = adapter.toJson(requestBody) - return createResource(path, serializedRequestBody, queryParams) - } + return client.executePost(path, DeleteResponse::class.java, serializedRequestBody, queryParams) + } }