Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed optional field for GetAvailabilityResponse #169

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
### Changed
* Return webhook object with secret when creating a webhook
* Fixed HTTP method for rotating webhook secret
* Fixed optional field for `GetAvailabilityResponse`

## [2.0.0-beta.1] - Released 2023-08-16

Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/com/nylas/models/GetAvailabilityResponse.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ data class GetAvailabilityResponse(
* It will contain the order in which the accounts would be next in line to attend the proposed meeting.
*/
@Json(name = "order")
val order: List<String>,
val order: List<String>? = null,
/**
* The available time slots where a new meeting can be created for the requested preferences.
*/
@Json(name = "time_slots")
val timeSlots: List<TimeSlot>,
val timeSlots: List<TimeSlot>? = null,
)
4 changes: 3 additions & 1 deletion src/main/kotlin/com/nylas/resources/Calendars.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ class Calendars(client: NylasClient) : Resource<Calendar>(client, Calendar::clas
.adapter(GetAvailabilityRequest::class.java)
.toJson(request)

return client.executePost(path, GetAvailabilityResponse::class.java, serializedRequestBody)
val responseType = Types.newParameterizedType(Response::class.java, GetAvailabilityResponse::class.java)

return client.executePost(path, responseType, serializedRequestBody)
}

/**
Expand Down