| POST,OPTIONS | /v1/routeplan/route/bulk |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class RoutePlanWriteResponse implements IConvertible
{
bool? Ok;
ResponseStatus? ResponseStatus;
RoutePlanWriteResponse({this.Ok,this.ResponseStatus});
RoutePlanWriteResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Ok = json['Ok'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Ok': Ok,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "RoutePlanWriteResponse";
TypeContext? context = _ctx;
}
class RoutePlanAssignItem implements IConvertible
{
int? AgreementID;
int? CrewID;
int? Seq;
RoutePlanAssignItem({this.AgreementID,this.CrewID,this.Seq});
RoutePlanAssignItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgreementID = json['AgreementID'];
CrewID = json['CrewID'];
Seq = json['Seq'];
return this;
}
Map<String, dynamic> toJson() => {
'AgreementID': AgreementID,
'CrewID': CrewID,
'Seq': Seq
};
getTypeName() => "RoutePlanAssignItem";
TypeContext? context = _ctx;
}
class RoutePlanAssignBulkRequest implements IConvertible
{
String? DateIso;
List<RoutePlanAssignItem>? Items = [];
RoutePlanAssignBulkRequest({this.DateIso,this.Items});
RoutePlanAssignBulkRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DateIso = json['DateIso'];
Items = JsonConverters.fromJson(json['Items'],'List<RoutePlanAssignItem>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'DateIso': DateIso,
'Items': JsonConverters.toJson(Items,'List<RoutePlanAssignItem>',context!)
};
getTypeName() => "RoutePlanAssignBulkRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'RoutePlanWriteResponse': TypeInfo(TypeOf.Class, create:() => RoutePlanWriteResponse()),
'RoutePlanAssignItem': TypeInfo(TypeOf.Class, create:() => RoutePlanAssignItem()),
'RoutePlanAssignBulkRequest': TypeInfo(TypeOf.Class, create:() => RoutePlanAssignBulkRequest()),
'List<RoutePlanAssignItem>': TypeInfo(TypeOf.Class, create:() => <RoutePlanAssignItem>[]),
});
Dart RoutePlanAssignBulkRequest 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/routeplan/route/bulk HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"DateIso":"String","Items":[{"AgreementID":0,"CrewID":0,"Seq":0}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Ok":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}