Class: Afterpay::Error
- Inherits:
-
Object
- Object
- Afterpay::Error
- Defined in:
- lib/afterpay/error.rb
Overview
Error class with accessor to methods Afterpay error returns the same format containing ‘errorId`, `errorCode`, `message`
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#id ⇒ Object
Returns the value of attribute id.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
10 11 12 13 14 |
# File 'lib/afterpay/error.rb', line 10 def initialize(response) @id = response[:errorId] @code = response[:errorCode] @message = response[:message] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
8 9 10 |
# File 'lib/afterpay/error.rb', line 8 def code @code end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/afterpay/error.rb', line 8 def id @id end |
#message ⇒ Object
Returns the value of attribute message.
8 9 10 |
# File 'lib/afterpay/error.rb', line 8 def @message end |