Model/DownloadItem.php
public function jsonSerialize()
    {
        $json = [];

        if (null !== $this->mediaId) {
            $json['mediaId'] = $this->mediaId;
        }
        if (null !== $this->imageTemplateId) {
            $json['imageTemplateId'] = $this->imageTemplateId;
        }
        if (null !== $this->videoTemplateId) {
            $json['videoTemplateId'] = $this->videoTemplateId;
        }
        if (null !== $this->documentTemplateId) {
            $json['documentTemplateId'] = $this->documentTemplateId;
        }
        if (null !== $this->audioTemplateId) {
            $json['audioTemplateId'] = $this->audioTemplateId;
        }

        return $json;
    }
public function jsonSerialize()
    {
        $json = [];

        if (null !== $this->mediaId) {
            $json['mediaId'] = $this->mediaId;
        }
        if (null !== $this->imageTemplateId) {
            $json['imageTemplateId'] = $this->imageTemplateId;
        }
        if (null !== $this->videoTemplateId) {
            $json['videoTemplateId'] = $this->videoTemplateId;
        }
        if (null !== $this->documentTemplateId) {
            $json['documentTemplateId'] = $this->documentTemplateId;
        }
        if (null !== $this->audioTemplateId) {
            $json['audioTemplateId'] = $this->audioTemplateId;
        }

        return $json;
    }
Gets all data that should be available in a json representation.

@return array an associative array of the available variables