Class: MarketingCloudSDK::Email::SendDefinition

Inherits:
Objects::Base show all
Includes:
Objects::Soap::CUD, Objects::Soap::Read
Defined in:
lib/marketingcloudsdk/objects.rb

Instance Attribute Summary collapse

Attributes included from Objects::Soap::Read

#filter

Attributes inherited from Objects::Base

#client, #properties

Instance Method Summary collapse

Methods included from Objects::Soap::CUD

#delete, #patch, #post

Methods included from Objects::Soap::Read

#get, #info

Methods inherited from Objects::Base

id, #props

Instance Attribute Details

#folder_idObject

Returns the value of attribute folder_id.



227
228
229
# File 'lib/marketingcloudsdk/objects.rb', line 227

def folder_id
  @folder_id
end

Instance Method Details

#folder_media_typeObject



237
238
239
# File 'lib/marketingcloudsdk/objects.rb', line 237

def folder_media_type
	'userinitiatedsends'
end

#folder_propertyObject



233
234
235
# File 'lib/marketingcloudsdk/objects.rb', line 233

def folder_property
	'CategoryID'
end

#idObject



229
230
231
# File 'lib/marketingcloudsdk/objects.rb', line 229

def id
	'EmailSendDefinition'
end

#sendObject



242
243
244
245
246
247
248
# File 'lib/marketingcloudsdk/objects.rb', line 242

def send
	perform_response = client.soap_perform id, 'start' , properties
	if perform_response.status then
		@last_task_id = perform_response.results[0][:result][:task][:id]
	end
	perform_response
end

#statusObject



250
251
252
# File 'lib/marketingcloudsdk/objects.rb', line 250

def status
	client.soap_get "Send", ['ID','CreatedDate', 'ModifiedDate', 'Client.ID', 'Email.ID', 'SendDate','FromAddress','FromName','Duplicates','InvalidAddresses','ExistingUndeliverables','ExistingUnsubscribes','HardBounces','SoftBounces','OtherBounces','ForwardedEmails','UniqueClicks','UniqueOpens','NumberSent','NumberDelivered','NumberTargeted','NumberErrored','NumberExcluded','Unsubscribes','MissingAddresses','Subject','PreviewURL','SentDate','EmailName','Status','IsMultipart','SendLimit','SendWindowOpen','SendWindowClose','BCCEmail','EmailSendDefinition.ObjectID','EmailSendDefinition.CustomerKey'], {'Property' => 'ID','SimpleOperator' => 'equals','Value' => @last_task_id}
end