Exception: Telapi::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Telapi::ApiError
- Defined in:
- lib/telapi/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#help_uri ⇒ Object
Returns the value of attribute help_uri.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(attributes) ⇒ ApiError
Returns a new instance of ApiError.
5 6 7 8 9 10 |
# File 'lib/telapi/error.rb', line 5 def initialize(attributes) super attributes['message'] @status = attributes['status'] @code = attributes['code'] @help_uri = attributes['more_info'] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/telapi/error.rb', line 3 def code @code end |
#help_uri ⇒ Object
Returns the value of attribute help_uri.
3 4 5 |
# File 'lib/telapi/error.rb', line 3 def help_uri @help_uri end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/telapi/error.rb', line 3 def status @status end |