Class: Campaigning::SOAPDriver
- Inherits:
-
Object
- Object
- Campaigning::SOAPDriver
- Includes:
- Singleton
- Defined in:
- lib/campaigning/soap/soap_driver.rb
Overview
A SOAPDriver is a singleton object responsable to supply a way to interact with the SOAP::RPC::Driver object.
Constant Summary collapse
- DefaultEndpointUrl =
"http://api.createsend.com/api/api.asmx"
Instance Method Summary collapse
-
#get_driver ⇒ Object
Return a unique Campaigning::SOAP::ApiSoap instance for the whole API client, which provides access to all the Campaign Monitor API methods.
- #set_endpoint_url(endpoint_url) ⇒ Object
-
#setup_debug_mode(dev) ⇒ Object
This method turns the API debug mode to on and off.
Instance Method Details
#get_driver ⇒ Object
Return a unique Campaigning::SOAP::ApiSoap instance for the whole API client, which provides access to all the Campaign Monitor API methods.
13 14 15 |
# File 'lib/campaigning/soap/soap_driver.rb', line 13 def get_driver @driver ||= Campaigning::ApiSoap.new(DefaultEndpointUrl) end |
#set_endpoint_url(endpoint_url) ⇒ Object
26 27 28 |
# File 'lib/campaigning/soap/soap_driver.rb', line 26 def set_endpoint_url(endpoint_url) @driver = Campaigning::ApiSoap.new(endpoint_url) end |
#setup_debug_mode(dev) ⇒ Object
This method turns the API debug mode to on and off. When method called with true argument, it will switch to on mode, the API will display at the console all SOAP requests made to the API server.
20 21 22 23 24 |
# File 'lib/campaigning/soap/soap_driver.rb', line 20 def setup_debug_mode(dev) dev = STDERR if dev == true get_driver @driver.wiredump_dev = dev end |