| GET,OPTIONS | /v1/dispatch/requests/{RequestId} |
|---|
import 'package:servicestack/servicestack.dart';
class DispatchRequestEventView implements IConvertible
{
int? EventId;
String? Kind;
String? Detail;
DateTime? AtUtc;
String? ByWho;
DispatchRequestEventView({this.EventId,this.Kind,this.Detail,this.AtUtc,this.ByWho});
DispatchRequestEventView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
EventId = json['EventId'];
Kind = json['Kind'];
Detail = json['Detail'];
AtUtc = JsonConverters.fromJson(json['AtUtc'],'DateTime',context!);
ByWho = json['ByWho'];
return this;
}
Map<String, dynamic> toJson() => {
'EventId': EventId,
'Kind': Kind,
'Detail': Detail,
'AtUtc': JsonConverters.toJson(AtUtc,'DateTime',context!),
'ByWho': ByWho
};
getTypeName() => "DispatchRequestEventView";
TypeContext? context = _ctx;
}
class DispatchRequestView implements IConvertible
{
int? RequestId;
String? Code;
String? CustomerName;
String? CustomerPhone;
String? CustomerEmail;
String? Cargo;
int? Units;
String? FromLoc;
String? ToLoc;
int? Miles;
String? WindowText;
bool? IsUrgent;
String? Notes;
String? Source;
String? Status;
String? RequiredRig;
int? UnitsPerTruck;
double? RatePerLoad;
double? UrgencyPct;
double? CostPerLoad;
int? LoadsNeeded;
double? QuoteTotal;
int? QuoteVersion;
DateTime? QuotedUtc;
String? QuotedBy;
DateTime? AcceptTokenExpiresUtc;
DateTime? AcceptedUtc;
String? AcceptedVia;
DateTime? DeclinedUtc;
String? DeclinedBy;
String? DeclineReason;
int? JobsCreated;
int? JobsDone;
int? JobsNeedDriver;
DateTime? CreatedUtc;
String? CreatedBy;
List<DispatchRequestEventView>? Events = [];
DispatchRequestView({this.RequestId,this.Code,this.CustomerName,this.CustomerPhone,this.CustomerEmail,this.Cargo,this.Units,this.FromLoc,this.ToLoc,this.Miles,this.WindowText,this.IsUrgent,this.Notes,this.Source,this.Status,this.RequiredRig,this.UnitsPerTruck,this.RatePerLoad,this.UrgencyPct,this.CostPerLoad,this.LoadsNeeded,this.QuoteTotal,this.QuoteVersion,this.QuotedUtc,this.QuotedBy,this.AcceptTokenExpiresUtc,this.AcceptedUtc,this.AcceptedVia,this.DeclinedUtc,this.DeclinedBy,this.DeclineReason,this.JobsCreated,this.JobsDone,this.JobsNeedDriver,this.CreatedUtc,this.CreatedBy,this.Events});
DispatchRequestView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RequestId = json['RequestId'];
Code = json['Code'];
CustomerName = json['CustomerName'];
CustomerPhone = json['CustomerPhone'];
CustomerEmail = json['CustomerEmail'];
Cargo = json['Cargo'];
Units = json['Units'];
FromLoc = json['FromLoc'];
ToLoc = json['ToLoc'];
Miles = json['Miles'];
WindowText = json['WindowText'];
IsUrgent = json['IsUrgent'];
Notes = json['Notes'];
Source = json['Source'];
Status = json['Status'];
RequiredRig = json['RequiredRig'];
UnitsPerTruck = json['UnitsPerTruck'];
RatePerLoad = JsonConverters.toDouble(json['RatePerLoad']);
UrgencyPct = JsonConverters.toDouble(json['UrgencyPct']);
CostPerLoad = JsonConverters.toDouble(json['CostPerLoad']);
LoadsNeeded = json['LoadsNeeded'];
QuoteTotal = JsonConverters.toDouble(json['QuoteTotal']);
QuoteVersion = json['QuoteVersion'];
QuotedUtc = JsonConverters.fromJson(json['QuotedUtc'],'DateTime',context!);
QuotedBy = json['QuotedBy'];
AcceptTokenExpiresUtc = JsonConverters.fromJson(json['AcceptTokenExpiresUtc'],'DateTime',context!);
AcceptedUtc = JsonConverters.fromJson(json['AcceptedUtc'],'DateTime',context!);
AcceptedVia = json['AcceptedVia'];
DeclinedUtc = JsonConverters.fromJson(json['DeclinedUtc'],'DateTime',context!);
DeclinedBy = json['DeclinedBy'];
DeclineReason = json['DeclineReason'];
JobsCreated = json['JobsCreated'];
JobsDone = json['JobsDone'];
JobsNeedDriver = json['JobsNeedDriver'];
CreatedUtc = JsonConverters.fromJson(json['CreatedUtc'],'DateTime',context!);
CreatedBy = json['CreatedBy'];
Events = JsonConverters.fromJson(json['Events'],'List<DispatchRequestEventView>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'RequestId': RequestId,
'Code': Code,
'CustomerName': CustomerName,
'CustomerPhone': CustomerPhone,
'CustomerEmail': CustomerEmail,
'Cargo': Cargo,
'Units': Units,
'FromLoc': FromLoc,
'ToLoc': ToLoc,
'Miles': Miles,
'WindowText': WindowText,
'IsUrgent': IsUrgent,
'Notes': Notes,
'Source': Source,
'Status': Status,
'RequiredRig': RequiredRig,
'UnitsPerTruck': UnitsPerTruck,
'RatePerLoad': RatePerLoad,
'UrgencyPct': UrgencyPct,
'CostPerLoad': CostPerLoad,
'LoadsNeeded': LoadsNeeded,
'QuoteTotal': QuoteTotal,
'QuoteVersion': QuoteVersion,
'QuotedUtc': JsonConverters.toJson(QuotedUtc,'DateTime',context!),
'QuotedBy': QuotedBy,
'AcceptTokenExpiresUtc': JsonConverters.toJson(AcceptTokenExpiresUtc,'DateTime',context!),
'AcceptedUtc': JsonConverters.toJson(AcceptedUtc,'DateTime',context!),
'AcceptedVia': AcceptedVia,
'DeclinedUtc': JsonConverters.toJson(DeclinedUtc,'DateTime',context!),
'DeclinedBy': DeclinedBy,
'DeclineReason': DeclineReason,
'JobsCreated': JobsCreated,
'JobsDone': JobsDone,
'JobsNeedDriver': JobsNeedDriver,
'CreatedUtc': JsonConverters.toJson(CreatedUtc,'DateTime',context!),
'CreatedBy': CreatedBy,
'Events': JsonConverters.toJson(Events,'List<DispatchRequestEventView>',context!)
};
getTypeName() => "DispatchRequestView";
TypeContext? context = _ctx;
}
class DispatchRigCountView implements IConvertible
{
String? RigType;
int? Rigs;
DispatchRigCountView({this.RigType,this.Rigs});
DispatchRigCountView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RigType = json['RigType'];
Rigs = json['Rigs'];
return this;
}
Map<String, dynamic> toJson() => {
'RigType': RigType,
'Rigs': Rigs
};
getTypeName() => "DispatchRigCountView";
TypeContext? context = _ctx;
}
class DispatchCarrierPickView implements IConvertible
{
int? VendorID;
String? VendorName;
DispatchCarrierPickView({this.VendorID,this.VendorName});
DispatchCarrierPickView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
VendorID = json['VendorID'];
VendorName = json['VendorName'];
return this;
}
Map<String, dynamic> toJson() => {
'VendorID': VendorID,
'VendorName': VendorName
};
getTypeName() => "DispatchCarrierPickView";
TypeContext? context = _ctx;
}
class DispatchRequestsResponse implements IConvertible
{
List<DispatchRequestView>? Requests = [];
DispatchRequestView? Request;
List<DispatchRigCountView>? RigCounts = [];
List<DispatchCarrierPickView>? Carriers = [];
String? QuoteLink;
String? Delivery;
ResponseStatus? ResponseStatus;
DispatchRequestsResponse({this.Requests,this.Request,this.RigCounts,this.Carriers,this.QuoteLink,this.Delivery,this.ResponseStatus});
DispatchRequestsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Requests = JsonConverters.fromJson(json['Requests'],'List<DispatchRequestView>',context!);
Request = JsonConverters.fromJson(json['Request'],'DispatchRequestView',context!);
RigCounts = JsonConverters.fromJson(json['RigCounts'],'List<DispatchRigCountView>',context!);
Carriers = JsonConverters.fromJson(json['Carriers'],'List<DispatchCarrierPickView>',context!);
QuoteLink = json['QuoteLink'];
Delivery = json['Delivery'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Requests': JsonConverters.toJson(Requests,'List<DispatchRequestView>',context!),
'Request': JsonConverters.toJson(Request,'DispatchRequestView',context!),
'RigCounts': JsonConverters.toJson(RigCounts,'List<DispatchRigCountView>',context!),
'Carriers': JsonConverters.toJson(Carriers,'List<DispatchCarrierPickView>',context!),
'QuoteLink': QuoteLink,
'Delivery': Delivery,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "DispatchRequestsResponse";
TypeContext? context = _ctx;
}
class DispatchRequestRequest implements IConvertible
{
int? RequestId;
DispatchRequestRequest({this.RequestId});
DispatchRequestRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RequestId = json['RequestId'];
return this;
}
Map<String, dynamic> toJson() => {
'RequestId': RequestId
};
getTypeName() => "DispatchRequestRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'DispatchRequestEventView': TypeInfo(TypeOf.Class, create:() => DispatchRequestEventView()),
'DispatchRequestView': TypeInfo(TypeOf.Class, create:() => DispatchRequestView()),
'List<DispatchRequestEventView>': TypeInfo(TypeOf.Class, create:() => <DispatchRequestEventView>[]),
'DispatchRigCountView': TypeInfo(TypeOf.Class, create:() => DispatchRigCountView()),
'DispatchCarrierPickView': TypeInfo(TypeOf.Class, create:() => DispatchCarrierPickView()),
'DispatchRequestsResponse': TypeInfo(TypeOf.Class, create:() => DispatchRequestsResponse()),
'List<DispatchRequestView>': TypeInfo(TypeOf.Class, create:() => <DispatchRequestView>[]),
'List<DispatchRigCountView>': TypeInfo(TypeOf.Class, create:() => <DispatchRigCountView>[]),
'List<DispatchCarrierPickView>': TypeInfo(TypeOf.Class, create:() => <DispatchCarrierPickView>[]),
'DispatchRequestRequest': TypeInfo(TypeOf.Class, create:() => DispatchRequestRequest()),
});
Dart DispatchRequestRequest 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/requests/{RequestId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Requests":[{"RequestId":0,"Code":"String","CustomerName":"String","CustomerPhone":"String","CustomerEmail":"String","Cargo":"String","Units":0,"FromLoc":"String","ToLoc":"String","Miles":0,"WindowText":"String","IsUrgent":false,"Notes":"String","Source":"String","Status":"String","RequiredRig":"String","UnitsPerTruck":0,"RatePerLoad":0,"UrgencyPct":0,"CostPerLoad":0,"LoadsNeeded":0,"QuoteTotal":0,"QuoteVersion":0,"QuotedUtc":"0001-01-01T00:00:00.0000000","QuotedBy":"String","AcceptTokenExpiresUtc":"0001-01-01T00:00:00.0000000","AcceptedUtc":"0001-01-01T00:00:00.0000000","AcceptedVia":"String","DeclinedUtc":"0001-01-01T00:00:00.0000000","DeclinedBy":"String","DeclineReason":"String","JobsCreated":0,"JobsDone":0,"JobsNeedDriver":0,"CreatedUtc":"0001-01-01T00:00:00.0000000","CreatedBy":"String","Events":[{"EventId":0,"Kind":"String","Detail":"String","AtUtc":"0001-01-01T00:00:00.0000000","ByWho":"String"}]}],"Request":{"RequestId":0,"Code":"String","CustomerName":"String","CustomerPhone":"String","CustomerEmail":"String","Cargo":"String","Units":0,"FromLoc":"String","ToLoc":"String","Miles":0,"WindowText":"String","IsUrgent":false,"Notes":"String","Source":"String","Status":"String","RequiredRig":"String","UnitsPerTruck":0,"RatePerLoad":0,"UrgencyPct":0,"CostPerLoad":0,"LoadsNeeded":0,"QuoteTotal":0,"QuoteVersion":0,"QuotedUtc":"0001-01-01T00:00:00.0000000","QuotedBy":"String","AcceptTokenExpiresUtc":"0001-01-01T00:00:00.0000000","AcceptedUtc":"0001-01-01T00:00:00.0000000","AcceptedVia":"String","DeclinedUtc":"0001-01-01T00:00:00.0000000","DeclinedBy":"String","DeclineReason":"String","JobsCreated":0,"JobsDone":0,"JobsNeedDriver":0,"CreatedUtc":"0001-01-01T00:00:00.0000000","CreatedBy":"String","Events":[{"EventId":0,"Kind":"String","Detail":"String","AtUtc":"0001-01-01T00:00:00.0000000","ByWho":"String"}]},"RigCounts":[{"RigType":"String","Rigs":0}],"Carriers":[{"VendorID":0,"VendorName":"String"}],"QuoteLink":"String","Delivery":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}