Exception: Bandwidth::AccountsTnlookup400ErrorException
- Inherits:
-
APIException
- Object
- StandardError
- APIException
- Bandwidth::AccountsTnlookup400ErrorException
- Defined in:
- lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/exceptions/accounts_tnlookup400_error_exception.rb
Overview
Accounts Tnlookup 400 Error class.
Instance Attribute Summary collapse
-
#message ⇒ String
A description of what validation error occurred.
Attributes inherited from APIException
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ AccountsTnlookup400ErrorException
constructor
The constructor.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ AccountsTnlookup400ErrorException
The constructor.
19 20 21 22 23 |
# File 'lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/exceptions/accounts_tnlookup400_error_exception.rb', line 19 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#message ⇒ String
A description of what validation error occurred.
14 15 16 |
# File 'lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/exceptions/accounts_tnlookup400_error_exception.rb', line 14 def @message end |
Instance Method Details
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
28 29 30 |
# File 'lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/exceptions/accounts_tnlookup400_error_exception.rb', line 28 def unbox(hash) @message = hash.key?('message') ? hash['message'] : SKIP end |