sfmc-fuelsdk-ruby 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +39 -39
  3. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -20
  4. data/.gitignore +29 -29
  5. data/Gemfile +3 -3
  6. data/Gemfile.lock +104 -92
  7. data/Guardfile +8 -8
  8. data/LICENSE.md +13 -13
  9. data/README.md +200 -194
  10. data/Rakefile +1 -1
  11. data/lib/marketingcloudsdk.rb +74 -74
  12. data/lib/marketingcloudsdk/client.rb +395 -395
  13. data/lib/marketingcloudsdk/http_request.rb +118 -118
  14. data/lib/marketingcloudsdk/objects.rb +757 -757
  15. data/lib/marketingcloudsdk/rest.rb +118 -118
  16. data/lib/marketingcloudsdk/soap.rb +296 -296
  17. data/lib/marketingcloudsdk/targeting.rb +99 -99
  18. data/lib/marketingcloudsdk/utils.rb +47 -47
  19. data/lib/marketingcloudsdk/version.rb +39 -39
  20. data/lib/new.rb +1240 -1240
  21. data/marketingcloudsdk.gemspec +30 -30
  22. data/samples/sample-AddSubscriberToList.rb +56 -56
  23. data/samples/sample-CreateAndStartDataExtensionImport.rb +29 -29
  24. data/samples/sample-CreateAndStartListImport.rb +27 -27
  25. data/samples/sample-CreateContentAreas.rb +48 -48
  26. data/samples/sample-CreateDataExtensions.rb +54 -54
  27. data/samples/sample-CreateProfileAttributes.rb +48 -48
  28. data/samples/sample-SendEmailToDataExtension.rb +23 -23
  29. data/samples/sample-SendEmailToList.rb +23 -23
  30. data/samples/sample-SendTriggeredSends.rb +30 -30
  31. data/samples/sample-bounceevent.rb +70 -70
  32. data/samples/sample-campaign.rb +211 -211
  33. data/samples/sample-clickevent.rb +71 -71
  34. data/samples/sample-contentarea.rb +122 -122
  35. data/samples/sample-dataextension.rb +209 -209
  36. data/samples/sample-directverb.rb +54 -54
  37. data/samples/sample-email.rb +122 -122
  38. data/samples/sample-email.senddefinition.rb +134 -134
  39. data/samples/sample-folder.rb +143 -143
  40. data/samples/sample-import.rb +103 -103
  41. data/samples/sample-list.rb +105 -105
  42. data/samples/sample-list.subscriber.rb +97 -97
  43. data/samples/sample-openevent.rb +70 -70
  44. data/samples/sample-profileattribute.rb +56 -56
  45. data/samples/sample-sentevent.rb +70 -70
  46. data/samples/sample-subscriber.rb +135 -135
  47. data/samples/sample-triggeredsend.rb +129 -129
  48. data/samples/sample-unsubevent.rb +72 -72
  49. data/samples/sample_helper.rb.template +10 -10
  50. data/spec/client_spec.rb +416 -416
  51. data/spec/default_values_fallback_spec.rb +30 -30
  52. data/spec/helper_funcs_spec.rb +11 -11
  53. data/spec/http_request_spec.rb +61 -61
  54. data/spec/objects_helper_spec.rb +32 -32
  55. data/spec/objects_spec.rb +484 -484
  56. data/spec/public_or_web_integration_credentials.rb.template +11 -11
  57. data/spec/rest_spec.rb +48 -48
  58. data/spec/soap_spec.rb +140 -140
  59. data/spec/spec_helper.rb +14 -14
  60. data/spec/targeting_spec.rb +44 -44
  61. metadata +14 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6d1e7835b46241d74415cfc71fcf04898d24c36b4d7e02ecc2c79c0b4b43851
