| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/DashboardItem |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class DashboardItem implements IConvertible
{
int? ID;
DateTime? Date;
String? Title;
String? Message;
String? Author;
String? Hyperlink;
String? ThumbnailImage;
DateTime? StartDate;
DateTime? EndDate;
String? Type;
int? SortKey;
DashboardItem({this.ID,this.Date,this.Title,this.Message,this.Author,this.Hyperlink,this.ThumbnailImage,this.StartDate,this.EndDate,this.Type,this.SortKey});
DashboardItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ID = json['ID'];
Date = JsonConverters.fromJson(json['Date'],'DateTime',context!);
Title = json['Title'];
Message = json['Message'];
Author = json['Author'];
Hyperlink = json['Hyperlink'];
ThumbnailImage = json['ThumbnailImage'];
StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!);
EndDate = JsonConverters.fromJson(json['EndDate'],'DateTime',context!);
Type = json['Type'];
SortKey = json['SortKey'];
return this;
}
Map<String, dynamic> toJson() => {
'ID': ID,
'Date': JsonConverters.toJson(Date,'DateTime',context!),
'Title': Title,
'Message': Message,
'Author': Author,
'Hyperlink': Hyperlink,
'ThumbnailImage': ThumbnailImage,
'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!),
'EndDate': JsonConverters.toJson(EndDate,'DateTime',context!),
'Type': Type,
'SortKey': SortKey
};
getTypeName() => "DashboardItem";
TypeContext? context = _ctx;
}
class DashboardItemResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<DashboardItem>? GeneralMessages = [];
List<DashboardItem>? PersonCallouts = [];
List<DashboardItem>? TipOfTheWeek = [];
List<DashboardItem>? NewsAndNotes = [];
DashboardItemResponse({this.ResponseStatus,this.GeneralMessages,this.PersonCallouts,this.TipOfTheWeek,this.NewsAndNotes});
DashboardItemResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
GeneralMessages = JsonConverters.fromJson(json['GeneralMessages'],'List<DashboardItem>',context!);
PersonCallouts = JsonConverters.fromJson(json['PersonCallouts'],'List<DashboardItem>',context!);
TipOfTheWeek = JsonConverters.fromJson(json['TipOfTheWeek'],'List<DashboardItem>',context!);
NewsAndNotes = JsonConverters.fromJson(json['NewsAndNotes'],'List<DashboardItem>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'GeneralMessages': JsonConverters.toJson(GeneralMessages,'List<DashboardItem>',context!),
'PersonCallouts': JsonConverters.toJson(PersonCallouts,'List<DashboardItem>',context!),
'TipOfTheWeek': JsonConverters.toJson(TipOfTheWeek,'List<DashboardItem>',context!),
'NewsAndNotes': JsonConverters.toJson(NewsAndNotes,'List<DashboardItem>',context!)
};
getTypeName() => "DashboardItemResponse";
TypeContext? context = _ctx;
}
class DashboardItemRequest implements IConvertible
{
DashboardItem? DashboardItem;
DashboardItemRequest({this.DashboardItem});
DashboardItemRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DashboardItem = JsonConverters.fromJson(json['DashboardItem'],'DashboardItem',context!);
return this;
}
Map<String, dynamic> toJson() => {
'DashboardItem': JsonConverters.toJson(DashboardItem,'DashboardItem',context!)
};
getTypeName() => "DashboardItemRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'DashboardItem': TypeInfo(TypeOf.Class, create:() => DashboardItem()),
'DashboardItemResponse': TypeInfo(TypeOf.Class, create:() => DashboardItemResponse()),
'List<DashboardItem>': TypeInfo(TypeOf.Class, create:() => <DashboardItem>[]),
'DashboardItemRequest': TypeInfo(TypeOf.Class, create:() => DashboardItemRequest()),
});
Dart DashboardItemRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/DashboardItem HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
GeneralMessages:
[
{
ID: 0,
Date: 0001-01-01,
Title: String,
Message: String,
Author: String,
Hyperlink: String,
ThumbnailImage: String,
StartDate: 0001-01-01,
EndDate: 0001-01-01,
Type: String,
SortKey: 0
}
],
PersonCallouts:
[
{
ID: 0,
Date: 0001-01-01,
Title: String,
Message: String,
Author: String,
Hyperlink: String,
ThumbnailImage: String,
StartDate: 0001-01-01,
EndDate: 0001-01-01,
Type: String,
SortKey: 0
}
],
TipOfTheWeek:
[
{
ID: 0,
Date: 0001-01-01,
Title: String,
Message: String,
Author: String,
Hyperlink: String,
ThumbnailImage: String,
StartDate: 0001-01-01,
EndDate: 0001-01-01,
Type: String,
SortKey: 0
}
],
NewsAndNotes:
[
{
ID: 0,
Date: 0001-01-01,
Title: String,
Message: String,
Author: String,
Hyperlink: String,
ThumbnailImage: String,
StartDate: 0001-01-01,
EndDate: 0001-01-01,
Type: String,
SortKey: 0
}
]
}