From beba77d6eac2c1483dfbdf83ab8f72fa7beb8024 Mon Sep 17 00:00:00 2001 From: YIFAN WU Date: Thu, 7 Dec 2023 17:10:05 -0500 Subject: [PATCH] Added send-rsvp support for events api --- lib/nylas/resources/events.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/nylas/resources/events.rb b/lib/nylas/resources/events.rb index afd796b5..f76b9f18 100644 --- a/lib/nylas/resources/events.rb +++ b/lib/nylas/resources/events.rb @@ -79,5 +79,20 @@ def destroy(identifier:, event_id:, query_params:) [true, request_id] end + + # Send RSVP. Allows users to respond to events they have been added to as an attendee. + # + # @param identifier [String] Grant ID or email account from which to send RSVP with. + # @param event_id [String] The id of the event to respond to. + # @param request_body [Hash] The status values to send the RSVP with. + # @param query_params [Hash] The query parameters to include in the request + # @return [Hash] Response object with the API Request ID. + def send_rsvp(identifier:, event_id:, request_body:, query_params:) + post( + path: "#{api_uri}/v3/grants/#{identifier}/events/#{event_id}/send-rsvp", + query_params: query_params, + request_body: request_body + ) + end end end