| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/Dropbox/Project/{ProjectId}/{LoggedInAgentId} |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class Dropbox implements IConvertible
{
int? Id;
String? AttachmentId;
String? FirstName;
String? LastName;
String? TableName;
int? RecordId;
String? Description;
String? DocumentType;
String? DocumentGroup;
DateTime? DateAdded;
bool? Locked;
double? FileSizeInKB;
Dropbox({this.Id,this.AttachmentId,this.FirstName,this.LastName,this.TableName,this.RecordId,this.Description,this.DocumentType,this.DocumentGroup,this.DateAdded,this.Locked,this.FileSizeInKB});
Dropbox.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
AttachmentId = json['AttachmentId'];
FirstName = json['FirstName'];
LastName = json['LastName'];
TableName = json['TableName'];
RecordId = json['RecordId'];
Description = json['Description'];
DocumentType = json['DocumentType'];
DocumentGroup = json['DocumentGroup'];
DateAdded = JsonConverters.fromJson(json['DateAdded'],'DateTime',context!);
Locked = json['Locked'];
FileSizeInKB = JsonConverters.toDouble(json['FileSizeInKB']);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'AttachmentId': AttachmentId,
'FirstName': FirstName,
'LastName': LastName,
'TableName': TableName,
'RecordId': RecordId,
'Description': Description,
'DocumentType': DocumentType,
'DocumentGroup': DocumentGroup,
'DateAdded': JsonConverters.toJson(DateAdded,'DateTime',context!),
'Locked': Locked,
'FileSizeInKB': FileSizeInKB
};
getTypeName() => "Dropbox";
TypeContext? context = _ctx;
}
class DropboxExtended extends Dropbox implements IConvertible
{
String? AttachmentName;
String? AgentName;
String? MimeType;
bool? IsAgent;
bool? IsContact;
bool? IsShared;
bool? CanShare;
String? ShareList;
DropboxExtended({this.AttachmentName,this.AgentName,this.MimeType,this.IsAgent,this.IsContact,this.IsShared,this.CanShare,this.ShareList});
DropboxExtended.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
AttachmentName = json['AttachmentName'];
AgentName = json['AgentName'];
MimeType = json['MimeType'];
IsAgent = json['IsAgent'];
IsContact = json['IsContact'];
IsShared = json['IsShared'];
CanShare = json['CanShare'];
ShareList = json['ShareList'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'AttachmentName': AttachmentName,
'AgentName': AgentName,
'MimeType': MimeType,
'IsAgent': IsAgent,
'IsContact': IsContact,
'IsShared': IsShared,
'CanShare': CanShare,
'ShareList': ShareList
});
getTypeName() => "DropboxExtended";
TypeContext? context = _ctx;
}
class DropboxResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<DropboxExtended>? Dropbox = [];
DropboxResponse({this.ResponseStatus,this.Dropbox});
DropboxResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Dropbox = JsonConverters.fromJson(json['Dropbox'],'List<DropboxExtended>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Dropbox': JsonConverters.toJson(Dropbox,'List<DropboxExtended>',context!)
};
getTypeName() => "DropboxResponse";
TypeContext? context = _ctx;
}
class DropboxProjectRequest implements IConvertible
{
List<Dropbox>? Dropbox = [];
int? ProjectId;
int? LoggedInAgentId;
DropboxProjectRequest({this.Dropbox,this.ProjectId,this.LoggedInAgentId});
DropboxProjectRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Dropbox = JsonConverters.fromJson(json['Dropbox'],'List<Dropbox>',context!);
ProjectId = json['ProjectId'];
LoggedInAgentId = json['LoggedInAgentId'];
return this;
}
Map<String, dynamic> toJson() => {
'Dropbox': JsonConverters.toJson(Dropbox,'List<Dropbox>',context!),
'ProjectId': ProjectId,
'LoggedInAgentId': LoggedInAgentId
};
getTypeName() => "DropboxProjectRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'Dropbox': TypeInfo(TypeOf.Class, create:() => Dropbox()),
'DropboxExtended': TypeInfo(TypeOf.Class, create:() => DropboxExtended()),
'DropboxResponse': TypeInfo(TypeOf.Class, create:() => DropboxResponse()),
'List<DropboxExtended>': TypeInfo(TypeOf.Class, create:() => <DropboxExtended>[]),
'DropboxProjectRequest': TypeInfo(TypeOf.Class, create:() => DropboxProjectRequest()),
'List<Dropbox>': TypeInfo(TypeOf.Class, create:() => <Dropbox>[]),
});
Dart DropboxProjectRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/Dropbox/Project/{ProjectId}/{LoggedInAgentId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Dropbox":[{"AttachmentName":"String","AgentName":"String","MimeType":"String","IsAgent":false,"IsContact":false,"IsShared":false,"CanShare":false,"ShareList":"String","Id":0,"AttachmentId":"00000000000000000000000000000000","FirstName":"String","LastName":"String","TableName":"String","RecordId":0,"Description":"String","DocumentType":"String","DocumentGroup":"String","DateAdded":"0001-01-01T00:00:00.0000000","Locked":false,"FileSizeInKB":0}]}