Class: Paymaster::RequestError
- Inherits:
-
Object
- Object
- Paymaster::RequestError
- Defined in:
- lib/paymaster/request_error.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#error_code ⇒ Object
Returns the value of attribute error_code.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
Instance Method Summary collapse
- #error? ⇒ Boolean
-
#initialize(response) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(response) ⇒ RequestError
Returns a new instance of RequestError.
7 8 9 10 11 |
# File 'lib/paymaster/request_error.rb', line 7 def initialize(response) self.data = response self.error_code = response["Retval"].to_i self. = response["Retdesc"] end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/paymaster/request_error.rb', line 3 def data @data end |
#error_code ⇒ Object
Returns the value of attribute error_code.
4 5 6 |
# File 'lib/paymaster/request_error.rb', line 4 def error_code @error_code end |
#error_message ⇒ Object
Returns the value of attribute error_message.
5 6 7 |
# File 'lib/paymaster/request_error.rb', line 5 def @error_message end |
Instance Method Details
#error? ⇒ Boolean
13 14 15 |
# File 'lib/paymaster/request_error.rb', line 13 def error? true end |