Trendsic Platform Service

<back to all web services

WebixKanbanTaskCreateRequest

The following routes are available for this service:
POST/v1/webix/kanban/tasks
POST/v1/webix/kanban/tasks/{ProjectUID}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class WebixKanbanComment implements IConvertible
{
    String? id;
    int? user_id;
    String? date;
    String? text;

    WebixKanbanComment({this.id,this.user_id,this.date,this.text});
    WebixKanbanComment.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class KanbanTaskAttachment implements IConvertible
{
    String? id;
    String? link;
    int? size;

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

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

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

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

class WebixKanbanTask implements IConvertible
{
    String? id;
    String? status;
    int? user_id;
    String? text;
    String? color;
    List<String>? tags = [];
    List<WebixKanbanComment>? comments = [];
    List<KanbanTaskAttachment>? attachments = [];
    int? list;

    WebixKanbanTask({this.id,this.status,this.user_id,this.text,this.color,this.tags,this.comments,this.attachments,this.list});
    WebixKanbanTask.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        status = json['status'];
        user_id = json['user_id'];
        text = json['text'];
        color = json['color'];
        tags = JsonConverters.fromJson(json['tags'],'List<String>',context!);
        comments = JsonConverters.fromJson(json['comments'],'List<WebixKanbanComment>',context!);
        attachments = JsonConverters.fromJson(json['attachments'],'List<KanbanTaskAttachment>',context!);
        list = json['list'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'status': status,
        'user_id': user_id,
        'text': text,
        'color': color,
        'tags': JsonConverters.toJson(tags,'List<String>',context!),
        'comments': JsonConverters.toJson(comments,'List<WebixKanbanComment>',context!),
        'attachments': JsonConverters.toJson(attachments,'List<KanbanTaskAttachment>',context!),
        'list': list
    };

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

class WebixKanbanTaskResponse extends WebixKanbanTask implements IConvertible
{
    WebixKanbanTaskResponse();
    WebixKanbanTaskResponse.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() => "WebixKanbanTaskResponse";
    TypeContext? context = _ctx;
}

class WebixKanbanTaskCreateRequest extends WebixKanbanTask implements IConvertible
{
    String? ProjectUID;

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

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ProjectUID': ProjectUID
    });

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'WebixKanbanComment': TypeInfo(TypeOf.Class, create:() => WebixKanbanComment()),
    'KanbanTaskAttachment': TypeInfo(TypeOf.Class, create:() => KanbanTaskAttachment()),
    'WebixKanbanTask': TypeInfo(TypeOf.Class, create:() => WebixKanbanTask()),
    'List<WebixKanbanComment>': TypeInfo(TypeOf.Class, create:() => <WebixKanbanComment>[]),
    'List<KanbanTaskAttachment>': TypeInfo(TypeOf.Class, create:() => <KanbanTaskAttachment>[]),
    'WebixKanbanTaskResponse': TypeInfo(TypeOf.Class, create:() => WebixKanbanTaskResponse()),
    'WebixKanbanTaskCreateRequest': TypeInfo(TypeOf.Class, create:() => WebixKanbanTaskCreateRequest()),
});

Dart WebixKanbanTaskCreateRequest DTOs

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

HTTP + XML

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

POST /v1/webix/kanban/tasks HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<WebixKanbanTaskCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <attachments>
    <KanbanTaskAttachment>
      <id>00000000-0000-0000-0000-000000000000</id>
      <link>String</link>
      <size>0</size>
    </KanbanTaskAttachment>
  </attachments>
  <color>String</color>
  <comments>
    <WebixKanbanComment>
      <date>String</date>
      <id>String</id>
      <text>String</text>
      <user_id>0</user_id>
    </WebixKanbanComment>
  </comments>
  <id>00000000-0000-0000-0000-000000000000</id>
  <list>0</list>
  <status>String</status>
  <tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </tags>
  <text>String</text>
  <user_id>0</user_id>
  <ProjectUID>00000000-0000-0000-0000-000000000000</ProjectUID>
</WebixKanbanTaskCreateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<WebixKanbanTaskResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <attachments>
    <KanbanTaskAttachment>
      <id>00000000-0000-0000-0000-000000000000</id>
      <link>String</link>
      <size>0</size>
    </KanbanTaskAttachment>
  </attachments>
  <color>String</color>
  <comments>
    <WebixKanbanComment>
      <date>String</date>
      <id>String</id>
      <text>String</text>
      <user_id>0</user_id>
    </WebixKanbanComment>
  </comments>
  <id>00000000-0000-0000-0000-000000000000</id>
  <list>0</list>
  <status>String</status>
  <tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </tags>
  <text>String</text>
  <user_id>0</user_id>
</WebixKanbanTaskResponse>