diff --git a/lib/nylas/client.rb b/lib/nylas/client.rb index f4e262e5..05c2bfb5 100644 --- a/lib/nylas/client.rb +++ b/lib/nylas/client.rb @@ -8,7 +8,10 @@ require_relative "resources/webhooks" require_relative "resources/applications" require_relative "resources/folders" -require_relative "resources/scheduling" +require_relative "resources/configurations" +require_relative "resources/sessions" +require_relative "resources/availability" +require_relative "resources/bookings" module Nylas # Methods to retrieve data from the Nylas API as Ruby objects. @@ -119,11 +122,33 @@ def webhooks Webhooks.new(self) end - # The scheduling resources for your Nylas application. + # The configuration resources for your Nylas application. # - # @return [Nylas::Scheduling] Scheduling resources for your Nylas application. - def scheduling - Scheduling.new(self) + # @return [Nylas::Scheduling::Confiugrations] Scheduling configuration resources + # for your Nylas application. + def configurations + Configurations.new(self) + end + + # The Booking resources for your Nylas application. + # + # @return [Nylas::Scheduling::Bookings] Scheduling booking resources for your Nylas application. + def bookings + Bookings.new(self) + end + + # The Session resources for your Nylas application. + # + # @return [Nylas::Scheduling::Sessions] Scheduling session resources for your Nylas application. + def sessions + Sessions.new(self) + end + + # The availability resources for your Nylas application. + # + # @return [Nylas::Scheduling::Availability] Scheduling availability resources for your Nylas application. + def availability + Availability.new(self) end end end diff --git a/lib/nylas/resources/scheduling.rb b/lib/nylas/resources/scheduling.rb deleted file mode 100644 index 9cb0ab73..00000000 --- a/lib/nylas/resources/scheduling.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -require_relative "resource" -require_relative "bookings" -require_relative "availability" -require_relative "configurations" -require_relative "sessions" - -module Nylas - # Nylas Scheduling API - class Scheduling < Resource - # The configuration resources for your Nylas application. - # - # @return [Nylas::Scheduling::Confiugrations] Scheduling configuration resources - # for your Nylas application. - def configurations - Configurations.new(self) - end - - # The Booking resources for your Nylas application. - # - # @return [Nylas::Scheduling::Bookings] Scheduling booking resources for your Nylas application. - def bookings - Bookings.new(self) - end - - # The Session resources for your Nylas application. - # - # @return [Nylas::Scheduling::Sessions] Scheduling session resources for your Nylas application. - def sessions - Sessions.new(self) - end - - # The availability resources for your Nylas application. - # - # @return [Nylas::Scheduling::Availability] Scheduling availability resources for your Nylas application. - def availability - Availability.new(self) - end - end -end