Class: Calendlyr::EventTypeResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/calendlyr/resources/event_types.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_uri:, organization_uri:, **params) ⇒ Object



3
4
5
6
# File 'lib/calendlyr/resources/event_types.rb', line 3

def list(user_uri:, organization_uri:, **params)
  response = get_request("event_types", params: {user: user_uri, organization: organization_uri}.merge(params))
  Collection.from_response(response, key: "collection", type: EventType, client: client)
end

#retrieve(event_type_uuid:) ⇒ Object



8
9
10
# File 'lib/calendlyr/resources/event_types.rb', line 8

def retrieve(event_type_uuid:)
  EventType.new get_request("event_types/#{event_type_uuid}").dig("resource").merge(client: client)
end