Class: Haipa::Client::TypedErrorInfo
- Inherits:
-
Object
- Object
- Haipa::Client::TypedErrorInfo
- Defined in:
- lib/haipa_rest/typed_error_info.rb
Overview
Class which represents the error type and information.
Instance Attribute Summary collapse
-
#info ⇒ Object
The error info parsed from the body of the http error response.
-
#type ⇒ String
The error type parsed from the body of the http error response.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ TypedErrorInfo
Deserializes given hash into TypedErrorInfo object.
Instance Attribute Details
#info ⇒ Object
Returns the error info parsed from the body of the http error response.
15 16 17 |
# File 'lib/haipa_rest/typed_error_info.rb', line 15 def info @info end |
#type ⇒ String
Returns the error type parsed from the body of the http error response.
12 13 14 |
# File 'lib/haipa_rest/typed_error_info.rb', line 12 def type @type end |
Class Method Details
.deserialize_object(object) ⇒ TypedErrorInfo
Deserializes given hash into TypedErrorInfo object.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/haipa_rest/typed_error_info.rb', line 22 def self.deserialize_object(object) return if object.nil? output_object = TypedErrorInfo.new output_object.type = object['type'] output_object.info = object['info'] output_object end |