sfmc-fuelsdk-ruby 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +28 -0
  3. data/Gemfile +3 -0
  4. data/Gemfile.lock +90 -0
  5. data/Guardfile +8 -0
  6. data/LICENSE.md +13 -0
  7. data/README.md +143 -0
  8. data/Rakefile +1 -0
  9. data/lib/marketingcloudsdk/client.rb +296 -0
  10. data/lib/marketingcloudsdk/http_request.rb +118 -0
  11. data/lib/marketingcloudsdk/objects.rb +757 -0
  12. data/lib/marketingcloudsdk/rest.rb +118 -0
  13. data/lib/marketingcloudsdk/soap.rb +282 -0
  14. data/lib/marketingcloudsdk/targeting.rb +99 -0
  15. data/lib/marketingcloudsdk/utils.rb +47 -0
  16. data/lib/marketingcloudsdk/version.rb +39 -0
  17. data/lib/marketingcloudsdk.rb +74 -0
  18. data/lib/new.rb +1240 -0
  19. data/marketingcloudsdk.gemspec +30 -0
  20. data/samples/sample-AddSubscriberToList.rb +56 -0
  21. data/samples/sample-CreateAndStartDataExtensionImport.rb +29 -0
  22. data/samples/sample-CreateAndStartListImport.rb +27 -0
  23. data/samples/sample-CreateContentAreas.rb +48 -0
  24. data/samples/sample-CreateDataExtensions.rb +54 -0
  25. data/samples/sample-CreateProfileAttributes.rb +48 -0
  26. data/samples/sample-SendEmailToDataExtension.rb +23 -0
  27. data/samples/sample-SendEmailToList.rb +23 -0
  28. data/samples/sample-SendTriggeredSends.rb +30 -0
  29. data/samples/sample-bounceevent.rb +70 -0
  30. data/samples/sample-campaign.rb +211 -0
  31. data/samples/sample-clickevent.rb +71 -0
  32. data/samples/sample-contentarea.rb +122 -0
  33. data/samples/sample-dataextension.rb +209 -0
  34. data/samples/sample-directverb.rb +54 -0
  35. data/samples/sample-email.rb +122 -0
  36. data/samples/sample-email.senddefinition.rb +134 -0
  37. data/samples/sample-folder.rb +143 -0
  38. data/samples/sample-import.rb +103 -0
  39. data/samples/sample-list.rb +105 -0
  40. data/samples/sample-list.subscriber.rb +97 -0
  41. data/samples/sample-openevent.rb +70 -0
  42. data/samples/sample-profileattribute.rb +56 -0
  43. data/samples/sample-sentevent.rb +70 -0
  44. data/samples/sample-subscriber.rb +135 -0
  45. data/samples/sample-triggeredsend.rb +129 -0
  46. data/samples/sample-unsubevent.rb +72 -0
  47. data/samples/sample_helper.rb.template +10 -0
  48. data/spec/client_spec.rb +218 -0
  49. data/spec/default_values_fallback_spec.rb +30 -0
  50. data/spec/helper_funcs_spec.rb +11 -0
  51. data/spec/http_request_spec.rb +61 -0
  52. data/spec/objects_helper_spec.rb +32 -0
  53. data/spec/objects_spec.rb +484 -0
  54. data/spec/rest_spec.rb +48 -0
  55. data/spec/soap_spec.rb +140 -0
  56. data/spec/spec_helper.rb +14 -0
  57. data/spec/targeting_spec.rb +44 -0
  58. metadata +262 -0
