Class: DSP::ErrorResponse
Overview
interface ErrorResponse extends Response {
body: {
/** An optional, structured error message. */
error?: Message;
};
}
Instance Attribute Summary collapse
-
#body ⇒ Object
type: {.
-
#command ⇒ Object
type: {.
-
#message ⇒ Object
type: {.
-
#request_seq ⇒ Object
/** An optional, structured error message.
-
#seq ⇒ Object
type: {.
-
#success ⇒ Object
type: {.
-
#type ⇒ Object
type: {.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ ErrorResponse
constructor
A new instance of ErrorResponse.
Methods inherited from DSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ ErrorResponse
Returns a new instance of ErrorResponse.
134 135 136 137 |
# File 'lib/dsp/dsp_protocol.rb', line 134 def initialize(initial_hash = nil) super @optional_method_names = i[] end |
Instance Attribute Details
#body ⇒ Object
type: {
128 129 130 |
# File 'lib/dsp/dsp_protocol.rb', line 128 def body @body end |
#command ⇒ Object
type: {
128 129 130 |
# File 'lib/dsp/dsp_protocol.rb', line 128 def command @command end |
#message ⇒ Object
type: {
128 129 130 |
# File 'lib/dsp/dsp_protocol.rb', line 128 def end |
#request_seq ⇒ Object
/** An optional, structured error message. */
error?: Message;
}
132 133 134 |
# File 'lib/dsp/dsp_protocol.rb', line 132 def request_seq @request_seq end |
#seq ⇒ Object
type: {
128 129 130 |
# File 'lib/dsp/dsp_protocol.rb', line 128 def seq @seq end |
#success ⇒ Object
type: {
128 129 130 |
# File 'lib/dsp/dsp_protocol.rb', line 128 def success @success end |
#type ⇒ Object
type: {
128 129 130 |
# File 'lib/dsp/dsp_protocol.rb', line 128 def type @type end |
Instance Method Details
#from_h!(value) ⇒ Object
139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/dsp/dsp_protocol.rb', line 139 def from_h!(value) value = {} if value.nil? self.body = value['body'] # Unknown type self.request_seq = value['request_seq'] self.success = value['success'] # Unknown type self.command = value['command'] self. = value['message'] self.seq = value['seq'] self.type = value['type'] self end |