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

        if (null !== $this->pinCode) {
            $json['pinCode'] = $this->pinCode;
        }
        if (null !== $this->templateId) {
            $json['templateId'] = $this->templateId;
        }
        if (null !== $this->expireDate) {
            $json['expireDate'] = $this->expireDate->format(\DateTime::ISO8601);
        }
        if (null !== $this->definition) {
            $json['definition'] = $this->definition;
        }
        if (null !== $this->visitNotification) {
            $json['visitNotification'] = $this->visitNotification;
        }
        if (null !== $this->name) {
            $json['name'] = $this->name;
        }
        if (null !== $this->deleted) {
            $json['deleted'] = $this->deleted;
        }
        if (null !== $this->properties && !empty($this->properties)) {
            $json['properties'] = $this->properties;
        }
        if (null !== $this->typeId) {
            $json['typeId'] = $this->typeId;
        }

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

        if (null !== $this->pinCode) {
            $json['pinCode'] = $this->pinCode;
        }
        if (null !== $this->templateId) {
            $json['templateId'] = $this->templateId;
        }
        if (null !== $this->expireDate) {
            $json['expireDate'] = $this->expireDate->format(\DateTime::ISO8601);
        }
        if (null !== $this->definition) {
            $json['definition'] = $this->definition;
        }
        if (null !== $this->visitNotification) {
            $json['visitNotification'] = $this->visitNotification;
        }
        if (null !== $this->name) {
            $json['name'] = $this->name;
        }
        if (null !== $this->deleted) {
            $json['deleted'] = $this->deleted;
        }
        if (null !== $this->properties && !empty($this->properties)) {
            $json['properties'] = $this->properties;
        }
        if (null !== $this->typeId) {
            $json['typeId'] = $this->typeId;
        }

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

@return array an associative array of the available variables