コード例 #1
0
    $postTrig->authStub = $myclient;
    $postTrig->props = array('CustomerKey' => $TSNameForCreateThenDelete, 'Name' => $TSNameForCreateThenDelete, 'Email' => array("ID" => "3113962"), "SendClassification" => array("CustomerKey" => "2240"));
    $postResult = $postTrig->post();
    print_r('Post Status: ' . ($postResult->status ? 'true' : 'false') . "\n");
    print 'Code: ' . $postResult->code . "\n";
    print 'Message: ' . $postResult->message . "\n";
    print 'Result Count: ' . count($postResult->results) . "\n";
    print 'Results: ' . "\n";
    print_r($postResult->results);
    print "\n---------------\n";
    // Delete a TriggeredSend Definition
    print_r("Delete a TriggeredSend Definition \n");
    $deleteTrig = new ET_TriggeredSend();
    $deleteTrig->authStub = $myclient;
    $deleteTrig->props = array('CustomerKey' => $TSNameForCreateThenDelete);
    $deleteResult = $deleteTrig->delete();
    print_r('Delete Status: ' . ($deleteResult->status ? 'true' : 'false') . "\n");
    print 'Code: ' . $deleteResult->code . "\n";
    print 'Message: ' . $deleteResult->message . "\n";
    print 'Result Count: ' . count($deleteResult->results) . "\n";
    print 'Results: ' . "\n";
    print_r($deleteResult->results);
    print "\n---------------\n";
} catch (Exception $e) {
    echo 'Caught exception: ', $e->getMessage(), "\n";
}
?>



コード例 #2
0
 public function deleteTriggeredSend($name)
 {
     $ts = new \ET_TriggeredSend();
     $ts->authStub = $this->fuel;
     $ts->props = array('CustomerKey' => $name);
     $getRes = $ts->delete();
     if ($getRes->status == true) {
         return $getRes;
     } else {
         Log::error("Error deleting Triggered Send", [$getRes]);
         return $getRes;
     }
 }