sfmc-fuelsdk-ruby 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +28 -28
- data/Gemfile +3 -3
- data/Gemfile.lock +92 -90
- data/Guardfile +8 -8
- data/LICENSE.md +13 -13
- data/README.md +166 -143
- data/Rakefile +1 -1
- data/lib/marketingcloudsdk.rb +74 -74
- data/lib/marketingcloudsdk/client.rb +348 -296
- data/lib/marketingcloudsdk/http_request.rb +118 -118
- data/lib/marketingcloudsdk/objects.rb +757 -757
- data/lib/marketingcloudsdk/rest.rb +118 -118
- data/lib/marketingcloudsdk/soap.rb +296 -282
- data/lib/marketingcloudsdk/targeting.rb +99 -99
- data/lib/marketingcloudsdk/utils.rb +47 -47
- data/lib/marketingcloudsdk/version.rb +39 -39
- data/lib/new.rb +1240 -1240
- data/marketingcloudsdk.gemspec +30 -30
- data/samples/sample-AddSubscriberToList.rb +56 -56
- data/samples/sample-CreateAndStartDataExtensionImport.rb +29 -29
- data/samples/sample-CreateAndStartListImport.rb +27 -27
- data/samples/sample-CreateContentAreas.rb +48 -48
- data/samples/sample-CreateDataExtensions.rb +54 -54
- data/samples/sample-CreateProfileAttributes.rb +48 -48
- data/samples/sample-SendEmailToDataExtension.rb +23 -23
- data/samples/sample-SendEmailToList.rb +23 -23
- data/samples/sample-SendTriggeredSends.rb +30 -30
- data/samples/sample-bounceevent.rb +70 -70
- data/samples/sample-campaign.rb +211 -211
- data/samples/sample-clickevent.rb +71 -71
- data/samples/sample-contentarea.rb +122 -122
- data/samples/sample-dataextension.rb +209 -209
- data/samples/sample-directverb.rb +54 -54
- data/samples/sample-email.rb +122 -122
- data/samples/sample-email.senddefinition.rb +134 -134
- data/samples/sample-folder.rb +143 -143
- data/samples/sample-import.rb +103 -103
- data/samples/sample-list.rb +105 -105
- data/samples/sample-list.subscriber.rb +97 -97
- data/samples/sample-openevent.rb +70 -70
- data/samples/sample-profileattribute.rb +56 -56
- data/samples/sample-sentevent.rb +70 -70
- data/samples/sample-subscriber.rb +135 -135
- data/samples/sample-triggeredsend.rb +129 -129
- data/samples/sample-unsubevent.rb +72 -72
- data/samples/sample_helper.rb.template +10 -10
- data/spec/client_spec.rb +218 -218
- data/spec/default_values_fallback_spec.rb +30 -30
- data/spec/helper_funcs_spec.rb +11 -11
- data/spec/http_request_spec.rb +61 -61
- data/spec/objects_helper_spec.rb +32 -32
- data/spec/objects_spec.rb +484 -484
- data/spec/rest_spec.rb +48 -48
- data/spec/soap_spec.rb +140 -140
- data/spec/spec_helper.rb +14 -14
- data/spec/targeting_spec.rb +44 -44
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a05834436829d49ca8336cd49946a56bed5f003f709a512a1ecb9637cec3031
|
4
|
+
data.tar.gz: 8f00eed0dd3e176c72042cf404b0fb7e06b71820f69df8417581c51a90e68869
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8ee8667e093661ebed4f9433f3de2010079117db931f917ddda8cefb5eef8e511a8857bd457731cb0cb217d46212a0f0b9b71cb41010ea6f3670aafadc50267
|
7
|
+
data.tar.gz: db4f4acc5d67666bef2a109460fdc018be30f438751968cb235d64663f73b5ec34cb1d8acc18cbd8574760ac3c5205dfe3105a819cade0030527609f51c38007
|
data/.gitignore
CHANGED
@@ -1,28 +1,28 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
.bundle
|
4
|
-
.config
|
5
|
-
coverage
|
6
|
-
InstalledFiles
|
7
|
-
lib/bundler/man
|
8
|
-
pkg
|
9
|
-
rdoc
|
10
|
-
spec/reports
|
11
|
-
test/tmp
|
12
|
-
test/version_tmp
|
13
|
-
tmp
|
14
|
-
samples/soap_cache_file.json
|
15
|
-
|
16
|
-
# YARD artifacts
|
17
|
-
.yardoc
|
18
|
-
_yardoc
|
19
|
-
doc/
|
20
|
-
sample.rb
|
21
|
-
ExactTargetWSDL.xml
|
22
|
-
config.yaml
|
23
|
-
/objsamples/config.yaml
|
24
|
-
/objsamples/AllTest.bat
|
25
|
-
samples/sample_helper.rb
|
26
|
-
.DS_STORE
|
27
|
-
gengem.bat
|
28
|
-
.idea
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
coverage
|
6
|
+
InstalledFiles
|
7
|
+
lib/bundler/man
|
8
|
+
pkg
|
9
|
+
rdoc
|
10
|
+
spec/reports
|
11
|
+
test/tmp
|
12
|
+
test/version_tmp
|
13
|
+
tmp
|
14
|
+
samples/soap_cache_file.json
|
15
|
+
|
16
|
+
# YARD artifacts
|
17
|
+
.yardoc
|
18
|
+
_yardoc
|
19
|
+
doc/
|
20
|
+
sample.rb
|
21
|
+
ExactTargetWSDL.xml
|
22
|
+
config.yaml
|
23
|
+
/objsamples/config.yaml
|
24
|
+
/objsamples/AllTest.bat
|
25
|
+
samples/sample_helper.rb
|
26
|
+
.DS_STORE
|
27
|
+
gengem.bat
|
28
|
+
.idea
|
data/Gemfile
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
gemspec
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,90 +1,92 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
sfmc-fuelsdk-ruby (1.
|
5
|
-
json (~> 1.8, >= 1.8.1)
|
6
|
-
jwt (~> 1.0, >= 1.0.0)
|
7
|
-
savon (= 2.2.0)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
akami (1.2.2)
|
13
|
-
gyoku (>= 0.4.0)
|
14
|
-
nokogiri
|
15
|
-
builder (3.2.3)
|
16
|
-
coderay (1.1.2)
|
17
|
-
diff-lcs (1.3)
|
18
|
-
ffi (1.9.25)
|
19
|
-
ffi (1.9.25-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
rb-
|
39
|
-
rb-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
rb-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
rspec-
|
59
|
-
rspec-
|
60
|
-
|
61
|
-
rspec-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
rspec (~> 2.0)
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
sfmc-fuelsdk-ruby (1.2.0)
|
5
|
+
json (~> 1.8, >= 1.8.1)
|
6
|
+
jwt (~> 1.0, >= 1.0.0)
|
7
|
+
savon (= 2.2.0)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
akami (1.2.2)
|
13
|
+
gyoku (>= 0.4.0)
|
14
|
+
nokogiri
|
15
|
+
builder (3.2.3)
|
16
|
+
coderay (1.1.2)
|
17
|
+
diff-lcs (1.3)
|
18
|
+
ffi (1.9.25)
|
19
|
+
ffi (1.9.25-x64-mingw32)
|
20
|
+
ffi (1.9.25-x86-mingw32)
|
21
|
+
formatador (0.2.5)
|
22
|
+
guard (1.8.3)
|
23
|
+
formatador (>= 0.2.4)
|
24
|
+
listen (~> 1.3)
|
25
|
+
lumberjack (>= 1.0.2)
|
26
|
+
pry (>= 0.9.10)
|
27
|
+
thor (>= 0.14.6)
|
28
|
+
guard-rspec (2.6.0)
|
29
|
+
guard (>= 1.8)
|
30
|
+
rspec (~> 2.13)
|
31
|
+
gyoku (1.0.0)
|
32
|
+
builder (>= 2.1.2)
|
33
|
+
httpi (2.0.2)
|
34
|
+
rack
|
35
|
+
json (1.8.6)
|
36
|
+
jwt (1.5.6)
|
37
|
+
listen (1.3.1)
|
38
|
+
rb-fsevent (>= 0.9.3)
|
39
|
+
rb-inotify (>= 0.9)
|
40
|
+
rb-kqueue (>= 0.2)
|
41
|
+
lumberjack (1.0.13)
|
42
|
+
method_source (0.9.0)
|
43
|
+
mini_portile2 (2.4.0)
|
44
|
+
nokogiri (1.10.1-x64-mingw32)
|
45
|
+
mini_portile2 (~> 2.4.0)
|
46
|
+
nori (2.1.0)
|
47
|
+
pry (0.11.3)
|
48
|
+
coderay (~> 1.1.0)
|
49
|
+
method_source (~> 0.9.0)
|
50
|
+
rack (2.0.6)
|
51
|
+
rake (0.9.6)
|
52
|
+
rb-fsevent (0.10.3)
|
53
|
+
rb-inotify (0.9.10)
|
54
|
+
ffi (>= 0.5.0, < 2)
|
55
|
+
rb-kqueue (0.2.5)
|
56
|
+
ffi (>= 0.5.0)
|
57
|
+
rspec (2.99.0)
|
58
|
+
rspec-core (~> 2.99.0)
|
59
|
+
rspec-expectations (~> 2.99.0)
|
60
|
+
rspec-mocks (~> 2.99.0)
|
61
|
+
rspec-core (2.99.2)
|
62
|
+
rspec-expectations (2.99.2)
|
63
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
64
|
+
rspec-mocks (2.99.4)
|
65
|
+
savon (2.2.0)
|
66
|
+
akami (~> 1.2.0)
|
67
|
+
builder (>= 2.1.2)
|
68
|
+
gyoku (~> 1.0.0)
|
69
|
+
httpi (~> 2.0.2)
|
70
|
+
nokogiri (>= 1.4.0)
|
71
|
+
nori (~> 2.1.0)
|
72
|
+
wasabi (~> 3.1.0)
|
73
|
+
thor (0.20.0)
|
74
|
+
wasabi (3.1.0)
|
75
|
+
httpi (~> 2.0)
|
76
|
+
nokogiri (>= 1.4.0)
|
77
|
+
|
78
|
+
PLATFORMS
|
79
|
+
ruby
|
80
|
+
x64-mingw32
|
81
|
+
x86-mingw32
|
82
|
+
|
83
|
+
DEPENDENCIES
|
84
|
+
bundler (~> 1.3)
|
85
|
+
guard (~> 1.1)
|
86
|
+
guard-rspec (~> 2.0)
|
87
|
+
rake (~> 0.9)
|
88
|
+
rspec (~> 2.0)
|
89
|
+
sfmc-fuelsdk-ruby!
|
90
|
+
|
91
|
+
BUNDLED WITH
|
92
|
+
1.17.1
|
data/Guardfile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
# A sample Guardfile
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
3
|
-
guard 'rspec' do
|
4
|
-
watch('spec/spec_helper.rb') { "spec" }
|
5
|
-
watch(%r{^spec/.+_spec\.rb$})
|
6
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
7
|
-
end
|
8
|
-
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
guard 'rspec' do
|
4
|
+
watch('spec/spec_helper.rb') { "spec" }
|
5
|
+
watch(%r{^spec/.+_spec\.rb$})
|
6
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
7
|
+
end
|
8
|
+
|
data/LICENSE.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
Copyright (c) 2013 ExactTarget, Inc.
|
2
|
-
|
3
|
-
All rights reserved.
|
4
|
-
|
5
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
6
|
-
|
7
|
-
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
8
|
-
|
9
|
-
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
10
|
-
|
11
|
-
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
12
|
-
|
13
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1
|
+
Copyright (c) 2013 ExactTarget, Inc.
|
2
|
+
|
3
|
+
All rights reserved.
|
4
|
+
|
5
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
8
|
+
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
10
|
+
|
11
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
12
|
+
|
13
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
CHANGED
@@ -1,143 +1,166 @@
|
|
1
|
-
FuelSDK-Ruby / MarketingCloudSDK-Ruby
|
2
|
-
=====================================
|
3
|
-
|
4
|
-
ExactTarget Fuel SDK / SalesforceMarektingCloudSDK for Ruby
|
5
|
-
|
6
|
-
## Overview ##
|
7
|
-
The Fuel SDK for Ruby provides easy access to ExactTarget's Fuel API Family services, including a collection of REST APIs and a SOAP API. These APIs provide access to ExactTarget functionality via common collection types such as array/hash.
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
- **
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
1
|
+
FuelSDK-Ruby / MarketingCloudSDK-Ruby
|
2
|
+
=====================================
|
3
|
+
|
4
|
+
ExactTarget Fuel SDK / SalesforceMarektingCloudSDK for Ruby
|
5
|
+
|
6
|
+
## Overview ##
|
7
|
+
The Fuel SDK for Ruby provides easy access to ExactTarget's Fuel API Family services, including a collection of REST APIs and a SOAP API. These APIs provide access to ExactTarget functionality via common collection types such as array/hash.
|
8
|
+
|
9
|
+
|
10
|
+
## New Features in Version 1.2.0 ##
|
11
|
+
- **OAuth2 authentication support** - [More Details](https://developer.salesforce.com/docs/atlas.en-us.mc-app-development.meta/mc-app-development/integration-considerations.htm)
|
12
|
+
|
13
|
+
To enable OAuth2 authentication, pass ```use_oAuth2_authentication => true``` in the params argument to the Client's class constructor.
|
14
|
+
|
15
|
+
Example of instantiating the Client class:
|
16
|
+
|
17
|
+
```
|
18
|
+
myclient = MarketingCloudSDK::Client.new({
|
19
|
+
'client' => {
|
20
|
+
'id' => '<CLIENT_ID>',
|
21
|
+
'secret' => '<CLIENT_SECRET>',
|
22
|
+
'request_token_url' => '<AUTH TENANT SPECIFIC ENDPOINT>',
|
23
|
+
'soap_endpoint' => '<SOAP TENANT SPECIFIC ENDPOINT>',
|
24
|
+
'base_api_url' => '<REST TENANT SPECIFIC ENDPOINT>',
|
25
|
+
'use_oAuth2_authentication' => true,
|
26
|
+
'account_id' => <TARGET_ACCOUNT_ID>,
|
27
|
+
'scope' => '<PERMISSION_LIST>'
|
28
|
+
}
|
29
|
+
})
|
30
|
+
```
|
31
|
+
|
32
|
+
## New Features in Version 1.1.0 ##
|
33
|
+
- **Added support for your tenant's endpoints - [More Details](https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/your-subdomain-tenant-specific-endpoints.htm) **
|
34
|
+
- **MarketingCloudSDK gem will be available as sfmc-fuelsdk-ruby on ruby gems.
|
35
|
+
|
36
|
+
## Migrationg to version to version 1.0 ##
|
37
|
+
- **FuelSDK gem has been renamed to MarketingCloudSDK and will be availbale as marketingcloudsdk on ruby gems.
|
38
|
+
|
39
|
+
## New Features in Version .9 ##
|
40
|
+
- **Streamlined Folder Support**: All objects that support folders within the UI now have a standardized property called folderId.
|
41
|
+
- **Interaction Support**: Now supports Import and Email::SendDefinition objects .
|
42
|
+
- **Profile Attribute Support**: Added the ability to manage profile attributes through the ProfileAttribute object.
|
43
|
+
- **Support for single request to Add/Update**:A single request can be made which will create the object if one doesn't already or update one if it does. This works for Subscriber, DataExtension::Row, and List objects using the Put method.
|
44
|
+
- **Tracking Events Batching Support**: By default, all tracking event types will only pull new data since the last time a request was made using the same filter. If you would like to override this functionality to pull all data, simply set the GetSinceLastBatch property to false.
|
45
|
+
- **Automatic Asset Organization for Hub Apps**: Applications that authenticate by providing a JWT will automatically have all created assets placed into a folder based on the HubExchange app's name.
|
46
|
+
- **Greater Flexibility for Authentication**:Yaml config file is no longer required in order to define the authentication parameters. They are now required inputs when instantiating the Client class so they can be stored anywhere.
|
47
|
+
|
48
|
+
## Migrating from old version ##
|
49
|
+
- MarkeitngCloudSDK is now gem, Going forward FuelSDK gem will be available as marketingcloudsdk on ruby gems.
|
50
|
+
- Config.yaml is no longer used. ClientID/ClientSecret will now need to be passed when instantiating the Client class.
|
51
|
+
- Previous versions of the SalesforceMarketingCloudSDK exposed objects with the prefix "ET_". For backwards compatibility you can still access objects this way.
|
52
|
+
Subscriber can be accessed using MarketingCloudSDK::Subscriber or ET_Subscriber.
|
53
|
+
|
54
|
+
## Requirements ##
|
55
|
+
- Ruby Version 2.2.5
|
56
|
+
- Savon 2.2.0
|
57
|
+
|
58
|
+
## Getting Started ##
|
59
|
+
Build the gem from the source
|
60
|
+
|
61
|
+
```ruby
|
62
|
+
gem build marketingcloudsdk.gemspec
|
63
|
+
```
|
64
|
+
|
65
|
+
Install the newly built gem
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
gem install marketingcloudsdk-1.2.0.gem
|
69
|
+
```
|
70
|
+
|
71
|
+
If you have not registered your application or you need to lookup your Application Key or Application Signature values, please go to App Center at [Code@: ExactTarget's Developer Community](http://code.exacttarget.com/appcenter "Code@ App Center").
|
72
|
+
|
73
|
+
|
74
|
+
## Example Request ##
|
75
|
+
|
76
|
+
Add a require statement to reference the SalesforceMarketingCloud SDK's functionality:
|
77
|
+
> require 'marketingcloudsdk'
|
78
|
+
|
79
|
+
Next, create an instance of the Client class:
|
80
|
+
> myClient = MarketingCloudSDK::Client.new {'client' => { 'id' => CLIENTID, 'secret' => SECRET }}
|
81
|
+
|
82
|
+
Create an instance of the object type we want to work with:
|
83
|
+
> list = MarketingCloudSDK::List.new
|
84
|
+
|
85
|
+
Associate the Client to the object using the client property:
|
86
|
+
> list.client = myClient
|
87
|
+
|
88
|
+
Utilize one of the List methods:
|
89
|
+
> response = list.get
|
90
|
+
|
91
|
+
Print out the results for viewing
|
92
|
+
> p response
|
93
|
+
|
94
|
+
**Example Output:**
|
95
|
+
|
96
|
+
<pre>
|
97
|
+
<MarketingCloudSDK::SoapResponse:0x007fb86abcf190
|
98
|
+
@body= {:retrieve_response_msg=> {:overall_status=>"OK", :request_id=>"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", :results=>..}
|
99
|
+
@code= 200,
|
100
|
+
@message= 'OK',
|
101
|
+
@request_id="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
|
102
|
+
@results=
|
103
|
+
[{:client=>{:id=>"xxxx"},
|
104
|
+
:partner_key=>nil,
|
105
|
+
:created_date=>
|
106
|
+
#<DateTime: 2013-05-30T23:02:00+00:00 ((2456443j,82920s,0n),+0s,2299161j)>,
|
107
|
+
:id=>"xxxx",
|
108
|
+
:object_id=>nil,
|
109
|
+
:email_address=>"xxxx",
|
110
|
+
:attributes=>
|
111
|
+
[{:name=>"Full Name", :value=>"Justin Barber"},
|
112
|
+
{:name=>"Gender", :value=>nil},
|
113
|
+
{:name=>"Email Address", :value=>"xxx"},
|
114
|
+
{:name=>"User Defined", :value=>"02/02/1982"}],
|
115
|
+
:subscriber_key=>"xxxx",
|
116
|
+
:status=>"Active",
|
117
|
+
:email_type_preference=>"HTML",
|
118
|
+
:"@xsi:type"=>"Subscriber"},
|
119
|
+
@success=true>
|
120
|
+
</pre>
|
121
|
+
|
122
|
+
## Client Class ##
|
123
|
+
|
124
|
+
The Client class takes care of many of the required steps when accessing ExactTarget's API, including retrieving appropriate access tokens, handling token state for managing refresh, and determining the appropriate endpoints for API requests. In order to leverage the advantages this class provides, use a single instance of this class for an entire session. Do not instantiate a new Client object for each request made.
|
125
|
+
|
126
|
+
Client class accepts multiple parameters
|
127
|
+
|
128
|
+
**Parameters** - Allows for passing authentication information for use with SSO with a JWT or for passing ClientID/ClientSecret.
|
129
|
+
Additionally the API hostname (base_api_url),Authentication URL (request_token_url) and the SOAP endpoint (soap_endpoint) is now configurable:
|
130
|
+
|
131
|
+
Example passing ClientID/ClientSecret:
|
132
|
+
> myclient = MarketingCloudSDK::Client.new({'client' => {'id' => 'exampleID','secret' => 'exampleSecret'}})
|
133
|
+
|
134
|
+
Example passing ClientID/ClientSecret/AppSignature/JWT:
|
135
|
+
> myclient = MarketingCloudSDK::Client.new({'client' => {'id' => 'exampleID','secret' => 'exampleSecret', 'signature'=>'examplesig'}, 'jwt'=>'exampleJWT'})
|
136
|
+
|
137
|
+
Example passing ClientID/ClientSecret/BaseAPIUrl/ReqTokenAuthUrl/Soap Endpoint
|
138
|
+
> myclient = MarketingCloudSDK::Client.new('client' => {'id' => 'exampleID', 'secret' => 'exampleSecret', 'base_api_url' => 'http://getapis', 'request_token_url' => 'http://authapi', 'soap_endpoint' => 'http://soapendpoint'})
|
139
|
+
|
140
|
+
**Note** - The following defaults apply if the following parameters are omitted:
|
141
|
+
- base_api_url: https://www.exacttargetapis.com
|
142
|
+
- request_token_url: https://auth.exacttargetapis.com/v1/requestToken
|
143
|
+
- soap_endpoint: https://webservice.exacttarget.com/Service.asmx
|
144
|
+
|
145
|
+
**Debug** - If 2nd parameter for debug is set to true, all API requests that the Fuel SDK is making behind the scenes will be logged. This option should only be set to true in order to troubleshoot during the development process and should never be used in a production scenario.
|
146
|
+
> myclient = MarketingCloudSDK::Client.new auth, true <br>
|
147
|
+
|
148
|
+
|
149
|
+
## Responses ##
|
150
|
+
All methods on MarketingCloud SDK objects return a generic object that follows the same structure, regardless of the type of call. This object contains a common set of properties used to display details about the request.
|
151
|
+
|
152
|
+
- success?: Boolean value that indicates if the call was successful
|
153
|
+
- code: HTTP Error Code (will always be 200 for SOAP requests)
|
154
|
+
- message: Text values containing more details in the event of an error
|
155
|
+
- results: Collection containing the details unique to the method called.
|
156
|
+
- more? - Boolean value that indicates on Get requests if more data is available.
|
157
|
+
|
158
|
+
|
159
|
+
## Samples ##
|
160
|
+
Find more sample files that illustrate using all of the available functions for ExactTarget objects exposed through the API in the samples directory.
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|