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



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def all_day
  @all_day
end

#attendeesObject

Returns the value of attribute attendees

Returns:

  • (Object)

    the current value of attendees



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def attendees
  @attendees
end

#availabilityObject

Returns the value of attribute availability

Returns:

  • (Object)

    the current value of availability



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def availability
  @availability
end

#calendar_idObject

Returns the value of attribute calendar_id

Returns:

  • (Object)

    the current value of calendar_id



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def calendar_id
  @calendar_id
end

#colorObject

Returns the value of attribute color

Returns:

  • (Object)

    the current value of color



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def color
  @color
end

#conferenceObject

Returns the value of attribute conference

Returns:

  • (Object)

    the current value of conference



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def conference
  @conference
end

#conference_dataObject

Returns the value of attribute conference_data

Returns:

  • (Object)

    the current value of conference_data



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def conference_data
  @conference_data
end

#customObject

Returns the value of attribute custom

Returns:

  • (Object)

    the current value of custom



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def custom
  @custom
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def description
  @description
end

#end_timeObject

Returns the value of attribute end_time

Returns:

  • (Object)

    the current value of end_time



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def end_time
  @end_time
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def id
  @id
end

#last_modifiedObject

Returns the value of attribute last_modified

Returns:

  • (Object)

    the current value of last_modified



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def last_modified
  @last_modified
end

Returns the value of attribute link

Returns:

  • (Object)

    the current value of link



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def link
  @link
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def location
  @location
end

#originalObject

Returns the value of attribute original

Returns:

  • (Object)

    the current value of original



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def original
  @original
end

#privacyObject

Returns the value of attribute privacy

Returns:

  • (Object)

    the current value of privacy



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def privacy
  @privacy
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def provider
  @provider
end

#recurring_event_idObject

Returns the value of attribute recurring_event_id

Returns:

  • (Object)

    the current value of recurring_event_id



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def recurring_event_id
  @recurring_event_id
end

#startObject

Returns the value of attribute start

Returns:

  • (Object)

    the current value of start



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def start
  @start
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def status
  @status
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



106
107
108
# File 'lib/mobiscroll/connect/models.rb', line 106

def title
  @title
end

Class Method Details

.from_h(hash) ⇒ Object



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/mobiscroll/connect/models.rb', line 112

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