Class: Calendly::EventType

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from ModelUtils

#client, #id, included, #initialize, #inspect

Instance Attribute Details

#activeBoolean

Is this event type currently active?

Returns:

  • (Boolean)


22
23
24
# File 'lib/calendly/models/event_type.rb', line 22

def active
  @active
end

#colorString

The web page styling color for this event type, expressed as a hexadecimal RGB value (e.g. #fa12e4).

Returns:

  • (String)


26
27
28
# File 'lib/calendly/models/event_type.rb', line 26

def color
  @color
end

#created_atTime

Moment when event type was eventually created.

Returns:

  • (Time)


60
61
62
# File 'lib/calendly/models/event_type.rb', line 60

def created_at
  @created_at
end

#description_htmlString

Longer text description with HTML formatting.

Returns:

  • (String)


29
30
31
# File 'lib/calendly/models/event_type.rb', line 29

def description_html
  @description_html
end

#description_plainString

Longer text description in plain text.

Returns:

  • (String)


32
33
34
# File 'lib/calendly/models/event_type.rb', line 32

def description_plain
  @description_plain
end

#durationInteger

Length of event type in minutes.

Returns:

  • (Integer)


35
36
37
# File 'lib/calendly/models/event_type.rb', line 35

def duration
  @duration
end

#internal_noteString

Optional internal note on an event type.

Returns:

  • (String)


38
39
40
# File 'lib/calendly/models/event_type.rb', line 38

def internal_note
  @internal_note
end

#kindString

Whether the event type is “solo” or with a “group”.

Returns:

  • (String)


41
42
43
# File 'lib/calendly/models/event_type.rb', line 41

def kind
  @kind
end

#nameString

Human-readable name. Note: some Event Types don’t have a name.

Returns:

  • (String)


44
45
46
# File 'lib/calendly/models/event_type.rb', line 44

def name
  @name
end

#owner_nameString

Human-readable name.

Returns:

  • (String)


73
74
75
# File 'lib/calendly/models/event_type.rb', line 73

def owner_name
  @owner_name
end

#owner_typeString

Whether the profile belongs to a “User” or a “Team”.

Returns:

  • (String)


76
77
78
# File 'lib/calendly/models/event_type.rb', line 76

def owner_type
  @owner_type
end

#owner_uriString

Reference to the profile owner.

Returns:

  • (String)


70
71
72
# File 'lib/calendly/models/event_type.rb', line 70

def owner_uri
  @owner_uri
end

#owner_uuidString

uuid of User or Team object.

Returns:

  • (String)


67
68
69
# File 'lib/calendly/models/event_type.rb', line 67

def owner_uuid
  @owner_uuid
end

#pooling_typeString

Whether the event type is “round_robin” or “collective”. This value is null if the event type does not pool team members’ availability.

Returns:

  • (String)


48
49
50
# File 'lib/calendly/models/event_type.rb', line 48

def pooling_type
  @pooling_type
end

#scheduling_urlString

The full URL of the web page for this event type.

Returns:

  • (String)


51
52
53
# File 'lib/calendly/models/event_type.rb', line 51

def scheduling_url
  @scheduling_url
end

#slugString

Unique human-readable slug used in page URL.

Returns:

  • (String)


54
55
56
# File 'lib/calendly/models/event_type.rb', line 54

def slug
  @slug
end

#typeString

Whether the event type is a “StandardEventType” or an “AdhocEventType”.

Returns:

  • (String)


57
58
59
# File 'lib/calendly/models/event_type.rb', line 57

def type
  @type
end

#updated_atTime

Moment when event type was last updated.

Returns:

  • (Time)


63
64
65
# File 'lib/calendly/models/event_type.rb', line 63

def updated_at
  @updated_at
end

#uriString

Canonical resource reference.

Returns:

  • (String)


19
20
21
# File 'lib/calendly/models/event_type.rb', line 19

def uri
  @uri
end

#uuidString

unique id of the EventType object.

Returns:

  • (String)


16
17
18
# File 'lib/calendly/models/event_type.rb', line 16

def uuid
  @uuid
end

Instance Method Details

#fetchCalendly::EventType

Get EventType associated with self.

Returns:

Raises:

Since:

  • 0.5.1



85
86
87
# File 'lib/calendly/models/event_type.rb', line 85

def fetch
  client.event_type uuid
end