| GET,POST,OPTIONS | /v1/Dropbox/Customer/{CustomerId} | ||
|---|---|---|---|
| GET,POST,OPTIONS | /v1/Dropbox/Customer/CustomerCheckIn/{CustomerCheckInId} |
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 DropboxCustomerRequest implements IConvertible
{
List<Dropbox>? Dropbox = [];
String? CustomerId;
String? CustomerCheckInId;
DropboxCustomerRequest({this.Dropbox,this.CustomerId,this.CustomerCheckInId});
DropboxCustomerRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Dropbox = JsonConverters.fromJson(json['Dropbox'],'List<Dropbox>',context!);
CustomerId = json['CustomerId'];
CustomerCheckInId = json['CustomerCheckInId'];
return this;
}
Map<String, dynamic> toJson() => {
'Dropbox': JsonConverters.toJson(Dropbox,'List<Dropbox>',context!),
'CustomerId': CustomerId,
'CustomerCheckInId': CustomerCheckInId
};
getTypeName() => "DropboxCustomerRequest";
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>[]),
'DropboxCustomerRequest': TypeInfo(TypeOf.Class, create:() => DropboxCustomerRequest()),
'List<Dropbox>': TypeInfo(TypeOf.Class, create:() => <Dropbox>[]),
});
Dart DropboxCustomerRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Dropbox/Customer/{CustomerId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"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}],"CustomerId":"00000000000000000000000000000000","CustomerCheckInId":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
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}]}