public function save() { $request = new RelateIQRequest(); if ($this->id) { return $request->newPut('lists/' . $this->listId . '/listitems/' . $this->id, $this); } else { $result = $request->newPost('lists/' . $this->listId . '/listitems/', $this); if ($result->id) { $this->id = $result->id; } } }
public function save() { $request = new RelateIQRequest(); if ($this->id) { $result = $request->newPut('contacts/' . $this->id, $this); } else { $result = $request->newPost('contacts', $this); } if (!$result) { return false; } return self::parseResponseObject($result); }