Exception: PinPays::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- PinPays::ApiError
- Defined in:
- lib/pin_pays/error.rb
Instance Attribute Summary collapse
-
#charge_token ⇒ Object
Returns the value of attribute charge_token.
-
#error ⇒ Object
Returns the value of attribute error.
-
#error_description ⇒ Object
Returns the value of attribute error_description.
-
#messages ⇒ Object
Returns the value of attribute messages.
-
#raw_response ⇒ Object
Returns the value of attribute raw_response.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, response) ⇒ ApiError
constructor
A new instance of ApiError.
- #to_s ⇒ Object
Constructor Details
#initialize(status, response) ⇒ ApiError
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pin_pays/error.rb', line 6 def initialize(status, response) @status = status @error = response['error'] @error_description = response['error_description'] @charge_token = response['charge_token'] @messages = response['messages'] @raw_response = response #puts "ApiError" #puts " #{@status} #{@error} #{@error_description}" end |
Instance Attribute Details
#charge_token ⇒ Object
Returns the value of attribute charge_token.
4 5 6 |
# File 'lib/pin_pays/error.rb', line 4 def charge_token @charge_token end |
#error ⇒ Object
Returns the value of attribute error.
4 5 6 |
# File 'lib/pin_pays/error.rb', line 4 def error @error end |
#error_description ⇒ Object
Returns the value of attribute error_description.
4 5 6 |
# File 'lib/pin_pays/error.rb', line 4 def error_description @error_description end |
#messages ⇒ Object
Returns the value of attribute messages.
4 5 6 |
# File 'lib/pin_pays/error.rb', line 4 def @messages end |
#raw_response ⇒ Object
Returns the value of attribute raw_response.
4 5 6 |
# File 'lib/pin_pays/error.rb', line 4 def raw_response @raw_response end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/pin_pays/error.rb', line 4 def status @status end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/pin_pays/error.rb', line 20 def to_s "#{@error}" end |