marketo-api-ruby 0.8 → 0.9
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +2 -2
- data/.coveralls.yml +2 -0
- data/.hoerc +2 -0
- data/.travis.yml +33 -0
- data/History.rdoc +11 -0
- data/Manifest.txt +3 -5
- data/README.rdoc +7 -2
- data/lib/marketo_api.rb +1 -1
- data/lib/marketo_api/campaigns.rb +19 -10
- data/lib/marketo_api/client.rb +12 -11
- data/lib/marketo_api/lead.rb +14 -14
- data/lib/marketo_api/leads.rb +5 -5
- data/lib/marketo_api/lists.rb +7 -7
- data/lib/marketo_api/mobject.rb +13 -12
- data/lib/marketo_api/mobjects.rb +3 -3
- data/test/marketo_api/test_campaigns.rb +37 -32
- data/test/marketo_api/test_lead.rb +10 -10
- data/test/marketo_api/test_leads.rb +4 -4
- data/test/marketo_api/test_lists.rb +17 -17
- data/test/marketo_api/test_mobject.rb +25 -19
- data/test/marketo_api/test_mobjects.rb +4 -4
- data/test/minitest_helper.rb +13 -0
- metadata +45 -12
- metadata.gz.sig +1 -3
- checksums.yaml +0 -15
- checksums.yaml.gz.sig +0 -0
- data/spec/marketo/authentication_header_spec.rb +0 -66
- data/spec/marketo/client_spec.rb +0 -363
- data/spec/marketo/lead_key_spec.rb +0 -40
- data/spec/marketo/lead_record_spec.rb +0 -86
- data/spec/spec_helper.rb +0 -4
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
���q��p+�����n�IU|њ�����IR%�-�N�iM��xnD�]�c��=A���fgCa�rQ*��MF'Yf�*�T�� iRh�k0>IJ��
|
2
|
+
?����Y����1I�b����@LOk�r���P�����/�[P/���j�ʙ���cļŠ@T+��i.���xŊ���#� 6�ktϧ�28�{���<�wR'���U^��0�O}��K�~�%�[��}�p±P�<��
|
data/.coveralls.yml
ADDED
data/.hoerc
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
---
|
2
|
+
language: ruby
|
3
|
+
rvm:
|
4
|
+
- 2.1.0
|
5
|
+
- 2.0.0
|
6
|
+
- 1.9.3
|
7
|
+
- ruby-head
|
8
|
+
- jruby-19mode
|
9
|
+
- jruby-head
|
10
|
+
- rbx-2
|
11
|
+
matrix:
|
12
|
+
allow_failures:
|
13
|
+
- rvm:
|
14
|
+
- rbx-2
|
15
|
+
gemfile:
|
16
|
+
- Gemfile
|
17
|
+
before_script:
|
18
|
+
- |
|
19
|
+
case "${TRAVIS_RUBY_VERSION}" in
|
20
|
+
rbx*)
|
21
|
+
gem install psych
|
22
|
+
;;
|
23
|
+
esac
|
24
|
+
- rake travis:before -t
|
25
|
+
script: rake travis
|
26
|
+
after_script:
|
27
|
+
- rake travis:after -t
|
28
|
+
notifications:
|
29
|
+
recipients:
|
30
|
+
- austin@clearfit.com
|
31
|
+
email:
|
32
|
+
- on_success: change
|
33
|
+
- on_failure: always
|
data/History.rdoc
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
=== 0.9 / 2014-MM-DD
|
2
|
+
|
3
|
+
* Bug Fixes:
|
4
|
+
* Fix #15, where Marketo uses inconsistent camelcasing.
|
5
|
+
|
6
|
+
* Infrastructure:
|
7
|
+
* While marketo-api-ruby may work on 1.9.2, it's being removed from Travis
|
8
|
+
due to ongoing test failures that I can't replicate (I can't get a 1.9.2
|
9
|
+
Ruby built, and it's no longer a supported Ruby in any case).
|
10
|
+
* Fixed rbx tests.
|
11
|
+
|
1
12
|
=== 0.8 / 2014-04-08
|
2
13
|
|
3
14
|
* First release as marketo-api-ruby. Features a substantially restructured API.
|
data/Manifest.txt
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
+
.coveralls.yml
|
1
2
|
.gemtest
|
3
|
+
.hoerc
|
4
|
+
.travis.yml
|
2
5
|
Contributing.rdoc
|
3
6
|
Gemfile
|
4
7
|
History.rdoc
|
@@ -16,11 +19,6 @@ lib/marketo_api/leads.rb
|
|
16
19
|
lib/marketo_api/lists.rb
|
17
20
|
lib/marketo_api/mobject.rb
|
18
21
|
lib/marketo_api/mobjects.rb
|
19
|
-
spec/marketo/authentication_header_spec.rb
|
20
|
-
spec/marketo/client_spec.rb
|
21
|
-
spec/marketo/lead_key_spec.rb
|
22
|
-
spec/marketo/lead_record_spec.rb
|
23
|
-
spec/spec_helper.rb
|
24
22
|
test/marketo_api/test_campaigns.rb
|
25
23
|
test/marketo_api/test_client.rb
|
26
24
|
test/marketo_api/test_lead.rb
|
data/README.rdoc
CHANGED
@@ -15,8 +15,13 @@ MarketoAPI (marketo-api-ruby) provides a native Ruby interface to the
|
|
15
15
|
API is necessary for using marketo-api-ruby, it is an explicit goal that
|
16
16
|
working with MarketoAPI not feel like working with a hinky Java port.
|
17
17
|
|
18
|
-
This is release 0.
|
19
|
-
{2.3}[http://app.marketo.com/soap/mktows/2_3?WSDL]
|
18
|
+
This is release 0.9, targeting Marketo API version
|
19
|
+
{2.3}[http://app.marketo.com/soap/mktows/2_3?WSDL], fixing a +syncLead+ problem
|
20
|
+
where +Id+, +Email+, and +ForeignSysPersonId+ are inconsistent with other
|
21
|
+
+syncLead+ parameters.
|
22
|
+
|
23
|
+
Please note that Ruby 1.9.2 is not officially supported, but MarketoAPI will
|
24
|
+
install on any version of Ruby 1.9.2 or later.
|
20
25
|
|
21
26
|
=== Features/Problems
|
22
27
|
|
data/lib/marketo_api.rb
CHANGED
@@ -18,6 +18,13 @@ class MarketoAPI::Campaigns < MarketoAPI::ClientProxy
|
|
18
18
|
ENUMS = MarketoAPI.freeze(*SOURCES.values) #:nodoc:
|
19
19
|
private_constant :ENUMS
|
20
20
|
|
21
|
+
REQUEST_PARAM_XF = { #:nodoc:
|
22
|
+
campaign_id: :campaignId,
|
23
|
+
campaign_name: :campaignName,
|
24
|
+
program_name: :programName,
|
25
|
+
}
|
26
|
+
private_constant :REQUEST_PARAM_XF
|
27
|
+
|
21
28
|
# Implements
|
22
29
|
# {+getCampaignsForSource+}[http://developers.marketo.com/documentation/soap/getcampaignsforsource/].
|
23
30
|
#
|
@@ -33,7 +40,7 @@ class MarketoAPI::Campaigns < MarketoAPI::ClientProxy
|
|
33
40
|
{
|
34
41
|
source: resolve_source(source),
|
35
42
|
name: name,
|
36
|
-
|
43
|
+
exactName: exact_name
|
37
44
|
}.delete_if(&MarketoAPI::MINIMIZE_HASH)
|
38
45
|
)
|
39
46
|
end
|
@@ -115,12 +122,14 @@ class MarketoAPI::Campaigns < MarketoAPI::ClientProxy
|
|
115
122
|
end
|
116
123
|
end
|
117
124
|
|
125
|
+
REQUEST_PARAM_XF.each { |o, n| options[n] = options.delete(o) }
|
126
|
+
|
118
127
|
call(
|
119
|
-
:
|
128
|
+
:RequestCampaign,
|
120
129
|
options.merge(
|
121
|
-
source:
|
122
|
-
|
123
|
-
|
130
|
+
source: resolve_source(source),
|
131
|
+
leadList: transform_param_list(:get, leads),
|
132
|
+
programTokenList: tokens
|
124
133
|
).delete_if(&MarketoAPI::MINIMIZE_HASH)
|
125
134
|
)
|
126
135
|
end
|
@@ -160,12 +169,12 @@ class MarketoAPI::Campaigns < MarketoAPI::ClientProxy
|
|
160
169
|
# schedule(program_name, campaign_name, options = {})
|
161
170
|
def schedule(program_name, campaign_name, options = {})
|
162
171
|
call(
|
163
|
-
:
|
172
|
+
:ScheduleCampaign,
|
164
173
|
{
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
174
|
+
programName: program_name,
|
175
|
+
campaignName: campaign_name,
|
176
|
+
campaignRunAt: options[:run_at],
|
177
|
+
programTokenList: options[:program_tokens]
|
169
178
|
}.delete_if(&MarketoAPI::MINIMIZE_HASH)
|
170
179
|
)
|
171
180
|
end
|
data/lib/marketo_api/client.rb
CHANGED
@@ -5,17 +5,18 @@ require 'openssl'
|
|
5
5
|
# The client to the Marketo SOAP API.
|
6
6
|
class MarketoAPI::Client
|
7
7
|
DEFAULT_CONFIG = {
|
8
|
-
api_subdomain:
|
9
|
-
api_version:
|
10
|
-
user_id:
|
11
|
-
encryption_key:
|
12
|
-
read_timeout:
|
13
|
-
open_timeout:
|
14
|
-
headers:
|
15
|
-
env_namespace:
|
16
|
-
namespaces:
|
17
|
-
pretty_print_xml:
|
18
|
-
ssl_verify_mode:
|
8
|
+
api_subdomain: '123-ABC-456',
|
9
|
+
api_version: '2_3',
|
10
|
+
user_id: nil,
|
11
|
+
encryption_key: nil,
|
12
|
+
read_timeout: 90,
|
13
|
+
open_timeout: 90,
|
14
|
+
headers: { 'Connection' => 'Keep-Alive' },
|
15
|
+
env_namespace: 'SOAP-ENV',
|
16
|
+
namespaces: { 'xmlns:ns1' => 'http://www.marketo.com/mktows/' },
|
17
|
+
pretty_print_xml: true,
|
18
|
+
ssl_verify_mode: :none,
|
19
|
+
convert_request_keys_to: :none,
|
19
20
|
}.freeze
|
20
21
|
DEFAULT_CONFIG.values.each(&:freeze)
|
21
22
|
private_constant :DEFAULT_CONFIG
|
data/lib/marketo_api/lead.rb
CHANGED
@@ -192,19 +192,19 @@ class MarketoAPI::Lead
|
|
192
192
|
# Returns the parameters required for use with MarketoAPI::Leads#sync.
|
193
193
|
def params_for_sync
|
194
194
|
{
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
195
|
+
returnLead: true,
|
196
|
+
marketoCookie: cookie,
|
197
|
+
leadRecord: {
|
198
|
+
Email: email,
|
199
|
+
Id: id,
|
200
|
+
ForeignSysPersonId: foreign[:id],
|
201
|
+
ForeignSysType: foreign[:type],
|
202
|
+
leadAttributeList: {
|
203
203
|
attribute: attributes.map { |key, value|
|
204
204
|
{
|
205
|
-
|
206
|
-
|
207
|
-
|
205
|
+
attrName: key.to_s,
|
206
|
+
attrType: types[key],
|
207
|
+
attrValue: value
|
208
208
|
}
|
209
209
|
}
|
210
210
|
}
|
@@ -234,9 +234,9 @@ class MarketoAPI::Lead
|
|
234
234
|
# API calls.
|
235
235
|
def key(key, value)
|
236
236
|
{
|
237
|
-
|
238
|
-
|
239
|
-
|
237
|
+
leadKey: {
|
238
|
+
keyType: key_type(key),
|
239
|
+
keyValue: value
|
240
240
|
}
|
241
241
|
}
|
242
242
|
end
|
data/lib/marketo_api/leads.rb
CHANGED
@@ -13,8 +13,8 @@ class MarketoAPI::Leads < MarketoAPI::ClientProxy
|
|
13
13
|
def get(type_or_key, value = nil)
|
14
14
|
key = case type_or_key
|
15
15
|
when Hash
|
16
|
-
if lk = type_or_key[:
|
17
|
-
if MarketoAPI::Lead.send(:key_type, lk[:
|
16
|
+
if lk = type_or_key[:leadKey]
|
17
|
+
if MarketoAPI::Lead.send(:key_type, lk[:keyType])
|
18
18
|
type_or_key
|
19
19
|
end
|
20
20
|
end
|
@@ -25,7 +25,7 @@ class MarketoAPI::Leads < MarketoAPI::ClientProxy
|
|
25
25
|
end
|
26
26
|
|
27
27
|
unless key
|
28
|
-
raise ArgumentError,
|
28
|
+
raise ArgumentError, "#{type_or_key} is not a valid lead key"
|
29
29
|
end
|
30
30
|
extract_from_response(call(:get_lead, key), :lead_record_list) { |record|
|
31
31
|
MarketoAPI::Lead.from_soap_hash(record[:lead_record]) do |lead|
|
@@ -64,8 +64,8 @@ class MarketoAPI::Leads < MarketoAPI::ClientProxy
|
|
64
64
|
def sync_multiple(leads, options = { dedup_enabled: true })
|
65
65
|
response = call(
|
66
66
|
:sync_multiple_leads,
|
67
|
-
|
68
|
-
|
67
|
+
dedupEnabled: options[:dedup_enabled],
|
68
|
+
leadRecordList: transform_param_list(:sync, leads)
|
69
69
|
)
|
70
70
|
extract_from_response(response, :lead_record_list) do |list|
|
71
71
|
list.each do |record|
|
data/lib/marketo_api/lists.rb
CHANGED
@@ -71,9 +71,9 @@ class MarketoAPI::Lists < MarketoAPI::ClientProxy
|
|
71
71
|
class << self
|
72
72
|
def key(type, value)
|
73
73
|
{
|
74
|
-
|
75
|
-
|
76
|
-
|
74
|
+
listKey: {
|
75
|
+
keyType: key_type(type),
|
76
|
+
keyValue: value
|
77
77
|
}
|
78
78
|
}
|
79
79
|
end
|
@@ -100,10 +100,10 @@ class MarketoAPI::Lists < MarketoAPI::ClientProxy
|
|
100
100
|
|
101
101
|
call(
|
102
102
|
:list_operation,
|
103
|
-
|
104
|
-
|
105
|
-
strict:
|
106
|
-
|
103
|
+
listOperation: operation,
|
104
|
+
listKey: list_key,
|
105
|
+
strict: false,
|
106
|
+
listMemberList: transform_param_list(:get, leads)
|
107
107
|
)
|
108
108
|
end
|
109
109
|
end
|
data/lib/marketo_api/mobject.rb
CHANGED
@@ -121,12 +121,13 @@ class MarketoAPI::MObject
|
|
121
121
|
def params_for_get #:nodoc:
|
122
122
|
ensure_valid_type!(type, GET_TYPES)
|
123
123
|
{
|
124
|
-
type:
|
125
|
-
id:
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
124
|
+
type: type,
|
125
|
+
id: id,
|
126
|
+
includeDetails: include_details,
|
127
|
+
mObjCriteriaList: criteria.compact.uniq.map(&:to_h),
|
128
|
+
mObjAssociationList: associations.compact.uniq.map(&:to_h),
|
129
|
+
streamPosition: stream_position,
|
130
|
+
externalKey: nil
|
130
131
|
}.delete_if(&MarketoAPI::MINIMIZE_HASH)
|
131
132
|
end
|
132
133
|
|
@@ -214,9 +215,9 @@ class MarketoAPI::MObject
|
|
214
215
|
|
215
216
|
def to_h
|
216
217
|
{
|
217
|
-
|
218
|
-
|
219
|
-
comparison:
|
218
|
+
attrName: name,
|
219
|
+
attrValue: value,
|
220
|
+
comparison: comparison
|
220
221
|
}
|
221
222
|
end
|
222
223
|
end
|
@@ -255,9 +256,9 @@ class MarketoAPI::MObject
|
|
255
256
|
|
256
257
|
def to_h
|
257
258
|
{
|
258
|
-
|
259
|
-
id:
|
260
|
-
|
259
|
+
mObjType: type,
|
260
|
+
id: id,
|
261
|
+
externalKey: external_key,
|
261
262
|
}
|
262
263
|
end
|
263
264
|
end
|
data/lib/marketo_api/mobjects.rb
CHANGED
@@ -22,7 +22,7 @@ class MarketoAPI::MObjects < MarketoAPI::ClientProxy
|
|
22
22
|
end
|
23
23
|
response = call(
|
24
24
|
:delete_m_objects,
|
25
|
-
|
25
|
+
mObjectList: transform_param_list(__method__, mobjects)
|
26
26
|
)
|
27
27
|
extract_mobject_status_list(response)
|
28
28
|
end
|
@@ -47,7 +47,7 @@ class MarketoAPI::MObjects < MarketoAPI::ClientProxy
|
|
47
47
|
end
|
48
48
|
|
49
49
|
extract_from_response(
|
50
|
-
call(:describe_m_object,
|
50
|
+
call(:describe_m_object, objectName: name),
|
51
51
|
:metadata
|
52
52
|
)
|
53
53
|
end
|
@@ -69,7 +69,7 @@ class MarketoAPI::MObjects < MarketoAPI::ClientProxy
|
|
69
69
|
def sync(operation, *mobjects) #:nodoc:
|
70
70
|
# http://developers.marketo.com/documentation/soap/sync-mobjects/
|
71
71
|
raise NotImplementedError,
|
72
|
-
":
|
72
|
+
":syncMObjects is not implemented in this version."
|
73
73
|
response = call(
|
74
74
|
:sync_m_objects,
|
75
75
|
transform_param_list(__method__, mobjects)
|
@@ -48,7 +48,7 @@ class TestMarketoAPICampaigns < Minitest::Test
|
|
48
48
|
stub_soap_call do
|
49
49
|
method, options = subject.for_source :marketo, 'John', true
|
50
50
|
assert_equal :get_campaigns_for_source, method
|
51
|
-
assert_equal({ source: :MKTOWS, name: 'John',
|
51
|
+
assert_equal({ source: :MKTOWS, name: 'John', exactName: true },
|
52
52
|
options)
|
53
53
|
end
|
54
54
|
end
|
@@ -70,31 +70,34 @@ class TestMarketoAPICampaigns < Minitest::Test
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def test_request_missing_leads
|
73
|
-
|
73
|
+
assert_raises_with_message(ArgumentError, ':lead or :leads must be provided') {
|
74
74
|
subject.request
|
75
75
|
}
|
76
76
|
end
|
77
77
|
|
78
78
|
def test_request_missing_campaign_or_program
|
79
|
-
assert_raises(ArgumentError
|
79
|
+
assert_raises(ArgumentError,
|
80
|
+
':campaignId, :campaignName, or :programName must be provided') {
|
80
81
|
subject.request(lead: :foo)
|
81
82
|
}
|
82
83
|
end
|
83
84
|
|
84
|
-
def
|
85
|
-
|
85
|
+
def test_request_program_tokens_with_no_program_name
|
86
|
+
assert_raises_with_message(KeyError,
|
87
|
+
':program_name must be provided when using :program_tokens') {
|
86
88
|
subject.request(lead: :foo, campaign_id: 5, program_tokens: [ 3 ])
|
87
89
|
}
|
88
90
|
end
|
89
91
|
|
90
92
|
def test_request_with_campaign_id_and_name
|
91
|
-
|
93
|
+
assert_raises_with_message(ArgumentError,
|
94
|
+
':campaign_id and :campaign_name are mutually exclusive') {
|
92
95
|
subject.request(lead: :foo, campaign_id: 5, campaign_name: 'Five')
|
93
96
|
}
|
94
97
|
end
|
95
98
|
|
96
99
|
def test_request_bad_source
|
97
|
-
|
100
|
+
assert_raises_with_message(ArgumentError, 'Invalid source bad_source') {
|
98
101
|
subject.request(lead: :foo, campaign_id: 5, source: :bad_source)
|
99
102
|
}
|
100
103
|
end
|
@@ -104,12 +107,13 @@ class TestMarketoAPICampaigns < Minitest::Test
|
|
104
107
|
method, options = subject.request(lead: lead_key(3),
|
105
108
|
leads: lead_keys(4, 5),
|
106
109
|
campaign_id: 3)
|
107
|
-
assert_equal :
|
110
|
+
assert_equal :RequestCampaign, method
|
111
|
+
refute_missing_keys options, :source, :leadList, :campaignId
|
108
112
|
assert_equal :MKTOWS, options[:source]
|
109
|
-
assert_equal lead_keys(4, 5, 3), options[:
|
110
|
-
assert_equal 3, options[:
|
111
|
-
assert_missing_keys options, :
|
112
|
-
:
|
113
|
+
assert_equal lead_keys(4, 5, 3), options[:leadList]
|
114
|
+
assert_equal 3, options[:campaignId]
|
115
|
+
assert_missing_keys options, :campaignName, :programName,
|
116
|
+
:programTokens
|
113
117
|
end
|
114
118
|
end
|
115
119
|
|
@@ -117,12 +121,12 @@ class TestMarketoAPICampaigns < Minitest::Test
|
|
117
121
|
stub_soap_call do
|
118
122
|
method, options = subject.request(lead: lead_key(3),
|
119
123
|
campaign_name: 'earthday')
|
120
|
-
assert_equal :
|
124
|
+
assert_equal :RequestCampaign, method
|
121
125
|
assert_equal :MKTOWS, options[:source]
|
122
|
-
assert_equal [ lead_key(3) ], options[:
|
123
|
-
assert_equal 'earthday', options[:
|
124
|
-
assert_missing_keys options, :
|
125
|
-
:
|
126
|
+
assert_equal [ lead_key(3) ], options[:leadList]
|
127
|
+
assert_equal 'earthday', options[:campaignName]
|
128
|
+
assert_missing_keys options, :campaignId, :programName,
|
129
|
+
:programTokens
|
126
130
|
end
|
127
131
|
end
|
128
132
|
|
@@ -130,31 +134,32 @@ class TestMarketoAPICampaigns < Minitest::Test
|
|
130
134
|
stub_soap_call do
|
131
135
|
method, options = subject.request(lead: lead_key(3),
|
132
136
|
program_name: 'earthday')
|
133
|
-
assert_equal :
|
137
|
+
assert_equal :RequestCampaign, method
|
138
|
+
refute_missing_keys options, :source, :leadList, :programName
|
134
139
|
assert_equal :MKTOWS, options[:source]
|
135
|
-
assert_equal [ lead_key(3) ], options[:
|
136
|
-
assert_equal 'earthday', options[:
|
137
|
-
assert_missing_keys options, :
|
138
|
-
:
|
140
|
+
assert_equal [ lead_key(3) ], options[:leadList]
|
141
|
+
assert_equal 'earthday', options[:programName]
|
142
|
+
assert_missing_keys options, :campaignName, :campaignId,
|
143
|
+
:programTokens
|
139
144
|
end
|
140
145
|
end
|
141
146
|
|
142
147
|
def test_schedule
|
143
148
|
stub_soap_call do
|
144
149
|
method, options = subject.schedule('program', 'campaign')
|
145
|
-
assert_equal :
|
146
|
-
assert_equal({
|
150
|
+
assert_equal :ScheduleCampaign, method
|
151
|
+
assert_equal({ programName: 'program', campaignName: 'campaign' }, options)
|
147
152
|
end
|
148
153
|
end
|
149
154
|
|
150
155
|
def test_schedule_with_run_at
|
151
156
|
stub_soap_call do
|
152
157
|
method, options = subject.schedule('program', 'campaign', run_at: 3)
|
153
|
-
assert_equal :
|
158
|
+
assert_equal :ScheduleCampaign, method
|
154
159
|
assert_equal({
|
155
|
-
|
156
|
-
|
157
|
-
|
160
|
+
programName: 'program',
|
161
|
+
campaignName: 'campaign',
|
162
|
+
campaignRunAt: 3
|
158
163
|
}, options)
|
159
164
|
end
|
160
165
|
end
|
@@ -162,11 +167,11 @@ class TestMarketoAPICampaigns < Minitest::Test
|
|
162
167
|
def test_schedule_with_program_tokens
|
163
168
|
stub_soap_call do
|
164
169
|
method, options = subject.schedule('program', 'campaign', program_tokens: [ :x ])
|
165
|
-
assert_equal :
|
170
|
+
assert_equal :ScheduleCampaign, method
|
166
171
|
assert_equal({
|
167
|
-
|
168
|
-
|
169
|
-
|
172
|
+
programName: 'program',
|
173
|
+
campaignName: 'campaign',
|
174
|
+
programTokenList: [ :x ]
|
170
175
|
}, options)
|
171
176
|
end
|
172
177
|
end
|