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
110 111 112 113 114 115 116 117 118 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 110 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.
129 130 131 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 129 def data @properties['data'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
141 142 143 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 141 def inspect "<Twilio.Sync.V1.StreamMessageInstance>" end |
#sid ⇒ String
Returns The unique string that we created to identify the Stream Message resource.
123 124 125 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 123 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
135 136 137 |
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb', line 135 def to_s "<Twilio.Sync.V1.StreamMessageInstance>" end |