Module: Rapleaf::Marketo
- Defined in:
- lib/marketo/enums.rb,
lib/marketo/client.rb,
lib/marketo/lead_key.rb,
lib/marketo/lead_record.rb,
lib/marketo/authentication_header.rb
Defined Under Namespace
Modules: LeadKeyType, ListOperationType Classes: AuthenticationHeader, Client, LeadKey, LeadRecord
Class Method Summary collapse
Class Method Details
.new_client(access_key, secret_key, api_version = '1.7', api_subdomain = 'na-c') ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/marketo/client.rb', line 6 def self.new_client(access_key, secret_key, api_version='1.7', api_subdomain='na-c') api_version = api_version.sub(".", "_") client = Savon::Client.new do wsdl.endpoint = "https://#{api_subdomain}.marketo.com/soap/mktows/#{api_version}" wsdl.document = "http://app.marketo.com/soap/mktows/#{api_version}?WSDL" http.read_timeout = 90 http.open_timeout = 90 http.headers = {"Connection" => "Keep-Alive"} end Client.new(client, Rapleaf::Marketo::AuthenticationHeader.new(access_key, secret_key)) end |