Class: Calendlyr::AvailabilityResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/calendlyr/resources/availability.rb

Constant Summary

Constants inherited from Resource

Resource::ERROR_CODES

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Calendlyr::Resource

Instance Method Details

#list_user_busy_times(user:, start_time:, end_time:, **params) ⇒ Object

User Busy Time



4
5
6
7
# File 'lib/calendlyr/resources/availability.rb', line 4

def list_user_busy_times(user:, start_time:, end_time:, **params)
  response = get_request("user_busy_times", params: {user: user, start_time: start_time, end_time: end_time}.merge(params).compact)
  Collection.from_response(response, type: Availabilities::UserBusyTime, client: client)
end

#list_user_schedules(user:, **params) ⇒ Object

User Schedule



10
11
12
13
# File 'lib/calendlyr/resources/availability.rb', line 10

def list_user_schedules(user:, **params)
  response = get_request("user_availability_schedules", params: {user: user}.merge(params).compact)
  Collection.from_response(response, type: Availabilities::UserSchedule, client: client)
end

#retrieve_user_schedule(uuid:) ⇒ Object



15
16
17
# File 'lib/calendlyr/resources/availability.rb', line 15

def retrieve_user_schedule(uuid:)
  Availabilities::UserSchedule.new get_request("user_availability_schedules/#{uuid}").dig("resource").merge(client: client)
end