Class: Twilio::REST::Sync::V1::ServiceContext::SyncStreamContext::StreamMessageListResponse
- Inherits:
-
InstanceListResource
- Object
- InstanceListResource
- Twilio::REST::Sync::V1::ServiceContext::SyncStreamContext::StreamMessageListResponse
- Defined in:
- lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb
Instance Method Summary collapse
- #headers ⇒ Object
-
#initialize(version, payload, key, limit = :unset) ⇒ StreamMessageListResponse
constructor
A new instance of StreamMessageListResponse.
- #status_code ⇒ Object
- #stream_message ⇒ Object
Constructor Details
#initialize(version, payload, key, limit = :unset) ⇒ StreamMessageListResponse
Returns a new instance of StreamMessageListResponse.
170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 170 def initialize(version, payload, key, limit = :unset) data_list = payload.body[key] if limit != :unset data_list = data_list[0, limit] end @stream_message = data_list.map do |data| StreamMessageInstance.new(version, data) end @headers = payload.headers @status_code = payload.status_code end |
Instance Method Details
#headers ⇒ Object
186 187 188 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 186 def headers @headers end |
#status_code ⇒ Object
190 191 192 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 190 def status_code @status_code end |
#stream_message ⇒ Object
182 183 184 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 182 def @stream_message end |