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)


436
437
438
439
440
441
442
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb', line 436

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



529
530
531
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb', line 529

def headers
  @headers
end

#status_codeObject



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

def status_code
  @status_code
end

#sync_streamObject



525
526
527
# File 'lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb', line 525

def sync_stream
    @sync_stream
end

#sync_stream_instanceObject



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

def sync_stream_instance
    @instance
end