| GET,OPTIONS | /v1/visits/week |
|---|
import 'package:servicestack/servicestack.dart';
class CrewWeekCell implements IConvertible
{
String? Date;
int? VisitCount;
int? LoadPct;
CrewWeekCell({this.Date,this.VisitCount,this.LoadPct});
CrewWeekCell.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Date = json['Date'];
VisitCount = json['VisitCount'];
LoadPct = json['LoadPct'];
return this;
}
Map<String, dynamic> toJson() => {
'Date': Date,
'VisitCount': VisitCount,
'LoadPct': LoadPct
};
getTypeName() => "CrewWeekCell";
TypeContext? context = _ctx;
}
class CrewWeekRow implements IConvertible
{
int? CrewID;
String? CrewName;
String? CrewColor;
List<CrewWeekCell>? Cells = [];
CrewWeekRow({this.CrewID,this.CrewName,this.CrewColor,this.Cells});
CrewWeekRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CrewID = json['CrewID'];
CrewName = json['CrewName'];
CrewColor = json['CrewColor'];
Cells = JsonConverters.fromJson(json['Cells'],'List<CrewWeekCell>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CrewID': CrewID,
'CrewName': CrewName,
'CrewColor': CrewColor,
'Cells': JsonConverters.toJson(Cells,'List<CrewWeekCell>',context!)
};
getTypeName() => "CrewWeekRow";
TypeContext? context = _ctx;
}
class VisitWeekResponse implements IConvertible
{
String? From;
String? To;
List<String>? Days = [];
List<CrewWeekRow>? Rows = [];
ResponseStatus? ResponseStatus;
VisitWeekResponse({this.From,this.To,this.Days,this.Rows,this.ResponseStatus});
VisitWeekResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
From = json['From'];
To = json['To'];
Days = JsonConverters.fromJson(json['Days'],'List<String>',context!);
Rows = JsonConverters.fromJson(json['Rows'],'List<CrewWeekRow>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'From': From,
'To': To,
'Days': JsonConverters.toJson(Days,'List<String>',context!),
'Rows': JsonConverters.toJson(Rows,'List<CrewWeekRow>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "VisitWeekResponse";
TypeContext? context = _ctx;
}
class VisitWeekRequest implements IConvertible
{
String? From;
int? Days;
VisitWeekRequest({this.From,this.Days});
VisitWeekRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
From = json['From'];
Days = json['Days'];
return this;
}
Map<String, dynamic> toJson() => {
'From': From,
'Days': Days
};
getTypeName() => "VisitWeekRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'CrewWeekCell': TypeInfo(TypeOf.Class, create:() => CrewWeekCell()),
'CrewWeekRow': TypeInfo(TypeOf.Class, create:() => CrewWeekRow()),
'List<CrewWeekCell>': TypeInfo(TypeOf.Class, create:() => <CrewWeekCell>[]),
'VisitWeekResponse': TypeInfo(TypeOf.Class, create:() => VisitWeekResponse()),
'List<CrewWeekRow>': TypeInfo(TypeOf.Class, create:() => <CrewWeekRow>[]),
'VisitWeekRequest': TypeInfo(TypeOf.Class, create:() => VisitWeekRequest()),
});
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/visits/week HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"From":"String","To":"String","Days":["String"],"Rows":[{"CrewID":0,"CrewName":"String","CrewColor":"String","Cells":[{"Date":"String","VisitCount":0,"LoadPct":0}]}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}