-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Events API Send-RSVP support # License <!-- Your PR comment must contain the following line for us to merge the PR. --> I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.
- Loading branch information
1 parent
e3bc843
commit cbf26c7
Showing
4 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.nylas.models | ||
|
||
import com.squareup.moshi.Json | ||
|
||
/** | ||
* Enum representing the allowed RSVP status values. | ||
*/ | ||
enum class RsvpStatus { | ||
@Json(name = "yes") | ||
YES, | ||
|
||
@Json(name = "no") | ||
NO, | ||
|
||
@Json(name = "maybe") | ||
MAYBE, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.nylas.models | ||
|
||
import com.squareup.moshi.Json | ||
|
||
/** | ||
* Class representation of the query parameters for sending RSVP. | ||
*/ | ||
data class SendRsvpQueryParams( | ||
/** | ||
* The RSVP status for the event. Must be yes, no, or maybe | ||
*/ | ||
@Json(name = "status") | ||
val status: RsvpStatus | ||
) : IQueryParams { | ||
|
||
/** | ||
* Builder for [SendRsvpQueryParams]. | ||
* @param status The RSVP status for the event. Must be yes, no, or maybe | ||
*/ | ||
data class Builder(private val status: RsvpStatus) { | ||
|
||
/** | ||
* Builds a [SendRsvpQueryParams] instance. | ||
* @return The [SendRsvpQueryParams] instance. | ||
*/ | ||
fun build() = SendRsvpQueryParams(status) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.nylas.models | ||
|
||
import com.squareup.moshi.Json | ||
|
||
/** | ||
* Class representation of a Nylas send-rsvp request | ||
*/ | ||
data class SendRsvpRequest( | ||
/** | ||
* RSVP status. must be yes, no, or maybe | ||
*/ | ||
@Json(name = "status") | ||
val status: RsvpStatus, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters