Class: Twilio::REST::Sync::V1::ServiceContext::SyncStreamContext::StreamMessageInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Sync::V1::ServiceContext::SyncStreamContext::StreamMessageInstance
- Defined in:
- lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb
Instance Method Summary collapse
-
#data ⇒ Hash
An arbitrary, schema-less object that contains the Stream Message body.
-
#initialize(version, payload, service_sid: nil, stream_sid: nil) ⇒ StreamMessageInstance
constructor
Initialize the StreamMessageInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sid ⇒ String
The unique string that we created to identify the Stream Message resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, service_sid: nil, stream_sid: nil) ⇒ StreamMessageInstance
Initialize the StreamMessageInstance
205 206 207 208 209 210 211 212 213 214 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 205 def initialize(version, payload , service_sid: nil, stream_sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'data' => payload['data'], } end |
Instance Method Details
#data ⇒ Hash
Returns An arbitrary, schema-less object that contains the Stream Message body. Can be up to 4 KiB in length.
225 226 227 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 225 def data @properties['data'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
237 238 239 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 237 def inspect "<Twilio.Sync.V1.StreamMessageInstance>" end |
#sid ⇒ String
Returns The unique string that we created to identify the Stream Message resource.
219 220 221 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 219 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
231 232 233 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 231 def to_s "<Twilio.Sync.V1.StreamMessageInstance>" end |