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.



153
154
155
156
157
158
159
160
161
162
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 153

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

#chunks ⇒ Array<KnowledgeChunkResult>

Returns:

  • (Array<KnowledgeChunkResult>)


167
168
169
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 167

def chunks
    @properties['chunks']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



179
180
181
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 179

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

#to_s ⇒ Object

Provide a user friendly representation



173
174
175
# File 'lib/twilio-ruby/rest/knowledge/v2/search.rb', line 173

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