Class: Calendly::EventType
- Inherits:
-
Object
- Object
- Calendly::EventType
- Includes:
- ModelUtils
- Defined in:
- lib/calendly/models/event_type.rb
Overview
Calendly’s event type model. A configuration for a schedulable event
Constant Summary collapse
- UUID_RE =
%r{\A#{Client::API_HOST}/event_types/(\w+)\z}.freeze
- TIME_FIELDS =
%i[created_at updated_at].freeze
Instance Attribute Summary collapse
-
#active ⇒ Boolean
Is this event type currently active?.
-
#color ⇒ String
The web page styling color for this event type, expressed as a hexadecimal RGB value (e.g. #fa12e4).
-
#created_at ⇒ Time
Moment when event type was eventually created.
-
#description_html ⇒ String
Longer text description with HTML formatting.
-
#description_plain ⇒ String
Longer text description in plain text.
-
#duration ⇒ Integer
Length of event type in minutes.
-
#internal_note ⇒ String
Optional internal note on an event type.
-
#kind ⇒ String
Whether the event type is “solo” or with a “group”.
-
#name ⇒ String
Human-readable name.
-
#owner_name ⇒ String
Human-readable name.
-
#owner_type ⇒ String
Whether the profile belongs to a “User” or a “Team”.
-
#owner_uri ⇒ String
Reference to the profile owner.
-
#owner_uuid ⇒ String
uuid of User or Team object.
-
#pooling_type ⇒ String
Whether the event type is “round_robin” or “collective”.
-
#scheduling_url ⇒ String
The full URL of the web page for this event type.
-
#slug ⇒ String
Unique human-readable slug used in page URL.
-
#type ⇒ String
Whether the event type is a “StandardEventType” or an “AdhocEventType”.
-
#updated_at ⇒ Time
Moment when event type was last updated.
-
#uri ⇒ String
Canonical resource reference.
-
#uuid ⇒ String
unique id of the EventType object.
Instance Method Summary collapse
-
#fetch ⇒ Calendly::EventType
Get EventType associated with self.
Methods included from ModelUtils
#client, #id, included, #initialize, #inspect
Instance Attribute Details
#active ⇒ Boolean
Is this event type currently active?
22 23 24 |
# File 'lib/calendly/models/event_type.rb', line 22 def active @active end |
#color ⇒ String
The web page styling color for this event type, expressed as a hexadecimal RGB value (e.g. #fa12e4).
26 27 28 |
# File 'lib/calendly/models/event_type.rb', line 26 def color @color end |
#created_at ⇒ Time
Moment when event type was eventually created.
60 61 62 |
# File 'lib/calendly/models/event_type.rb', line 60 def created_at @created_at end |
#description_html ⇒ String
Longer text description with HTML formatting.
29 30 31 |
# File 'lib/calendly/models/event_type.rb', line 29 def description_html @description_html end |
#description_plain ⇒ String
Longer text description in plain text.
32 33 34 |
# File 'lib/calendly/models/event_type.rb', line 32 def description_plain @description_plain end |
#duration ⇒ Integer
Length of event type in minutes.
35 36 37 |
# File 'lib/calendly/models/event_type.rb', line 35 def duration @duration end |
#internal_note ⇒ String
Optional internal note on an event type.
38 39 40 |
# File 'lib/calendly/models/event_type.rb', line 38 def internal_note @internal_note end |
#kind ⇒ String
Whether the event type is “solo” or with a “group”.
41 42 43 |
# File 'lib/calendly/models/event_type.rb', line 41 def kind @kind end |
#name ⇒ String
Human-readable name. Note: some Event Types don’t have a name.
44 45 46 |
# File 'lib/calendly/models/event_type.rb', line 44 def name @name end |
#owner_name ⇒ String
Human-readable name.
73 74 75 |
# File 'lib/calendly/models/event_type.rb', line 73 def owner_name @owner_name end |
#owner_type ⇒ String
Whether the profile belongs to a “User” or a “Team”.
76 77 78 |
# File 'lib/calendly/models/event_type.rb', line 76 def owner_type @owner_type end |
#owner_uri ⇒ String
Reference to the profile owner.
70 71 72 |
# File 'lib/calendly/models/event_type.rb', line 70 def owner_uri @owner_uri end |
#owner_uuid ⇒ String
uuid of User or Team object.
67 68 69 |
# File 'lib/calendly/models/event_type.rb', line 67 def owner_uuid @owner_uuid end |
#pooling_type ⇒ String
Whether the event type is “round_robin” or “collective”. This value is null if the event type does not pool team members’ availability.
48 49 50 |
# File 'lib/calendly/models/event_type.rb', line 48 def pooling_type @pooling_type end |
#scheduling_url ⇒ String
The full URL of the web page for this event type.
51 52 53 |
# File 'lib/calendly/models/event_type.rb', line 51 def scheduling_url @scheduling_url end |
#slug ⇒ String
Unique human-readable slug used in page URL.
54 55 56 |
# File 'lib/calendly/models/event_type.rb', line 54 def slug @slug end |
#type ⇒ String
Whether the event type is a “StandardEventType” or an “AdhocEventType”.
57 58 59 |
# File 'lib/calendly/models/event_type.rb', line 57 def type @type end |
#updated_at ⇒ Time
Moment when event type was last updated.
63 64 65 |
# File 'lib/calendly/models/event_type.rb', line 63 def updated_at @updated_at end |
#uri ⇒ String
Canonical resource reference.
19 20 21 |
# File 'lib/calendly/models/event_type.rb', line 19 def uri @uri end |
#uuid ⇒ String
unique id of the EventType object.
16 17 18 |
# File 'lib/calendly/models/event_type.rb', line 16 def uuid @uuid end |
Instance Method Details
#fetch ⇒ Calendly::EventType
Get EventType associated with self.
85 86 87 |
# File 'lib/calendly/models/event_type.rb', line 85 def fetch client.event_type uuid end |