class Calendly::Event
Calendly's event model. A meeting that has been scheduled.
Constants
- ASSOCIATION
- TIME_FIELDS
- UUID_RE
Attributes
@return [Time] Moment when user record was first created.
@return [Time] Moment when event is (or was) scheduled to end.
@return [Array<Guest>] Additional people added to an event by an invitee.
@return [Array<User>] Event
membership list.
@return [EventType] Reference to Event
Type associated with this event.
@return [InviteesCounter] invitees counter.
@return [Calendly::Location] location in this event.
@return [String] Name of the event.
@return [Time] Moment when event is (or was) scheduled to begin.
@return [String] Whether the event is active or canceled.
@return [Time] Moment when user record was last updated.
@return [String] Canonical resource reference.
@return [String] unique id of the Event
object.
Public Instance Methods
Get Scheduled Event
associated with self.
@return [Calendly::Event] @raise [Calendly::Error] if the uuid is empty. @raise [Calendly::ApiError] if the api returns error code. @since 0.1.0
# File lib/calendly/models/event.rb, line 83 def fetch client.scheduled_event uuid end
Returns all Event
Invitees associated with self.
@param [Hash] options the optional request parameters. Optional. @option options [Integer] :count Number of rows to return. @option options [String] :email Filter by email. @option options [String] :page_token Pass this to get the next portion of collection. @option opts [String] :sort Order results by the specified field and directin. Accepts comma-separated list of {field}:{direction} values. @option opts [String] :status Whether the scheduled event is active or canceled. @return [Array<Calendly::Invitee>] @raise [Calendly::Error] if the uuid is empty. @raise [Calendly::ApiError] if the api returns error code. @since 0.1.0
# File lib/calendly/models/event.rb, line 102 def invitees(options: nil) return @cached_invitees if defined?(@cached_invitees) && @cached_invitees request_proc = proc { |opts| client.event_invitees uuid, options: opts } @cached_invitees = auto_pagination request_proc, options end
@since 0.2.0
# File lib/calendly/models/event.rb, line 110 def invitees!(options: nil) @cached_invitees = nil invitees options: options end
Private Instance Methods
Calendly::ModelUtils#after_set_attributes
# File lib/calendly/models/event.rb, line 117 def after_set_attributes(attrs) super attrs if event_memberships.is_a? Array # rubocop:disable Style/GuardClause @event_memberships = event_memberships.map do |params| uri = params[:user] User.new({uri: uri}, @client) end end end