4
- data.tar.gz: 6e49a53e6a97bda143d6cae5fb335f50dc793ea0da967c4236f69874137e7f17
3
+ metadata.gz: 1e04339e9458587a85c6c2d32f67d6d17a1927993195ae76c68d2e9b753a046a
4
+ data.tar.gz: 3f9096bd72e79dae9b933a6fa23ea9e603efb62cb31ab3a37a931487fde66318
5
5
  SHA512:
6
- metadata.gz: c7f5558179e22d3acf72b562b6ea219f1ffea55946ccab4bd2108e2e471f35102131113c6e4e58ad69801281e24d02a5e174006193ba018d26a14df79c60ec2a
7
- data.tar.gz: aef480e9c3218532d934d69b9204b71822e7d2ee6c4a2eece74211bf8442196caa241328b43229a6e241b6baabd7130ca7104ace67d9fdd14632f7367deeeca1
6
+ metadata.gz: d23513ec0a99d829223f8d06a5c8254867afe0d6b7e6428befd7945e8a6b9425920945d4c6a768f9f213fc106f61bc2be24361bf032c6c0b06b10d998d50f123
7
+ data.tar.gz: e593436ff4ae449dc5def0b7913c13d539725137e322ba669f294aa29264e3c471c1bba878100d65108dccefcd250eea985395c69dc54134a69e12562bd071a6
@@ -1,39 +1,39 @@
1
- ---
2
- name: Bug report
3
- about: Describe the issue you found
4
- title: "[BUG]"
5
- labels: bug
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Describe the bug**
11
- A clear and concise description of what the bug is.
12
-
13
- **To Reproduce**
14
- Steps to reproduce the behavior.
15
-
16
- **Expected behavior**
17
- A clear and concise description of what you expected to happen.
18
-
19
- **Screenshots**
20
- If applicable, add screenshots to help explain your problem.
21
-
22
- **Code snippet**
23
- A code snippet that demonstrates the issue or a link to a code repository the developers can easily pull down to recreate the issue locally.
24
-
25
- Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (e.g. gif) is not sufficient.
26
-
27
-
28
- **Environment**
29
- - SDK Version [e.g. 1.2.0]
30
- - Ruby version
31
-
32
- **The bug has the severity**
33
- - [ ] Critical: The defect affects critical functionality or critical data. It does not have a workaround.
34
- - [ ] Major: The defect affects major functionality or major data. It has a workaround but is not obvious and is difficult.
35
- - [ ] Minor: The defect affects minor functionality or non-critical data. It has an easy workaround.
36
- - [ ] Trivial: The defect does not affect functionality or data. It does not even need a workaround. It does not impact productivity or efficiency. It is merely an inconvenience.
37
-
38
- **Additional context**
39
- Add any other context about the problem here.
1
+ ---
2
+ name: Bug report
3
+ about: Describe the issue you found
4
+ title: "[BUG]"
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior.
15
+
16
+ **Expected behavior**
17
+ A clear and concise description of what you expected to happen.
18
+
19
+ **Screenshots**
20
+ If applicable, add screenshots to help explain your problem.
21
+
22
+ **Code snippet**
23
+ A code snippet that demonstrates the issue or a link to a code repository the developers can easily pull down to recreate the issue locally.
24
+
25
+ Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (e.g. gif) is not sufficient.
26
+
27
+
28
+ **Environment**
29
+ - SDK Version [e.g. 1.2.0]
30
+ - Ruby version
31
+
32
+ **The bug has the severity**
33
+ - [ ] Critical: The defect affects critical functionality or critical data. It does not have a workaround.
34
+ - [ ] Major: The defect affects major functionality or major data. It has a workaround but is not obvious and is difficult.
35
+ - [ ] Minor: The defect affects minor functionality or non-critical data. It has an easy workaround.
36
+ - [ ] Trivial: The defect does not affect functionality or data. It does not even need a workaround. It does not impact productivity or efficiency. It is merely an inconvenience.
37
+
38
+ **Additional context**
39
+ Add any other context about the problem here.
@@ -1,20 +1,20 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
- title: "[Enhancement]"
5
- labels: enhancement
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Is your feature request related to a problem? Please describe**
11
- A clear and concise description of what the problem is.
12
-
13
- **Describe the solution you'd like**
14
- A clear and concise description of what you want to happen.
15
-
16
- **Describe alternatives you've considered**
17
- A clear and concise description of any alternative solutions or features you've considered.
18
-
19
- **Additional context**
20
- Add any other context or screenshots about the feature request here.
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: "[Enhancement]"
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe**
11
+ A clear and concise description of what the problem is.
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
data/.gitignore CHANGED
@@ -1,29 +1,29 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- coverage
6
- InstalledFiles
7
- lib/bundler/man
8
- pkg
9
- rdoc
10
- spec/reports
11
- spec/public_or_web_integration_credentials.rb
12
- test/tmp
13
- test/version_tmp
14
- tmp
15
- samples/soap_cache_file.json
16
-
17
- # YARD artifacts
18
- .yardoc
19
- _yardoc
20
- doc/
21
- sample.rb
22
- ExactTargetWSDL.xml
23
- config.yaml
24
- /objsamples/config.yaml
25
- /objsamples/AllTest.bat
26
- samples/sample_helper.rb
27
- .DS_STORE
28
- gengem.bat
29
- .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
+ spec/public_or_web_integration_credentials.rb
12
+ test/tmp
13
+ test/version_tmp
14
+ tmp
15
+ samples/soap_cache_file.json
16
+
17
+ # YARD artifacts
18
+ .yardoc
19
+ _yardoc
20
+ doc/
21
+ sample.rb
22
+ ExactTargetWSDL.xml
23
+ config.yaml
24
+ /objsamples/config.yaml
25
+ /objsamples/AllTest.bat
26
+ samples/sample_helper.rb
27
+ .DS_STORE
28
+ gengem.bat
29
+ .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,92 +1,104 @@
1
- PATH
2
- remote: .
3
- specs:
4
- sfmc-fuelsdk-ruby (1.3.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
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sfmc-fuelsdk-ruby (1.3.1)
5
+ json (>= 2.2.0)
6
+ jwt (>= 2.1.0)
7
+ savon (>= 2.12.1)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ addressable (2.7.0)
13
+ public_suffix (>= 2.0.2, < 5.0)
14
+ akami (1.3.1)
15
+ gyoku (>= 0.4.0)
16
+ nokogiri
17
+ builder (3.2.4)
18
+ coderay (1.1.3)
19
+ diff-lcs (1.4.4)
20
+ ffi (1.15.1)
21
+ ffi (1.15.1-x64-mingw32)
22
+ ffi (1.15.1-x86-mingw32)
23
+ formatador (0.2.5)
24
+ guard (1.8.3)
25
+ formatador (>= 0.2.4)
26
+ listen (~> 1.3)
27
+ lumberjack (>= 1.0.2)
28
+ pry (>= 0.9.10)
29
+ thor (>= 0.14.6)
30
+ guard-rspec (2.6.0)
31
+ guard (>= 1.8)
32
+ rspec (~> 2.13)
33
+ gyoku (1.3.1)
34
+ builder (>= 2.1.2)
35
+ httpi (2.4.5)
36
+ rack
37
+ socksify
38
+ json (2.5.1)
39
+ jwt (2.2.3)
40
+ listen (1.3.1)
41
+ rb-fsevent (>= 0.9.3)
42
+ rb-inotify (>= 0.9)
43
+ rb-kqueue (>= 0.2)
44
+ lumberjack (1.2.8)
45
+ method_source (1.0.0)
46
+ mini_portile2 (2.5.3)
47
+ nokogiri (1.11.7)
48
+ mini_portile2 (~> 2.5.0)
49
+ racc (~> 1.4)
50
+ nokogiri (1.11.7-x64-mingw32)
51
+ racc (~> 1.4)
52
+ nokogiri (1.11.7-x86-mingw32)
53
+ racc (~> 1.4)
54
+ nori (2.6.0)
55
+ pry (0.14.1)
56
+ coderay (~> 1.1)
57
+ method_source (~> 1.0)
58
+ public_suffix (4.0.6)
59
+ racc (1.5.2)
60
+ rack (2.2.3)
61
+ rake (0.9.6)
62
+ rb-fsevent (0.11.0)
63
+ rb-inotify (0.10.1)
64
+ ffi (~> 1.0)
65
+ rb-kqueue (0.2.6)
66
+ ffi (>= 0.5.0)
67
+ rspec (2.99.0)
68
+ rspec-core (~> 2.99.0)
69
+ rspec-expectations (~> 2.99.0)
70
+ rspec-mocks (~> 2.99.0)
71
+ rspec-core (2.99.2)
72
+ rspec-expectations (2.99.2)
73
+ diff-lcs (>= 1.1.3, < 2.0)
74
+ rspec-mocks (2.99.4)
75
+ savon (2.12.1)
76
+ akami (~> 1.2)
77
+ builder (>= 2.1.2)
78
+ gyoku (~> 1.2)
79
+ httpi (~> 2.3)
80
+ nokogiri (>= 1.8.1)
81
+ nori (~> 2.4)
82
+ wasabi (~> 3.4)
83
+ socksify (1.7.1)
84
+ thor (1.1.0)
85
+ wasabi (3.6.1)
86
+ addressable
87
+ httpi (~> 2.0)
88
+ nokogiri (>= 1.4.2)
89
+
90
+ PLATFORMS
91
+ ruby
92
+ x64-mingw32
93
+ x86-mingw32
94
+
95
+ DEPENDENCIES
96
+ bundler (~> 1.3)
97
+ guard (~> 1.1)
98
+ guard-rspec (~> 2.0)
99
+ rake (~> 0.9)
100
+ rspec (~> 2.0)
101
+ sfmc-fuelsdk-ruby!
102
+
103
+ BUNDLED WITH
104
+ 1.17.3
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,194 +1,200 @@
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
- ## New Features in Version 1.3.0 ##
10
- - **Added Refresh Token support for OAuth2 authentication**
11
- - **Added Web/Public App support for OAuth2 authentication**
12
-
13
- More details on Access Tokens for Web/Public Apps can be found [here](https://developer.salesforce.com/docs/atlas.en-us.mc-app-development.meta/mc-app-development/access-token-app.htm)
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
- 'application_type' => '<APPLICATION_TYPE>',
29
- 'redirect_URI' => '<REDIRECT_URI_FOR_PUBLIC/WEB_APP>',
30
- 'authorization_code' => '<AUTHORIZATION_CODE_FOR_PUBLIC/WEB_APP>'
31
- }
32
- })
33
- ```
34
-
35
- * application_type can have one of the following values: `server`, `public`, `web`. The default value of application_type is `server`.
36
-
37
-
38
- ## New Features in Version 1.2.0 ##
39
- - **OAuth2 authentication support** - [More Details](https://developer.salesforce.com/docs/atlas.en-us.mc-app-development.meta/mc-app-development/integration-considerations.htm)
40
-
41
- To enable OAuth2 authentication, pass ```use_oAuth2_authentication => true``` in the params argument to the Client's class constructor.
42
-
43
- Example of instantiating the Client class:
44
-
45
- ```
46
- myclient = MarketingCloudSDK::Client.new({
47
- 'client' => {
48
- 'id' => '<CLIENT_ID>',
49
- 'secret' => '<CLIENT_SECRET>',
50
- 'request_token_url' => '<AUTH TENANT SPECIFIC ENDPOINT>',
51
- 'soap_endpoint' => '<SOAP TENANT SPECIFIC ENDPOINT>',
52
- 'base_api_url' => '<REST TENANT SPECIFIC ENDPOINT>',
53
- 'use_oAuth2_authentication' => true,
54
- 'account_id' => <TARGET_ACCOUNT_ID>,
55
- 'scope' => '<PERMISSION_LIST>'
56
- }
57
- })
58
- ```
59
-
60
- ## New Features in Version 1.1.0 ##
61
- - **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) **
62
- - **MarketingCloudSDK gem will be available as sfmc-fuelsdk-ruby on ruby gems.
63
-
64
- ## Migrationg to version to version 1.0 ##
65
- - **FuelSDK gem has been renamed to MarketingCloudSDK and will be availbale as marketingcloudsdk on ruby gems.
66
-
67
- ## New Features in Version .9 ##
68
- - **Streamlined Folder Support**: All objects that support folders within the UI now have a standardized property called folderId.
69
- - **Interaction Support**: Now supports Import and Email::SendDefinition objects .
70
- - **Profile Attribute Support**: Added the ability to manage profile attributes through the ProfileAttribute object.
71
- - **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.
72
- - **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.
73
- - **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.
74
- - **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.
75
-
76
- ## Migrating from old version ##
77
- - MarkeitngCloudSDK is now gem, Going forward FuelSDK gem will be available as marketingcloudsdk on ruby gems.
78
- - Config.yaml is no longer used. ClientID/ClientSecret will now need to be passed when instantiating the Client class.
79
- - Previous versions of the SalesforceMarketingCloudSDK exposed objects with the prefix "ET_". For backwards compatibility you can still access objects this way.
80
- Subscriber can be accessed using MarketingCloudSDK::Subscriber or ET_Subscriber.
81
-
82
- ## Requirements ##
83
- - Ruby Version 2.2.5
84
- - Savon 2.2.0
85
-
86
- ## Getting Started ##
87
- Build the gem from the source
88
-
89
- ```ruby
90
- gem build marketingcloudsdk.gemspec
91
- ```
92
-
93
- Install the newly built gem
94
-
95
- ```ruby
96
- gem install marketingcloudsdk-1.3.0.gem
97
- ```
98
-
99
- 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").
100
-
101
-
102
- ## Example Request ##
103
-
104
- Add a require statement to reference the SalesforceMarketingCloud SDK's functionality:
105
- > require 'marketingcloudsdk'
106
-
107
- Next, create an instance of the Client class:
108
- > myClient = MarketingCloudSDK::Client.new {'client' => { 'id' => CLIENTID, 'secret' => SECRET }}
109
-
110
- Create an instance of the object type we want to work with:
111
- > list = MarketingCloudSDK::List.new
112
-
113
- Associate the Client to the object using the client property:
114
- > list.client = myClient
115
-
116
- Utilize one of the List methods:
117
- > response = list.get
118
-
119
- Print out the results for viewing
120
- > p response
121
-
122
- **Example Output:**
123
-
124
- <pre>
125
- <MarketingCloudSDK::SoapResponse:0x007fb86abcf190
126
- @body= {:retrieve_response_msg=> {:overall_status=>"OK", :request_id=>"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", :results=>..}
127
- @code= 200,
128
- @message= 'OK',
129
- @request_id="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
130
- @results=
131
- [{:client=>{:id=>"xxxx"},
132
- :partner_key=>nil,
133
- :created_date=>
134
- #<DateTime: 2013-05-30T23:02:00+00:00 ((2456443j,82920s,0n),+0s,2299161j)>,
135
- :id=>"xxxx",
136
- :object_id=>nil,
137
- :email_address=>"xxxx",
138
- :attributes=>
139
- [{:name=>"Full Name", :value=>"Justin Barber"},
140
- {:name=>"Gender", :value=>nil},
141
- {:name=>"Email Address", :value=>"xxx"},
142
- {:name=>"User Defined", :value=>"02/02/1982"}],
143
- :subscriber_key=>"xxxx",
144
- :status=>"Active",
145
- :email_type_preference=>"HTML",
146
- :"@xsi:type"=>"Subscriber"},
147
- @success=true>
148
- </pre>
149
-
150
- ## Client Class ##
151
-
152
- 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.
153
-
154
- Client class accepts multiple parameters
155
-
156
- **Parameters** - Allows for passing authentication information for use with SSO with a JWT or for passing ClientID/ClientSecret.
157
- Additionally the API hostname (base_api_url),Authentication URL (request_token_url) and the SOAP endpoint (soap_endpoint) is now configurable:
158
-
159
- Example passing ClientID/ClientSecret:
160
- > myclient = MarketingCloudSDK::Client.new({'client' => {'id' => 'exampleID','secret' => 'exampleSecret'}})
161
-
162
- Example passing ClientID/ClientSecret/AppSignature/JWT:
163
- > myclient = MarketingCloudSDK::Client.new({'client' => {'id' => 'exampleID','secret' => 'exampleSecret', 'signature'=>'examplesig'}, 'jwt'=>'exampleJWT'})
164
-
165
- Example passing ClientID/ClientSecret/BaseAPIUrl/ReqTokenAuthUrl/Soap Endpoint
166
- > myclient = MarketingCloudSDK::Client.new('client' => {'id' => 'exampleID', 'secret' => 'exampleSecret', 'base_api_url' => 'http://getapis', 'request_token_url' => 'http://authapi', 'soap_endpoint' => 'http://soapendpoint'})
167
-
168
- **Note** - The following defaults apply if the following parameters are omitted:
169
- - base_api_url: https://www.exacttargetapis.com
170
- - request_token_url: https://auth.exacttargetapis.com/v1/requestToken
171
- - soap_endpoint: https://webservice.exacttarget.com/Service.asmx
172
-
173
- **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.
174
- > myclient = MarketingCloudSDK::Client.new auth, true <br>
175
-
176
-
177
- ## Responses ##
178
- 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.
179
-
180
- - success?: Boolean value that indicates if the call was successful
181
- - code: HTTP Error Code (will always be 200 for SOAP requests)
182
- - message: Text values containing more details in the event of an error
183
- - results: Collection containing the details unique to the method called.
184
- - more? - Boolean value that indicates on Get requests if more data is available.
185
-
186
-
187
- ## Samples ##
188
- Find more sample files that illustrate using all of the available functions for ExactTarget objects exposed through the API in the samples directory.
189
-
190
-
191
-
192
-
193
-
194
-
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
+ ## New Features in Version 1.3.1 ##
10
+ - **Updated below packages to latest version**
11
+ - savon: ">= 2.12.1"
12
+ - json: ">= 2.2.0"
13
+ - jwt: ">= 2.1.0"
14
+
15
+ ## New Features in Version 1.3.0 ##
16
+ - **Added Refresh Token support for OAuth2 authentication**
17
+ - **Added Web/Public App support for OAuth2 authentication**
18
+
19
+ More details on Access Tokens for Web/Public Apps can be found [here](https://developer.salesforce.com/docs/atlas.en-us.mc-app-development.meta/mc-app-development/access-token-app.htm)
20
+
21
+ Example of instantiating the Client class:
22
+
23
+ ```
24
+ myclient = MarketingCloudSDK::Client.new({
25
+ 'client' => {
26
+ 'id' => '<CLIENT_ID>',
27
+ 'secret' => '<CLIENT_SECRET>',
28
+ 'request_token_url' => '<AUTH TENANT SPECIFIC ENDPOINT>',
29
+ 'soap_endpoint' => '<SOAP TENANT SPECIFIC ENDPOINT>',
30
+ 'base_api_url' => '<REST TENANT SPECIFIC ENDPOINT>',
31
+ 'use_oAuth2_authentication' => true,
32
+ 'account_id' => <TARGET_ACCOUNT_ID>,
33
+ 'scope' => '<PERMISSION_LIST>',
34
+ 'application_type' => '<APPLICATION_TYPE>',
35
+ 'redirect_URI' => '<REDIRECT_URI_FOR_PUBLIC/WEB_APP>',
36
+ 'authorization_code' => '<AUTHORIZATION_CODE_FOR_PUBLIC/WEB_APP>'
37
+ }
38
+ })
39
+ ```
40
+
41
+ * application_type can have one of the following values: `server`, `public`, `web`. The default value of application_type is `server`.
42
+
43
+
44
+ ## New Features in Version 1.2.0 ##
45
+ - **OAuth2 authentication support** - [More Details](https://developer.salesforce.com/docs/atlas.en-us.mc-app-development.meta/mc-app-development/integration-considerations.htm)
46
+
47
+ To enable OAuth2 authentication, pass ```use_oAuth2_authentication => true``` in the params argument to the Client's class constructor.
48
+
49
+ Example of instantiating the Client class:
50
+
51
+ ```
52
+ myclient = MarketingCloudSDK::Client.new({
53
+ 'client' => {
54
+ 'id' => '<CLIENT_ID>',
55
+ 'secret' => '<CLIENT_SECRET>',
56
+ 'request_token_url' => '<AUTH TENANT SPECIFIC ENDPOINT>',
57
+ 'soap_endpoint' => '<SOAP TENANT SPECIFIC ENDPOINT>',
58
+ 'base_api_url' => '<REST TENANT SPECIFIC ENDPOINT>',
59
+ 'use_oAuth2_authentication' => true,
60
+ 'account_id' => <TARGET_ACCOUNT_ID>,
61
+ 'scope' => '<PERMISSION_LIST>'
62
+ }
63
+ })
64
+ ```
65
+
66
+ ## New Features in Version 1.1.0 ##
67
+ - **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) **
68
+ - **MarketingCloudSDK gem will be available as sfmc-fuelsdk-ruby on ruby gems.
69
+
70
+ ## Migrationg to version to version 1.0 ##
71
+ - **FuelSDK gem has been renamed to MarketingCloudSDK and will be availbale as marketingcloudsdk on ruby gems.
72
+
73
+ ## New Features in Version .9 ##
74
+ - **Streamlined Folder Support**: All objects that support folders within the UI now have a standardized property called folderId.
75
+ - **Interaction Support**: Now supports Import and Email::SendDefinition objects .
76
+ - **Profile Attribute Support**: Added the ability to manage profile attributes through the ProfileAttribute object.
77
+ - **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.
78
+ - **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.
79
+ - **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.
80
+ - **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.
81
+
82
+ ## Migrating from old version ##
83
+ - MarkeitngCloudSDK is now gem, Going forward FuelSDK gem will be available as marketingcloudsdk on ruby gems.
84
+ - Config.yaml is no longer used. ClientID/ClientSecret will now need to be passed when instantiating the Client class.
85
+ - Previous versions of the SalesforceMarketingCloudSDK exposed objects with the prefix "ET_". For backwards compatibility you can still access objects this way.
86
+ Subscriber can be accessed using MarketingCloudSDK::Subscriber or ET_Subscriber.
87
+
88
+ ## Requirements ##
89
+ - Ruby Version 2.2.5
90
+ - Savon 2.2.0
91
+
92
+ ## Getting Started ##
93
+ Build the gem from the source
94
+
95
+ ```ruby
96
+ gem build marketingcloudsdk.gemspec
97
+ ```
98
+
99
+ Install the newly built gem
100
+
101
+ ```ruby
102
+ gem install marketingcloudsdk-1.3.0.gem
103
+ ```
104
+
105
+ 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").
106
+
107
+
108
+ ## Example Request ##
109
+
110
+ Add a require statement to reference the SalesforceMarketingCloud SDK's functionality:
111
+ > require 'marketingcloudsdk'
112
+
113
+ Next, create an instance of the Client class:
114
+ > myClient = MarketingCloudSDK::Client.new {'client' => { 'id' => CLIENTID, 'secret' => SECRET }}
115
+
116
+ Create an instance of the object type we want to work with:
117
+ > list = MarketingCloudSDK::List.new
118
+
119
+ Associate the Client to the object using the client property:
120
+ > list.client = myClient
121
+
122
+ Utilize one of the List methods:
123
+ > response = list.get
124
+
125
+ Print out the results for viewing
126
+ > p response
127
+
128
+ **Example Output:**
129
+
130
+ <pre>
131
+ <MarketingCloudSDK::SoapResponse:0x007fb86abcf190
132
+ @body= {:retrieve_response_msg=> {:overall_status=>"OK", :request_id=>"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", :results=>..}
133
+ @code= 200,
134
+ @message= 'OK',
135
+ @request_id="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
136
+ @results=
137
+ [{:client=>{:id=>"xxxx"},
138
+ :partner_key=>nil,
139
+ :created_date=>
140
+ #<DateTime: 2013-05-30T23:02:00+00:00 ((2456443j,82920s,0n),+0s,2299161j)>,
141
+ :id=>"xxxx",
142
+ :object_id=>nil,
143
+ :email_address=>"xxxx",
144
+ :attributes=>
145
+ [{:name=>"Full Name", :value=>"Justin Barber"},
146
+ {:name=>"Gender", :value=>nil},
147
+ {:name=>"Email Address", :value=>"xxx"},
148
+ {:name=>"User Defined", :value=>"02/02/1982"}],
149
+ :subscriber_key=>"xxxx",
150
+ :status=>"Active",
151
+ :email_type_preference=>"HTML",
152
+ :"@xsi:type"=>"Subscriber"},
153
+ @success=true>
154
+ </pre>
155
+
156
+ ## Client Class ##
157
+
158
+ 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.
159
+
160
+ Client class accepts multiple parameters
161
+
162
+ **Parameters** - Allows for passing authentication information for use with SSO with a JWT or for passing ClientID/ClientSecret.
163
+ Additionally the API hostname (base_api_url),Authentication URL (request_token_url) and the SOAP endpoint (soap_endpoint) is now configurable:
164
+
165
+ Example passing ClientID/ClientSecret:
166
+ > myclient = MarketingCloudSDK::Client.new({'client' => {'id' => 'exampleID','secret' => 'exampleSecret'}})
167
+
168
+ Example passing ClientID/ClientSecret/AppSignature/JWT:
169
+ > myclient = MarketingCloudSDK::Client.new({'client' => {'id' => 'exampleID','secret' => 'exampleSecret', 'signature'=>'examplesig'}, 'jwt'=>'exampleJWT'})
170
+
171
+ Example passing ClientID/ClientSecret/BaseAPIUrl/ReqTokenAuthUrl/Soap Endpoint
172
+ > myclient = MarketingCloudSDK::Client.new('client' => {'id' => 'exampleID', 'secret' => 'exampleSecret', 'base_api_url' => 'http://getapis', 'request_token_url' => 'http://authapi', 'soap_endpoint' => 'http://soapendpoint'})
173
+
174
+ **Note** - The following defaults apply if the following parameters are omitted:
175
+ - base_api_url: https://www.exacttargetapis.com
176
+ - request_token_url: https://auth.exacttargetapis.com/v1/requestToken
177
+ - soap_endpoint: https://webservice.exacttarget.com/Service.asmx
178
+
179
+ **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.
180
+ > myclient = MarketingCloudSDK::Client.new auth, true <br>
181
+
182
+
183
+ ## Responses ##
184
+ 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.
185
+
186
+ - success?: Boolean value that indicates if the call was successful
187
+ - code: HTTP Error Code (will always be 200 for SOAP requests)
188
+ - message: Text values containing more details in the event of an error
189
+ - results: Collection containing the details unique to the method called.
190
+ - more? - Boolean value that indicates on Get requests if more data is available.
191
+
192
+
193
+ ## Samples ##
194
+ Find more sample files that illustrate using all of the available functions for ExactTarget objects exposed through the API in the samples directory.
195
+
196
+
197
+
198
+
199
+
200
+