You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When passing the result of calling the free/busy endpoint to calendars.availability, I recieve a Nylas::InvalidRequest error with the message free_busy.0.time_slots: Missing data for required field.
To Reproduce
# nylas here is just the value returned from Nylas::API.new
# start_time and end_time should be on a day where the user has no calendar events/busy blocks.
nylas.calendars.availability(
**{ duration_minutes: duration_minutes,
interval_minutes: interval_minutes || duration_minutes,
start_time: start_time,
end_time: end_time,
emails: emails,
free_busy: nylas.free_busy(
emails: emails,
start_time: start_time.to_i,
end_time: end_time.to_i
),
open_hours: open_hours,
calendars: [
...
] })
)
Expected behavior
I expected to receive a list of available times for the user. It isn't quite clear to me why this should break on a day that has no busy blocks. I was able to achieve this by using nylas.free_busy(...).reject { |block| block.time_slots.blank? }.
SDK Version:
5.13.0
Additional context
Using Ruby 3.0.2
The text was updated successfully, but these errors were encountered:
Describe the bug
When passing the result of calling the free/busy endpoint to
calendars.availability
, I recieve aNylas::InvalidRequest
error with the messagefree_busy.0.time_slots: Missing data for required field.
To Reproduce
Expected behavior
I expected to receive a list of available times for the user. It isn't quite clear to me why this should break on a day that has no busy blocks. I was able to achieve this by using
nylas.free_busy(...).reject { |block| block.time_slots.blank? }
.SDK Version:
5.13.0
Additional context
Using Ruby 3.0.2
The text was updated successfully, but these errors were encountered: