Class: Calendly::Invitee
- Inherits:
-
Object
- Object
- Calendly::Invitee
- Includes:
- ModelUtils
- Defined in:
- lib/calendly/models/invitee.rb
Overview
Calendly’s invitee model. An individual who has been invited to meet with a Calendly member.
Constant Summary collapse
- UUID_RE =
%r{\A#{Client::API_HOST}/scheduled_events/(#{UUID_FORMAT})/invitees/(#{UUID_FORMAT})\z}.freeze
- UUID_RE_INDEX =
2
- TIME_FIELDS =
%i[created_at updated_at].freeze
Constants included from ModelUtils
Instance Attribute Summary collapse
-
#cancel_url ⇒ String
Link to cancelling the event for the invitee.
-
#cancellation ⇒ Calendly::InviteeCancellation
Provides data pertaining to the cancellation of the Invitee.
-
#created_at ⇒ Time
Moment when user record was first created.
-
#email ⇒ String
The invitee’s email address.
-
#event ⇒ Event
Reference to Event associated with this invitee.
-
#first_name ⇒ String
The first name of the invitee who booked the event when the event type is configured to use separate fields for first name and last name.
-
#last_name ⇒ String
The last name of the invitee who booked the event when the event type is configured to use separate fields for first name and last name.
-
#name ⇒ String
The invitee’s human-readable name.
-
#new_invitee ⇒ String?
Link to new invitee, after reschedule.
-
#no_show ⇒ Calendly::InviteeNoShow?
Provides data pertaining to the associated no show for the Invitee.
-
#old_invitee ⇒ String?
Reference to old Invitee instance that got rescheduled.
-
#payment ⇒ Calendly::InviteePayment
Invitee payment.
-
#questions_and_answers ⇒ Array<Calendly::InviteeQuestionAndAnswer>
A collection of form responses from the invitee.
-
#reschedule_url ⇒ String
Link to rescheduling the event for the invitee.
-
#rescheduled ⇒ Boolean
Indicates if this invitee has rescheduled.
- #routing_form_submission ⇒ Calendly::RoutingFormSubmission?
-
#status ⇒ String
Whether the invitee has canceled or is still active.
-
#text_reminder_number ⇒ String
Text (SMS) reminder phone number.
-
#timezone ⇒ String
Timezone offest to use when presenting time information to invitee.
- #tracking ⇒ Calendly::InviteeTracking
-
#updated_at ⇒ Time
Moment when user record was last updated.
-
#uri ⇒ String
Canonical resource reference.
-
#uuid ⇒ String
unique id of the Invitee object.
Class Method Summary collapse
Instance Method Summary collapse
-
#fetch ⇒ Calendly::Invitee
Get Event Invitee associated with self.
-
#mark_no_show ⇒ Calendly::InviteeNoShow
Marks as a No Show.
-
#unmark_no_show ⇒ true?
Unmarks as a No Show.
Methods included from ModelUtils
#client, #id, included, #initialize, #inspect
Instance Attribute Details
#cancel_url ⇒ String
Link to cancelling the event for the invitee.
84 85 86 |
# File 'lib/calendly/models/invitee.rb', line 84 def cancel_url @cancel_url end |
#cancellation ⇒ Calendly::InviteeCancellation
Returns Provides data pertaining to the cancellation of the Invitee.
99 100 101 |
# File 'lib/calendly/models/invitee.rb', line 99 def cancellation @cancellation end |
#created_at ⇒ Time
Moment when user record was first created.
92 93 94 |
# File 'lib/calendly/models/invitee.rb', line 92 def created_at @created_at end |
#email ⇒ String
The invitee’s email address.
41 42 43 |
# File 'lib/calendly/models/invitee.rb', line 41 def email @email end |
#event ⇒ Event
Reference to Event associated with this invitee.
110 111 112 |
# File 'lib/calendly/models/invitee.rb', line 110 def event @event end |
#first_name ⇒ String
The first name of the invitee who booked the event when the event type is configured to use separate fields for first name and last name. Null when event type is configured to use a single field for name.
50 51 52 |
# File 'lib/calendly/models/invitee.rb', line 50 def first_name @first_name end |
#last_name ⇒ String
The last name of the invitee who booked the event when the event type is configured to use separate fields for first name and last name. Null when event type is configured to use a single field for name.
55 56 57 |
# File 'lib/calendly/models/invitee.rb', line 55 def last_name @last_name end |
#name ⇒ String
The invitee’s human-readable name.
45 46 47 |
# File 'lib/calendly/models/invitee.rb', line 45 def name @name end |
#new_invitee ⇒ String?
Link to new invitee, after reschedule.
80 81 82 |
# File 'lib/calendly/models/invitee.rb', line 80 def new_invitee @new_invitee end |
#no_show ⇒ Calendly::InviteeNoShow?
Provides data pertaining to the associated no show for the Invitee.
106 107 108 |
# File 'lib/calendly/models/invitee.rb', line 106 def no_show @no_show end |
#old_invitee ⇒ String?
Reference to old Invitee instance that got rescheduled.
76 77 78 |
# File 'lib/calendly/models/invitee.rb', line 76 def old_invitee @old_invitee end |
#payment ⇒ Calendly::InviteePayment
Returns Invitee payment.
102 103 104 |
# File 'lib/calendly/models/invitee.rb', line 102 def payment @payment end |
#questions_and_answers ⇒ Array<Calendly::InviteeQuestionAndAnswer>
A collection of form responses from the invitee.
114 115 116 |
# File 'lib/calendly/models/invitee.rb', line 114 def questions_and_answers @questions_and_answers end |
#reschedule_url ⇒ String
Link to rescheduling the event for the invitee.
88 89 90 |
# File 'lib/calendly/models/invitee.rb', line 88 def reschedule_url @reschedule_url end |
#rescheduled ⇒ Boolean
Indicates if this invitee has rescheduled. If true, a reference to the new Invitee instance is provided in the new_invitee field.
72 73 74 |
# File 'lib/calendly/models/invitee.rb', line 72 def rescheduled @rescheduled end |
#routing_form_submission ⇒ Calendly::RoutingFormSubmission?
120 121 122 |
# File 'lib/calendly/models/invitee.rb', line 120 def routing_form_submission @routing_form_submission end |
#status ⇒ String
Whether the invitee has canceled or is still active.
59 60 61 |
# File 'lib/calendly/models/invitee.rb', line 59 def status @status end |
#text_reminder_number ⇒ String
Text (SMS) reminder phone number.
67 68 69 |
# File 'lib/calendly/models/invitee.rb', line 67 def text_reminder_number @text_reminder_number end |
#timezone ⇒ String
Timezone offest to use when presenting time information to invitee.
63 64 65 |
# File 'lib/calendly/models/invitee.rb', line 63 def timezone @timezone end |
#tracking ⇒ Calendly::InviteeTracking
117 118 119 |
# File 'lib/calendly/models/invitee.rb', line 117 def tracking @tracking end |
#updated_at ⇒ Time
Moment when user record was last updated.
96 97 98 |
# File 'lib/calendly/models/invitee.rb', line 96 def updated_at @updated_at end |
#uri ⇒ String
Canonical resource reference.
37 38 39 |
# File 'lib/calendly/models/invitee.rb', line 37 def uri @uri end |
#uuid ⇒ String
unique id of the Invitee object.
33 34 35 |
# File 'lib/calendly/models/invitee.rb', line 33 def uuid @uuid end |
Class Method Details
.association ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/calendly/models/invitee.rb', line 12 def self.association { event: Event, cancellation: InviteeCancellation, payment: InviteePayment, no_show: InviteeNoShow, questions_and_answers: InviteeQuestionAndAnswer, tracking: InviteeTracking, routing_form_submission: RoutingFormSubmission } end |
.extract_event_uuid(str) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/calendly/models/invitee.rb', line 24 def self.extract_event_uuid(str) m = extract_uuid_match str return unless m m[1] end |
Instance Method Details
#fetch ⇒ Calendly::Invitee
Get Event Invitee associated with self.
130 131 132 |
# File 'lib/calendly/models/invitee.rb', line 130 def fetch client.event_invitee event&.uuid, uuid end |
#mark_no_show ⇒ Calendly::InviteeNoShow
Marks as a No Show. If already marked as a No Show, do nothing.
142 143 144 145 146 |
# File 'lib/calendly/models/invitee.rb', line 142 def mark_no_show return no_show if no_show @no_show = client.create_invitee_no_show uri end |
#unmark_no_show ⇒ true?
Unmarks as a No Show. If already unmarked as a No Show, do nothing.
156 157 158 159 160 161 162 |
# File 'lib/calendly/models/invitee.rb', line 156 def unmark_no_show return unless no_show no_show.delete @no_show = nil true end |