Exception: Pin::ChargeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/pin_up/pin_errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#messageObject

Returns the value of attribute message.



90
91
92
# File 'lib/pin_up/pin_errors.rb', line 90

def message
  @message
end

#responseObject

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_sObject



96
97
98
# File 'lib/pin_up/pin_errors.rb', line 96

def to_s
  @message
end