Class: MarketingCloudSDK::TriggeredSend

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

#attributesObject

Returns the value of attribute attributes.



376
377
378
# File 'lib/marketingcloudsdk/objects.rb', line 376

def attributes
  @attributes
end

#folder_idObject

Returns the value of attribute folder_id.



376
377
378
# File 'lib/marketingcloudsdk/objects.rb', line 376

def folder_id
  @folder_id
end

#subscribersObject

Returns the value of attribute subscribers.



376
377
378
# File 'lib/marketingcloudsdk/objects.rb', line 376

def subscribers
  @subscribers
end

Instance Method Details

#folder_media_typeObject



385
386
387
# File 'lib/marketingcloudsdk/objects.rb', line 385

def folder_media_type
	'triggered_send'
end

#folder_propertyObject



381
382
383
# File 'lib/marketingcloudsdk/objects.rb', line 381

def folder_property
	'CategoryID'
end

#idObject



377
378
379
# File 'lib/marketingcloudsdk/objects.rb', line 377

def id
	'TriggeredSendDefinition'
end

#sendObject



389
390
391
392
393
394
395
396
397
398
399
# File 'lib/marketingcloudsdk/objects.rb', line 389

def send
	if self.properties.is_a? Array then
		tscall = []
		self.properties.each{ |p|
			tscall.push({"TriggeredSendDefinition" => {"CustomerKey" => p["CustomerKey"]}, "Subscribers" => p["Subscribers"], "Attributes" => p["Attributes"]})
		}
	else
		tscall = {"TriggeredSendDefinition" => self.properties, "Subscribers" => @subscribers, "Attributes" => @attributes }
    end
	client.soap_post 'TriggeredSend', tscall
end