| GET,OPTIONS | /v1/dispatch/rates |
|---|
import 'package:servicestack/servicestack.dart';
class DispatchRateConfigView implements IConvertible
{
double? FuelSurchargePct;
double? TransportPerMile;
double? TransportJobMin;
double? TransportEnclosedUpliftPct;
double? OdBase;
double? OdPerBag;
double? OdPremiumUpliftPct;
String? HaulBasis;
String? Facility;
String? Unit;
double? LoadQty;
DispatchRateConfigView({this.FuelSurchargePct,this.TransportPerMile,this.TransportJobMin,this.TransportEnclosedUpliftPct,this.OdBase,this.OdPerBag,this.OdPremiumUpliftPct,this.HaulBasis,this.Facility,this.Unit,this.LoadQty});
DispatchRateConfigView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FuelSurchargePct = JsonConverters.toDouble(json['FuelSurchargePct']);
TransportPerMile = JsonConverters.toDouble(json['TransportPerMile']);
TransportJobMin = JsonConverters.toDouble(json['TransportJobMin']);
TransportEnclosedUpliftPct = JsonConverters.toDouble(json['TransportEnclosedUpliftPct']);
OdBase = JsonConverters.toDouble(json['OdBase']);
OdPerBag = JsonConverters.toDouble(json['OdPerBag']);
OdPremiumUpliftPct = JsonConverters.toDouble(json['OdPremiumUpliftPct']);
HaulBasis = json['HaulBasis'];
Facility = json['Facility'];
Unit = json['Unit'];
LoadQty = JsonConverters.toDouble(json['LoadQty']);
return this;
}
Map<String, dynamic> toJson() => {
'FuelSurchargePct': FuelSurchargePct,
'TransportPerMile': TransportPerMile,
'TransportJobMin': TransportJobMin,
'TransportEnclosedUpliftPct': TransportEnclosedUpliftPct,
'OdBase': OdBase,
'OdPerBag': OdPerBag,
'OdPremiumUpliftPct': OdPremiumUpliftPct,
'HaulBasis': HaulBasis,
'Facility': Facility,
'Unit': Unit,
'LoadQty': LoadQty
};
getTypeName() => "DispatchRateConfigView";
TypeContext? context = _ctx;
}
class DispatchLaneRateView implements IConvertible
{
int? DispatchSiteID;
int? DispatchSupplierID;
String? SourceLabel;
String? SupplierName;
int? DispatchLaneRateID;
double? Miles;
double? RatePerTon;
double? RatePerLoad;
double? RatePerTonMile;
double? RatePerHour;
DispatchLaneRateView({this.DispatchSiteID,this.DispatchSupplierID,this.SourceLabel,this.SupplierName,this.DispatchLaneRateID,this.Miles,this.RatePerTon,this.RatePerLoad,this.RatePerTonMile,this.RatePerHour});
DispatchLaneRateView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DispatchSiteID = json['DispatchSiteID'];
DispatchSupplierID = json['DispatchSupplierID'];
SourceLabel = json['SourceLabel'];
SupplierName = json['SupplierName'];
DispatchLaneRateID = json['DispatchLaneRateID'];
Miles = JsonConverters.toDouble(json['Miles']);
RatePerTon = JsonConverters.toDouble(json['RatePerTon']);
RatePerLoad = JsonConverters.toDouble(json['RatePerLoad']);
RatePerTonMile = JsonConverters.toDouble(json['RatePerTonMile']);
RatePerHour = JsonConverters.toDouble(json['RatePerHour']);
return this;
}
Map<String, dynamic> toJson() => {
'DispatchSiteID': DispatchSiteID,
'DispatchSupplierID': DispatchSupplierID,
'SourceLabel': SourceLabel,
'SupplierName': SupplierName,
'DispatchLaneRateID': DispatchLaneRateID,
'Miles': Miles,
'RatePerTon': RatePerTon,
'RatePerLoad': RatePerLoad,
'RatePerTonMile': RatePerTonMile,
'RatePerHour': RatePerHour
};
getTypeName() => "DispatchLaneRateView";
TypeContext? context = _ctx;
}
class DispatchZoneRateView implements IConvertible
{
String? Zone;
int? DispatchZoneRateID;
double? Base;
double? PerBag;
double? PremiumUpliftPct;
int? Drivers;
DispatchZoneRateView({this.Zone,this.DispatchZoneRateID,this.Base,this.PerBag,this.PremiumUpliftPct,this.Drivers});
DispatchZoneRateView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Zone = json['Zone'];
DispatchZoneRateID = json['DispatchZoneRateID'];
Base = JsonConverters.toDouble(json['Base']);
PerBag = JsonConverters.toDouble(json['PerBag']);
PremiumUpliftPct = JsonConverters.toDouble(json['PremiumUpliftPct']);
Drivers = json['Drivers'];
return this;
}
Map<String, dynamic> toJson() => {
'Zone': Zone,
'DispatchZoneRateID': DispatchZoneRateID,
'Base': Base,
'PerBag': PerBag,
'PremiumUpliftPct': PremiumUpliftPct,
'Drivers': Drivers
};
getTypeName() => "DispatchZoneRateView";
TypeContext? context = _ctx;
}
class DispatchPayPlanView implements IConvertible
{
int? DispatchPayPlanID;
String? Name;
String? Basis;
double? Rate;
double? Rate2;
DateTime? EffectiveDate;
bool? IsActive;
int? Drivers;
DispatchPayPlanView({this.DispatchPayPlanID,this.Name,this.Basis,this.Rate,this.Rate2,this.EffectiveDate,this.IsActive,this.Drivers});
DispatchPayPlanView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DispatchPayPlanID = json['DispatchPayPlanID'];
Name = json['Name'];
Basis = json['Basis'];
Rate = JsonConverters.toDouble(json['Rate']);
Rate2 = JsonConverters.toDouble(json['Rate2']);
EffectiveDate = JsonConverters.fromJson(json['EffectiveDate'],'DateTime',context!);
IsActive = json['IsActive'];
Drivers = json['Drivers'];
return this;
}
Map<String, dynamic> toJson() => {
'DispatchPayPlanID': DispatchPayPlanID,
'Name': Name,
'Basis': Basis,
'Rate': Rate,
'Rate2': Rate2,
'EffectiveDate': JsonConverters.toJson(EffectiveDate,'DateTime',context!),
'IsActive': IsActive,
'Drivers': Drivers
};
getTypeName() => "DispatchPayPlanView";
TypeContext? context = _ctx;
}
class DispatchRatesResponse implements IConvertible
{
DispatchRateConfigView? Config;
List<DispatchLaneRateView>? Lanes = [];
List<DispatchZoneRateView>? Zones = [];
List<DispatchPayPlanView>? Plans = [];
int? Repriced;
int? StillNoRevenue;
int? StillNoPay;
ResponseStatus? ResponseStatus;
DispatchRatesResponse({this.Config,this.Lanes,this.Zones,this.Plans,this.Repriced,this.StillNoRevenue,this.StillNoPay,this.ResponseStatus});
DispatchRatesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Config = JsonConverters.fromJson(json['Config'],'DispatchRateConfigView',context!);
Lanes = JsonConverters.fromJson(json['Lanes'],'List<DispatchLaneRateView>',context!);
Zones = JsonConverters.fromJson(json['Zones'],'List<DispatchZoneRateView>',context!);
Plans = JsonConverters.fromJson(json['Plans'],'List<DispatchPayPlanView>',context!);
Repriced = json['Repriced'];
StillNoRevenue = json['StillNoRevenue'];
StillNoPay = json['StillNoPay'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Config': JsonConverters.toJson(Config,'DispatchRateConfigView',context!),
'Lanes': JsonConverters.toJson(Lanes,'List<DispatchLaneRateView>',context!),
'Zones': JsonConverters.toJson(Zones,'List<DispatchZoneRateView>',context!),
'Plans': JsonConverters.toJson(Plans,'List<DispatchPayPlanView>',context!),
'Repriced': Repriced,
'StillNoRevenue': StillNoRevenue,
'StillNoPay': StillNoPay,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "DispatchRatesResponse";
TypeContext? context = _ctx;
}
class DispatchRatesRequest implements IConvertible
{
DispatchRatesRequest();
DispatchRatesRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "DispatchRatesRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'DispatchRateConfigView': TypeInfo(TypeOf.Class, create:() => DispatchRateConfigView()),
'DispatchLaneRateView': TypeInfo(TypeOf.Class, create:() => DispatchLaneRateView()),
'DispatchZoneRateView': TypeInfo(TypeOf.Class, create:() => DispatchZoneRateView()),
'DispatchPayPlanView': TypeInfo(TypeOf.Class, create:() => DispatchPayPlanView()),
'DispatchRatesResponse': TypeInfo(TypeOf.Class, create:() => DispatchRatesResponse()),
'List<DispatchLaneRateView>': TypeInfo(TypeOf.Class, create:() => <DispatchLaneRateView>[]),
'List<DispatchZoneRateView>': TypeInfo(TypeOf.Class, create:() => <DispatchZoneRateView>[]),
'List<DispatchPayPlanView>': TypeInfo(TypeOf.Class, create:() => <DispatchPayPlanView>[]),
'DispatchRatesRequest': TypeInfo(TypeOf.Class, create:() => DispatchRatesRequest()),
});
Dart DispatchRatesRequest 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/rates HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DispatchRatesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Config>
<Facility>String</Facility>
<FuelSurchargePct>0</FuelSurchargePct>
<HaulBasis>String</HaulBasis>
<LoadQty>0</LoadQty>
<OdBase>0</OdBase>
<OdPerBag>0</OdPerBag>
<OdPremiumUpliftPct>0</OdPremiumUpliftPct>
<TransportEnclosedUpliftPct>0</TransportEnclosedUpliftPct>
<TransportJobMin>0</TransportJobMin>
<TransportPerMile>0</TransportPerMile>
<Unit>String</Unit>
</Config>
<Lanes>
<DispatchLaneRateView>
<DispatchLaneRateID>0</DispatchLaneRateID>
<DispatchSiteID>0</DispatchSiteID>
<DispatchSupplierID>0</DispatchSupplierID>
<Miles>0</Miles>
<RatePerHour>0</RatePerHour>
<RatePerLoad>0</RatePerLoad>
<RatePerTon>0</RatePerTon>
<RatePerTonMile>0</RatePerTonMile>
<SourceLabel>String</SourceLabel>
<SupplierName>String</SupplierName>
</DispatchLaneRateView>
</Lanes>
<Plans>
<DispatchPayPlanView>
<Basis>String</Basis>
<DispatchPayPlanID>0</DispatchPayPlanID>
<Drivers>0</Drivers>
<EffectiveDate>0001-01-01T00:00:00</EffectiveDate>
<IsActive>false</IsActive>
<Name>String</Name>
<Rate>0</Rate>
<Rate2>0</Rate2>
</DispatchPayPlanView>
</Plans>
<Repriced>0</Repriced>
<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>
<StillNoPay>0</StillNoPay>
<StillNoRevenue>0</StillNoRevenue>
<Zones>
<DispatchZoneRateView>
<Base>0</Base>
<DispatchZoneRateID>0</DispatchZoneRateID>
<Drivers>0</Drivers>
<PerBag>0</PerBag>
<PremiumUpliftPct>0</PremiumUpliftPct>
<Zone>String</Zone>
</DispatchZoneRateView>
</Zones>
</DispatchRatesResponse>