Class: Twilio::REST::Knowledge::V2::KnowledgeList::KnowledgeCore

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ KnowledgeCore

Returns a new instance of KnowledgeCore.



27
28
29
30
31
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 27

def initialize(payload)
        @name = payload["name"]
        @description = payload["description"]
        @source = payload["source"]
end

Instance Attribute Details

#descriptionObject

Parameters:

  • : (name)
    String

    The name of the knowledge source.

  • : (description)
    String

    A detailed description of the knowledge source and when to use it. This helps provide context about the content and its intended purpose.

  • : (source)
    KnowledgeList.KnowledgeSourceTypes


26
27
28
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 26

def description
  @description
end

#nameObject

Parameters:

  • : (name)
    String

    The name of the knowledge source.

  • : (description)
    String

    A detailed description of the knowledge source and when to use it. This helps provide context about the content and its intended purpose.

  • : (source)
    KnowledgeList.KnowledgeSourceTypes


26
27
28
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 26

def name
  @name
end

#sourceObject

Parameters:

  • : (name)
    String

    The name of the knowledge source.

  • : (description)
    String

    A detailed description of the knowledge source and when to use it. This helps provide context about the content and its intended purpose.

  • : (source)
    KnowledgeList.KnowledgeSourceTypes


26
27
28
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 26

def source
  @source
end

Instance Method Details

#to_json(options = {}) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 32

def to_json(options = {})
{
        "name": @name,
        "description": @description,
        "source": @source,
}.to_json(options)
end