Class: Mobiscroll::Connect::CalendarEvent

Inherits:
Struct
  • Object
show all
Defined in:
lib/mobiscroll/connect/models.rb

Overview

An event returned by the API. Field set mirrors the Node SDK exactly.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#all_dayObject

Returns the value of attribute all_day

Returns:

  • (Object)

    the current value of all_day



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def all_day
  @all_day
end

#attendeesObject

Returns the value of attribute attendees

Returns:

  • (Object)

    the current value of attendees



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def attendees
  @attendees
end

#availabilityObject

Returns the value of attribute availability

Returns:

  • (Object)

    the current value of availability



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def availability
  @availability
end

#calendar_idObject

Returns the value of attribute calendar_id

Returns:

  • (Object)

    the current value of calendar_id



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def calendar_id
  @calendar_id
end

#colorObject

Returns the value of attribute color

Returns:

  • (Object)

    the current value of color



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def color
  @color
end

#conferenceObject

Returns the value of attribute conference

Returns:

  • (Object)

    the current value of conference



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def conference
  @conference
end

#conference_dataObject

Returns the value of attribute conference_data

Returns:

  • (Object)

    the current value of conference_data



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def conference_data
  @conference_data
end

#customObject

Returns the value of attribute custom

Returns:

  • (Object)

    the current value of custom



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def custom
  @custom
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def description
  @description
end

#end_timeObject

Returns the value of attribute end_time

Returns:

  • (Object)

    the current value of end_time



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def end_time
  @end_time
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def id
  @id
end

#last_modifiedObject

Returns the value of attribute last_modified

Returns:

  • (Object)

    the current value of last_modified



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def last_modified
  @last_modified
end

Returns the value of attribute link

Returns:

  • (Object)

    the current value of link



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def link
  @link
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def location
  @location
end

#originalObject

Returns the value of attribute original

Returns:

  • (Object)

    the current value of original



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def original
  @original
end

#privacyObject

Returns the value of attribute privacy

Returns:

  • (Object)

    the current value of privacy



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def privacy
  @privacy
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def provider
  @provider
end

#recurring_event_idObject

Returns the value of attribute recurring_event_id

Returns:

  • (Object)

    the current value of recurring_event_id



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def recurring_event_id
  @recurring_event_id
end

#startObject

Returns the value of attribute start

Returns:

  • (Object)

    the current value of start



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def start
  @start
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def status
  @status
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



134
135
136
# File 'lib/mobiscroll/connect/models.rb', line 134

def title
  @title
end

Class Method Details

.from_h(hash) ⇒ Object



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/mobiscroll/connect/models.rb', line 140

def self.from_h(hash)
  return nil if hash.nil?

  attendees = hash['attendees'] || hash[:attendees]
  attendees = attendees.map { |a| Attendee.from_h(a) } if attendees.is_a?(Array)

  new(
    provider: hash['provider'] || hash[:provider],
    id: hash['id'] || hash[:id],
    calendar_id: hash['calendarId'] || hash[:calendarId],
    title: hash['title'] || hash[:title],
    description: hash['description'] || hash[:description],
    start: hash['start'] || hash[:start],
    end_time: hash['end'] || hash[:end],
    all_day: hash['allDay'] || hash[:allDay],
    recurring_event_id: hash['recurringEventId'] || hash[:recurringEventId],
    color: hash['color'] || hash[:color],
    location: hash['location'] || hash[:location],
    attendees: attendees,
    custom: hash['custom'] || hash[:custom],
    conference: hash['conference'] || hash[:conference],
    conference_data: hash['conferenceData'] || hash[:conferenceData],
    availability: hash['availability'] || hash[:availability],
    privacy: hash['privacy'] || hash[:privacy],
    status: hash['status'] || hash[:status],
    last_modified: hash['lastModified'] || hash[:lastModified],
    link: hash['link'] || hash[:link],
    original: hash['original'] || hash[:original]
  )
end