Class: Twilio::REST::Knowledge::V2::SearchListResponse

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of SearchListResponse.

Parameters:

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


180
181
182
183
184
185
186
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 180

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

Instance Method Details

#headersObject



274
275
276
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 274

def headers
  @headers
end

#searchObject



270
271
272
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 270

def search
    @search
end

#search_instanceObject



188
189
190
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 188

def search_instance
    @instance
end

#status_codeObject



278
279
280
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 278

def status_code
  @status_code
end