Exception: Pin::ChargeError
- Inherits:
-
StandardError
- Object
- StandardError
- Pin::ChargeError
- Defined in:
- lib/pin_up/pin_errors.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ ChargeError
constructor
A new instance of ChargeError.
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ ChargeError
Returns a new instance of ChargeError.
91 92 93 94 |
# File 'lib/pin_up/pin_errors.rb', line 91 def initialize(response) @response = response @message = "#{@response['error']}: #{@response['error_description']}. Charge token: #{@response['charge_token']}" end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
90 91 92 |
# File 'lib/pin_up/pin_errors.rb', line 90 def @message end |
#response ⇒ Object
Returns the value of attribute response.
90 91 92 |
# File 'lib/pin_up/pin_errors.rb', line 90 def response @response end |
Instance Method Details
#to_s ⇒ Object
96 97 98 |
# File 'lib/pin_up/pin_errors.rb', line 96 def to_s @message end |