Class: Twilio::REST::Knowledge::V2::KnowledgeList::KnowledgeErrorGroup

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) ⇒ KnowledgeErrorGroup

Returns a new instance of KnowledgeErrorGroup.



45
46
47
48
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 45

def initialize(payload)
        @title = payload["title"]
        @instances = payload["instances"]
end

Instance Attribute Details

#instancesObject

Parameters:

  • : (title)

    [String] The error type or reason (e.g., "404 Not Found", "500 Internal Server Error").

  • : (instances)

    [Array<KnowledgeList.KnowledgeErrorInstance>] Array of error instances for this error title. Required when an error group is present.



44
45
46
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 44

def instances
  @instances
end

#titleObject

Parameters:

  • : (title)

    [String] The error type or reason (e.g., "404 Not Found", "500 Internal Server Error").

  • : (instances)

    [Array<KnowledgeList.KnowledgeErrorInstance>] Array of error instances for this error title. Required when an error group is present.



44
45
46
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 44

def title
  @title
end

Instance Method Details

#to_json(options = {}) ⇒ Object



49
50
51
52
53
54
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 49

def to_json(options = {})
{
        "title": @title,
        "instances": @instances,
}.to_json(options)
end