module Adyen::API::RecurringService::TestHelpers
A collection of test helpers that create and assign stubbed response instances for a subsequent remote call.
This module extends the {RecurringService} class and thus these methods are callable on it.
Constants
- DISABLE_RESPONSE
Public Instance Methods
disabled_stub()
click to toggle source
@return [DisableResponse] A ‘disable succeeded’ response instance.
# File lib/adyen/api/test_helpers.rb 118 def disabled_stub 119 http_response = Net::HTTPOK.new('1.1', '200', 'OK') 120 def http_response.body; DISABLE_RESPONSE % DisableResponse::DISABLED_RESPONSES.first; end 121 RecurringService::DisableResponse.new(http_response) 122 end
stub_disabled!()
click to toggle source
Assigns a {#disabled_stub}, meaning the subsequent disable request will be successful.
# File lib/adyen/api/test_helpers.rb 125 def stub_disabled! 126 @stubbed_response = disabled_stub 127 end