class Calendly::EventType
Calendly's event type model. A configuration for a schedulable event.
Constants
- ASSOCIATION
- TIME_FIELDS
- UUID_RE
Attributes
@return [Boolean] Is this event type currently active?
@return [String] The web page styling color for this event type, expressed as a hexadecimal RGB value (e.g. fa12e4).
@return [Time] Moment when event type was eventually created.
@return [Array<EventTypeCustomQuestion>] A collection of custom questions.
@return [String] Longer text description with HTML formatting.
@return [String] Longer text description in plain text.
@return [Integer] Length of event type in minutes.
@return [String] Optional internal note on an event type.
@return [String] Whether the event type is “solo” or with a “group”.
@return [String] Human-readable name. Note: some Event
Types don't have a name.
@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.
@return [String] The full URL of the web page for this event type.
@return [Boolean] Indicates if the event type is hidden on the owner's main scheduling page.
@return [String] Unique human-readable slug used in page URL.
@return [String] Whether the event type is a “StandardEventType” or an “AdhocEventType”.
@return [Time] Moment when event type was last updated.
@return [String] Canonical resource reference.
@return [String] unique id of the EventType
object.
Public Instance Methods
Create an associated scheduling link.
@param [String] max_event_count The max number of events that can be scheduled using this scheduling link. @return [Hash] e.g. {
booking_url: "https://calendly.com/s/FOO-BAR-SLUG", owner: "https://api.calendly.com/event_types/GBGBDCAADAEDCRZ2", owner_type: "EventType"
} @raise [Calendly::Error] if the uri is empty. @raise [Calendly::Error] if the max_event_count arg is empty. @raise [Calendly::ApiError] if the api returns error code. @since 0.5.2
# File lib/calendly/models/event_type.rb, line 135 def create_schedule_link(max_event_count: 1) client.create_schedule_link uri, max_event_count: max_event_count, owner_type: 'EventType' end
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
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
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
Calendly::ModelUtils#inspect_attributes
# File lib/calendly/models/event_type.rb, line 141 def inspect_attributes super + %i[active kind scheduling_url] end