protected function setKeysForSave()
    {
        // Convert objects to array
        $params = array_map(function($value) {
            if (is_object($value)
                && !($value instanceof UploadedFile)
                && is_callable([$value, 'toApi'])) {
                return $value->toApi();
            }

            return $value;
        }, $this->toApi());

        // Remove dynamic params
        return array_except($params, array_merge([static::CREATED_AT, static::UPDATED_AT], [
            'id',
            'pagination',
        ]));
    }