Exception: Bandwidth::MessagingException
- Inherits:
-
APIException
- Object
- StandardError
- APIException
- Bandwidth::MessagingException
- Defined in:
- lib/bandwidth/messaging_lib/messaging/exceptions/messaging_exception.rb
Overview
MessagingException class.
Instance Attribute Summary collapse
-
#description ⇒ String
TODO: Write general description for this method.
-
#type ⇒ String
TODO: Write general description for this method.
Attributes inherited from APIException
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ MessagingException
constructor
The constructor.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ MessagingException
The constructor.
20 21 22 23 24 |
# File 'lib/bandwidth/messaging_lib/messaging/exceptions/messaging_exception.rb', line 20 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#description ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/bandwidth/messaging_lib/messaging/exceptions/messaging_exception.rb', line 15 def description @description end |
#type ⇒ String
TODO: Write general description for this method
11 12 13 |
# File 'lib/bandwidth/messaging_lib/messaging/exceptions/messaging_exception.rb', line 11 def type @type end |
Instance Method Details
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
29 30 31 32 |
# File 'lib/bandwidth/messaging_lib/messaging/exceptions/messaging_exception.rb', line 29 def unbox(hash) @type = hash['type'] @description = hash['description'] end |