Skip to content

Commit

Permalink
Scheduling resource
Browse files Browse the repository at this point in the history
  • Loading branch information
kraju3 committed Oct 3, 2024
1 parent 11c50cb commit 0aed828
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 9 deletions.
8 changes: 8 additions & 0 deletions lib/nylas/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
require_relative "resources/webhooks"
require_relative "resources/applications"
require_relative "resources/folders"
require_relative "resources/scheduling"

module Nylas
# Methods to retrieve data from the Nylas API as Ruby objects.
Expand Down Expand Up @@ -117,5 +118,12 @@ def threads
def webhooks
Webhooks.new(self)
end

# The scheduling resources for your Nylas application.
#
# @return [Nylas::Scheduling] Scheduling resources for your Nylas application.
def scheduling
Scheduling.new(self)
end
end
end
35 changes: 26 additions & 9 deletions lib/nylas/resources/scheduling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,33 @@
module Nylas
# Nylas Scheduling API
class Scheduling < Resource
attr_reader :confiugrations, :bookings, :sessions, :availability
# 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

# Initializes the scheduling resource.
# @param sdk_instance [Nylas::API] The API instance to which the resource is bound.
def initialize(sdk_instance)
super(sdk_instance)
@configurations = Configurations.new(sdk_instance)
@bookings = Bookings.new(sdk_instance)
@sessions = Sessions.new(sdk_instance)
@availability = Availability.new(sdk_instance)
# 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

0 comments on commit 0aed828

Please sign in to comment.