Trendsic Platform Service

<back to all web services

CourierProfilesRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/dispatch/courier/profiles
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 CourierProfilesRequest implements IConvertible
{
    CourierProfilesRequest();
    CourierProfilesRequest.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "CourierProfilesRequest";
    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>[]),
    'CourierProfilesRequest': TypeInfo(TypeOf.Class, create:() => CourierProfilesRequest()),
});

Dart CourierProfilesRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/dispatch/courier/profiles HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CourierResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Changes>
    <CourierChange>
      <From>String</From>
      <Key>String</Key>
      <Label>String</Label>
      <Section>String</Section>
      <To>String</To>
    </CourierChange>
  </Changes>
  <Fleet>
    <CourierFleetVehicle>
      <Assigned>false</Assigned>
      <Cap>0</Cap>
      <Cold>false</Cold>
      <EquipmentID>0</EquipmentID>
      <Name>String</Name>
      <Status>String</Status>
      <Unit>String</Unit>
      <UnitNumber>String</UnitNumber>
      <VehicleType>String</VehicleType>
    </CourierFleetVehicle>
  </Fleet>
  <Issues>
    <CourierIssue>
      <Key>String</Key>
      <Message>String</Message>
      <Section>String</Section>
    </CourierIssue>
  </Issues>
  <Preview>
    <DeadlineLead>String</DeadlineLead>
    <DeadlineTitle>String</DeadlineTitle>
    <GoW>String</GoW>
    <LastW>String</LastW>
    <PayRows>
      <CourierPreviewLine>
        <Dot>String</Dot>
        <K>String</K>
        <V>String</V>
      </CourierPreviewLine>
    </PayRows>
    <PaySub>String</PaySub>
    <PayTotal>String</PayTotal>
    <Ping>String</Ping>
    <ProofRows>
      <CourierPreviewLine>
        <Dot>String</Dot>
        <K>String</K>
        <V>String</V>
      </CourierPreviewLine>
    </ProofRows>
    <RoomW>String</RoomW>
    <Zones>
      <CourierPreviewLine>
        <Dot>String</Dot>
        <K>String</K>
        <V>String</V>
      </CourierPreviewLine>
    </Zones>
  </Preview>
  <Profile>
    <Booking>
      <Asap>false</Asap>
      <Close>String</Close>
      <DriveBufferMin>0</DriveBufferMin>
      <MinLeadMin>0</MinLeadMin>
      <On>false</On>
      <Open>String</Open>
      <PayTiming>String</PayTiming>
      <Recurring>false</Recurring>
      <Slug>String</Slug>
      <Zips xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </Zips>
    </Booking>
    <BusinessName>String</BusinessName>
    <Code>String</Code>
    <Context>
      <Drivers>0</Drivers>
      <HasBookingPage>false</HasBookingPage>
      <HasRateConfig>false</HasRateConfig>
      <PayPlanId>0</PayPlanId>
      <ProfileCount>0</ProfileCount>
      <VehicleFacts xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </VehicleFacts>
      <ZoneCount>0</ZoneCount>
      <ZoneMode>String</ZoneMode>
      <ZoneName>String</ZoneName>
    </Context>
    <CourierProfileID>0</CourierProfileID>
    <Dispatch>
      <DeclinePenalty>false</DeclinePenalty>
      <GoMin>0</GoMin>
      <LastMin>0</LastMin>
      <MarginMin>0</MarginMin>
      <NearFull>0</NearFull>
      <NextRule>String</NextRule>
      <PingSecs>0</PingSecs>
      <RadiusMi>0</RadiusMi>
      <TrafficSource>String</TrafficSource>
    </Dispatch>
    <Enabled>false</Enabled>
    <Facilities>
      <CourierFacilityView>
        <Address>String</Address>
        <Code>String</Code>
        <Holidays xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </Holidays>
        <IntakeMin>0</IntakeMin>
        <Levels>
          <CourierLevelView>
            <Code>String</Code>
            <Days xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:int>0</d7p1:int>
            </Days>
            <InBy>String</InBy>
            <IsOn>false</IsOn>
            <Name>String</Name>
            <Ready>String</Ready>
            <WithinMin>0</WithinMin>
          </CourierLevelView>
        </Levels>
        <Name>String</Name>
      </CourierFacilityView>
    </Facilities>
    <FacilityNoun>String</FacilityNoun>
    <FacilityNounEs>String</FacilityNounEs>
    <Missed>
      <AutoRebook>false</AutoRebook>
      <CancelFee>0</CancelFee>
      <Fee>0</Fee>
      <RequireContact>false</RequireContact>
      <RequirePhoto>false</RequirePhoto>
      <WaitMin>0</WaitMin>
    </Missed>
    <Name>String</Name>
    <Pay>
      <MileageOn>false</MileageOn>
      <MinPerJob>0</MinPerJob>
      <PerCancel>0</PerCancel>
      <PerMile>0</PerMile>
      <PerMissed>0</PerMissed>
      <PerPickup>0</PerPickup>
      <PerStop>0</PerStop>
      <TipsPct>0</TipsPct>
      <WaitAfterMin>0</WaitAfterMin>
      <WaitPerMin>0</WaitPerMin>
      <WorkerClass>String</WorkerClass>
    </Pay>
    <Pricing>
      <Base>0</Base>
      <FinalAfterCount>false</FinalAfterCount>
      <MinOrder>0</MinOrder>
      <PerMile>0</PerMile>
      <PerUnit>0</PerUnit>
      <ServiceArea xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </ServiceArea>
      <Surcharges xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringdecimal>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>0</d4p1:Value>
        </d4p1:KeyValueOfstringdecimal>
      </Surcharges>
      <TaxPct>0</TaxPct>
      <WindowMin>0</WindowMin>
    </Pricing>
    <Privacy>
      <HideAddr>false</HideAddr>
      <LiveEta>false</LiveEta>
      <LockNames>String</LockNames>
      <PhotoDays>0</PhotoDays>
      <ThreadHrs>0</ThreadHrs>
      <Tipping>false</Tipping>
    </Privacy>
    <Proof xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringArrayOfKeyValueOfstringstringty7Ep6D1>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>
          <d3p1:KeyValueOfstringstring>
            <d3p1:Key>String</d3p1:Key>
            <d3p1:Value>String</d3p1:Value>
          </d3p1:KeyValueOfstringstring>
        </d3p1:Value>
      </d3p1:KeyValueOfstringArrayOfKeyValueOfstringstringty7Ep6D1>
    </Proof>
    <RouteShape>String</RouteShape>
    <TagFormats xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>String</d3p1:string>
    </TagFormats>
    <TagMode>String</TagMode>
    <TemplateFrom>String</TemplateFrom>
    <UnitMany>String</UnitMany>
    <UnitManyEs>String</UnitManyEs>
    <UnitOne>String</UnitOne>
    <UnitOneEs>String</UnitOneEs>
    <Vehicles>
      <CourierVehicleView>
        <Cap>0</Cap>
        <Cold>false</Cold>
        <EquipmentID>0</EquipmentID>
        <Name>String</Name>
        <Unit>String</Unit>
        <UnitNumber>String</UnitNumber>
      </CourierVehicleView>
    </Vehicles>
  </Profile>
  <Profiles>
    <CourierProfileSummary>
      <BusinessName>String</BusinessName>
      <Code>String</Code>
      <CourierProfileID>0</CourierProfileID>
      <Drivers>0</Drivers>
      <Enabled>false</Enabled>
      <Name>String</Name>
      <RouteShape>String</RouteShape>
      <TemplateFrom>String</TemplateFrom>
    </CourierProfileSummary>
  </Profiles>
  <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>
  <Templates>
    <CourierTemplateOption>
      <Detail>String</Detail>
      <Key>String</Key>
      <Label>String</Label>
      <RouteShape>String</RouteShape>
    </CourierTemplateOption>
  </Templates>
</CourierResponse>