Class: LockstepSdk::ErrorResult

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/error_result.rb

Overview

Represents a failed API request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ ErrorResult

Initialize the ErrorResult using the provided prototype



25
26
27
28
29
30
31
32
# File 'lib/lockstep_sdk/models/error_result.rb', line 25

def initialize(params = {})
    @type = params.dig(:type)
    @title = params.dig(:title)
    @status = params.dig(:status)
    @detail = params.dig(:detail)
    @instance = params.dig(:instance)
    @content = params.dig(:content)
end

Instance Attribute Details

#contentString

Returns The full content of the HTTP response.

Returns:

  • (String)

    The full content of the HTTP response.



56
57
58
# File 'lib/lockstep_sdk/models/error_result.rb', line 56

def content
  @content
end

#detailString

Returns If detailed information about this error is available, this value contains more information.

Returns:

  • (String)

    If detailed information about this error is available, this value contains more information.



48
49
50
# File 'lib/lockstep_sdk/models/error_result.rb', line 48

def detail
  @detail
end

#instanceString

Returns If this error corresponds to a specific instance or object, this field indicates which one.

Returns:

  • (String)

    If this error corresponds to a specific instance or object, this field indicates which one.



52
53
54
# File 'lib/lockstep_sdk/models/error_result.rb', line 52

def instance
  @instance
end

#statusInt32

Returns If an error code is applicable, this contains an error number.

Returns:

  • (Int32)

    If an error code is applicable, this contains an error number.



44
45
46
# File 'lib/lockstep_sdk/models/error_result.rb', line 44

def status
  @status
end

#titleString

Returns A short title describing the error.

Returns:

  • (String)

    A short title describing the error.



40
41
42
# File 'lib/lockstep_sdk/models/error_result.rb', line 40

def title
  @title
end

#typeString

Returns A description of the type of error that occurred.

Returns:

  • (String)

    A description of the type of error that occurred.



36
37
38
# File 'lib/lockstep_sdk/models/error_result.rb', line 36

def type
  @type
end

Instance Method Details

#as_json(options = {}) ⇒ object

Returns This object as a JSON key-value structure.

Returns:

  • (object)

    This object as a JSON key-value structure



60
61
62
63
64
65
66
67
68
69
# File 'lib/lockstep_sdk/models/error_result.rb', line 60

def as_json(options={})
    {
        'type' => @type,
        'title' => @title,
        'status' => @status,
        'detail' => @detail,
        'instance' => @instance,
        'content' => @content,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



73
74
75
# File 'lib/lockstep_sdk/models/error_result.rb', line 73

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end