| GET,OPTIONS | /v1/fleet/live |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class FleetRowDto implements IConvertible
{
int? ContactID;
String? WorkerName;
int? CrewID;
String? CrewName;
String? BranchId;
String? LiveStatus;
int? WorkerScheduleItemID;
int? JobID;
String? CurProperty;
String? CurAddress;
String? CurZip;
String? EnRouteAt;
String? StartedAt;
double? LastLat;
double? LastLng;
String? LastLocAt;
String? NextProperty;
int? DoneVisits;
int? TotalVisits;
FleetRowDto({this.ContactID,this.WorkerName,this.CrewID,this.CrewName,this.BranchId,this.LiveStatus,this.WorkerScheduleItemID,this.JobID,this.CurProperty,this.CurAddress,this.CurZip,this.EnRouteAt,this.StartedAt,this.LastLat,this.LastLng,this.LastLocAt,this.NextProperty,this.DoneVisits,this.TotalVisits});
FleetRowDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ContactID = json['ContactID'];
WorkerName = json['WorkerName'];
CrewID = json['CrewID'];
CrewName = json['CrewName'];
BranchId = json['BranchId'];
LiveStatus = json['LiveStatus'];
WorkerScheduleItemID = json['WorkerScheduleItemID'];
JobID = json['JobID'];
CurProperty = json['CurProperty'];
CurAddress = json['CurAddress'];
CurZip = json['CurZip'];
EnRouteAt = json['EnRouteAt'];
StartedAt = json['StartedAt'];
LastLat = JsonConverters.toDouble(json['LastLat']);
LastLng = JsonConverters.toDouble(json['LastLng']);
LastLocAt = json['LastLocAt'];
NextProperty = json['NextProperty'];
DoneVisits = json['DoneVisits'];
TotalVisits = json['TotalVisits'];
return this;
}
Map<String, dynamic> toJson() => {
'ContactID': ContactID,
'WorkerName': WorkerName,
'CrewID': CrewID,
'CrewName': CrewName,
'BranchId': BranchId,
'LiveStatus': LiveStatus,
'WorkerScheduleItemID': WorkerScheduleItemID,
'JobID': JobID,
'CurProperty': CurProperty,
'CurAddress': CurAddress,
'CurZip': CurZip,
'EnRouteAt': EnRouteAt,
'StartedAt': StartedAt,
'LastLat': LastLat,
'LastLng': LastLng,
'LastLocAt': LastLocAt,
'NextProperty': NextProperty,
'DoneVisits': DoneVisits,
'TotalVisits': TotalVisits
};
getTypeName() => "FleetRowDto";
TypeContext? context = _ctx;
}
class FleetLiveResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<FleetRowDto>? Rows = [];
int? ActiveWorkers;
int? EnRoute;
int? OnSite;
int? Waiting;
int? Done;
int? RunningLate;
int? PageTotal;
int? Page;
int? PageSize;
FleetLiveResponse({this.ResponseStatus,this.Rows,this.ActiveWorkers,this.EnRoute,this.OnSite,this.Waiting,this.Done,this.RunningLate,this.PageTotal,this.Page,this.PageSize});
FleetLiveResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Rows = JsonConverters.fromJson(json['Rows'],'List<FleetRowDto>',context!);
ActiveWorkers = json['ActiveWorkers'];
EnRoute = json['EnRoute'];
OnSite = json['OnSite'];
Waiting = json['Waiting'];
Done = json['Done'];
RunningLate = json['RunningLate'];
PageTotal = json['PageTotal'];
Page = json['Page'];
PageSize = json['PageSize'];
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Rows': JsonConverters.toJson(Rows,'List<FleetRowDto>',context!),
'ActiveWorkers': ActiveWorkers,
'EnRoute': EnRoute,
'OnSite': OnSite,
'Waiting': Waiting,
'Done': Done,
'RunningLate': RunningLate,
'PageTotal': PageTotal,
'Page': Page,
'PageSize': PageSize
};
getTypeName() => "FleetLiveResponse";
TypeContext? context = _ctx;
}
class FleetLiveRequest implements IConvertible
{
String? Date;
String? Status;
int? CrewID;
String? Zip;
String? BranchId;
String? Search;
int? Page;
int? PageSize;
FleetLiveRequest({this.Date,this.Status,this.CrewID,this.Zip,this.BranchId,this.Search,this.Page,this.PageSize});
FleetLiveRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Date = json['Date'];
Status = json['Status'];
CrewID = json['CrewID'];
Zip = json['Zip'];
BranchId = json['BranchId'];
Search = json['Search'];
Page = json['Page'];
PageSize = json['PageSize'];
return this;
}
Map<String, dynamic> toJson() => {
'Date': Date,
'Status': Status,
'CrewID': CrewID,
'Zip': Zip,
'BranchId': BranchId,
'Search': Search,
'Page': Page,
'PageSize': PageSize
};
getTypeName() => "FleetLiveRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'FleetRowDto': TypeInfo(TypeOf.Class, create:() => FleetRowDto()),
'FleetLiveResponse': TypeInfo(TypeOf.Class, create:() => FleetLiveResponse()),
'List<FleetRowDto>': TypeInfo(TypeOf.Class, create:() => <FleetRowDto>[]),
'FleetLiveRequest': TypeInfo(TypeOf.Class, create:() => FleetLiveRequest()),
});
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.
GET /v1/fleet/live HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/json
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"}},"Rows":[{"ContactID":0,"WorkerName":"String","CrewID":0,"CrewName":"String","BranchId":"00000000000000000000000000000000","LiveStatus":"String","WorkerScheduleItemID":0,"JobID":0,"CurProperty":"String","CurAddress":"String","CurZip":"String","EnRouteAt":"String","StartedAt":"String","LastLat":0,"LastLng":0,"LastLocAt":"String","NextProperty":"String","DoneVisits":0,"TotalVisits":0}],"ActiveWorkers":0,"EnRoute":0,"OnSite":0,"Waiting":0,"Done":0,"RunningLate":0,"PageTotal":0,"Page":0,"PageSize":0}