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
191 192 193 |
# File 'lib/mobiscroll/connect/models.rb', line 191 def events @events end |
#next_page_token ⇒ Object
Returns the value of attribute next_page_token
191 192 193 |
# File 'lib/mobiscroll/connect/models.rb', line 191 def next_page_token @next_page_token end |
#page_size ⇒ Object
Returns the value of attribute page_size
191 192 193 |
# File 'lib/mobiscroll/connect/models.rb', line 191 def page_size @page_size end |
Class Method Details
.from_h(hash) ⇒ Object
192 193 194 195 196 197 198 199 200 201 |
# File 'lib/mobiscroll/connect/models.rb', line 192 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 |