Class: Twilio::REST::Sync::V1::ServiceContext::DocumentListResponse

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of DocumentListResponse.

Parameters:

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


460
461
462
463
464
465
466
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 460

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

Instance Method Details

#documentObject



549
550
551
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 549

def document
    @document
end

#document_instanceObject



468
469
470
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 468

def document_instance
    @instance
end

#headersObject



553
554
555
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 553

def headers
  @headers
end

#status_codeObject



557
558
559
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 557

def status_code
  @status_code
end