Exception: Moyasar::MoyasarError
- Inherits:
-
StandardError
- Object
- StandardError
- Moyasar::MoyasarError
- Defined in:
- lib/moyasar/errors/moyasar_error.rb
Direct Known Subclasses
APIConnectionError, APIError, AccountInactiveError, AuthenticationError, InvalidRequestError, RateLimitError
Instance Attribute Summary collapse
-
#http_code ⇒ Object
readonly
Returns the value of attribute http_code.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ MoyasarError
constructor
A new instance of MoyasarError.
Constructor Details
#initialize(attrs = {}) ⇒ MoyasarError
Returns a new instance of MoyasarError.
5 6 7 8 9 |
# File 'lib/moyasar/errors/moyasar_error.rb', line 5 def initialize(attrs = {}) @type = attrs['type'] @http_code = attrs['http_code'] super(attrs['message']) end |
Instance Attribute Details
#http_code ⇒ Object (readonly)
Returns the value of attribute http_code.
3 4 5 |
# File 'lib/moyasar/errors/moyasar_error.rb', line 3 def http_code @http_code end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/moyasar/errors/moyasar_error.rb', line 3 def type @type end |