exact_target_sdk 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,8 @@
1
1
  = ExactTarget SDK
2
2
 
3
+ == Version 0.1.0
4
+ * Adding ErrorCode to CreateResult
5
+
3
6
  == Version 0.0.2
4
7
  * Adding thorough unit tests throughout
5
8
  * Using ActiveModel::Callbacks instead of home-baked before_validation
data/README.rdoc CHANGED
@@ -22,7 +22,7 @@ easily implement new objects by simply declaring their properties.
22
22
  definition = ExactTargetSDK::TriggeredSendDefinition.new('CustomerKey' => 'my_triggered_send')
23
23
  subscriber = ExactTargetSDK::Subscriber.new('EmailAddress' => 'me@example.com')
24
24
  triggered_send = ExactTargetSDK::TriggeredSend.new('TriggeredSendDefinition' => definition)
25
- triggered_send.subscribers << subscriber
25
+ triggered_send.Subscribers << subscriber
26
26
 
27
27
  # Creates subscriber record, then executes the "my_triggered_send" trigger to
28
28
  # that subscriber.
@@ -1,11 +1,22 @@
1
+ require 'active_support/inflector'
2
+
1
3
  module ExactTargetSDK
2
4
  class CreateResult
3
5
 
4
- attr_reader :StatusCode, :StatusMessage
6
+ PROPERTIES = [
7
+ 'StatusCode',
8
+ 'StatusMessage',
9
+ 'ErrorCode'
10
+ ]
11
+
12
+ PROPERTIES.each do |property|
13
+ attr_reader property
14
+ end
5
15
 
6
16
  def initialize(hash)
7
- @StatusCode = hash[:status_code]
8
- @StatusMessage = hash[:status_message]
17
+ PROPERTIES.each do |property|
18
+ instance_variable_set("@#{property}", hash[property.underscore.to_sym])
19
+ end
9
20
  end
10
21
 
11
22
  end
@@ -1,3 +1,3 @@
1
1
  module ExactTargetSDK
2
- VERSION = '0.0.2'
2
+ VERSION = '0.1.0'
3
3
  end
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 2
10
- version: 0.0.2
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Dawson
@@ -23,17 +23,32 @@ dependencies:
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- hash: 5
26
+ hash: 7
27
27
  segments:
28
28
  - 3
29
- - 1
30
- version: "3.1"
29
+ - 0
30
+ version: "3.0"
31
31
  version_requirements: *id001
32
32
  name: activemodel
33
33
  prerelease: false
34
34
  type: :runtime
35
35
  - !ruby/object:Gem::Dependency
36
36
  requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ hash: 7
42
+ segments:
43
+ - 3
44
+ - 0
45
+ version: "3.0"
46
+ version_requirements: *id002
47
+ name: activesupport
48
+ prerelease: false
49
+ type: :runtime
50
+ - !ruby/object:Gem::Dependency
51
+ requirement: &id003 !ruby/object:Gem::Requirement
37
52
  none: false
38
53
  requirements:
39
54
  - - ~>
@@ -43,12 +58,12 @@ dependencies:
43
58
  - 0
44
59
  - 1
45
60
  version: "0.1"
46
- version_requirements: *id002
61
+ version_requirements: *id003
47
62
  name: guid
48
63
  prerelease: false
49
64
  type: :runtime
50
65
  - !ruby/object:Gem::Dependency
51
- requirement: &id003 !ruby/object:Gem::Requirement
66
+ requirement: &id004 !ruby/object:Gem::Requirement
52
67
  none: false
53
68
  requirements:
54
69
  - - ~>
@@ -58,7 +73,7 @@ dependencies:
58
73
  - 0
59
74
  - 9
60
75
  version: "0.9"
61
- version_requirements: *id003
76
+ version_requirements: *id004
62
77
  name: savon
63
78
  prerelease: false
64
79
  type: :runtime