Class: Verizon::EdgePerformanceResultException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- Verizon::EdgePerformanceResultException
- Defined in:
- lib/verizon/exceptions/edge_performance_result_exception.rb
Overview
Types of errors in response.
Instance Attribute Summary collapse
-
#message ⇒ String
Error details.
-
#status ⇒ String
HTTP status code.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ EdgePerformanceResultException
constructor
The constructor.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ EdgePerformanceResultException
The constructor.
23 24 25 26 27 |
# File 'lib/verizon/exceptions/edge_performance_result_exception.rb', line 23 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#message ⇒ String
Error details.
18 19 20 |
# File 'lib/verizon/exceptions/edge_performance_result_exception.rb', line 18 def @message end |
#status ⇒ String
HTTP status code.
14 15 16 |
# File 'lib/verizon/exceptions/edge_performance_result_exception.rb', line 14 def status @status end |
Instance Method Details
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
32 33 34 35 |
# File 'lib/verizon/exceptions/edge_performance_result_exception.rb', line 32 def unbox(hash) @status = hash.key?('status') ? hash['status'] : SKIP @message = hash.key?('message') ? hash['message'] : SKIP end |