| Requires any of the roles: | Worker, Agent, Administrator, Worker, Agent, Administrator |
| GET,OPTIONS | /v1/Dropbox/{AgentName} | ||
|---|---|---|---|
| POST,OPTIONS | /v1/Dropbox/{AttachmentId} | ||
| GET,POST,OPTIONS | /v1/Dropbox | ||
| GET,OPTIONS | /v1/Dropbox/ByAgentID/{ID} | ||
| GET,OPTIONS | /v1/Dropbox/ByAgentID/{ID}/{LoggedInAgent}/{PageName} | ||
| GET,OPTIONS | /v1/Dropbox/ByAgentID/{ID}/{PageName} |
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 DropboxRequest implements IConvertible
{
String? Attachment;
List<Dropbox>? Dropbox = [];
String? AttachmentId;
int? ID;
int? LoggedInAgent;
String? AgentName;
String? PageName;
String? TableName;
String? FieldName;
List<int>? RecordIds = [];
bool? IsNewApplication;
bool? IsFactFillerPro;
bool? AgentId;
String? AgentEmail;
String? FullNameAttachee;
bool? IsFactFinder;
int? SharedId;
int? Sharer;
bool? IsSecurities;
bool? Locked;
DropboxRequest({this.Attachment,this.Dropbox,this.AttachmentId,this.ID,this.LoggedInAgent,this.AgentName,this.PageName,this.TableName,this.FieldName,this.RecordIds,this.IsNewApplication,this.IsFactFillerPro,this.AgentId,this.AgentEmail,this.FullNameAttachee,this.IsFactFinder,this.SharedId,this.Sharer,this.IsSecurities,this.Locked});
DropboxRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Attachment = json['Attachment'];
Dropbox = JsonConverters.fromJson(json['Dropbox'],'List<Dropbox>',context!);
AttachmentId = json['AttachmentId'];
ID = json['ID'];
LoggedInAgent = json['LoggedInAgent'];
AgentName = json['AgentName'];
PageName = json['PageName'];
TableName = json['TableName'];
FieldName = json['FieldName'];
RecordIds = JsonConverters.fromJson(json['RecordIds'],'List<int>',context!);
IsNewApplication = json['IsNewApplication'];
IsFactFillerPro = json['IsFactFillerPro'];
AgentId = json['AgentId'];
AgentEmail = json['AgentEmail'];
FullNameAttachee = json['FullNameAttachee'];
IsFactFinder = json['IsFactFinder'];
SharedId = json['SharedId'];
Sharer = json['Sharer'];
IsSecurities = json['IsSecurities'];
Locked = json['Locked'];
return this;
}
Map<String, dynamic> toJson() => {
'Attachment': Attachment,
'Dropbox': JsonConverters.toJson(Dropbox,'List<Dropbox>',context!),
'AttachmentId': AttachmentId,
'ID': ID,
'LoggedInAgent': LoggedInAgent,
'AgentName': AgentName,
'PageName': PageName,
'TableName': TableName,
'FieldName': FieldName,
'RecordIds': JsonConverters.toJson(RecordIds,'List<int>',context!),
'IsNewApplication': IsNewApplication,
'IsFactFillerPro': IsFactFillerPro,
'AgentId': AgentId,
'AgentEmail': AgentEmail,
'FullNameAttachee': FullNameAttachee,
'IsFactFinder': IsFactFinder,
'SharedId': SharedId,
'Sharer': Sharer,
'IsSecurities': IsSecurities,
'Locked': Locked
};
getTypeName() => "DropboxRequest";
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>[]),
'DropboxRequest': TypeInfo(TypeOf.Class, create:() => DropboxRequest()),
'List<Dropbox>': TypeInfo(TypeOf.Class, create:() => <Dropbox>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Dropbox/{AttachmentId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Attachment":"String","Dropbox":[{"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}],"AttachmentId":"String","ID":0,"LoggedInAgent":0,"AgentName":"String","PageName":"String","TableName":"String","FieldName":"String","RecordIds":[0],"IsNewApplication":false,"IsFactFillerPro":false,"AgentId":false,"AgentEmail":"String","FullNameAttachee":"String","IsFactFinder":false,"SharedId":0,"Sharer":0,"IsSecurities":false,"Locked":false}
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"}},"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}]}