class Twilio::REST::Sync::V1::ServiceContext::SyncStreamContext::StreamMessageInstance

Public Class Methods

new(version, payload, service_sid: nil, stream_sid: nil) click to toggle source

Initialize the StreamMessageInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] service_sid The SID of the {Sync

Service}[https://www.twilio.com/docs/sync/api/service] the resource is
associated with.

@param [String] stream_sid The unique string that we created to identify the

Sync Stream resource.

@return [StreamMessageInstance] StreamMessageInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb
103 def initialize(version, payload, service_sid: nil, stream_sid: nil)
104   super(version)
105 
106   # Marshaled Properties
107   @properties = {'sid' => payload['sid'], 'data' => payload['data'], }
108 end

Public Instance Methods

data() click to toggle source

@return [Hash] Stream Message body

    # File lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb
118 def data
119   @properties['data']
120 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb
130 def inspect
131   "<Twilio.Sync.V1.StreamMessageInstance>"
132 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb
112 def sid
113   @properties['sid']
114 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb
124 def to_s
125   "<Twilio.Sync.V1.StreamMessageInstance>"
126 end