Class: Twilio::REST::Knowledge::V2::SearchListResponse
- Inherits:
-
InstanceListResource
- Object
- InstanceListResource
- Twilio::REST::Knowledge::V2::SearchListResponse
- Defined in:
- lib/twilio-ruby/rest/knowledge/v2/search.rb
Instance Method Summary collapse
- #headers ⇒ Object
-
#initialize(version, payload, key, limit = :unset) ⇒ SearchListResponse
constructor
A new instance of SearchListResponse.
- #search ⇒ Object
- #status_code ⇒ Object
Constructor Details
#initialize(version, payload, key, limit = :unset) ⇒ SearchListResponse
Returns a new instance of SearchListResponse.
177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 177 def initialize(version, payload, key, limit = :unset) data_list = payload.body[key] || [] if limit != :unset data_list = data_list[0, limit] end @search = data_list.map do |data| SearchInstance.new(version, data) end @headers = payload.headers @status_code = payload.status_code end |
Instance Method Details
#headers ⇒ Object
193 194 195 |
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 193 def headers @headers end |
#search ⇒ Object
189 190 191 |
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 189 def search @search end |
#status_code ⇒ Object
197 198 199 |
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 197 def status_code @status_code end |