Class: Bancard::SingleBuyRollbackResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/bancard/single_buy_rollback_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (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

#messageObject



25
26
# File 'lib/bancard/single_buy_rollback_response.rb', line 25

def message
end

#paramsObject



17
18
19
# File 'lib/bancard/single_buy_rollback_response.rb', line 17

def params
  body
end

#process_idObject



21
22
23
# File 'lib/bancard/single_buy_rollback_response.rb', line 21

def process_id
  body['process_id']
end

#success?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/bancard/single_buy_rollback_response.rb', line 13

def success?
  body['status'] == 'success'
end