I cannot figure out how to make a Data Extension sendable using the PHP version of the Fuel SDK.
The documentation describes both the SendableDataExtensionField and SendableSubscriberField as string datatypes, but that results in an Error 2.
A comment on another question suggests using nested arrays, but that returns SendableSubscriberField and SendableDataExtensionField cannot be blank errors.
Also, I know that this account uses "Email Address" for it's Sendable Subscriber Field.
My current code:
$myclient = new ET_Client(true);
$DataExtensionNameForTesting = "TestForTim";
$postDE = new ET_DataExtension();
$postDE->authStub = $myclient;
$postDE->props = array(
"Name" => $DataExtensionNameForTesting,
"CustomerKey" => $DataExtensionNameForTesting,
"IsSendable" => "true",
"SendableDataExtensionField" => "EmailAddress",
"SendableSubscriberField" => "EmailAddress"
);
$postDE->columns = array();
$postDE->columns[] = array(
"Name" => "EmailAddress",
"FieldType" => "EmailAddress",
"IsPrimaryKey" => "true",
"MaxLength" => "100",
"IsRequired" => "true"
);
$postDE->columns[] = array(
"Name" => "FirstName",
"FieldType" => "Text"
);
$postResult = $postDE->post();