public function performAction($action, $data = null) {
        $this->setTokenValue($this->getEntityIdName(), $this->getId());

        $payload = new \stdClass;
        $payload->data = new \stdClass;
        $payload->data->action = $action;
        $payload->data->data = is_null($data) ? new \stdClass : $data;

        $this->put(json_encode($payload));
    }