Trendsic Platform Service

<back to all web services

ReportManagerModuleSaveRequest

The following routes are available for this service:
POST,OPTIONS/v1/ReportManager/api/Modules
PUT,OPTIONS/v1/ReportManager/api/Modules/{id}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class ReportManagerModule implements IReportManagerDocument, IConvertible
{
    int? id;
    String? name;
    String? text;
    DateTime? updated;

    ReportManagerModule({this.id,this.name,this.text,this.updated});
    ReportManagerModule.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        text = json['text'];
        updated = JsonConverters.fromJson(json['updated'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'text': text,
        'updated': JsonConverters.toJson(updated,'DateTime',context!)
    };

    getTypeName() => "ReportManagerModule";
    TypeContext? context = _ctx;
}

class ReportManagerModuleSaveRequest extends ReportManagerModule implements IConvertible
{
    ReportManagerModuleSaveRequest();
    ReportManagerModuleSaveRequest.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "ReportManagerModuleSaveRequest";
    TypeContext? context = _ctx;
}

class ReportManagerSaveDeleteResponse implements IConvertible
{
    int? id;

    ReportManagerSaveDeleteResponse({this.id});
    ReportManagerSaveDeleteResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id
    };

    getTypeName() => "ReportManagerSaveDeleteResponse";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'ReportManagerModule': TypeInfo(TypeOf.Class, create:() => ReportManagerModule()),
    'ReportManagerModuleSaveRequest': TypeInfo(TypeOf.Class, create:() => ReportManagerModuleSaveRequest()),
    'ReportManagerSaveDeleteResponse': TypeInfo(TypeOf.Class, create:() => ReportManagerSaveDeleteResponse()),
});

Dart ReportManagerModuleSaveRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/ReportManager/api/Modules HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: 0,
	name: String,
	text: String,
	updated: 0001-01-01
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: 0
}