| Requires any of the roles: | Worker, Agent, Administrator |
| GET,OPTIONS | /v1/Dropbox/Contact/{ContactId}/{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 DropboxContactRequest implements IConvertible
{
List<Dropbox>? Dropbox = [];
int? ContactId;
int? LoggedInAgentId;
DropboxContactRequest({this.Dropbox,this.ContactId,this.LoggedInAgentId});
DropboxContactRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Dropbox = JsonConverters.fromJson(json['Dropbox'],'List<Dropbox>',context!);
ContactId = json['ContactId'];
LoggedInAgentId = json['LoggedInAgentId'];
return this;
}
Map<String, dynamic> toJson() => {
'Dropbox': JsonConverters.toJson(Dropbox,'List<Dropbox>',context!),
'ContactId': ContactId,
'LoggedInAgentId': LoggedInAgentId
};
getTypeName() => "DropboxContactRequest";
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>[]),
'DropboxContactRequest': TypeInfo(TypeOf.Class, create:() => DropboxContactRequest()),
'List<Dropbox>': TypeInfo(TypeOf.Class, create:() => <Dropbox>[]),
});
Dart DropboxContactRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/Dropbox/Contact/{ContactId}/{LoggedInAgentId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DropboxResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Dropbox>
<DropboxExtended>
<AttachmentId>00000000-0000-0000-0000-000000000000</AttachmentId>
<DateAdded>0001-01-01T00:00:00</DateAdded>
<Description>String</Description>
<DocumentGroup>String</DocumentGroup>
<DocumentType>String</DocumentType>
<FileSizeInKB>0</FileSizeInKB>
<FirstName>String</FirstName>
<Id>0</Id>
<LastName>String</LastName>
<Locked>false</Locked>
<RecordId>0</RecordId>
<TableName>String</TableName>
<AgentName>String</AgentName>
<AttachmentName>String</AttachmentName>
<CanShare>false</CanShare>
<IsAgent>false</IsAgent>
<IsContact>false</IsContact>
<IsShared>false</IsShared>
<MimeType>String</MimeType>
<ShareList>String</ShareList>
</DropboxExtended>
</Dropbox>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</DropboxResponse>