@@ -0,0 +1,44 @@
1
+ require 'spec_helper'
2
+
3
+ describe MarketingCloudSDK::Targeting do
4
+
5
+ subject { Class.new.new.extend(MarketingCloudSDK::Targeting) }
6
+
7
+ it { should respond_to(:endpoint) }
8
+ it { should_not respond_to(:endpoint=) }
9
+ it { should_not respond_to(:get_soap_endpoint) }
10
+ it { should respond_to(:get) }
11
+ it { should respond_to(:post) }
12
+ it { should respond_to(:patch) }
13
+ it { should respond_to(:delete) }
14
+ it { should respond_to(:access_token) }
15
+
16
+ describe '#get_soap_endpoint' do
17
+ let(:client) { c = Class.new.new.extend(MarketingCloudSDK::Targeting)
18
+ c.stub(:base_api_url).and_return('https://www.exacttargetapis.com')
19
+ c.stub(:access_token).and_return('open_sesame')
20
+ c.stub(:get_soap_endpoint_from_file).and_return(nil)
21
+ c.stub(:set_soap_endpoint_to_file).and_return(nil)
22
+ c.stub(:get)
23
+ .with('https://www.exacttargetapis.com/platform/v1/endpoints/soap',{'access_token'=>'open_sesame'})
24
+ .and_return({'url' => 'S#.authentication.target'})
25
+ c
26
+ }
27
+ it 'sets @endpoint' do
28
+ client.send(:get_soap_endpoint)
29
+ expect(client.endpoint).to eq 'S#.authentication.target'
30
+ end
31
+ end
32
+
33
+ describe '#endpoint' do
34
+ let(:client) { c = Class.new.new.extend(MarketingCloudSDK::Targeting)
35
+ c.stub(:base_api_url).and_return('bogus url')
36
+ c.stub(:get).and_return({'url' => 'S#.authentication.target'})
37
+ c
38
+ }
39
+
40
+ it 'calls get_soap_endpoint to find target' do
41
+ expect(client.endpoint).to eq 'S#.authentication.target'
42
+ end
43
+ end
44
+ end
metadata ADDED
@@ -0,0 +1,262 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sfmc-fuelsdk-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Salesforce
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-11-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.9'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.9'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: guard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard-rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: savon
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 2.2.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 2.2.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: json
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.8'
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: 1.8.1
107
+ type: :runtime
108
+ prerelease: false
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - "~>"
112
+ - !ruby/object:Gem::Version
113
+ version: '1.8'
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: 1.8.1
117
+ - !ruby/object:Gem::Dependency
118
+ name: jwt
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: 1.0.0
124
+ - - "~>"
125
+ - !ruby/object:Gem::Version
126
+ version: '1.0'
127
+ type: :runtime
128
+ prerelease: false
129
+ version_requirements: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: 1.0.0
134
+ - - "~>"
135
+ - !ruby/object:Gem::Version
136
+ version: '1.0'
137
+ description: API wrapper for SOAP and REST API with Salesforce Marketing Cloud (ExactTarget)
138
+ email:
139
+ - mcsdkadmin@salesforce.com
140
+ executables: []
141
+ extensions: []
142
+ extra_rdoc_files: []
143
+ files:
144
+ - ".gitignore"
145
+ - Gemfile
146
+ - Gemfile.lock
147
+ - Guardfile
148
+ - LICENSE.md
149
+ - README.md
150
+ - Rakefile
151
+ - lib/marketingcloudsdk.rb
152
+ - lib/marketingcloudsdk/client.rb
153
+ - lib/marketingcloudsdk/http_request.rb
154
+ - lib/marketingcloudsdk/objects.rb
155
+ - lib/marketingcloudsdk/rest.rb
156
+ - lib/marketingcloudsdk/soap.rb
157
+ - lib/marketingcloudsdk/targeting.rb
158
+ - lib/marketingcloudsdk/utils.rb
159
+ - lib/marketingcloudsdk/version.rb
160
+ - lib/new.rb
161
+ - marketingcloudsdk.gemspec
162
+ - samples/sample-AddSubscriberToList.rb
163
+ - samples/sample-CreateAndStartDataExtensionImport.rb
164
+ - samples/sample-CreateAndStartListImport.rb
165
+ - samples/sample-CreateContentAreas.rb
166
+ - samples/sample-CreateDataExtensions.rb
167
+ - samples/sample-CreateProfileAttributes.rb
168
+ - samples/sample-SendEmailToDataExtension.rb
169
+ - samples/sample-SendEmailToList.rb
170
+ - samples/sample-SendTriggeredSends.rb
171
+ - samples/sample-bounceevent.rb
172
+ - samples/sample-campaign.rb
173
+ - samples/sample-clickevent.rb
174
+ - samples/sample-contentarea.rb
175
+ - samples/sample-dataextension.rb
176
+ - samples/sample-directverb.rb
177
+ - samples/sample-email.rb
178
+ - samples/sample-email.senddefinition.rb
179
+ - samples/sample-folder.rb
180
+ - samples/sample-import.rb
181
+ - samples/sample-list.rb
182
+ - samples/sample-list.subscriber.rb
183
+ - samples/sample-openevent.rb
184
+ - samples/sample-profileattribute.rb
185
+ - samples/sample-sentevent.rb
186
+ - samples/sample-subscriber.rb
187
+ - samples/sample-triggeredsend.rb
188
+ - samples/sample-unsubevent.rb
189
+ - samples/sample_helper.rb.template
190
+ - spec/client_spec.rb
191
+ - spec/default_values_fallback_spec.rb
192
+ - spec/helper_funcs_spec.rb
193
+ - spec/http_request_spec.rb
194
+ - spec/objects_helper_spec.rb
195
+ - spec/objects_spec.rb
196
+ - spec/rest_spec.rb
197
+ - spec/soap_spec.rb
198
+ - spec/spec_helper.rb
199
+ - spec/targeting_spec.rb
200
+ homepage: https://github.com/ExactTarget/FuelSDK-Ruby
201
+ licenses:
202
+ - ''
203
+ metadata: {}
204
+ post_install_message:
205
+ rdoc_options: []
206
+ require_paths:
207
+ - lib
208
+ required_ruby_version: !ruby/object:Gem::Requirement
209
+ requirements:
210
+ - - ">="
211
+ - !ruby/object:Gem::Version
212
+ version: '0'
213
+ required_rubygems_version: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - ">="
216
+ - !ruby/object:Gem::Version
217
+ version: '0'
218
+ requirements: []
219
+ rubyforge_project:
220
+ rubygems_version: 2.7.8
221
+ signing_key:
222
+ specification_version: 4
223
+ summary: Fuel Client Library for Ruby
224
+ test_files:
225
+ - samples/sample-AddSubscriberToList.rb
226
+ - samples/sample-CreateAndStartDataExtensionImport.rb
227
+ - samples/sample-CreateAndStartListImport.rb
228
+ - samples/sample-CreateContentAreas.rb
229
+ - samples/sample-CreateDataExtensions.rb
230
+ - samples/sample-CreateProfileAttributes.rb
231
+ - samples/sample-SendEmailToDataExtension.rb
232
+ - samples/sample-SendEmailToList.rb
233
+ - samples/sample-SendTriggeredSends.rb
234
+ - samples/sample-bounceevent.rb
235
+ - samples/sample-campaign.rb
236
+ - samples/sample-clickevent.rb
237
+ - samples/sample-contentarea.rb
238
+ - samples/sample-dataextension.rb
239
+ - samples/sample-directverb.rb
240
+ - samples/sample-email.rb
241
+ - samples/sample-email.senddefinition.rb
242
+ - samples/sample-folder.rb
243
+ - samples/sample-import.rb
244
+ - samples/sample-list.rb
245
+ - samples/sample-list.subscriber.rb
246
+ - samples/sample-openevent.rb
247
+ - samples/sample-profileattribute.rb
248
+ - samples/sample-sentevent.rb
249
+ - samples/sample-subscriber.rb
250
+ - samples/sample-triggeredsend.rb
251
+ - samples/sample-unsubevent.rb
252
+ - samples/sample_helper.rb.template
253
+ - spec/client_spec.rb
254
+ - spec/default_values_fallback_spec.rb
255
+ - spec/helper_funcs_spec.rb
256
+ - spec/http_request_spec.rb
257
+ - spec/objects_helper_spec.rb
258
+ - spec/objects_spec.rb
259
+ - spec/rest_spec.rb
260
+ - spec/soap_spec.rb
261
+ - spec/spec_helper.rb
262
+ - spec/targeting_spec.rb