| 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 .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/dispatch/loads HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DispatchLoadsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Hours>0</Hours>
<Loads>
<DispatchLoadView>
<CarrierLabel>String</CarrierLabel>
<ClosedUtc>0001-01-01T00:00:00</ClosedUtc>
<Code>String</Code>
<DestinationLabel>String</DestinationLabel>
<DriverLabel>String</DriverLabel>
<LoadId>0</LoadId>
<Module>String</Module>
<OpenedUtc>0001-01-01T00:00:00</OpenedUtc>
<Pay>0</Pay>
<PayPlanLabel>String</PayPlanLabel>
<Photos>0</Photos>
<Qty>0</Qty>
<QtyText>String</QtyText>
<RateApplied>0</RateApplied>
<RateBasis>String</RateBasis>
<Revenue>0</Revenue>
<SourceLabel>String</SourceLabel>
<Stages>
<DispatchLoadStageView>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<Note>String</Note>
<Stage>String</Stage>
</DispatchLoadStageView>
</Stages>
<Status>String</Status>
<TicketCode>String</TicketCode>
<TruckLabel>String</TruckLabel>
<Unit>String</Unit>
</DispatchLoadView>
</Loads>
<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>
</DispatchLoadsResponse>