Exception: Wepay::ApiError
Overview
This error is raised when there is an error in the request.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, message, code) ⇒ ApiError
constructor
A new instance of ApiError.
- #message ⇒ Object
Constructor Details
#initialize(type, message, code) ⇒ ApiError
Returns a new instance of ApiError.
11 12 13 14 15 |
# File 'lib/wepay/error.rb', line 11 def initialize(type, , code) super() @type = type @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
9 10 11 |
# File 'lib/wepay/error.rb', line 9 def code @code end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/wepay/error.rb', line 9 def type @type end |
Instance Method Details
#message ⇒ Object
17 18 19 |
# File 'lib/wepay/error.rb', line 17 def "#{type} (#{code}): #{super}" end |