marketo 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/marketo/client.rb +9 -4
- metadata +6 -6
data/lib/marketo/client.rb
CHANGED
@@ -2,10 +2,10 @@ require File.expand_path('authentication_header', File.dirname(__FILE__))
|
|
2
2
|
|
3
3
|
module Rapleaf
|
4
4
|
module Marketo
|
5
|
-
def self.new_client(access_key, secret_key)
|
5
|
+
def self.new_client(access_key, secret_key, api_subdomain = 'na-i', api_version = '1_5', document_version = '1_4')
|
6
6
|
client = Savon::Client.new do
|
7
|
-
wsdl.endpoint = "https
|
8
|
-
wsdl.document = "http://app.marketo.com/soap/mktows
|
7
|
+
wsdl.endpoint = "https://#{api_subdomain}.marketo.com/soap/mktows/#{api_version}"
|
8
|
+
wsdl.document = "http://app.marketo.com/soap/mktows/#{document_version}?WSDL"
|
9
9
|
http.read_timeout = 90
|
10
10
|
http.open_timeout = 90
|
11
11
|
http.headers = {"Connection" => "Keep-Alive"}
|
@@ -19,7 +19,7 @@ module Rapleaf
|
|
19
19
|
#
|
20
20
|
# Usage:
|
21
21
|
#
|
22
|
-
# client = Rapleaf::Marketo.new_client(<access_key>, <secret_key
|
22
|
+
# client = Rapleaf::Marketo.new_client(<access_key>, <secret_key>, api_subdomain = 'na-i', api_version = '1_5', document_version = '1_4')
|
23
23
|
#
|
24
24
|
# == get_lead_by_email:
|
25
25
|
#
|
@@ -50,6 +50,11 @@ module Rapleaf
|
|
50
50
|
# lead_record.set_attribute('MobilePhone', '123 456')
|
51
51
|
#
|
52
52
|
# response = client.sync_lead_record(lead_record)
|
53
|
+
#
|
54
|
+
# == sync_lead_record_on_id: (update with custom fields, ensuring the sync is id based)
|
55
|
+
#
|
56
|
+
# similarly, you can force a sync via id instead of email by calling client.sync_lead_record_on_id(lead_record)
|
57
|
+
#
|
53
58
|
class Client
|
54
59
|
# This constructor is used internally, create your client with *Rapleaf::Marketo.new_client(<access_key>, <secret_key>)*
|
55
60
|
def initialize(savon_client, authentication_header)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marketo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 4
|
9
|
+
- 0
|
10
|
+
version: 1.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James O'Brien
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: 0.8.3
|
50
50
|
type: :runtime
|
51
51
|
version_requirements: *id002
|
52
|
-
description: " Allows easy integration with marketo from ruby. You can synchronize leads and fetch them back by email
|
52
|
+
description: " Allows easy integration with marketo from ruby. You can synchronize leads and fetch them back by email.\n By default this is configured for the SOAP wsdl file: http://app.marketo.com/soap/mktows/1_4?WSDL but this is\n configurable when you construct the client, e.g.\n client = Rapleaf::Marketo.new_client(<access_key>, <secret_key>, (api_subdomain = 'na-i'), (api_version = '1_5'), (document_version = '1_4'))\n More information at https://www.rapleaf.com/developers/marketo.\n"
|
53
53
|
email: james@rapleaf.com
|
54
54
|
executables: []
|
55
55
|
|
@@ -103,7 +103,7 @@ rubyforge_project:
|
|
103
103
|
rubygems_version: 1.8.11
|
104
104
|
signing_key:
|
105
105
|
specification_version: 3
|
106
|
-
summary: A client for
|
106
|
+
summary: A client for the marketo API
|
107
107
|
test_files:
|
108
108
|
- spec/marketo/client_spec.rb
|
109
109
|
- spec/marketo/authentication_header_spec.rb
|