Class: Adyen::REST::ModifyPayment::Response

Inherits:
Response
  • Object
show all
Defined in:
lib/adyen/rest/modify_payment.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#attributes, #http_response, #prefix

Instance Method Summary collapse

Methods inherited from Response

#[], #has_attribute?, #psp_reference

Constructor Details

#initialize(http_response, options = {}) ⇒ Response

Returns a new instance of Response.



18
19
20
21
# File 'lib/adyen/rest/modify_payment.rb', line 18

def initialize(http_response, options = {})
  super
  @expected_response = options[:expects]
end

Instance Attribute Details

#expected_responseObject (readonly)

Returns the value of attribute expected_response.



16
17
18
# File 'lib/adyen/rest/modify_payment.rb', line 16

def expected_response
  @expected_response
end

Instance Method Details

#received?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/adyen/rest/modify_payment.rb', line 23

def received?
  self[:response] == expected_response
end