Class: ActiveMerchant::Billing::WorldpayGateway::MultiResponse
- Defined in:
- lib/active_merchant/billing/gateways/worldpay.rb
Instance Attribute Summary collapse
-
#responses ⇒ Object
readonly
Returns the value of attribute responses.
Attributes inherited from Response
#authorization, #avs_result, #cvv_result, #message, #params, #test
Instance Method Summary collapse
- #<<(response) ⇒ Object
-
#initialize ⇒ MultiResponse
constructor
A new instance of MultiResponse.
- #success? ⇒ Boolean
Methods inherited from Response
Constructor Details
#initialize ⇒ MultiResponse
Returns a new instance of MultiResponse.
254 255 256 |
# File 'lib/active_merchant/billing/gateways/worldpay.rb', line 254 def initialize @responses = [] end |
Instance Attribute Details
#responses ⇒ Object (readonly)
Returns the value of attribute responses.
252 253 254 |
# File 'lib/active_merchant/billing/gateways/worldpay.rb', line 252 def responses @responses end |
Instance Method Details
#<<(response) ⇒ Object
258 259 260 261 262 263 264 |
# File 'lib/active_merchant/billing/gateways/worldpay.rb', line 258 def <<(response) if response.is_a?(MultiResponse) response.responses.each{|r| @responses << r} else @responses << response end end |
#success? ⇒ Boolean
266 267 268 |
# File 'lib/active_merchant/billing/gateways/worldpay.rb', line 266 def success? @responses.all?{|r| r.success?} end |