Class: Twilio::REST::Assistants::V1::KnowledgeListResponse

Inherits:
InstanceListResource show all
Defined in:
lib/twilio-ruby/rest/assistants/v1/knowledge.rb,
lib/twilio-ruby/rest/assistants/v1/knowledge.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of KnowledgeListResponse.

Parameters:

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


598
599
600
601
602
603
604
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 598

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

Instance Method Details

#headersObject



691
692
693
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 691

def headers
  @headers
end

#knowledgeObject



687
688
689
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 687

def knowledge
    @knowledge
end

#knowledge_instanceObject



606
607
608
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 606

def knowledge_instance
    @instance
end

#status_codeObject



695
696
697
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 695

def status_code
  @status_code
end