Class: Twilio::REST::Assistants::V1::ToolListResponse

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ToolListResponse.

Parameters:

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


573
574
575
576
577
578
579
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 573

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

Instance Method Details

#headersObject



666
667
668
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 666

def headers
  @headers
end

#status_codeObject



670
671
672
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 670

def status_code
  @status_code
end

#toolObject



662
663
664
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 662

def tool
    @tool
end

#tool_instanceObject



581
582
583
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 581

def tool_instance
    @instance
end