Class: Calendly::Organization
- Inherits:
-
Object
- Object
- Calendly::Organization
- Includes:
- ModelUtils
- Defined in:
- lib/calendly/models/organization.rb
Overview
Calendly’s organization model.
Constant Summary collapse
Instance Attribute Summary collapse
-
#uri ⇒ String
Canonical resource reference.
-
#uuid ⇒ String
unique id of the Organization object.
Instance Method Summary collapse
-
#create_invitation(email) ⇒ Calendly::OrganizationInvitation
Invite a person to an Organization.
-
#create_webhook(url, events) ⇒ Calendly::WebhookSubscription
Create a user scope webhook associated with self.
-
#invitations(opts = {}) ⇒ Array<Calendly::OrganizationInvitation>
Get Organization Invitations.
- #invitations!(opts = {}) ⇒ Object
-
#memberships(opts = {}) ⇒ Array<Calendly::OrganizationMembership>
Get List memberships of all users belonging to self.
- #memberships!(opts = {}) ⇒ Object
-
#webhooks(opts = {}) ⇒ Array<Calendly::WebhookSubscription>
Get List of organization scope Webhooks associated with self.
- #webhooks!(opts = {}) ⇒ Object
Methods included from ModelUtils
#client, #id, included, #initialize, #inspect
Instance Attribute Details
#uri ⇒ String
Canonical resource reference.
17 18 19 |
# File 'lib/calendly/models/organization.rb', line 17 def uri @uri end |
#uuid ⇒ String
unique id of the Organization object.
14 15 16 |
# File 'lib/calendly/models/organization.rb', line 14 def uuid @uuid end |
Instance Method Details
#create_invitation(email) ⇒ Calendly::OrganizationInvitation
Invite a person to an Organization.
79 80 81 |
# File 'lib/calendly/models/organization.rb', line 79 def create_invitation(email) client.create_invitation uuid, email end |
#create_webhook(url, events) ⇒ Calendly::WebhookSubscription
Create a user scope webhook associated with self.
119 120 121 |
# File 'lib/calendly/models/organization.rb', line 119 def create_webhook(url, events) client.create_webhook url, events, uri end |
#invitations(opts = {}) ⇒ Array<Calendly::OrganizationInvitation>
Get Organization Invitations.
Accepts comma-separated list of field:direction values.
57 58 59 60 61 62 |
# File 'lib/calendly/models/organization.rb', line 57 def invitations(opts = {}) return @cached_invitations if @cached_invitations request_proc = proc { || client.invitations uuid, } @cached_invitations = auto_pagination request_proc, opts end |
#invitations!(opts = {}) ⇒ Object
65 66 67 68 |
# File 'lib/calendly/models/organization.rb', line 65 def invitations!(opts = {}) @cached_invitations = nil invitations opts end |
#memberships(opts = {}) ⇒ Array<Calendly::OrganizationMembership>
Get List memberships of all users belonging to self.
30 31 32 33 34 35 |
# File 'lib/calendly/models/organization.rb', line 30 def memberships(opts = {}) return @cached_memberships if @cached_memberships request_proc = proc { || client.memberships uri, } @cached_memberships = auto_pagination request_proc, opts end |
#memberships!(opts = {}) ⇒ Object
38 39 40 41 |
# File 'lib/calendly/models/organization.rb', line 38 def memberships!(opts = {}) @cached_memberships = nil memberships opts end |
#webhooks(opts = {}) ⇒ Array<Calendly::WebhookSubscription>
Get List of organization scope Webhooks associated with self.
Accepts comma-separated list of field:direction values.
95 96 97 98 99 100 |
# File 'lib/calendly/models/organization.rb', line 95 def webhooks(opts = {}) return @cached_webhooks if @cached_webhooks request_proc = proc { || client.webhooks uri, } @cached_webhooks = auto_pagination request_proc, opts end |
#webhooks!(opts = {}) ⇒ Object
103 104 105 106 |
# File 'lib/calendly/models/organization.rb', line 103 def webhooks!(opts = {}) @cached_webhooks = nil webhooks opts end |