| POST,OPTIONS | /v1/dispatch/courier/profiles/{Id}/preview |
|---|
import 'package:servicestack/servicestack.dart';
class CourierProfileSummary implements IConvertible
{
int? CourierProfileID;
String? Code;
String? Name;
String? BusinessName;
String? RouteShape;
bool? Enabled;
String? TemplateFrom;
int? Drivers;
CourierProfileSummary({this.CourierProfileID,this.Code,this.Name,this.BusinessName,this.RouteShape,this.Enabled,this.TemplateFrom,this.Drivers});
CourierProfileSummary.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CourierProfileID = json['CourierProfileID'];
Code = json['Code'];
Name = json['Name'];
BusinessName = json['BusinessName'];
RouteShape = json['RouteShape'];
Enabled = json['Enabled'];
TemplateFrom = json['TemplateFrom'];
Drivers = json['Drivers'];
return this;
}
Map<String, dynamic> toJson() => {
'CourierProfileID': CourierProfileID,
'Code': Code,
'Name': Name,
'BusinessName': BusinessName,
'RouteShape': RouteShape,
'Enabled': Enabled,
'TemplateFrom': TemplateFrom,
'Drivers': Drivers
};
getTypeName() => "CourierProfileSummary";
TypeContext? context = _ctx;
}
class CourierTemplateOption implements IConvertible
{
String? Key;
String? Label;
String? Detail;
String? RouteShape;
CourierTemplateOption({this.Key,this.Label,this.Detail,this.RouteShape});
CourierTemplateOption.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
Label = json['Label'];
Detail = json['Detail'];
RouteShape = json['RouteShape'];
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'Label': Label,
'Detail': Detail,
'RouteShape': RouteShape
};
getTypeName() => "CourierTemplateOption";
TypeContext? context = _ctx;
}
class CourierPay implements IConvertible
{
String? WorkerClass;
double? PerPickup;
double? PerStop;
double? PerMissed;
double? PerCancel;
int? WaitAfterMin;
double? WaitPerMin;
bool? MileageOn;
double? PerMile;
double? MinPerJob;
double? TipsPct;
CourierPay({this.WorkerClass,this.PerPickup,this.PerStop,this.PerMissed,this.PerCancel,this.WaitAfterMin,this.WaitPerMin,this.MileageOn,this.PerMile,this.MinPerJob,this.TipsPct});
CourierPay.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
WorkerClass = json['WorkerClass'];
PerPickup = JsonConverters.toDouble(json['PerPickup']);
PerStop = JsonConverters.toDouble(json['PerStop']);
PerMissed = JsonConverters.toDouble(json['PerMissed']);
PerCancel = JsonConverters.toDouble(json['PerCancel']);
WaitAfterMin = json['WaitAfterMin'];
WaitPerMin = JsonConverters.toDouble(json['WaitPerMin']);
MileageOn = json['MileageOn'];
PerMile = JsonConverters.toDouble(json['PerMile']);
MinPerJob = JsonConverters.toDouble(json['MinPerJob']);
TipsPct = JsonConverters.toDouble(json['TipsPct']);
return this;
}
Map<String, dynamic> toJson() => {
'WorkerClass': WorkerClass,
'PerPickup': PerPickup,
'PerStop': PerStop,
'PerMissed': PerMissed,
'PerCancel': PerCancel,
'WaitAfterMin': WaitAfterMin,
'WaitPerMin': WaitPerMin,
'MileageOn': MileageOn,
'PerMile': PerMile,
'MinPerJob': MinPerJob,
'TipsPct': TipsPct
};
getTypeName() => "CourierPay";
TypeContext? context = _ctx;
}
class CourierDispatch implements IConvertible
{
int? PingSecs;
double? RadiusMi;
bool? DeclinePenalty;
String? NextRule;
int? GoMin;
int? LastMin;
int? NearFull;
int? MarginMin;
String? TrafficSource;
CourierDispatch({this.PingSecs,this.RadiusMi,this.DeclinePenalty,this.NextRule,this.GoMin,this.LastMin,this.NearFull,this.MarginMin,this.TrafficSource});
CourierDispatch.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
PingSecs = json['PingSecs'];
RadiusMi = JsonConverters.toDouble(json['RadiusMi']);
DeclinePenalty = json['DeclinePenalty'];
NextRule = json['NextRule'];
GoMin = json['GoMin'];
LastMin = json['LastMin'];
NearFull = json['NearFull'];
MarginMin = json['MarginMin'];
TrafficSource = json['TrafficSource'];
return this;
}
Map<String, dynamic> toJson() => {
'PingSecs': PingSecs,
'RadiusMi': RadiusMi,
'DeclinePenalty': DeclinePenalty,
'NextRule': NextRule,
'GoMin': GoMin,
'LastMin': LastMin,
'NearFull': NearFull,
'MarginMin': MarginMin,
'TrafficSource': TrafficSource
};
getTypeName() => "CourierDispatch";
TypeContext? context = _ctx;
}
class CourierMissed implements IConvertible
{
int? WaitMin;
double? Fee;
double? CancelFee;
bool? AutoRebook;
bool? RequireContact;
bool? RequirePhoto;
CourierMissed({this.WaitMin,this.Fee,this.CancelFee,this.AutoRebook,this.RequireContact,this.RequirePhoto});
CourierMissed.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
WaitMin = json['WaitMin'];
Fee = JsonConverters.toDouble(json['Fee']);
CancelFee = JsonConverters.toDouble(json['CancelFee']);
AutoRebook = json['AutoRebook'];
RequireContact = json['RequireContact'];
RequirePhoto = json['RequirePhoto'];
return this;
}
Map<String, dynamic> toJson() => {
'WaitMin': WaitMin,
'Fee': Fee,
'CancelFee': CancelFee,
'AutoRebook': AutoRebook,
'RequireContact': RequireContact,
'RequirePhoto': RequirePhoto
};
getTypeName() => "CourierMissed";
TypeContext? context = _ctx;
}
class CourierPrivacy implements IConvertible
{
int? ThreadHrs;
int? PhotoDays;
String? LockNames;
bool? HideAddr;
bool? LiveEta;
bool? Tipping;
CourierPrivacy({this.ThreadHrs,this.PhotoDays,this.LockNames,this.HideAddr,this.LiveEta,this.Tipping});
CourierPrivacy.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ThreadHrs = json['ThreadHrs'];
PhotoDays = json['PhotoDays'];
LockNames = json['LockNames'];
HideAddr = json['HideAddr'];
LiveEta = json['LiveEta'];
Tipping = json['Tipping'];
return this;
}
Map<String, dynamic> toJson() => {
'ThreadHrs': ThreadHrs,
'PhotoDays': PhotoDays,
'LockNames': LockNames,
'HideAddr': HideAddr,
'LiveEta': LiveEta,
'Tipping': Tipping
};
getTypeName() => "CourierPrivacy";
TypeContext? context = _ctx;
}
class CourierPricing implements IConvertible
{
double? Base;
double? PerUnit;
double? PerMile;
double? MinOrder;
double? TaxPct;
bool? FinalAfterCount;
List<String>? ServiceArea = [];
int? WindowMin;
Map<String,double?>? Surcharges = {};
CourierPricing({this.Base,this.PerUnit,this.PerMile,this.MinOrder,this.TaxPct,this.FinalAfterCount,this.ServiceArea,this.WindowMin,this.Surcharges});
CourierPricing.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Base = JsonConverters.toDouble(json['Base']);
PerUnit = JsonConverters.toDouble(json['PerUnit']);
PerMile = JsonConverters.toDouble(json['PerMile']);
MinOrder = JsonConverters.toDouble(json['MinOrder']);
TaxPct = JsonConverters.toDouble(json['TaxPct']);
FinalAfterCount = json['FinalAfterCount'];
ServiceArea = JsonConverters.fromJson(json['ServiceArea'],'List<String>',context!);
WindowMin = json['WindowMin'];
Surcharges = JsonConverters.fromJson(json['Surcharges'],'Map<String,double?>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Base': Base,
'PerUnit': PerUnit,
'PerMile': PerMile,
'MinOrder': MinOrder,
'TaxPct': TaxPct,
'FinalAfterCount': FinalAfterCount,
'ServiceArea': JsonConverters.toJson(ServiceArea,'List<String>',context!),
'WindowMin': WindowMin,
'Surcharges': JsonConverters.toJson(Surcharges,'Map<String,double?>',context!)
};
getTypeName() => "CourierPricing";
TypeContext? context = _ctx;
}
class CourierBooking implements IConvertible
{
bool? On;
String? Slug;
bool? Asap;
int? MinLeadMin;
String? Open;
String? Close;
int? DriveBufferMin;
List<String>? Zips = [];
bool? Recurring;
String? PayTiming;
CourierBooking({this.On,this.Slug,this.Asap,this.MinLeadMin,this.Open,this.Close,this.DriveBufferMin,this.Zips,this.Recurring,this.PayTiming});
CourierBooking.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
On = json['On'];
Slug = json['Slug'];
Asap = json['Asap'];
MinLeadMin = json['MinLeadMin'];
Open = json['Open'];
Close = json['Close'];
DriveBufferMin = json['DriveBufferMin'];
Zips = JsonConverters.fromJson(json['Zips'],'List<String>',context!);
Recurring = json['Recurring'];
PayTiming = json['PayTiming'];
return this;
}
Map<String, dynamic> toJson() => {
'On': On,
'Slug': Slug,
'Asap': Asap,
'MinLeadMin': MinLeadMin,
'Open': Open,
'Close': Close,
'DriveBufferMin': DriveBufferMin,
'Zips': JsonConverters.toJson(Zips,'List<String>',context!),
'Recurring': Recurring,
'PayTiming': PayTiming
};
getTypeName() => "CourierBooking";
TypeContext? context = _ctx;
}
class CourierLevelView implements IConvertible
{
String? Code;
String? Name;
String? InBy;
int? WithinMin;
String? Ready;
List<int>? Days = [];
bool? IsOn;
CourierLevelView({this.Code,this.Name,this.InBy,this.WithinMin,this.Ready,this.Days,this.IsOn});
CourierLevelView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Code = json['Code'];
Name = json['Name'];
InBy = json['InBy'];
WithinMin = json['WithinMin'];
Ready = json['Ready'];
Days = JsonConverters.fromJson(json['Days'],'List<int>',context!);
IsOn = json['IsOn'];
return this;
}
Map<String, dynamic> toJson() => {
'Code': Code,
'Name': Name,
'InBy': InBy,
'WithinMin': WithinMin,
'Ready': Ready,
'Days': JsonConverters.toJson(Days,'List<int>',context!),
'IsOn': IsOn
};
getTypeName() => "CourierLevelView";
TypeContext? context = _ctx;
}
class CourierFacilityView implements IConvertible
{
String? Code;
String? Name;
String? Address;
int? IntakeMin;
List<CourierLevelView>? Levels = [];
List<String>? Holidays = [];
CourierFacilityView({this.Code,this.Name,this.Address,this.IntakeMin,this.Levels,this.Holidays});
CourierFacilityView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Code = json['Code'];
Name = json['Name'];
Address = json['Address'];
IntakeMin = json['IntakeMin'];
Levels = JsonConverters.fromJson(json['Levels'],'List<CourierLevelView>',context!);
Holidays = JsonConverters.fromJson(json['Holidays'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Code': Code,
'Name': Name,
'Address': Address,
'IntakeMin': IntakeMin,
'Levels': JsonConverters.toJson(Levels,'List<CourierLevelView>',context!),
'Holidays': JsonConverters.toJson(Holidays,'List<String>',context!)
};
getTypeName() => "CourierFacilityView";
TypeContext? context = _ctx;
}
class CourierVehicleView implements IConvertible
{
int? EquipmentID;
String? UnitNumber;
String? Name;
String? Unit;
double? Cap;
bool? Cold;
CourierVehicleView({this.EquipmentID,this.UnitNumber,this.Name,this.Unit,this.Cap,this.Cold});
CourierVehicleView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
EquipmentID = json['EquipmentID'];
UnitNumber = json['UnitNumber'];
Name = json['Name'];
Unit = json['Unit'];
Cap = JsonConverters.toDouble(json['Cap']);
Cold = json['Cold'];
return this;
}
Map<String, dynamic> toJson() => {
'EquipmentID': EquipmentID,
'UnitNumber': UnitNumber,
'Name': Name,
'Unit': Unit,
'Cap': Cap,
'Cold': Cold
};
getTypeName() => "CourierVehicleView";
TypeContext? context = _ctx;
}
class CourierProfileContext implements IConvertible
{
int? Drivers;
int? ProfileCount;
int? PayPlanId;
String? ZoneMode;
String? ZoneName;
int? ZoneCount;
bool? HasBookingPage;
bool? HasRateConfig;
Map<String,String?>? VehicleFacts = {};
CourierProfileContext({this.Drivers,this.ProfileCount,this.PayPlanId,this.ZoneMode,this.ZoneName,this.ZoneCount,this.HasBookingPage,this.HasRateConfig,this.VehicleFacts});
CourierProfileContext.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Drivers = json['Drivers'];
ProfileCount = json['ProfileCount'];
PayPlanId = json['PayPlanId'];
ZoneMode = json['ZoneMode'];
ZoneName = json['ZoneName'];
ZoneCount = json['ZoneCount'];
HasBookingPage = json['HasBookingPage'];
HasRateConfig = json['HasRateConfig'];
VehicleFacts = JsonConverters.toStringMap(json['VehicleFacts']);
return this;
}
Map<String, dynamic> toJson() => {
'Drivers': Drivers,
'ProfileCount': ProfileCount,
'PayPlanId': PayPlanId,
'ZoneMode': ZoneMode,
'ZoneName': ZoneName,
'ZoneCount': ZoneCount,
'HasBookingPage': HasBookingPage,
'HasRateConfig': HasRateConfig,
'VehicleFacts': VehicleFacts
};
getTypeName() => "CourierProfileContext";
TypeContext? context = _ctx;
}
class CourierProfileView implements IConvertible
{
int? CourierProfileID;
String? Code;
String? Name;
String? BusinessName;
String? RouteShape;
bool? Enabled;
String? TemplateFrom;
String? UnitOne;
String? UnitMany;
String? FacilityNoun;
String? UnitOneEs;
String? UnitManyEs;
String? FacilityNounEs;
String? TagMode;
List<String>? TagFormats = [];
CourierPay? Pay;
CourierDispatch? Dispatch;
CourierMissed? Missed;
CourierPrivacy? Privacy;
CourierPricing? Pricing;
CourierBooking? Booking;
List<CourierFacilityView>? Facilities = [];
List<CourierVehicleView>? Vehicles = [];
Map<String,Map<String,String>?>? Proof = {};
CourierProfileContext? Context;
CourierProfileView({this.CourierProfileID,this.Code,this.Name,this.BusinessName,this.RouteShape,this.Enabled,this.TemplateFrom,this.UnitOne,this.UnitMany,this.FacilityNoun,this.UnitOneEs,this.UnitManyEs,this.FacilityNounEs,this.TagMode,this.TagFormats,this.Pay,this.Dispatch,this.Missed,this.Privacy,this.Pricing,this.Booking,this.Facilities,this.Vehicles,this.Proof,this.Context});
CourierProfileView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CourierProfileID = json['CourierProfileID'];
Code = json['Code'];
Name = json['Name'];
BusinessName = json['BusinessName'];
RouteShape = json['RouteShape'];
Enabled = json['Enabled'];
TemplateFrom = json['TemplateFrom'];
UnitOne = json['UnitOne'];
UnitMany = json['UnitMany'];
FacilityNoun = json['FacilityNoun'];
UnitOneEs = json['UnitOneEs'];
UnitManyEs = json['UnitManyEs'];
FacilityNounEs = json['FacilityNounEs'];
TagMode = json['TagMode'];
TagFormats = JsonConverters.fromJson(json['TagFormats'],'List<String>',context!);
Pay = JsonConverters.fromJson(json['Pay'],'CourierPay',context!);
Dispatch = JsonConverters.fromJson(json['Dispatch'],'CourierDispatch',context!);
Missed = JsonConverters.fromJson(json['Missed'],'CourierMissed',context!);
Privacy = JsonConverters.fromJson(json['Privacy'],'CourierPrivacy',context!);
Pricing = JsonConverters.fromJson(json['Pricing'],'CourierPricing',context!);
Booking = JsonConverters.fromJson(json['Booking'],'CourierBooking',context!);
Facilities = JsonConverters.fromJson(json['Facilities'],'List<CourierFacilityView>',context!);
Vehicles = JsonConverters.fromJson(json['Vehicles'],'List<CourierVehicleView>',context!);
Proof = JsonConverters.fromJson(json['Proof'],'Map<String,Map<String,String>?>',context!);
Context = JsonConverters.fromJson(json['Context'],'CourierProfileContext',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CourierProfileID': CourierProfileID,
'Code': Code,
'Name': Name,
'BusinessName': BusinessName,
'RouteShape': RouteShape,
'Enabled': Enabled,
'TemplateFrom': TemplateFrom,
'UnitOne': UnitOne,
'UnitMany': UnitMany,
'FacilityNoun': FacilityNoun,
'UnitOneEs': UnitOneEs,
'UnitManyEs': UnitManyEs,
'FacilityNounEs': FacilityNounEs,
'TagMode': TagMode,
'TagFormats': JsonConverters.toJson(TagFormats,'List<String>',context!),
'Pay': JsonConverters.toJson(Pay,'CourierPay',context!),
'Dispatch': JsonConverters.toJson(Dispatch,'CourierDispatch',context!),
'Missed': JsonConverters.toJson(Missed,'CourierMissed',context!),
'Privacy': JsonConverters.toJson(Privacy,'CourierPrivacy',context!),
'Pricing': JsonConverters.toJson(Pricing,'CourierPricing',context!),
'Booking': JsonConverters.toJson(Booking,'CourierBooking',context!),
'Facilities': JsonConverters.toJson(Facilities,'List<CourierFacilityView>',context!),
'Vehicles': JsonConverters.toJson(Vehicles,'List<CourierVehicleView>',context!),
'Proof': JsonConverters.toJson(Proof,'Map<String,Map<String,String>?>',context!),
'Context': JsonConverters.toJson(Context,'CourierProfileContext',context!)
};
getTypeName() => "CourierProfileView";
TypeContext? context = _ctx;
}
class CourierIssue implements IConvertible
{
String? Key;
String? Section;
String? Message;
CourierIssue({this.Key,this.Section,this.Message});
CourierIssue.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
Section = json['Section'];
Message = json['Message'];
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'Section': Section,
'Message': Message
};
getTypeName() => "CourierIssue";
TypeContext? context = _ctx;
}
class CourierChange implements IConvertible
{
String? Key;
String? Section;
String? Label;
String? From;
String? To;
CourierChange({this.Key,this.Section,this.Label,this.From,this.To});
CourierChange.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
Section = json['Section'];
Label = json['Label'];
From = json['From'];
To = json['To'];
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'Section': Section,
'Label': Label,
'From': From,
'To': To
};
getTypeName() => "CourierChange";
TypeContext? context = _ctx;
}
class CourierPreviewLine implements IConvertible
{
String? K;
String? V;
String? Dot;
CourierPreviewLine({this.K,this.V,this.Dot});
CourierPreviewLine.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
K = json['K'];
V = json['V'];
Dot = json['Dot'];
return this;
}
Map<String, dynamic> toJson() => {
'K': K,
'V': V,
'Dot': Dot
};
getTypeName() => "CourierPreviewLine";
TypeContext? context = _ctx;
}
class CourierPreview implements IConvertible
{
String? DeadlineTitle;
String? DeadlineLead;
String? RoomW;
String? LastW;
String? GoW;
List<CourierPreviewLine>? Zones = [];
String? PaySub;
List<CourierPreviewLine>? PayRows = [];
String? PayTotal;
List<CourierPreviewLine>? ProofRows = [];
String? Ping;
CourierPreview({this.DeadlineTitle,this.DeadlineLead,this.RoomW,this.LastW,this.GoW,this.Zones,this.PaySub,this.PayRows,this.PayTotal,this.ProofRows,this.Ping});
CourierPreview.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DeadlineTitle = json['DeadlineTitle'];
DeadlineLead = json['DeadlineLead'];
RoomW = json['RoomW'];
LastW = json['LastW'];
GoW = json['GoW'];
Zones = JsonConverters.fromJson(json['Zones'],'List<CourierPreviewLine>',context!);
PaySub = json['PaySub'];
PayRows = JsonConverters.fromJson(json['PayRows'],'List<CourierPreviewLine>',context!);
PayTotal = json['PayTotal'];
ProofRows = JsonConverters.fromJson(json['ProofRows'],'List<CourierPreviewLine>',context!);
Ping = json['Ping'];
return this;
}
Map<String, dynamic> toJson() => {
'DeadlineTitle': DeadlineTitle,
'DeadlineLead': DeadlineLead,
'RoomW': RoomW,
'LastW': LastW,
'GoW': GoW,
'Zones': JsonConverters.toJson(Zones,'List<CourierPreviewLine>',context!),
'PaySub': PaySub,
'PayRows': JsonConverters.toJson(PayRows,'List<CourierPreviewLine>',context!),
'PayTotal': PayTotal,
'ProofRows': JsonConverters.toJson(ProofRows,'List<CourierPreviewLine>',context!),
'Ping': Ping
};
getTypeName() => "CourierPreview";
TypeContext? context = _ctx;
}
class CourierFleetVehicle implements IConvertible
{
int? EquipmentID;
String? UnitNumber;
String? Name;
String? VehicleType;
String? Unit;
double? Cap;
bool? Cold;
String? Status;
bool? Assigned;
CourierFleetVehicle({this.EquipmentID,this.UnitNumber,this.Name,this.VehicleType,this.Unit,this.Cap,this.Cold,this.Status,this.Assigned});
CourierFleetVehicle.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
EquipmentID = json['EquipmentID'];
UnitNumber = json['UnitNumber'];
Name = json['Name'];
VehicleType = json['VehicleType'];
Unit = json['Unit'];
Cap = JsonConverters.toDouble(json['Cap']);
Cold = json['Cold'];
Status = json['Status'];
Assigned = json['Assigned'];
return this;
}
Map<String, dynamic> toJson() => {
'EquipmentID': EquipmentID,
'UnitNumber': UnitNumber,
'Name': Name,
'VehicleType': VehicleType,
'Unit': Unit,
'Cap': Cap,
'Cold': Cold,
'Status': Status,
'Assigned': Assigned
};
getTypeName() => "CourierFleetVehicle";
TypeContext? context = _ctx;
}
class CourierResponse implements IConvertible
{
List<CourierProfileSummary>? Profiles = [];
List<CourierTemplateOption>? Templates = [];
CourierProfileView? Profile;
List<CourierIssue>? Issues = [];
List<CourierChange>? Changes = [];
CourierPreview? Preview;
List<CourierFleetVehicle>? Fleet = [];
ResponseStatus? ResponseStatus;
CourierResponse({this.Profiles,this.Templates,this.Profile,this.Issues,this.Changes,this.Preview,this.Fleet,this.ResponseStatus});
CourierResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Profiles = JsonConverters.fromJson(json['Profiles'],'List<CourierProfileSummary>',context!);
Templates = JsonConverters.fromJson(json['Templates'],'List<CourierTemplateOption>',context!);
Profile = JsonConverters.fromJson(json['Profile'],'CourierProfileView',context!);
Issues = JsonConverters.fromJson(json['Issues'],'List<CourierIssue>',context!);
Changes = JsonConverters.fromJson(json['Changes'],'List<CourierChange>',context!);
Preview = JsonConverters.fromJson(json['Preview'],'CourierPreview',context!);
Fleet = JsonConverters.fromJson(json['Fleet'],'List<CourierFleetVehicle>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Profiles': JsonConverters.toJson(Profiles,'List<CourierProfileSummary>',context!),
'Templates': JsonConverters.toJson(Templates,'List<CourierTemplateOption>',context!),
'Profile': JsonConverters.toJson(Profile,'CourierProfileView',context!),
'Issues': JsonConverters.toJson(Issues,'List<CourierIssue>',context!),
'Changes': JsonConverters.toJson(Changes,'List<CourierChange>',context!),
'Preview': JsonConverters.toJson(Preview,'CourierPreview',context!),
'Fleet': JsonConverters.toJson(Fleet,'List<CourierFleetVehicle>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "CourierResponse";
TypeContext? context = _ctx;
}
class CourierProfilePreviewRequest implements IConvertible
{
int? Id;
CourierProfileView? Draft;
String? FacilityCode;
CourierProfilePreviewRequest({this.Id,this.Draft,this.FacilityCode});
CourierProfilePreviewRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Draft = JsonConverters.fromJson(json['Draft'],'CourierProfileView',context!);
FacilityCode = json['FacilityCode'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Draft': JsonConverters.toJson(Draft,'CourierProfileView',context!),
'FacilityCode': FacilityCode
};
getTypeName() => "CourierProfilePreviewRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'CourierProfileSummary': TypeInfo(TypeOf.Class, create:() => CourierProfileSummary()),
'CourierTemplateOption': TypeInfo(TypeOf.Class, create:() => CourierTemplateOption()),
'CourierPay': TypeInfo(TypeOf.Class, create:() => CourierPay()),
'CourierDispatch': TypeInfo(TypeOf.Class, create:() => CourierDispatch()),
'CourierMissed': TypeInfo(TypeOf.Class, create:() => CourierMissed()),
'CourierPrivacy': TypeInfo(TypeOf.Class, create:() => CourierPrivacy()),
'CourierPricing': TypeInfo(TypeOf.Class, create:() => CourierPricing()),
'Map<String,double?>': TypeInfo(TypeOf.Class, create:() => Map<String,double?>()),
'CourierBooking': TypeInfo(TypeOf.Class, create:() => CourierBooking()),
'CourierLevelView': TypeInfo(TypeOf.Class, create:() => CourierLevelView()),
'CourierFacilityView': TypeInfo(TypeOf.Class, create:() => CourierFacilityView()),
'List<CourierLevelView>': TypeInfo(TypeOf.Class, create:() => <CourierLevelView>[]),
'CourierVehicleView': TypeInfo(TypeOf.Class, create:() => CourierVehicleView()),
'CourierProfileContext': TypeInfo(TypeOf.Class, create:() => CourierProfileContext()),
'CourierProfileView': TypeInfo(TypeOf.Class, create:() => CourierProfileView()),
'List<CourierFacilityView>': TypeInfo(TypeOf.Class, create:() => <CourierFacilityView>[]),
'List<CourierVehicleView>': TypeInfo(TypeOf.Class, create:() => <CourierVehicleView>[]),
'Map<String,Map<String,String>?>': TypeInfo(TypeOf.Class, create:() => Map<String,Map<String,String>?>()),
'CourierIssue': TypeInfo(TypeOf.Class, create:() => CourierIssue()),
'CourierChange': TypeInfo(TypeOf.Class, create:() => CourierChange()),
'CourierPreviewLine': TypeInfo(TypeOf.Class, create:() => CourierPreviewLine()),
'CourierPreview': TypeInfo(TypeOf.Class, create:() => CourierPreview()),
'List<CourierPreviewLine>': TypeInfo(TypeOf.Class, create:() => <CourierPreviewLine>[]),
'CourierFleetVehicle': TypeInfo(TypeOf.Class, create:() => CourierFleetVehicle()),
'CourierResponse': TypeInfo(TypeOf.Class, create:() => CourierResponse()),
'List<CourierProfileSummary>': TypeInfo(TypeOf.Class, create:() => <CourierProfileSummary>[]),
'List<CourierTemplateOption>': TypeInfo(TypeOf.Class, create:() => <CourierTemplateOption>[]),
'List<CourierIssue>': TypeInfo(TypeOf.Class, create:() => <CourierIssue>[]),
'List<CourierChange>': TypeInfo(TypeOf.Class, create:() => <CourierChange>[]),
'List<CourierFleetVehicle>': TypeInfo(TypeOf.Class, create:() => <CourierFleetVehicle>[]),
'CourierProfilePreviewRequest': TypeInfo(TypeOf.Class, create:() => CourierProfilePreviewRequest()),
});
Dart CourierProfilePreviewRequest 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/dispatch/courier/profiles/{Id}/preview HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Id":0,"Draft":{"CourierProfileID":0,"Code":"String","Name":"String","BusinessName":"String","RouteShape":"String","Enabled":false,"TemplateFrom":"String","UnitOne":"String","UnitMany":"String","FacilityNoun":"String","UnitOneEs":"String","UnitManyEs":"String","FacilityNounEs":"String","TagMode":"String","TagFormats":["String"],"Pay":{"WorkerClass":"String","PerPickup":0,"PerStop":0,"PerMissed":0,"PerCancel":0,"WaitAfterMin":0,"WaitPerMin":0,"MileageOn":false,"PerMile":0,"MinPerJob":0,"TipsPct":0},"Dispatch":{"PingSecs":0,"RadiusMi":0,"DeclinePenalty":false,"NextRule":"String","GoMin":0,"LastMin":0,"NearFull":0,"MarginMin":0,"TrafficSource":"String"},"Missed":{"WaitMin":0,"Fee":0,"CancelFee":0,"AutoRebook":false,"RequireContact":false,"RequirePhoto":false},"Privacy":{"ThreadHrs":0,"PhotoDays":0,"LockNames":"String","HideAddr":false,"LiveEta":false,"Tipping":false},"Pricing":{"Base":0,"PerUnit":0,"PerMile":0,"MinOrder":0,"TaxPct":0,"FinalAfterCount":false,"ServiceArea":["String"],"WindowMin":0,"Surcharges":{"String":0}},"Booking":{"On":false,"Slug":"String","Asap":false,"MinLeadMin":0,"Open":"String","Close":"String","DriveBufferMin":0,"Zips":["String"],"Recurring":false,"PayTiming":"String"},"Facilities":[{"Code":"String","Name":"String","Address":"String","IntakeMin":0,"Levels":[{"Code":"String","Name":"String","InBy":"String","WithinMin":0,"Ready":"String","Days":[0],"IsOn":false}],"Holidays":["String"]}],"Vehicles":[{"EquipmentID":0,"UnitNumber":"String","Name":"String","Unit":"String","Cap":0,"Cold":false}],"Proof":{"String":{"String":"String"}},"Context":{"Drivers":0,"ProfileCount":0,"PayPlanId":0,"ZoneMode":"String","ZoneName":"String","ZoneCount":0,"HasBookingPage":false,"HasRateConfig":false,"VehicleFacts":{"String":"String"}}},"FacilityCode":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Profiles":[{"CourierProfileID":0,"Code":"String","Name":"String","BusinessName":"String","RouteShape":"String","Enabled":false,"TemplateFrom":"String","Drivers":0}],"Templates":[{"Key":"String","Label":"String","Detail":"String","RouteShape":"String"}],"Profile":{"CourierProfileID":0,"Code":"String","Name":"String","BusinessName":"String","RouteShape":"String","Enabled":false,"TemplateFrom":"String","UnitOne":"String","UnitMany":"String","FacilityNoun":"String","UnitOneEs":"String","UnitManyEs":"String","FacilityNounEs":"String","TagMode":"String","TagFormats":["String"],"Pay":{"WorkerClass":"String","PerPickup":0,"PerStop":0,"PerMissed":0,"PerCancel":0,"WaitAfterMin":0,"WaitPerMin":0,"MileageOn":false,"PerMile":0,"MinPerJob":0,"TipsPct":0},"Dispatch":{"PingSecs":0,"RadiusMi":0,"DeclinePenalty":false,"NextRule":"String","GoMin":0,"LastMin":0,"NearFull":0,"MarginMin":0,"TrafficSource":"String"},"Missed":{"WaitMin":0,"Fee":0,"CancelFee":0,"AutoRebook":false,"RequireContact":false,"RequirePhoto":false},"Privacy":{"ThreadHrs":0,"PhotoDays":0,"LockNames":"String","HideAddr":false,"LiveEta":false,"Tipping":false},"Pricing":{"Base":0,"PerUnit":0,"PerMile":0,"MinOrder":0,"TaxPct":0,"FinalAfterCount":false,"ServiceArea":["String"],"WindowMin":0,"Surcharges":{"String":0}},"Booking":{"On":false,"Slug":"String","Asap":false,"MinLeadMin":0,"Open":"String","Close":"String","DriveBufferMin":0,"Zips":["String"],"Recurring":false,"PayTiming":"String"},"Facilities":[{"Code":"String","Name":"String","Address":"String","IntakeMin":0,"Levels":[{"Code":"String","Name":"String","InBy":"String","WithinMin":0,"Ready":"String","Days":[0],"IsOn":false}],"Holidays":["String"]}],"Vehicles":[{"EquipmentID":0,"UnitNumber":"String","Name":"String","Unit":"String","Cap":0,"Cold":false}],"Proof":{"String":{"String":"String"}},"Context":{"Drivers":0,"ProfileCount":0,"PayPlanId":0,"ZoneMode":"String","ZoneName":"String","ZoneCount":0,"HasBookingPage":false,"HasRateConfig":false,"VehicleFacts":{"String":"String"}}},"Issues":[{"Key":"String","Section":"String","Message":"String"}],"Changes":[{"Key":"String","Section":"String","Label":"String","From":"String","To":"String"}],"Preview":{"DeadlineTitle":"String","DeadlineLead":"String","RoomW":"String","LastW":"String","GoW":"String","Zones":[{"K":"String","V":"String","Dot":"String"}],"PaySub":"String","PayRows":[{"K":"String","V":"String","Dot":"String"}],"PayTotal":"String","ProofRows":[{"K":"String","V":"String","Dot":"String"}],"Ping":"String"},"Fleet":[{"EquipmentID":0,"UnitNumber":"String","Name":"String","VehicleType":"String","Unit":"String","Cap":0,"Cold":false,"Status":"String","Assigned":false}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}