| GET,OPTIONS | /v1/dispatch/loads |
|---|
import 'package:servicestack/servicestack.dart';
class DispatchLoadStageView implements IConvertible
{
String? Stage;
DateTime? AtUtc;
String? Note;
DispatchLoadStageView({this.Stage,this.AtUtc,this.Note});
DispatchLoadStageView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Stage = json['Stage'];
AtUtc = JsonConverters.fromJson(json['AtUtc'],'DateTime',context!);
Note = json['Note'];
return this;
}
Map<String, dynamic> toJson() => {
'Stage': Stage,
'AtUtc': JsonConverters.toJson(AtUtc,'DateTime',context!),
'Note': Note
};
getTypeName() => "DispatchLoadStageView";
TypeContext? context = _ctx;
}
class DispatchLoadView implements IConvertible
{
int? LoadId;
String? Code;
String? Module;
String? TruckLabel;
String? DriverLabel;
String? CarrierLabel;
String? SourceLabel;
String? DestinationLabel;
double? Qty;
String? Unit;
String? QtyText;
String? TicketCode;
double? RateApplied;
String? RateBasis;
double? Revenue;
String? PayPlanLabel;
double? Pay;
String? Status;
DateTime? OpenedUtc;
DateTime? ClosedUtc;
int? Photos;
List<DispatchLoadStageView>? Stages = [];
DispatchLoadView({this.LoadId,this.Code,this.Module,this.TruckLabel,this.DriverLabel,this.CarrierLabel,this.SourceLabel,this.DestinationLabel,this.Qty,this.Unit,this.QtyText,this.TicketCode,this.RateApplied,this.RateBasis,this.Revenue,this.PayPlanLabel,this.Pay,this.Status,this.OpenedUtc,this.ClosedUtc,this.Photos,this.Stages});
DispatchLoadView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
LoadId = json['LoadId'];
Code = json['Code'];
Module = json['Module'];
TruckLabel = json['TruckLabel'];
DriverLabel = json['DriverLabel'];
CarrierLabel = json['CarrierLabel'];
SourceLabel = json['SourceLabel'];
DestinationLabel = json['DestinationLabel'];
Qty = JsonConverters.toDouble(json['Qty']);
Unit = json['Unit'];
QtyText = json['QtyText'];
TicketCode = json['TicketCode'];
RateApplied = JsonConverters.toDouble(json['RateApplied']);
RateBasis = json['RateBasis'];
Revenue = JsonConverters.toDouble(json['Revenue']);
PayPlanLabel = json['PayPlanLabel'];
Pay = JsonConverters.toDouble(json['Pay']);
Status = json['Status'];
OpenedUtc = JsonConverters.fromJson(json['OpenedUtc'],'DateTime',context!);
ClosedUtc = JsonConverters.fromJson(json['ClosedUtc'],'DateTime',context!);
Photos = json['Photos'];
Stages = JsonConverters.fromJson(json['Stages'],'List<DispatchLoadStageView>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'LoadId': LoadId,
'Code': Code,
'Module': Module,
'TruckLabel': TruckLabel,
'DriverLabel': DriverLabel,
'CarrierLabel': CarrierLabel,
'SourceLabel': SourceLabel,
'DestinationLabel': DestinationLabel,
'Qty': Qty,
'Unit': Unit,
'QtyText': QtyText,
'TicketCode': TicketCode,
'RateApplied': RateApplied,
'RateBasis': RateBasis,
'Revenue': Revenue,
'PayPlanLabel': PayPlanLabel,
'Pay': Pay,
'Status': Status,
'OpenedUtc': JsonConverters.toJson(OpenedUtc,'DateTime',context!),
'ClosedUtc': JsonConverters.toJson(ClosedUtc,'DateTime',context!),
'Photos': Photos,
'Stages': JsonConverters.toJson(Stages,'List<DispatchLoadStageView>',context!)
};
getTypeName() => "DispatchLoadView";
TypeContext? context = _ctx;
}
class DispatchLoadsResponse implements IConvertible
{
List<DispatchLoadView>? Loads = [];
int? Hours;
ResponseStatus? ResponseStatus;
DispatchLoadsResponse({this.Loads,this.Hours,this.ResponseStatus});
DispatchLoadsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Loads = JsonConverters.fromJson(json['Loads'],'List<DispatchLoadView>',context!);
Hours = json['Hours'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Loads': JsonConverters.toJson(Loads,'List<DispatchLoadView>',context!),
'Hours': Hours,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "DispatchLoadsResponse";
TypeContext? context = _ctx;
}
class DispatchLoadsRequest implements IConvertible
{
int? Hours;
String? Module;
DispatchLoadsRequest({this.Hours,this.Module});
DispatchLoadsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Hours = json['Hours'];
Module = json['Module'];
return this;
}
Map<String, dynamic> toJson() => {
'Hours': Hours,
'Module': Module
};
getTypeName() => "DispatchLoadsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'DispatchLoadStageView': TypeInfo(TypeOf.Class, create:() => DispatchLoadStageView()),
'DispatchLoadView': TypeInfo(TypeOf.Class, create:() => DispatchLoadView()),
'List<DispatchLoadStageView>': TypeInfo(TypeOf.Class, create:() => <DispatchLoadStageView>[]),
'DispatchLoadsResponse': TypeInfo(TypeOf.Class, create:() => DispatchLoadsResponse()),
'List<DispatchLoadView>': TypeInfo(TypeOf.Class, create:() => <DispatchLoadView>[]),
'DispatchLoadsRequest': TypeInfo(TypeOf.Class, create:() => DispatchLoadsRequest()),
});
Dart DispatchLoadsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/dispatch/loads HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Loads":[{"LoadId":0,"Code":"String","Module":"String","TruckLabel":"String","DriverLabel":"String","CarrierLabel":"String","SourceLabel":"String","DestinationLabel":"String","Qty":0,"Unit":"String","QtyText":"String","TicketCode":"String","RateApplied":0,"RateBasis":"String","Revenue":0,"PayPlanLabel":"String","Pay":0,"Status":"String","OpenedUtc":"0001-01-01T00:00:00.0000000","ClosedUtc":"0001-01-01T00:00:00.0000000","Photos":0,"Stages":[{"Stage":"String","AtUtc":"0001-01-01T00:00:00.0000000","Note":"String"}]}],"Hours":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}