Trendsic Platform Service

<back to all web services

DocumentTypeRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/DocumentType/
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class DocumentType implements IConvertible
{
    int? Sort;
    String? TypeName;

    DocumentType({this.Sort,this.TypeName});
    DocumentType.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class DocumentTypeResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<DocumentType>? DocumentTypes = [];

    DocumentTypeResponse({this.ResponseStatus,this.DocumentTypes});
    DocumentTypeResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        DocumentTypes = JsonConverters.fromJson(json['DocumentTypes'],'List<DocumentType>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'DocumentTypes': JsonConverters.toJson(DocumentTypes,'List<DocumentType>',context!)
    };

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

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

    Map<String, dynamic> toJson() => {};
    getTypeName() => "DocumentTypeRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'DocumentType': TypeInfo(TypeOf.Class, create:() => DocumentType()),
    'DocumentTypeResponse': TypeInfo(TypeOf.Class, create:() => DocumentTypeResponse()),
    'List<DocumentType>': TypeInfo(TypeOf.Class, create:() => <DocumentType>[]),
    'DocumentTypeRequest': TypeInfo(TypeOf.Class, create:() => DocumentTypeRequest()),
});

Dart DocumentTypeRequest DTOs

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

HTTP + OTHER

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

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

{}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"DocumentTypes":[{"Sort":0,"TypeName":"String"}]}