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
- UUID_RE =
%r{\A#{Client::API_HOST}/organizations/(#{UUID_FORMAT})\z}.freeze
Constants included from ModelUtils
Instance Attribute Summary collapse
-
#uri ⇒ String
Canonical resource reference.
-
#uuid ⇒ String
unique id of the Organization object.
Instance Method Summary collapse
-
#activity_log_entries(options: nil) ⇒ Array<Array<Calendly::ActivityLogEntry>, Hash, Hash>
Returns a list of activity log entries.
-
#create_invitation(email) ⇒ Calendly::OrganizationInvitation
Invite a person to an Organization.
-
#create_webhook(url, events, signing_key: nil) ⇒ Calendly::WebhookSubscription
Create a user scope webhook associated with self.
-
#event_types(options: nil) ⇒ Array<Calendly::EventType>
Returns all Event Types associated with self.
- #event_types!(options: nil) ⇒ Object
-
#invitations(options: nil) ⇒ Array<Calendly::OrganizationInvitation>
Get Organization Invitations.
- #invitations!(options: nil) ⇒ Object
-
#memberships(options: nil) ⇒ Array<Calendly::OrganizationMembership>
Get List memberships of all users belonging to self.
- #memberships!(options: nil) ⇒ Object
-
#routing_forms(options: nil) ⇒ Array<Calendly::RoutingForm>
Returns all Routing Forms associated with self.
- #routing_forms!(options: nil) ⇒ Object
-
#scheduled_events(options: nil) ⇒ Array<Calendly::Event>
Returns all Scheduled Events associated with self.
- #scheduled_events!(options: nil) ⇒ Object
-
#webhooks(options: nil) ⇒ Array<Calendly::WebhookSubscription>
Get List of organization scope Webhooks associated with self.
- #webhooks!(options: nil) ⇒ Object
Methods included from ModelUtils
#client, #id, included, #initialize, #inspect
Instance Attribute Details
#uri ⇒ String
Canonical resource reference.
15 16 17 |
# File 'lib/calendly/models/organization.rb', line 15 def uri @uri end |
#uuid ⇒ String
unique id of the Organization object.
11 12 13 |
# File 'lib/calendly/models/organization.rb', line 11 def uuid @uuid end |
Instance Method Details
#activity_log_entries(options: nil) ⇒ Array<Array<Calendly::ActivityLogEntry>, Hash, Hash>
Returns a list of activity log entries.
217 218 219 |
# File 'lib/calendly/models/organization.rb', line 217 def activity_log_entries(options: nil) client.activity_log_entries uri, options: end |
#create_invitation(email) ⇒ Calendly::OrganizationInvitation
Invite a person to an Organization.
76 77 78 |
# File 'lib/calendly/models/organization.rb', line 76 def create_invitation(email) client.create_invitation uuid, email end |
#create_webhook(url, events, signing_key: nil) ⇒ Calendly::WebhookSubscription
Create a user scope webhook associated with self.
169 170 171 |
# File 'lib/calendly/models/organization.rb', line 169 def create_webhook(url, events, signing_key: nil) client.create_webhook url, events, uri, signing_key: signing_key end |
#event_types(options: nil) ⇒ Array<Calendly::EventType>
Returns all Event Types associated with self.
92 93 94 95 96 97 |
# File 'lib/calendly/models/organization.rb', line 92 def event_types(options: nil) return @cached_event_types if defined?(@cached_event_types) && @cached_event_types request_proc = proc { |opts| client.event_types uri, options: opts } @cached_event_types = auto_pagination request_proc, end |
#event_types!(options: nil) ⇒ Object
100 101 102 103 |
# File 'lib/calendly/models/organization.rb', line 100 def event_types!(options: nil) @cached_event_types = nil event_types options: end |
#invitations(options: nil) ⇒ Array<Calendly::OrganizationInvitation>
Get Organization Invitations.
54 55 56 57 58 59 |
# File 'lib/calendly/models/organization.rb', line 54 def invitations(options: nil) return @cached_invitations if defined?(@cached_invitations) && @cached_invitations request_proc = proc { |opts| client.invitations uuid, options: opts } @cached_invitations = auto_pagination request_proc, end |
#invitations!(options: nil) ⇒ Object
62 63 64 65 |
# File 'lib/calendly/models/organization.rb', line 62 def invitations!(options: nil) @cached_invitations = nil invitations options: end |
#memberships(options: nil) ⇒ Array<Calendly::OrganizationMembership>
Get List memberships of all users belonging to self.
28 29 30 31 32 33 |
# File 'lib/calendly/models/organization.rb', line 28 def memberships(options: nil) return @cached_memberships if defined?(@cached_memberships) && @cached_memberships request_proc = proc { |opts| client.memberships uri, options: opts } @cached_memberships = auto_pagination request_proc, end |
#memberships!(options: nil) ⇒ Object
36 37 38 39 |
# File 'lib/calendly/models/organization.rb', line 36 def memberships!(options: nil) @cached_memberships = nil memberships options: end |
#routing_forms(options: nil) ⇒ Array<Calendly::RoutingForm>
Returns all Routing Forms associated with self.
184 185 186 187 188 189 |
# File 'lib/calendly/models/organization.rb', line 184 def routing_forms(options: nil) return @cached_routing_forms if defined?(@cached_routing_forms) && @cached_routing_forms request_proc = proc { |opts| client.routing_forms uri, options: opts } @cached_routing_forms = auto_pagination request_proc, end |
#routing_forms!(options: nil) ⇒ Object
192 193 194 195 |
# File 'lib/calendly/models/organization.rb', line 192 def routing_forms!(options: nil) @cached_routing_forms = nil routing_forms options: end |
#scheduled_events(options: nil) ⇒ Array<Calendly::Event>
Returns all Scheduled Events associated with self.
120 121 122 123 124 125 |
# File 'lib/calendly/models/organization.rb', line 120 def scheduled_events(options: nil) return @cached_scheduled_events if defined?(@cached_scheduled_events) && @cached_scheduled_events request_proc = proc { |opts| client.scheduled_events uri, options: opts } @cached_scheduled_events = auto_pagination request_proc, end |
#scheduled_events!(options: nil) ⇒ Object
128 129 130 131 |
# File 'lib/calendly/models/organization.rb', line 128 def scheduled_events!(options: nil) @cached_scheduled_events = nil scheduled_events options: end |
#webhooks(options: nil) ⇒ Array<Calendly::WebhookSubscription>
Get List of organization scope Webhooks associated with self.
144 145 146 147 148 149 |
# File 'lib/calendly/models/organization.rb', line 144 def webhooks(options: nil) return @cached_webhooks if defined?(@cached_webhooks) && @cached_webhooks request_proc = proc { |opts| client.webhooks uri, options: opts } @cached_webhooks = auto_pagination request_proc, end |
#webhooks!(options: nil) ⇒ Object
152 153 154 155 |
# File 'lib/calendly/models/organization.rb', line 152 def webhooks!(options: nil) @cached_webhooks = nil webhooks options: end |