Class: Twilio::REST::Knowledge::V2::KnowledgeList::KnowledgeCore
- Inherits:
-
Object
- Object
- Twilio::REST::Knowledge::V2::KnowledgeList::KnowledgeCore
- Defined in:
- lib/twilio-ruby/rest/knowledge/v2/knowledge.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ KnowledgeCore
constructor
A new instance of KnowledgeCore.
- #to_json(options = {}) ⇒ Object
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
#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( = {}) { "name": @name, "description": @description, "source": @source, }.to_json() end |