i can create data extensions using the code provided on exact target help section. But i can't figure out how to define the data retention length. Suppose i want the data to be cleared automatically after 24 hours (not deleting the data extension).
Please see the code below (sample code)
$newde = new ExactTarget_DataExtension();
$newde->Name = "New DE2";
$newde->CustomerKey = "New DE2";
$newde->IsSendable = true;
$newde->IsTestable = false;
$newde->SendableDataExtensionField = new ExactTarget_DataExtensionField();
$newde->SendableDataExtensionField->Name = 'EMAIL';
$newde->SendableSubscriberField = new ExactTarget_Attribute();
$newde->SendableSubscriberField->Name = 'Email Address';
$newde->Fields = array();
$emailfield = new ExactTarget_DataExtensionField();
$emailfield->Name = 'EMAIL';
$emailfield->IsPrimaryKey = true;
$emailfield->IsRequired = true;
$emailfield->FieldType = ExactTarget_DataExtensionFieldType::EmailAddress;
$newde->Fields[] = $emailfield;
$fnamefield = new ExactTarget_DataExtensionField();
$fnamefield->Name = 'First Name';
$fnamefield->IsPrimaryKey = false;
$fnamefield->FieldType = ExactTarget_DataExtensionFieldType::Text;
$newde->Fields[] = $fnamefield;
$lnamefield = new ExactTarget_DataExtensionField();
$lnamefield->Name = 'Last Name';
$lnamefield->IsPrimaryKey = false;
$lnamefield->FieldType = ExactTarget_DataExtensionFieldType::Text;
$newde->Fields[] = $lnamefield;
$object = new SoapVar($newde, SOAP_ENC_OBJECT, 'DataExtension', "http://exacttarget.com/wsdl/partnerAPI");
$request = new ExactTarget_CreateRequest();
$request->Options = NULL;
$request->Objects = array($object);
$results = $client->Create($request);
var_dump($results);
Any help will be grateful.
Thanks