Esempio n. 1
0
 public function testListitemDelete()
 {
     Client::relateIQ(GlobalVar::KEY, GlobalVar::SECRET);
     $data = ["id" => "53ae0c09e4b0f0eb6bc57ecd"];
     $listObj = new Lists($data);
     $this->assertNotNull($listObj->id());
     //Creating ListItems...
     $account = new Account([]);
     $contact = new Contact(["id" => "53b4b4cce4b0e6c80c5fca0c"]);
     $listItem = new ListItems(["parent" => $listObj]);
     $listItem->accountId($account->id());
     $listItem->contactIds($contact->id());
     $listItem->name("MASH Realtors");
     $listItem->fieldValues(["0" => "5", "2" => "0"]);
     $res = $listItem->create();
     $this->assertNotNull($res->id());
     $idList = $res->id();
     //Deleting ListItems...
     $listItem = $listObj->ListItem($idList);
     $res = $listItem->delete();
     $this->assertEquals(true, $res);
 }