Class: Twilio::REST::Sync::V1::ServiceContext::SyncStreamListResponse

Inherits:
InstanceListResource show all
Defined in:
lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb,
lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, key, limit = :unset) ⇒ SyncStreamListResponse

Returns a new instance of SyncStreamListResponse.

Parameters:

  • instance (Array<SyncStreamInstance>)
  • headers (Hash{String => Object})
  • status_code (Integer)


444
445
446
447
448
449
450
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb', line 444

def initialize(version, payload, key)
   @sync_stream_instance = payload.body[key].map do |data|
    SyncStreamInstance.new(version, data)
   end
   @headers = payload.headers
   @status_code = payload.status_code
end

Instance Method Details

#headersObject



537
538
539
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb', line 537

def headers
  @headers
end

#status_codeObject



541
542
543
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb', line 541

def status_code
  @status_code
end

#sync_streamObject



533
534
535
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb', line 533

def sync_stream
    @sync_stream
end

#sync_stream_instanceObject



452
453
454
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb', line 452

def sync_stream_instance
    @instance
end