| GET,OPTIONS | /v1/routeplan/week |
|---|
import 'package:servicestack/servicestack.dart';
class RoutePlanCrew implements IConvertible
{
int? CrewID;
String? CrewName;
String? CrewColor;
String? HomeZip;
double? YardLat;
double? YardLng;
int? DailyCapacityMin;
int? WeeklyCapacityMin;
bool? Specialist;
RoutePlanCrew({this.CrewID,this.CrewName,this.CrewColor,this.HomeZip,this.YardLat,this.YardLng,this.DailyCapacityMin,this.WeeklyCapacityMin,this.Specialist});
RoutePlanCrew.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CrewID = json['CrewID'];
CrewName = json['CrewName'];
CrewColor = json['CrewColor'];
HomeZip = json['HomeZip'];
YardLat = JsonConverters.toDouble(json['YardLat']);
YardLng = JsonConverters.toDouble(json['YardLng']);
DailyCapacityMin = json['DailyCapacityMin'];
WeeklyCapacityMin = json['WeeklyCapacityMin'];
Specialist = json['Specialist'];
return this;
}
Map<String, dynamic> toJson() => {
'CrewID': CrewID,
'CrewName': CrewName,
'CrewColor': CrewColor,
'HomeZip': HomeZip,
'YardLat': YardLat,
'YardLng': YardLng,
'DailyCapacityMin': DailyCapacityMin,
'WeeklyCapacityMin': WeeklyCapacityMin,
'Specialist': Specialist
};
getTypeName() => "RoutePlanCrew";
TypeContext? context = _ctx;
}
class RoutePlanVisit implements IConvertible
{
int? AgreementID;
int? AgreementJobID;
String? Name;
String? Sub;
String? ServiceType;
String? Zip;
String? Area;
double? Lat;
double? Lng;
int? DurationMin;
String? DueIso;
String? DueLabel;
bool? Overdue;
int? DefaultCrewID;
int? RouteCrewID;
int? RouteSeq;
String? RouteDateIso;
int? LateDays;
bool? AutoPay;
String? SkipPolicy;
double? SkipCreditAmount;
RoutePlanVisit({this.AgreementID,this.AgreementJobID,this.Name,this.Sub,this.ServiceType,this.Zip,this.Area,this.Lat,this.Lng,this.DurationMin,this.DueIso,this.DueLabel,this.Overdue,this.DefaultCrewID,this.RouteCrewID,this.RouteSeq,this.RouteDateIso,this.LateDays,this.AutoPay,this.SkipPolicy,this.SkipCreditAmount});
RoutePlanVisit.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgreementID = json['AgreementID'];
AgreementJobID = json['AgreementJobID'];
Name = json['Name'];
Sub = json['Sub'];
ServiceType = json['ServiceType'];
Zip = json['Zip'];
Area = json['Area'];
Lat = JsonConverters.toDouble(json['Lat']);
Lng = JsonConverters.toDouble(json['Lng']);
DurationMin = json['DurationMin'];
DueIso = json['DueIso'];
DueLabel = json['DueLabel'];
Overdue = json['Overdue'];
DefaultCrewID = json['DefaultCrewID'];
RouteCrewID = json['RouteCrewID'];
RouteSeq = json['RouteSeq'];
RouteDateIso = json['RouteDateIso'];
LateDays = json['LateDays'];
AutoPay = json['AutoPay'];
SkipPolicy = json['SkipPolicy'];
SkipCreditAmount = JsonConverters.toDouble(json['SkipCreditAmount']);
return this;
}
Map<String, dynamic> toJson() => {
'AgreementID': AgreementID,
'AgreementJobID': AgreementJobID,
'Name': Name,
'Sub': Sub,
'ServiceType': ServiceType,
'Zip': Zip,
'Area': Area,
'Lat': Lat,
'Lng': Lng,
'DurationMin': DurationMin,
'DueIso': DueIso,
'DueLabel': DueLabel,
'Overdue': Overdue,
'DefaultCrewID': DefaultCrewID,
'RouteCrewID': RouteCrewID,
'RouteSeq': RouteSeq,
'RouteDateIso': RouteDateIso,
'LateDays': LateDays,
'AutoPay': AutoPay,
'SkipPolicy': SkipPolicy,
'SkipCreditAmount': SkipCreditAmount
};
getTypeName() => "RoutePlanVisit";
TypeContext? context = _ctx;
}
class RoutePlanSkippedVisit implements IConvertible
{
int? AgreementJobID;
int? AgreementID;
String? Name;
String? DateIso;
String? Reason;
double? CreditAmount;
RoutePlanSkippedVisit({this.AgreementJobID,this.AgreementID,this.Name,this.DateIso,this.Reason,this.CreditAmount});
RoutePlanSkippedVisit.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgreementJobID = json['AgreementJobID'];
AgreementID = json['AgreementID'];
Name = json['Name'];
DateIso = json['DateIso'];
Reason = json['Reason'];
CreditAmount = JsonConverters.toDouble(json['CreditAmount']);
return this;
}
Map<String, dynamic> toJson() => {
'AgreementJobID': AgreementJobID,
'AgreementID': AgreementID,
'Name': Name,
'DateIso': DateIso,
'Reason': Reason,
'CreditAmount': CreditAmount
};
getTypeName() => "RoutePlanSkippedVisit";
TypeContext? context = _ctx;
}
class RoutePlanWeekResponse implements IConvertible
{
String? FromIso;
String? ToIso;
List<RoutePlanCrew>? Crews = [];
List<RoutePlanVisit>? Visits = [];
List<RoutePlanSkippedVisit>? Skipped = [];
ResponseStatus? ResponseStatus;
RoutePlanWeekResponse({this.FromIso,this.ToIso,this.Crews,this.Visits,this.Skipped,this.ResponseStatus});
RoutePlanWeekResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FromIso = json['FromIso'];
ToIso = json['ToIso'];
Crews = JsonConverters.fromJson(json['Crews'],'List<RoutePlanCrew>',context!);
Visits = JsonConverters.fromJson(json['Visits'],'List<RoutePlanVisit>',context!);
Skipped = JsonConverters.fromJson(json['Skipped'],'List<RoutePlanSkippedVisit>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'FromIso': FromIso,
'ToIso': ToIso,
'Crews': JsonConverters.toJson(Crews,'List<RoutePlanCrew>',context!),
'Visits': JsonConverters.toJson(Visits,'List<RoutePlanVisit>',context!),
'Skipped': JsonConverters.toJson(Skipped,'List<RoutePlanSkippedVisit>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "RoutePlanWeekResponse";
TypeContext? context = _ctx;
}
class RoutePlanWeekRequest implements IConvertible
{
String? From;
RoutePlanWeekRequest({this.From});
RoutePlanWeekRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
From = json['From'];
return this;
}
Map<String, dynamic> toJson() => {
'From': From
};
getTypeName() => "RoutePlanWeekRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'RoutePlanCrew': TypeInfo(TypeOf.Class, create:() => RoutePlanCrew()),
'RoutePlanVisit': TypeInfo(TypeOf.Class, create:() => RoutePlanVisit()),
'RoutePlanSkippedVisit': TypeInfo(TypeOf.Class, create:() => RoutePlanSkippedVisit()),
'RoutePlanWeekResponse': TypeInfo(TypeOf.Class, create:() => RoutePlanWeekResponse()),
'List<RoutePlanCrew>': TypeInfo(TypeOf.Class, create:() => <RoutePlanCrew>[]),
'List<RoutePlanVisit>': TypeInfo(TypeOf.Class, create:() => <RoutePlanVisit>[]),
'List<RoutePlanSkippedVisit>': TypeInfo(TypeOf.Class, create:() => <RoutePlanSkippedVisit>[]),
'RoutePlanWeekRequest': TypeInfo(TypeOf.Class, create:() => RoutePlanWeekRequest()),
});
Dart RoutePlanWeekRequest 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/routeplan/week HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RoutePlanWeekResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Crews>
<RoutePlanCrew>
<CrewColor>String</CrewColor>
<CrewID>0</CrewID>
<CrewName>String</CrewName>
<DailyCapacityMin>0</DailyCapacityMin>
<HomeZip>String</HomeZip>
<Specialist>false</Specialist>
<WeeklyCapacityMin>0</WeeklyCapacityMin>
<YardLat>0</YardLat>
<YardLng>0</YardLng>
</RoutePlanCrew>
</Crews>
<FromIso>String</FromIso>
<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>
<Skipped>
<RoutePlanSkippedVisit>
<AgreementID>0</AgreementID>
<AgreementJobID>0</AgreementJobID>
<CreditAmount>0</CreditAmount>
<DateIso>String</DateIso>
<Name>String</Name>
<Reason>String</Reason>
</RoutePlanSkippedVisit>
</Skipped>
<ToIso>String</ToIso>
<Visits>
<RoutePlanVisit>
<AgreementID>0</AgreementID>
<AgreementJobID>0</AgreementJobID>
<Area>String</Area>
<AutoPay>false</AutoPay>
<DefaultCrewID>0</DefaultCrewID>
<DueIso>String</DueIso>
<DueLabel>String</DueLabel>
<DurationMin>0</DurationMin>
<Lat>0</Lat>
<LateDays>0</LateDays>
<Lng>0</Lng>
<Name>String</Name>
<Overdue>false</Overdue>
<RouteCrewID>0</RouteCrewID>
<RouteDateIso>String</RouteDateIso>
<RouteSeq>0</RouteSeq>
<ServiceType>String</ServiceType>
<SkipCreditAmount>0</SkipCreditAmount>
<SkipPolicy>String</SkipPolicy>
<Sub>String</Sub>
<Zip>String</Zip>
</RoutePlanVisit>
</Visits>
</RoutePlanWeekResponse>