Class: Calendlyr::Organizations::Invitation

Inherits:
Calendlyr::Object show all
Defined in:
lib/calendlyr/objects/organizations/invitation.rb

Instance Method Summary collapse

Methods inherited from Calendlyr::Object

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

Constructor Details

This class inherits a constructor from Calendlyr::Object

Instance Method Details

#associated_organizationObject



3
4
5
# File 'lib/calendlyr/objects/organizations/invitation.rb', line 3

def associated_organization
  Organization.new({"uri" => organization}.merge(client: client))
end

#associated_userObject



7
8
9
# File 'lib/calendlyr/objects/organizations/invitation.rb', line 7

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

#revokeObject



11
12
13
# File 'lib/calendlyr/objects/organizations/invitation.rb', line 11

def revoke
  associated_organization.revoke_invitation(invitation_uuid: uuid)
end