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



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

#description ⇒ Object



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

def description
  @description
end

#name ⇒ Object



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

def name
  @name
end

#source ⇒ Object



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