Class: Calendlyr::GroupsResource

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



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

def list(organization:, **params)
  response = get_request("groups", params: params.merge(organization: organization))
  Collection.from_response(response, type: Group, client: client)
end

#list_relationships(**params) ⇒ Object

Relationships



13
14
15
16
# File 'lib/calendlyr/resources/groups.rb', line 13

def list_relationships(**params)
  response = get_request("group_relationships", params: params)
  Collection.from_response(response, type: Groups::Relationship, client: client)
end

#retrieve(uuid:) ⇒ Object



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

def retrieve(uuid:)
  Group.new get_request("groups/#{uuid}").dig("resource").merge(client: client)
end

#retrieve_relationship(uuid:) ⇒ Object



18
19
20
# File 'lib/calendlyr/resources/groups.rb', line 18

def retrieve_relationship(uuid:)
  Groups::Relationship.new get_request("group_relationships/#{uuid}").dig("resource").merge(client: client)
end