exact_target_sdk 0.0.0 → 0.0.1
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/README.rdoc
CHANGED
@@ -19,9 +19,9 @@ easily implement new objects by simply declaring their properties.
|
|
19
19
|
ExactTargetSDK.config(:username => 'foo', :password => 'mypass')
|
20
20
|
|
21
21
|
client = ExactTargetSDK::Client.new
|
22
|
-
definition = TriggeredSendDefinition.new('CustomerKey' => 'my_triggered_send')
|
23
|
-
subscriber = Subscriber.new('EmailAddress' => 'me@example.com')
|
24
|
-
triggered_send = TriggeredSend.new('TriggeredSendDefinition' => definition)
|
22
|
+
definition = ExactTargetSDK::TriggeredSendDefinition.new('CustomerKey' => 'my_triggered_send')
|
23
|
+
subscriber = ExactTargetSDK::Subscriber.new('EmailAddress' => 'me@example.com')
|
24
|
+
triggered_send = ExactTargetSDK::TriggeredSend.new('TriggeredSendDefinition' => definition)
|
25
25
|
triggered_send.subscribers << subscriber
|
26
26
|
|
27
27
|
# Creates subscriber record, then executes the "my_triggered_send" trigger to
|
@@ -74,13 +74,13 @@ class APIObject
|
|
74
74
|
@properties || []
|
75
75
|
end
|
76
76
|
|
77
|
-
private
|
78
|
-
|
79
77
|
# Returns the method names declared using #before_validation.
|
80
78
|
def before_validation_methods
|
81
79
|
@before_validation_methods ||= []
|
82
80
|
end
|
83
81
|
|
82
|
+
private
|
83
|
+
|
84
84
|
# Stores the given property name to be used at render time.
|
85
85
|
def register_property!(name)
|
86
86
|
@properties ||= []
|
@@ -128,7 +128,7 @@ class Client
|
|
128
128
|
end
|
129
129
|
|
130
130
|
response
|
131
|
-
rescue Timeout::Error => e
|
131
|
+
rescue ::Timeout::Error => e
|
132
132
|
timeout = ::ExactTargetSDK::Timeout.new("#{e.message}; open_timeout: #{config[:open_timeout]}; read_timeout: #{config[:read_timeout]}")
|
133
133
|
timeout.set_backtrace(e.backtrace)
|
134
134
|
raise timeout
|
@@ -8,7 +8,14 @@ class CreateResponse
|
|
8
8
|
@OverallStatus = response[:overall_status]
|
9
9
|
@RequestID = response[:request_id]
|
10
10
|
@Results = []
|
11
|
-
|
11
|
+
results = if response[:results].is_a? Array
|
12
|
+
response[:results]
|
13
|
+
elsif response[:results].is_a? Hash
|
14
|
+
[ response[:results] ]
|
15
|
+
else
|
16
|
+
[]
|
17
|
+
end
|
18
|
+
results.each do |result|
|
12
19
|
@Results << CreateResult.new(result)
|
13
20
|
end
|
14
21
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exact_target_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Dawson
|