Class: Haipa::Client::CloudErrorData
- Inherits:
-
Object
- Object
- Haipa::Client::CloudErrorData
- Defined in:
- lib/haipa_rest/cloud_error_data.rb
Overview
Class which represents keeps aux data about Haipa invalid response.
Instance Attribute Summary collapse
-
#additionalInfo ⇒ Array<TypedErrorInfo>
The list of additional error info parsed from the body of the http error response.
-
#code ⇒ String
The error code parsed from the body of the http error response.
-
#message ⇒ String
The error message parsed from the body of the http error response.
-
#target ⇒ String
The error target parsed from the body of the http error response.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ CloudErrorData
Deserializes given hash into CloudErrorData object.
Instance Attribute Details
#additionalInfo ⇒ Array<TypedErrorInfo>
Returns the list of additional error info parsed from the body of the http error response.
21 22 23 |
# File 'lib/haipa_rest/cloud_error_data.rb', line 21 def additionalInfo @additionalInfo end |
#code ⇒ String
Returns the error code parsed from the body of the http error response.
12 13 14 |
# File 'lib/haipa_rest/cloud_error_data.rb', line 12 def code @code end |
#message ⇒ String
Returns the error message parsed from the body of the http error response.
15 16 17 |
# File 'lib/haipa_rest/cloud_error_data.rb', line 15 def @message end |
#target ⇒ String
Returns the error target parsed from the body of the http error response.
18 19 20 |
# File 'lib/haipa_rest/cloud_error_data.rb', line 18 def target @target end |
Class Method Details
.deserialize_object(object) ⇒ CloudErrorData
Deserializes given hash into CloudErrorData object.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/haipa_rest/cloud_error_data.rb', line 28 def self.deserialize_object(object) return if object.nil? output_object = CloudErrorData.new output_object.code = object['code'] output_object. = object['message'] output_object.target = object['target'] unless object['additionalInfo'].nil? output_object.additionalInfo = [] object['additionalInfo'].each do |info| output_object.additionalInfo << Haipa::Client::TypedErrorInfo.deserialize_object(info) end end output_object end |