Class: Twilio::REST::Knowledge::V2::SearchInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, kb_id: nil) ⇒ SearchInstance

Initialize the SearchInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this Search resource.

  • sid (String)

    The SID of the Call resource to fetch.



212
213
214
215
216
217
218
219
220
221
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 212

def initialize(version, payload , kb_id: nil)
    
    apiV1Version = ApiV1Version.new version.domain, version
    super(apiV1Version)
    
    # Marshaled Properties
    @properties = { 
        'chunks' => payload['chunks'],
    }
end

Instance Method Details

#chunksArray<KnowledgeChunkResult>

Returns:

  • (Array<KnowledgeChunkResult>)


226
227
228
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 226

def chunks
    @properties['chunks']
end

#inspectObject

Provide a detailed, user friendly representation



238
239
240
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 238

def inspect
    "<Twilio.Knowledge.V2.SearchInstance>"
end

#to_sObject

Provide a user friendly representation



232
233
234
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 232

def to_s
    "<Twilio.Knowledge.V2.SearchInstance>"
end