fuelsdk 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/fuelsdk.rb CHANGED
@@ -30,3 +30,4 @@ ET_Subscriber = FuelSDK::Subscriber
30
30
  ET_UnsubEvent = FuelSDK::UnsubEvent
31
31
  ET_TriggeredSend = FuelSDK::TriggeredSend
32
32
  ET_Campaign = FuelSDK::Campaign
33
+ ET_Get = FuelSDK::Get
@@ -364,4 +364,28 @@ module FuelSDK
364
364
  end
365
365
  end
366
366
  end
367
+
368
+ class Get < Objects::Base
369
+ include Objects::Soap::Read
370
+ attr_accessor :id
371
+
372
+ def initialize client, id, properties, filter
373
+ self.properties = properties
374
+ self.filter = filter
375
+ self.client = client
376
+ self.id = id
377
+ end
378
+
379
+ def get
380
+ super id
381
+ end
382
+
383
+ class << self
384
+ def new client, id, properties=nil, filter=nil
385
+ o = self.allocate
386
+ o.send :initialize, client, id, properties, filter
387
+ return o.get
388
+ end
389
+ end
390
+ end
367
391
  end
@@ -1,3 +1,3 @@
1
1
  module FuelSDK
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -0,0 +1,13 @@
1
+ require 'fuelsdk'
2
+ require_relative 'sample_helper' # contains auth with credentials
3
+
4
+ begin
5
+ client = ET_Client.new auth
6
+ get = ET_Get.new client, 'Account'
7
+ p "Results: #{get.results}"
8
+ raise 'Failure getting Account info' unless get.success?
9
+
10
+ rescue => e
11
+ p "Caught exception: #{e.message}"
12
+ p e.backtrace
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuelsdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -170,6 +170,7 @@ files:
170
170
  - samples/sample-dataextension.rb
171
171
  - samples/sample-email.rb
172
172
  - samples/sample-folder.rb
173
+ - samples/sample-get.rb
173
174
  - samples/sample-list.rb
174
175
  - samples/sample-list.subscriber.rb
175
176
  - samples/sample-openevent.rb
@@ -222,6 +223,7 @@ test_files:
222
223
  - samples/sample-dataextension.rb
223
224
  - samples/sample-email.rb
224
225
  - samples/sample-folder.rb
226
+ - samples/sample-get.rb
225
227
  - samples/sample-list.rb
226
228
  - samples/sample-list.subscriber.rb
227
229
  - samples/sample-openevent.rb