Class: Payture::Cheques::Responses::Base
- Inherits:
-
Object
- Object
- Payture::Cheques::Responses::Base
- Defined in:
- lib/payture/cheques/responses/base.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
- #error? ⇒ Boolean
- #error_code ⇒ Object
- #error_messages ⇒ Object
-
#initialize(body) ⇒ Base
constructor
A new instance of Base.
- #success? ⇒ Boolean
Constructor Details
#initialize(body) ⇒ Base
Returns a new instance of Base.
8 9 10 |
# File 'lib/payture/cheques/responses/base.rb', line 8 def initialize(body) @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/payture/cheques/responses/base.rb', line 6 def body @body end |
Instance Method Details
#error? ⇒ Boolean
16 17 18 |
# File 'lib/payture/cheques/responses/base.rb', line 16 def error? !success? end |
#error_code ⇒ Object
20 21 22 |
# File 'lib/payture/cheques/responses/base.rb', line 20 def error_code body['ErrCode'] end |
#error_messages ⇒ Object
24 25 26 |
# File 'lib/payture/cheques/responses/base.rb', line 24 def body['ErrMessages'] end |
#success? ⇒ Boolean
12 13 14 |
# File 'lib/payture/cheques/responses/base.rb', line 12 def success? body['Success'] == 'True' end |