Class: Calendlyr::EventsResource
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
Instance Method Details
#cancel(uuid:, reason: nil) ⇒ Object
12
13
14
|
# File 'lib/calendlyr/resources/events.rb', line 12
def cancel(uuid:, reason: nil)
Events::Cancellation.new post_request("scheduled_events/#{uuid}/cancellation", body: {reason: reason}).dig("resource").merge(client: client)
end
|
#create_invitee_no_show(invitee:) ⇒ Object
31
32
33
34
|
# File 'lib/calendlyr/resources/events.rb', line 31
def create_invitee_no_show(invitee:)
body = {invitee: invitee}
Events::InviteeNoShow.new post_request("invitee_no_shows", body: body).dig("resource").merge(client: client)
end
|
#delete_invitee_no_show(uuid:) ⇒ Object
36
37
38
|
# File 'lib/calendlyr/resources/events.rb', line 36
def delete_invitee_no_show(uuid:)
delete_request("invitee_no_shows/#{uuid}")
end
|
#list(**params) ⇒ Object
3
4
5
6
|
# File 'lib/calendlyr/resources/events.rb', line 3
def list(**params)
response = get_request("scheduled_events", params: params)
Collection.from_response(response, type: Event, client: client)
end
|
#list_invitees(uuid:, **params) ⇒ Object
17
18
19
20
|
# File 'lib/calendlyr/resources/events.rb', line 17
def list_invitees(uuid:, **params)
response = get_request("scheduled_events/#{uuid}/invitees", params: params)
Collection.from_response(response, type: Events::Invitee, client: client)
end
|
#retrieve(uuid:) ⇒ Object
8
9
10
|
# File 'lib/calendlyr/resources/events.rb', line 8
def retrieve(uuid:)
Event.new get_request("scheduled_events/#{uuid}").dig("resource").merge(client: client)
end
|
#retrieve_invitee(event_uuid:, invitee_uuid:) ⇒ Object
22
23
24
|
# File 'lib/calendlyr/resources/events.rb', line 22
def retrieve_invitee(event_uuid:, invitee_uuid:)
Events::Invitee.new get_request("scheduled_events/#{event_uuid}/invitees/#{invitee_uuid}").dig("resource").merge(client: client)
end
|
#retrieve_invitee_no_show(uuid:) ⇒ Object
27
28
29
|
# File 'lib/calendlyr/resources/events.rb', line 27
def retrieve_invitee_no_show(uuid:)
Events::InviteeNoShow.new get_request("invitee_no_shows/#{uuid}").dig("resource").merge(client: client)
end
|