samples/sample-sentevent.rb in fuelsdk-0.0.3 vs samples/sample-sentevent.rb in fuelsdk-0.0.4
- old
+ new
@@ -1,17 +1,17 @@
require 'fuelsdk'
require_relative 'sample_helper'
begin
- stubObj = FuelSDK::ET_Client.new auth
+ stubObj = FuelSDK::Client.new auth
## Modify the date below to reduce the number of results returned from the request
## Setting this too far in the past could result in a very large response size
retrieveDate = '2013-01-15T13:00:00.000'
p '>>> Retrieve Filtered SentEvents with GetMoreResults'
- getSentEvent = FuelSDK::ET_SentEvent.new()
+ getSentEvent = FuelSDK::SentEvent.new()
getSentEvent.authStub = stubObj
getSentEvent.props = ["SendID","SubscriberKey","EventDate","Client.ID","EventType","BatchID","TriggeredSendDefinitionObjectID","ListID","PartnerKey","SubscriberID"]
getSentEvent.filter = {'Property' => 'EventDate','SimpleOperator' => 'greaterThan','DateValue' => retrieveDate}
getResponse = getSentEvent.get
p 'Retrieve Status: ' + getResponse.status.to_s
@@ -36,10 +36,10 @@
end
# The following request could potentially bring back large amounts of data if run against a production account
=begin
p '>>> Retrieve All SentEvents with GetMoreResults'
- getSentEvent = FuelSDK::ET_SentEvent.new()
+ getSentEvent = FuelSDK::SentEvent.new()
getSentEvent.authStub = stubObj
getSentEvent.props = ["SendID","SubscriberKey","EventDate","Client.ID","EventType","BatchID","TriggeredSendDefinitionObjectID","ListID","PartnerKey","SubscriberID"]
getResponse = getSentEvent.get
p 'Retrieve Status: ' + getResponse.status.to_s
p 'Code: ' + getResponse.code.to_s