class Calendly::EventType

Calendly's event type model. A configuration for a schedulable event.

Constants

ASSOCIATION
TIME_FIELDS
UUID_RE

Attributes

active[RW]

@return [Boolean] Is this event type currently active?

color[RW]

@return [String] The web page styling color for this event type, expressed as a hexadecimal RGB value (e.g. fa12e4).

created_at[RW]

@return [Time] Moment when event type was eventually created.

custom_questions[RW]

@return [Array<EventTypeCustomQuestion>] A collection of custom questions.

description_html[RW]

@return [String] Longer text description with HTML formatting.

description_plain[RW]

@return [String] Longer text description in plain text.

duration[RW]

@return [Integer] Length of event type in minutes.

internal_note[RW]

@return [String] Optional internal note on an event type.

kind[RW]

@return [String] Whether the event type is “solo” or with a “group”.

name[RW]

@return [String] Human-readable name. Note: some Event Types don't have a name.

pooling_type[RW]

@return [String] Whether the event type is “round_robin” or “collective”. This value is null if the event type does not pool team members' availability.

profile[RW]

@return [EventTypeProfile] The profile of the User that's associated with the Event Type.

scheduling_url[RW]

@return [String] The full URL of the web page for this event type.

secret[RW]

@return [Boolean] Indicates if the event type is hidden on the owner's main scheduling page.

slug[RW]

@return [String] Unique human-readable slug used in page URL.

type[RW]

@return [String] Whether the event type is a “StandardEventType” or an “AdhocEventType”.

updated_at[RW]

@return [Time] Moment when event type was last updated.

uri[RW]

@return [String] Canonical resource reference.

uuid[RW]

@return [String] unique id of the EventType object.

Public Instance Methods

fetch() click to toggle source

Get EventType associated with self.

@return [Calendly::EventType] @raise [Calendly::Error] if the uuid is empty. @raise [Calendly::ApiError] if the api returns error code. @since 0.5.1

# File lib/calendly/models/event_type.rb, line 116
def fetch
  client.event_type uuid
end
owner_team() click to toggle source

The owner team if the profile belongs to a “team”. @return [Team] @since 0.6.0

# File lib/calendly/models/event_type.rb, line 105
def owner_team
  profile&.owner_team
end
owner_user() click to toggle source

The owner user if the profile belongs to a “user” (individual). @return [User] @since 0.6.0

# File lib/calendly/models/event_type.rb, line 98
def owner_user
  profile&.owner_user
end

Private Instance Methods

inspect_attributes() click to toggle source
Calls superclass method Calendly::ModelUtils#inspect_attributes
# File lib/calendly/models/event_type.rb, line 141
def inspect_attributes
  super + %i[active kind scheduling_url]
end