Exception: Pin::APIError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ APIError
constructor
A new instance of APIError.
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ APIError
Returns a new instance of APIError.
16 17 18 19 20 21 |
# File 'lib/pin-payments.rb', line 16 def initialize(response) @code = response.code @error = response['error'] @description = response['description'] @response = response end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
14 15 16 |
# File 'lib/pin-payments.rb', line 14 def code @code end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
14 15 16 |
# File 'lib/pin-payments.rb', line 14 def description @description end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
14 15 16 |
# File 'lib/pin-payments.rb', line 14 def error @error end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
14 15 16 |
# File 'lib/pin-payments.rb', line 14 def response @response end |
Instance Method Details
#to_s ⇒ Object
23 24 25 |
# File 'lib/pin-payments.rb', line 23 def to_s "#{@code} #{@error} #{@description}" end |