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)


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

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



674
675
676
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 674

def headers
  @headers
end

#status_codeObject



678
679
680
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 678

def status_code
  @status_code
end

#toolObject



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

def tool
    @tool
end

#tool_instanceObject



589
590
591
# File 'lib/twilio-ruby/rest/assistants/v1/tool.rb', line 589

def tool_instance
    @instance
end