Class: Twilio::REST::Knowledge::V2::KnowledgeList::KnowledgeErrorInstance

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

Returns a new instance of KnowledgeErrorInstance.



63
64
65
66
67
68
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 63

def initialize(payload)
        @type = payload["type"]
        @code = payload["code"]
        @instance = payload["instance"]
        @detail = payload["detail"]
end

Instance Attribute Details

#codeObject

Parameters:

  • : (type)

    [String] A URI reference identifying the problem type, resolving to human-readable documentation (e.g., https://www.twilio.com/docs/api/errors/420018).

  • : (code)

    [String] Twilio-specific numeric error code for programmatic handling.

  • : (instance)

    [String] The specific URL or resource that caused the error.

  • : (detail)

    [String] Detailed explanation of the error.



62
63
64
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 62

def code
  @code
end

#detailObject

Parameters:

  • : (type)

    [String] A URI reference identifying the problem type, resolving to human-readable documentation (e.g., https://www.twilio.com/docs/api/errors/420018).

  • : (code)

    [String] Twilio-specific numeric error code for programmatic handling.

  • : (instance)

    [String] The specific URL or resource that caused the error.

  • : (detail)

    [String] Detailed explanation of the error.



62
63
64
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 62

def detail
  @detail
end

#instanceObject

Parameters:

  • : (type)

    [String] A URI reference identifying the problem type, resolving to human-readable documentation (e.g., https://www.twilio.com/docs/api/errors/420018).

  • : (code)

    [String] Twilio-specific numeric error code for programmatic handling.

  • : (instance)

    [String] The specific URL or resource that caused the error.

  • : (detail)

    [String] Detailed explanation of the error.



62
63
64
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 62

def instance
  @instance
end

#typeObject

Parameters:

  • : (type)

    [String] A URI reference identifying the problem type, resolving to human-readable documentation (e.g., https://www.twilio.com/docs/api/errors/420018).

  • : (code)

    [String] Twilio-specific numeric error code for programmatic handling.

  • : (instance)

    [String] The specific URL or resource that caused the error.

  • : (detail)

    [String] Detailed explanation of the error.



62
63
64
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 62

def type
  @type
end

Instance Method Details

#to_json(options = {}) ⇒ Object



69
70
71
72
73
74
75
76
# File 'lib/twilio-ruby/rest/knowledge/v2/knowledge.rb', line 69

def to_json(options = {})
{
        "type": @type,
        "code": @code,
        "instance": @instance,
        "detail": @detail,
}.to_json(options)
end