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)


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

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



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

def document
    @document
end

#document_instanceObject



476
477
478
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 476

def document_instance
    @instance
end

#headersObject



561
562
563
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 561

def headers
  @headers
end

#status_codeObject



565
566
567
# File 'lib/twilio-ruby/rest/sync/v1/service/document.rb', line 565

def status_code
  @status_code
end