Class: Calendlyr::Availabilities::UserSchedule

Inherits:
Object
  • Object
show all
Defined in:
lib/calendlyr/objects/availabilities/user_schedule.rb

Instance Method Summary collapse

Methods inherited from Object

#extract_uuid, #get_slug, get_slug, #initialize, #to_ostruct

Constructor Details

This class inherits a constructor from Calendlyr::Object

Instance Method Details

#associated_userObject



3
4
5
# File 'lib/calendlyr/objects/availabilities/user_schedule.rb', line 3

def associated_user
  client.users.retrieve(uuid: get_slug(user))
end

#availability_rulesObject



7
8
9
10
11
# File 'lib/calendlyr/objects/availabilities/user_schedule.rb', line 7

def availability_rules
  rules.map do |rule|
    Availabilities::Rule.new(rule.to_h.merge(client: client))
  end
end