Permalink
Browse files

Merge pull request #1 from kapost/allow_full_soap

Allow ful soap url to be passed in instead of just subdomain
  • Loading branch information...
Raul E Rangel
Raul E Rangel committed Feb 27, 2014
2 parents db95c40 + 25bfe03 commit 3820710d0630c1fdebe6721b10eaa060c5c5546b
Showing with 11 additions and 2 deletions.
  1. +11 −2 lib/marketo/client.rb
View
@@ -3,7 +3,7 @@
module Marketo
def self.new_client(access_key, secret_key, api_subdomain = 'na-i', api_version = '1_5', document_version = '1_4')
client = Savon::Client.new do
- wsdl.endpoint = "https://#{api_subdomain}.marketo.com/soap/mktows/#{api_version}"
+ wsdl.endpoint = api_subdomain.start_with?('http') ? api_subdomain : "https://#{api_subdomain}.marketo.com/soap/mktows/#{api_version}"
wsdl.document = "http://app.marketo.com/soap/mktows/#{document_version}?WSDL"
http.read_timeout = 90
http.open_timeout = 90
@@ -163,7 +163,16 @@ def remove_from_list(list_key, email)
def is_member_of_list?(list_key, email)
list_operation(list_key, ListOperationType::IS_MEMBER_OF, email)
end
-
+
+ def verify_soap_params()
+ begin
+ send_request("ns1:paramsDescribeMObject", {:objectName => 'LeadRecord'})
+ true
+ rescue Exception => e
+ @logger.log(e) if @logger
+ false
+ end
+ end
private

0 comments on commit 3820710

Please sign in to comment.