Sha256: 14343e97771110b961f2ee2078b5bc9c0c0030d53ce52f64740cb91116cc5e3f

Contents?: true

Size: 1.89 KB

Versions: 6

Compression:

Stored size: 1.89 KB

Contents

module Calendlyr
  class Organization < Object
    def activity_logs(**params)
      client.organizations.activity_log(**params.merge(organization: uri))
    end

    def events(**params)
      client.events.list(**params.merge(organization: uri))
    end

    def event_types(**params)
      client.event_types.list(**params.merge(organization: uri))
    end

    def routing_forms(**params)
      client.routing_forms.list(**params.merge(organization: uri))
    end

    # Groups
    def groups(**params)
      client.groups.list(**params.merge(organization: uri))
    end

    def group_relationships(**params)
      client.groups.list_relationships(**params.merge(organization: uri))
    end

    # Memberships
    def memberships(**params)
      client.organizations.list_memberships(**params.merge(organization: uri))
    end

    def membership(uuid:)
      client.organizations.retrieve_membership(uuid: uuid)
    end

    # Webhooks
    def webhooks(scope:, **params)
      client.webhooks.list(**params.merge(organization: uri, scope: scope))
    end

    def create_webhook(url:, events:, scope:, **params)
      client.webhooks.create(**params.merge(organization: uri, url: url, events: events, scope: scope))
    end

    def sample_webhook_data(event:, scope:, **params)
      client.webhooks.sample_webhook_data(event: event, scope: scope, organization: uri, **params)
    end

    # Invitations
    def invite_user(email:, **params)
      client.organizations.invite(**params.merge(organization_uuid: uuid, email: email))
    end

    def invitations(**params)
      client.organizations.list_invitations(**params.merge(uuid: uuid))
    end

    def invitation(invitation_uuid:)
      client.organizations.retrieve_invitation(org_uuid: uuid, uuid: invitation_uuid)
    end

    def revoke_invitation(invitation_uuid:)
      client.organizations.revoke_invitation(org_uuid: uuid, uuid: invitation_uuid)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
calendlyr-0.7.5 lib/calendlyr/objects/organization.rb
calendlyr-0.7.4 lib/calendlyr/objects/organization.rb
calendlyr-0.7.3 lib/calendlyr/objects/organization.rb
calendlyr-0.7.2 lib/calendlyr/objects/organization.rb
calendlyr-0.7.1 lib/calendlyr/objects/organization.rb
calendlyr-0.7.0 lib/calendlyr/objects/organization.rb