marketo 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/marketo/client.rb +5 -0
- data/lib/marketo/lead_record.rb +1 -0
- data/spec/marketo/client_spec.rb +5 -1
- data/spec/marketo/lead_record_spec.rb +2 -1
- metadata +4 -4
data/lib/marketo/client.rb
CHANGED
@@ -68,6 +68,10 @@ module Rapleaf
|
|
68
68
|
get_lead(LeadKey.new(LeadKeyType::EMAIL, email))
|
69
69
|
end
|
70
70
|
|
71
|
+
def set_logger(logger)
|
72
|
+
@logger = logger
|
73
|
+
end
|
74
|
+
|
71
75
|
# create (if new) or update (if existing) a lead
|
72
76
|
#
|
73
77
|
# * email - email address of lead
|
@@ -133,6 +137,7 @@ module Rapleaf
|
|
133
137
|
})
|
134
138
|
return response
|
135
139
|
rescue Exception => e
|
140
|
+
@logger.log(e) if @logger
|
136
141
|
return nil
|
137
142
|
end
|
138
143
|
end
|
data/lib/marketo/lead_record.rb
CHANGED
data/spec/marketo/client_spec.rb
CHANGED
@@ -151,7 +151,7 @@ module Rapleaf
|
|
151
151
|
equals_matcher({
|
152
152
|
:return_lead => true,
|
153
153
|
:lead_record => {
|
154
|
-
:email =>
|
154
|
+
:email => EMAIL,
|
155
155
|
:lead_attribute_list =>
|
156
156
|
{
|
157
157
|
:attribute => [
|
@@ -160,6 +160,9 @@ module Rapleaf
|
|
160
160
|
:attr_type => "string"},
|
161
161
|
{:attr_value => "val2",
|
162
162
|
:attr_name => "name2",
|
163
|
+
:attr_type => "string"},
|
164
|
+
{:attr_value => EMAIL,
|
165
|
+
:attr_name => "Email",
|
163
166
|
:attr_type => "string"}
|
164
167
|
]}}}),
|
165
168
|
'ns1:paramsSyncLead',
|
@@ -169,6 +172,7 @@ module Rapleaf
|
|
169
172
|
lead_record.set_attribute('name2', 'val2')
|
170
173
|
|
171
174
|
expected_lead_record = LeadRecord.new(EMAIL, IDNUM)
|
175
|
+
expected_lead_record.set_attribute('Email', EMAIL)
|
172
176
|
expected_lead_record.set_attribute('name1', 'val1')
|
173
177
|
expected_lead_record.set_attribute('name2', 'val2')
|
174
178
|
expected_lead_record.set_attribute('name3', 'val3')
|
@@ -51,9 +51,10 @@ module Rapleaf
|
|
51
51
|
pairs << [attribute_name, attribute_value]
|
52
52
|
end
|
53
53
|
|
54
|
-
pairs.size.should ==
|
54
|
+
pairs.size.should == 3
|
55
55
|
pairs.should include(['favourite color', 'green'])
|
56
56
|
pairs.should include(['age', '99'])
|
57
|
+
pairs.should include(['Email', EMAIL])
|
57
58
|
end
|
58
59
|
|
59
60
|
it "should be instantiable from a savon hash" do
|
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: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 4
|
10
|
+
version: 1.2.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James O'Brien
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-25 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|