Class: Bancard::SingleBuyRollbackResponse
- Inherits:
-
Object
- Object
- Bancard::SingleBuyRollbackResponse
- Defined in:
- lib/bancard/single_buy_rollback_response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
-
#initialize(response) ⇒ SingleBuyRollbackResponse
constructor
A new instance of SingleBuyRollbackResponse.
- #message ⇒ Object
- #params ⇒ Object
- #process_id ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ SingleBuyRollbackResponse
Returns a new instance of SingleBuyRollbackResponse.
8 9 10 11 |
# File 'lib/bancard/single_buy_rollback_response.rb', line 8 def initialize(response) @original_response = response @body = JSON.parse(response.body) end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/bancard/single_buy_rollback_response.rb', line 6 def body @body end |
Instance Method Details
#message ⇒ Object
25 26 |
# File 'lib/bancard/single_buy_rollback_response.rb', line 25 def end |
#params ⇒ Object
17 18 19 |
# File 'lib/bancard/single_buy_rollback_response.rb', line 17 def params body end |
#process_id ⇒ Object
21 22 23 |
# File 'lib/bancard/single_buy_rollback_response.rb', line 21 def process_id body['process_id'] end |
#success? ⇒ Boolean
13 14 15 |
# File 'lib/bancard/single_buy_rollback_response.rb', line 13 def success? body['status'] == 'success' end |