Class: Mobiscroll::Connect::EventsListResponse
- Inherits:
-
Struct
- Object
- Struct
- Mobiscroll::Connect::EventsListResponse
- Defined in:
- lib/mobiscroll/connect/models.rb
Overview
Paginated response from Events#list.
Instance Attribute Summary collapse
-
#events ⇒ Object
Returns the value of attribute events.
-
#next_page_token ⇒ Object
Returns the value of attribute next_page_token.
-
#page_size ⇒ Object
Returns the value of attribute page_size.
Class Method Summary collapse
Instance Attribute Details
#events ⇒ Object
Returns the value of attribute events
163 164 165 |
# File 'lib/mobiscroll/connect/models.rb', line 163 def events @events end |
#next_page_token ⇒ Object
Returns the value of attribute next_page_token
163 164 165 |
# File 'lib/mobiscroll/connect/models.rb', line 163 def next_page_token @next_page_token end |
#page_size ⇒ Object
Returns the value of attribute page_size
163 164 165 |
# File 'lib/mobiscroll/connect/models.rb', line 163 def page_size @page_size end |
Class Method Details
.from_h(hash) ⇒ Object
164 165 166 167 168 169 170 171 172 173 |
# File 'lib/mobiscroll/connect/models.rb', line 164 def self.from_h(hash) return new(events: [], page_size: nil, next_page_token: nil) if hash.nil? events = (hash['events'] || hash[:events] || []).map { |e| CalendarEvent.from_h(e) } new( events: events, page_size: hash['pageSize'] || hash[:pageSize], next_page_token: hash['nextPageToken'] || hash[:nextPageToken] ) end |