Trendsic Platform Service

<back to all web services

CustomerAppOrderRequest

The following routes are available for this service:
POST/v1/c/app/orders
import 'package:servicestack/servicestack.dart';

abstract class CustomerAppSessionRequest
{
    String? Slug;
    String? Profile;

    CustomerAppSessionRequest({this.Slug,this.Profile});
    CustomerAppSessionRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Slug = json['Slug'];
        Profile = json['Profile'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Slug': Slug,
        'Profile': Profile
    };

    getTypeName() => "CustomerAppSessionRequest";
    TypeContext? context = _ctx;
}

class CourierTrackBusiness implements IConvertible
{
    String? Name;
    String? Phone;

    CourierTrackBusiness({this.Name,this.Phone});
    CourierTrackBusiness.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        Phone = json['Phone'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'Phone': Phone
    };

    getTypeName() => "CourierTrackBusiness";
    TypeContext? context = _ctx;
}

class CourierBookLevel implements IConvertible
{
    String? Code;
    String? Name;
    String? Ready;
    int? WithinMin;
    String? InBy;
    double? Surcharge;
    List<int>? Days = [];
    int? DeadlineMin;

    CourierBookLevel({this.Code,this.Name,this.Ready,this.WithinMin,this.InBy,this.Surcharge,this.Days,this.DeadlineMin});
    CourierBookLevel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Code = json['Code'];
        Name = json['Name'];
        Ready = json['Ready'];
        WithinMin = json['WithinMin'];
        InBy = json['InBy'];
        Surcharge = JsonConverters.toDouble(json['Surcharge']);
        Days = JsonConverters.fromJson(json['Days'],'List<int>',context!);
        DeadlineMin = json['DeadlineMin'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Code': Code,
        'Name': Name,
        'Ready': Ready,
        'WithinMin': WithinMin,
        'InBy': InBy,
        'Surcharge': Surcharge,
        'Days': JsonConverters.toJson(Days,'List<int>',context!),
        'DeadlineMin': DeadlineMin
    };

    getTypeName() => "CourierBookLevel";
    TypeContext? context = _ctx;
}

class HandoffOptions implements IConvertible
{
    bool? Hand;
    bool? Porch;
    bool? Desk;
    bool? SigRequired;
    bool? IdRequired;
    bool? CodeRequired;

    HandoffOptions({this.Hand,this.Porch,this.Desk,this.SigRequired,this.IdRequired,this.CodeRequired});
    HandoffOptions.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Hand = json['Hand'];
        Porch = json['Porch'];
        Desk = json['Desk'];
        SigRequired = json['SigRequired'];
        IdRequired = json['IdRequired'];
        CodeRequired = json['CodeRequired'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Hand': Hand,
        'Porch': Porch,
        'Desk': Desk,
        'SigRequired': SigRequired,
        'IdRequired': IdRequired,
        'CodeRequired': CodeRequired
    };

    getTypeName() => "HandoffOptions";
    TypeContext? context = _ctx;
}

class CourierBookProfile implements IConvertible
{
    String? Code;
    String? Name;
    String? Shape;
    String? Template;
    String? UnitOne;
    String? UnitMany;
    String? UnitOneEs;
    String? UnitManyEs;
    String? FacilityNoun;
    String? FacilityNounEs;
    String? FacilityName;
    List<CourierBookLevel>? Levels = [];
    bool? Asap;
    bool? Recurring;
    String? PayTiming;
    bool? FinalAfterCount;
    double? CancelFee;
    double? MissedFee;
    int? MissedWaitMin;
    List<String>? ServiceArea = [];
    List<String>? Zips = [];
    HandoffOptions? Handoffs;

    CourierBookProfile({this.Code,this.Name,this.Shape,this.Template,this.UnitOne,this.UnitMany,this.UnitOneEs,this.UnitManyEs,this.FacilityNoun,this.FacilityNounEs,this.FacilityName,this.Levels,this.Asap,this.Recurring,this.PayTiming,this.FinalAfterCount,this.CancelFee,this.MissedFee,this.MissedWaitMin,this.ServiceArea,this.Zips,this.Handoffs});
    CourierBookProfile.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Code = json['Code'];
        Name = json['Name'];
        Shape = json['Shape'];
        Template = json['Template'];
        UnitOne = json['UnitOne'];
        UnitMany = json['UnitMany'];
        UnitOneEs = json['UnitOneEs'];
        UnitManyEs = json['UnitManyEs'];
        FacilityNoun = json['FacilityNoun'];
        FacilityNounEs = json['FacilityNounEs'];
        FacilityName = json['FacilityName'];
        Levels = JsonConverters.fromJson(json['Levels'],'List<CourierBookLevel>',context!);
        Asap = json['Asap'];
        Recurring = json['Recurring'];
        PayTiming = json['PayTiming'];
        FinalAfterCount = json['FinalAfterCount'];
        CancelFee = JsonConverters.toDouble(json['CancelFee']);
        MissedFee = JsonConverters.toDouble(json['MissedFee']);
        MissedWaitMin = json['MissedWaitMin'];
        ServiceArea = JsonConverters.fromJson(json['ServiceArea'],'List<String>',context!);
        Zips = JsonConverters.fromJson(json['Zips'],'List<String>',context!);
        Handoffs = JsonConverters.fromJson(json['Handoffs'],'HandoffOptions',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Code': Code,
        'Name': Name,
        'Shape': Shape,
        'Template': Template,
        'UnitOne': UnitOne,
        'UnitMany': UnitMany,
        'UnitOneEs': UnitOneEs,
        'UnitManyEs': UnitManyEs,
        'FacilityNoun': FacilityNoun,
        'FacilityNounEs': FacilityNounEs,
        'FacilityName': FacilityName,
        'Levels': JsonConverters.toJson(Levels,'List<CourierBookLevel>',context!),
        'Asap': Asap,
        'Recurring': Recurring,
        'PayTiming': PayTiming,
        'FinalAfterCount': FinalAfterCount,
        'CancelFee': CancelFee,
        'MissedFee': MissedFee,
        'MissedWaitMin': MissedWaitMin,
        'ServiceArea': JsonConverters.toJson(ServiceArea,'List<String>',context!),
        'Zips': JsonConverters.toJson(Zips,'List<String>',context!),
        'Handoffs': JsonConverters.toJson(Handoffs,'HandoffOptions',context!)
    };

    getTypeName() => "CourierBookProfile";
    TypeContext? context = _ctx;
}

class CourierBookProfileLink implements IConvertible
{
    String? Code;
    String? Name;
    String? Shape;

    CourierBookProfileLink({this.Code,this.Name,this.Shape});
    CourierBookProfileLink.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Code = json['Code'];
        Name = json['Name'];
        Shape = json['Shape'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Code': Code,
        'Name': Name,
        'Shape': Shape
    };

    getTypeName() => "CourierBookProfileLink";
    TypeContext? context = _ctx;
}

class CourierBookPageView implements IConvertible
{
    bool? Available;
    bool? BookingOn;
    CourierTrackBusiness? Business;
    CourierBookProfile? Profile;
    List<CourierBookProfileLink>? Profiles = [];
    bool? CardEnabled;
    String? PublishableKey;
    String? AppUrl;
    String? Today;
    int? Weekday;
    int? NowMin;

    CourierBookPageView({this.Available,this.BookingOn,this.Business,this.Profile,this.Profiles,this.CardEnabled,this.PublishableKey,this.AppUrl,this.Today,this.Weekday,this.NowMin});
    CourierBookPageView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Available = json['Available'];
        BookingOn = json['BookingOn'];
        Business = JsonConverters.fromJson(json['Business'],'CourierTrackBusiness',context!);
        Profile = JsonConverters.fromJson(json['Profile'],'CourierBookProfile',context!);
        Profiles = JsonConverters.fromJson(json['Profiles'],'List<CourierBookProfileLink>',context!);
        CardEnabled = json['CardEnabled'];
        PublishableKey = json['PublishableKey'];
        AppUrl = json['AppUrl'];
        Today = json['Today'];
        Weekday = json['Weekday'];
        NowMin = json['NowMin'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Available': Available,
        'BookingOn': BookingOn,
        'Business': JsonConverters.toJson(Business,'CourierTrackBusiness',context!),
        'Profile': JsonConverters.toJson(Profile,'CourierBookProfile',context!),
        'Profiles': JsonConverters.toJson(Profiles,'List<CourierBookProfileLink>',context!),
        'CardEnabled': CardEnabled,
        'PublishableKey': PublishableKey,
        'AppUrl': AppUrl,
        'Today': Today,
        'Weekday': Weekday,
        'NowMin': NowMin
    };

    getTypeName() => "CourierBookPageView";
    TypeContext? context = _ctx;
}

class CustomerAppBoot implements IConvertible
{
    String? Profile;
    bool? Available;
    String? Reason;
    String? AuthMethod;
    String? Slug;
    CourierBookPageView? Page;
    String? ManifestUrl;

    CustomerAppBoot({this.Profile,this.Available,this.Reason,this.AuthMethod,this.Slug,this.Page,this.ManifestUrl});
    CustomerAppBoot.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Profile = json['Profile'];
        Available = json['Available'];
        Reason = json['Reason'];
        AuthMethod = json['AuthMethod'];
        Slug = json['Slug'];
        Page = JsonConverters.fromJson(json['Page'],'CourierBookPageView',context!);
        ManifestUrl = json['ManifestUrl'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Profile': Profile,
        'Available': Available,
        'Reason': Reason,
        'AuthMethod': AuthMethod,
        'Slug': Slug,
        'Page': JsonConverters.toJson(Page,'CourierBookPageView',context!),
        'ManifestUrl': ManifestUrl
    };

    getTypeName() => "CustomerAppBoot";
    TypeContext? context = _ctx;
}

class CustomerAppAddress implements IConvertible
{
    int? Id;
    String? Label;
    String? Street;
    String? Unit;
    String? City;
    String? Zip;
    double? Lat;
    double? Lng;
    bool? InArea;

    CustomerAppAddress({this.Id,this.Label,this.Street,this.Unit,this.City,this.Zip,this.Lat,this.Lng,this.InArea});
    CustomerAppAddress.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Label = json['Label'];
        Street = json['Street'];
        Unit = json['Unit'];
        City = json['City'];
        Zip = json['Zip'];
        Lat = JsonConverters.toDouble(json['Lat']);
        Lng = JsonConverters.toDouble(json['Lng']);
        InArea = json['InArea'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Label': Label,
        'Street': Street,
        'Unit': Unit,
        'City': City,
        'Zip': Zip,
        'Lat': Lat,
        'Lng': Lng,
        'InArea': InArea
    };

    getTypeName() => "CustomerAppAddress";
    TypeContext? context = _ctx;
}

class CustomerAppCard implements IConvertible
{
    int? Id;
    String? Label;
    String? Brand;
    String? Last4;
    bool? IsDefault;

    CustomerAppCard({this.Id,this.Label,this.Brand,this.Last4,this.IsDefault});
    CustomerAppCard.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Label = json['Label'];
        Brand = json['Brand'];
        Last4 = json['Last4'];
        IsDefault = json['IsDefault'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Label': Label,
        'Brand': Brand,
        'Last4': Last4,
        'IsDefault': IsDefault
    };

    getTypeName() => "CustomerAppCard";
    TypeContext? context = _ctx;
}

class CustomerAppNotif implements IConvertible
{
    bool? Texts;
    bool? Push;
    bool? Promos;

    CustomerAppNotif({this.Texts,this.Push,this.Promos});
    CustomerAppNotif.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Texts = json['Texts'];
        Push = json['Push'];
        Promos = json['Promos'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Texts': Texts,
        'Push': Push,
        'Promos': Promos
    };

    getTypeName() => "CustomerAppNotif";
    TypeContext? context = _ctx;
}

class CustomerAppStep implements IConvertible
{
    String? Key;
    bool? Done;
    String? Time;

    CustomerAppStep({this.Key,this.Done,this.Time});
    CustomerAppStep.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Key = json['Key'];
        Done = json['Done'];
        Time = json['Time'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Key': Key,
        'Done': Done,
        'Time': Time
    };

    getTypeName() => "CustomerAppStep";
    TypeContext? context = _ctx;
}

class CustomerAppOrder implements IConvertible
{
    int? Id;
    String? Code;
    String? Status;
    String? State;
    bool? Active;
    String? LevelCode;
    String? LevelName;
    int? Units;
    int? UnitsFound;
    String? Address;
    String? Unit;
    String? Zip;
    String? DropAddress;
    String? RecipientName;
    String? Handoff;
    bool? IsAsap;
    int? DayIx;
    String? DateText;
    int? StartMin;
    int? EndMin;
    String? DriverFirstName;
    int? EtaMin;
    String? Promise;
    String? PayMode;
    double? Amount;
    double? Charged;
    double? Tip;
    String? CardLast4;
    int? RecurrenceId;
    List<CustomerAppStep>? Steps = [];

    CustomerAppOrder({this.Id,this.Code,this.Status,this.State,this.Active,this.LevelCode,this.LevelName,this.Units,this.UnitsFound,this.Address,this.Unit,this.Zip,this.DropAddress,this.RecipientName,this.Handoff,this.IsAsap,this.DayIx,this.DateText,this.StartMin,this.EndMin,this.DriverFirstName,this.EtaMin,this.Promise,this.PayMode,this.Amount,this.Charged,this.Tip,this.CardLast4,this.RecurrenceId,this.Steps});
    CustomerAppOrder.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Code = json['Code'];
        Status = json['Status'];
        State = json['State'];
        Active = json['Active'];
        LevelCode = json['LevelCode'];
        LevelName = json['LevelName'];
        Units = json['Units'];
        UnitsFound = json['UnitsFound'];
        Address = json['Address'];
        Unit = json['Unit'];
        Zip = json['Zip'];
        DropAddress = json['DropAddress'];
        RecipientName = json['RecipientName'];
        Handoff = json['Handoff'];
        IsAsap = json['IsAsap'];
        DayIx = json['DayIx'];
        DateText = json['DateText'];
        StartMin = json['StartMin'];
        EndMin = json['EndMin'];
        DriverFirstName = json['DriverFirstName'];
        EtaMin = json['EtaMin'];
        Promise = json['Promise'];
        PayMode = json['PayMode'];
        Amount = JsonConverters.toDouble(json['Amount']);
        Charged = JsonConverters.toDouble(json['Charged']);
        Tip = JsonConverters.toDouble(json['Tip']);
        CardLast4 = json['CardLast4'];
        RecurrenceId = json['RecurrenceId'];
        Steps = JsonConverters.fromJson(json['Steps'],'List<CustomerAppStep>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Code': Code,
        'Status': Status,
        'State': State,
        'Active': Active,
        'LevelCode': LevelCode,
        'LevelName': LevelName,
        'Units': Units,
        'UnitsFound': UnitsFound,
        'Address': Address,
        'Unit': Unit,
        'Zip': Zip,
        'DropAddress': DropAddress,
        'RecipientName': RecipientName,
        'Handoff': Handoff,
        'IsAsap': IsAsap,
        'DayIx': DayIx,
        'DateText': DateText,
        'StartMin': StartMin,
        'EndMin': EndMin,
        'DriverFirstName': DriverFirstName,
        'EtaMin': EtaMin,
        'Promise': Promise,
        'PayMode': PayMode,
        'Amount': Amount,
        'Charged': Charged,
        'Tip': Tip,
        'CardLast4': CardLast4,
        'RecurrenceId': RecurrenceId,
        'Steps': JsonConverters.toJson(Steps,'List<CustomerAppStep>',context!)
    };

    getTypeName() => "CustomerAppOrder";
    TypeContext? context = _ctx;
}

class CustomerAppRecurrence implements IConvertible
{
    int? Id;
    int? Weekday;
    int? StartMin;
    int? EndMin;
    String? Cadence;
    String? LevelCode;
    int? Units;
    String? Handoff;
    String? Address;
    bool? Paused;
    String? PayMode;
    String? CardLast4;
    String? NextDate;
    String? SkippedDate;
    int? AheadDays;

    CustomerAppRecurrence({this.Id,this.Weekday,this.StartMin,this.EndMin,this.Cadence,this.LevelCode,this.Units,this.Handoff,this.Address,this.Paused,this.PayMode,this.CardLast4,this.NextDate,this.SkippedDate,this.AheadDays});
    CustomerAppRecurrence.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Weekday = json['Weekday'];
        StartMin = json['StartMin'];
        EndMin = json['EndMin'];
        Cadence = json['Cadence'];
        LevelCode = json['LevelCode'];
        Units = json['Units'];
        Handoff = json['Handoff'];
        Address = json['Address'];
        Paused = json['Paused'];
        PayMode = json['PayMode'];
        CardLast4 = json['CardLast4'];
        NextDate = json['NextDate'];
        SkippedDate = json['SkippedDate'];
        AheadDays = json['AheadDays'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Weekday': Weekday,
        'StartMin': StartMin,
        'EndMin': EndMin,
        'Cadence': Cadence,
        'LevelCode': LevelCode,
        'Units': Units,
        'Handoff': Handoff,
        'Address': Address,
        'Paused': Paused,
        'PayMode': PayMode,
        'CardLast4': CardLast4,
        'NextDate': NextDate,
        'SkippedDate': SkippedDate,
        'AheadDays': AheadDays
    };

    getTypeName() => "CustomerAppRecurrence";
    TypeContext? context = _ctx;
}

class CustomerAppInvoice implements IConvertible
{
    String? Uid;
    String? Number;
    String? DateText;
    double? Total;
    double? Balance;
    bool? Paid;

    CustomerAppInvoice({this.Uid,this.Number,this.DateText,this.Total,this.Balance,this.Paid});
    CustomerAppInvoice.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Uid = json['Uid'];
        Number = json['Number'];
        DateText = json['DateText'];
        Total = JsonConverters.toDouble(json['Total']);
        Balance = JsonConverters.toDouble(json['Balance']);
        Paid = json['Paid'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Uid': Uid,
        'Number': Number,
        'DateText': DateText,
        'Total': Total,
        'Balance': Balance,
        'Paid': Paid
    };

    getTypeName() => "CustomerAppInvoice";
    TypeContext? context = _ctx;
}

class CustomerAppMe implements IConvertible
{
    int? ContactId;
    String? FirstName;
    String? LastName;
    String? Name;
    String? Phone;
    bool? NeedsName;
    String? BillingMode;
    String? AccountCode;
    List<CustomerAppAddress>? Addresses = [];
    List<CustomerAppCard>? Cards = [];
    CustomerAppNotif? Notif;
    List<CustomerAppOrder>? Orders = [];
    List<CustomerAppRecurrence>? Recurring = [];
    List<CustomerAppInvoice>? Invoices = [];
    String? Today;
    int? NowMin;

    CustomerAppMe({this.ContactId,this.FirstName,this.LastName,this.Name,this.Phone,this.NeedsName,this.BillingMode,this.AccountCode,this.Addresses,this.Cards,this.Notif,this.Orders,this.Recurring,this.Invoices,this.Today,this.NowMin});
    CustomerAppMe.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ContactId = json['ContactId'];
        FirstName = json['FirstName'];
        LastName = json['LastName'];
        Name = json['Name'];
        Phone = json['Phone'];
        NeedsName = json['NeedsName'];
        BillingMode = json['BillingMode'];
        AccountCode = json['AccountCode'];
        Addresses = JsonConverters.fromJson(json['Addresses'],'List<CustomerAppAddress>',context!);
        Cards = JsonConverters.fromJson(json['Cards'],'List<CustomerAppCard>',context!);
        Notif = JsonConverters.fromJson(json['Notif'],'CustomerAppNotif',context!);
        Orders = JsonConverters.fromJson(json['Orders'],'List<CustomerAppOrder>',context!);
        Recurring = JsonConverters.fromJson(json['Recurring'],'List<CustomerAppRecurrence>',context!);
        Invoices = JsonConverters.fromJson(json['Invoices'],'List<CustomerAppInvoice>',context!);
        Today = json['Today'];
        NowMin = json['NowMin'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ContactId': ContactId,
        'FirstName': FirstName,
        'LastName': LastName,
        'Name': Name,
        'Phone': Phone,
        'NeedsName': NeedsName,
        'BillingMode': BillingMode,
        'AccountCode': AccountCode,
        'Addresses': JsonConverters.toJson(Addresses,'List<CustomerAppAddress>',context!),
        'Cards': JsonConverters.toJson(Cards,'List<CustomerAppCard>',context!),
        'Notif': JsonConverters.toJson(Notif,'CustomerAppNotif',context!),
        'Orders': JsonConverters.toJson(Orders,'List<CustomerAppOrder>',context!),
        'Recurring': JsonConverters.toJson(Recurring,'List<CustomerAppRecurrence>',context!),
        'Invoices': JsonConverters.toJson(Invoices,'List<CustomerAppInvoice>',context!),
        'Today': Today,
        'NowMin': NowMin
    };

    getTypeName() => "CustomerAppMe";
    TypeContext? context = _ctx;
}

class CourierBookOrderResponse implements IConvertible
{
    bool? Done;
    bool? NeedsAction;
    String? ClientSecret;
    String? SetupIntentId;
    String? Code;
    String? TrackUrl;
    String? IcsUrl;
    String? WindowText;
    String? Promise;
    double? Total;
    String? PayTiming;
    String? CardLast4;
    String? Repeats;
    String? LinkSentBy;
    String? ReopenStep;
    ResponseStatus? ResponseStatus;

    CourierBookOrderResponse({this.Done,this.NeedsAction,this.ClientSecret,this.SetupIntentId,this.Code,this.TrackUrl,this.IcsUrl,this.WindowText,this.Promise,this.Total,this.PayTiming,this.CardLast4,this.Repeats,this.LinkSentBy,this.ReopenStep,this.ResponseStatus});
    CourierBookOrderResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Done = json['Done'];
        NeedsAction = json['NeedsAction'];
        ClientSecret = json['ClientSecret'];
        SetupIntentId = json['SetupIntentId'];
        Code = json['Code'];
        TrackUrl = json['TrackUrl'];
        IcsUrl = json['IcsUrl'];
        WindowText = json['WindowText'];
        Promise = json['Promise'];
        Total = JsonConverters.toDouble(json['Total']);
        PayTiming = json['PayTiming'];
        CardLast4 = json['CardLast4'];
        Repeats = json['Repeats'];
        LinkSentBy = json['LinkSentBy'];
        ReopenStep = json['ReopenStep'];
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Done': Done,
        'NeedsAction': NeedsAction,
        'ClientSecret': ClientSecret,
        'SetupIntentId': SetupIntentId,
        'Code': Code,
        'TrackUrl': TrackUrl,
        'IcsUrl': IcsUrl,
        'WindowText': WindowText,
        'Promise': Promise,
        'Total': Total,
        'PayTiming': PayTiming,
        'CardLast4': CardLast4,
        'Repeats': Repeats,
        'LinkSentBy': LinkSentBy,
        'ReopenStep': ReopenStep,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "CourierBookOrderResponse";
    TypeContext? context = _ctx;
}

class CourierCustomerRow implements IConvertible
{
    int? ContactId;
    String? Name;
    String? Phone;
    String? BillingMode;
    String? AccountCode;
    int? Orders;
    DateTime? LastOrderAt;
    int? Unbilled;
    double? UnbilledAmount;
    int? Cards;

    CourierCustomerRow({this.ContactId,this.Name,this.Phone,this.BillingMode,this.AccountCode,this.Orders,this.LastOrderAt,this.Unbilled,this.UnbilledAmount,this.Cards});
    CourierCustomerRow.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ContactId = json['ContactId'];
        Name = json['Name'];
        Phone = json['Phone'];
        BillingMode = json['BillingMode'];
        AccountCode = json['AccountCode'];
        Orders = json['Orders'];
        LastOrderAt = JsonConverters.fromJson(json['LastOrderAt'],'DateTime',context!);
        Unbilled = json['Unbilled'];
        UnbilledAmount = JsonConverters.toDouble(json['UnbilledAmount']);
        Cards = json['Cards'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ContactId': ContactId,
        'Name': Name,
        'Phone': Phone,
        'BillingMode': BillingMode,
        'AccountCode': AccountCode,
        'Orders': Orders,
        'LastOrderAt': JsonConverters.toJson(LastOrderAt,'DateTime',context!),
        'Unbilled': Unbilled,
        'UnbilledAmount': UnbilledAmount,
        'Cards': Cards
    };

    getTypeName() => "CourierCustomerRow";
    TypeContext? context = _ctx;
}

class RunResult implements IConvertible
{
    int? Invoices;
    int? Orders;
    double? Total;
    List<String>? Skipped = [];

    RunResult({this.Invoices,this.Orders,this.Total,this.Skipped});
    RunResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Invoices = json['Invoices'];
        Orders = json['Orders'];
        Total = JsonConverters.toDouble(json['Total']);
        Skipped = JsonConverters.fromJson(json['Skipped'],'List<String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Invoices': Invoices,
        'Orders': Orders,
        'Total': Total,
        'Skipped': JsonConverters.toJson(Skipped,'List<String>',context!)
    };

    getTypeName() => "RunResult";
    TypeContext? context = _ctx;
}

class CustomerAppResponse implements IConvertible
{
    CustomerAppBoot? Boot;
    CustomerAppMe? Customer;
    List<CustomerAppAddress>? Addresses = [];
    List<CustomerAppCard>? Cards = [];
    CustomerAppNotif? Notif;
    List<CustomerAppRecurrence>? Recurring = [];
    CourierBookOrderResponse? Booked;
    bool? Sent;
    String? Token;
    bool? NeedsName;
    String? Name;
    String? Url;
    String? ClientSecret;
    String? PublishableKey;
    String? Message;
    String? ReopenStep;
    List<CourierCustomerRow>? Customers = [];
    RunResult? Run;
    ResponseStatus? ResponseStatus;

    CustomerAppResponse({this.Boot,this.Customer,this.Addresses,this.Cards,this.Notif,this.Recurring,this.Booked,this.Sent,this.Token,this.NeedsName,this.Name,this.Url,this.ClientSecret,this.PublishableKey,this.Message,this.ReopenStep,this.Customers,this.Run,this.ResponseStatus});
    CustomerAppResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Boot = JsonConverters.fromJson(json['Boot'],'CustomerAppBoot',context!);
        Customer = JsonConverters.fromJson(json['Customer'],'CustomerAppMe',context!);
        Addresses = JsonConverters.fromJson(json['Addresses'],'List<CustomerAppAddress>',context!);
        Cards = JsonConverters.fromJson(json['Cards'],'List<CustomerAppCard>',context!);
        Notif = JsonConverters.fromJson(json['Notif'],'CustomerAppNotif',context!);
        Recurring = JsonConverters.fromJson(json['Recurring'],'List<CustomerAppRecurrence>',context!);
        Booked = JsonConverters.fromJson(json['Booked'],'CourierBookOrderResponse',context!);
        Sent = json['Sent'];
        Token = json['Token'];
        NeedsName = json['NeedsName'];
        Name = json['Name'];
        Url = json['Url'];
        ClientSecret = json['ClientSecret'];
        PublishableKey = json['PublishableKey'];
        Message = json['Message'];
        ReopenStep = json['ReopenStep'];
        Customers = JsonConverters.fromJson(json['Customers'],'List<CourierCustomerRow>',context!);
        Run = JsonConverters.fromJson(json['Run'],'RunResult',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Boot': JsonConverters.toJson(Boot,'CustomerAppBoot',context!),
        'Customer': JsonConverters.toJson(Customer,'CustomerAppMe',context!),
        'Addresses': JsonConverters.toJson(Addresses,'List<CustomerAppAddress>',context!),
        'Cards': JsonConverters.toJson(Cards,'List<CustomerAppCard>',context!),
        'Notif': JsonConverters.toJson(Notif,'CustomerAppNotif',context!),
        'Recurring': JsonConverters.toJson(Recurring,'List<CustomerAppRecurrence>',context!),
        'Booked': JsonConverters.toJson(Booked,'CourierBookOrderResponse',context!),
        'Sent': Sent,
        'Token': Token,
        'NeedsName': NeedsName,
        'Name': Name,
        'Url': Url,
        'ClientSecret': ClientSecret,
        'PublishableKey': PublishableKey,
        'Message': Message,
        'ReopenStep': ReopenStep,
        'Customers': JsonConverters.toJson(Customers,'List<CourierCustomerRow>',context!),
        'Run': JsonConverters.toJson(Run,'RunResult',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "CustomerAppResponse";
    TypeContext? context = _ctx;
}

class CustomerAppOrderRequest extends CustomerAppSessionRequest implements IConvertible
{
    String? Level;
    String? WindowId;
    String? Recur;
    int? AddressId;
    int? DropAddressId;
    String? RecipientName;
    int? Units;
    String? Handoff;
    String? GateCode;
    String? Note;
    int? CardId;
    double? QuotedTotal;
    String? Lang;

    CustomerAppOrderRequest({this.Level,this.WindowId,this.Recur,this.AddressId,this.DropAddressId,this.RecipientName,this.Units,this.Handoff,this.GateCode,this.Note,this.CardId,this.QuotedTotal,this.Lang});
    CustomerAppOrderRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Level = json['Level'];
        WindowId = json['WindowId'];
        Recur = json['Recur'];
        AddressId = json['AddressId'];
        DropAddressId = json['DropAddressId'];
        RecipientName = json['RecipientName'];
        Units = json['Units'];
        Handoff = json['Handoff'];
        GateCode = json['GateCode'];
        Note = json['Note'];
        CardId = json['CardId'];
        QuotedTotal = JsonConverters.toDouble(json['QuotedTotal']);
        Lang = json['Lang'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Level': Level,
        'WindowId': WindowId,
        'Recur': Recur,
        'AddressId': AddressId,
        'DropAddressId': DropAddressId,
        'RecipientName': RecipientName,
        'Units': Units,
        'Handoff': Handoff,
        'GateCode': GateCode,
        'Note': Note,
        'CardId': CardId,
        'QuotedTotal': QuotedTotal,
        'Lang': Lang
    });

    getTypeName() => "CustomerAppOrderRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'CustomerAppSessionRequest': TypeInfo(TypeOf.AbstractClass),
    'CourierTrackBusiness': TypeInfo(TypeOf.Class, create:() => CourierTrackBusiness()),
    'CourierBookLevel': TypeInfo(TypeOf.Class, create:() => CourierBookLevel()),
    'HandoffOptions': TypeInfo(TypeOf.Class, create:() => HandoffOptions()),
    'CourierBookProfile': TypeInfo(TypeOf.Class, create:() => CourierBookProfile()),
    'List<CourierBookLevel>': TypeInfo(TypeOf.Class, create:() => <CourierBookLevel>[]),
    'CourierBookProfileLink': TypeInfo(TypeOf.Class, create:() => CourierBookProfileLink()),
    'CourierBookPageView': TypeInfo(TypeOf.Class, create:() => CourierBookPageView()),
    'List<CourierBookProfileLink>': TypeInfo(TypeOf.Class, create:() => <CourierBookProfileLink>[]),
    'CustomerAppBoot': TypeInfo(TypeOf.Class, create:() => CustomerAppBoot()),
    'CustomerAppAddress': TypeInfo(TypeOf.Class, create:() => CustomerAppAddress()),
    'CustomerAppCard': TypeInfo(TypeOf.Class, create:() => CustomerAppCard()),
    'CustomerAppNotif': TypeInfo(TypeOf.Class, create:() => CustomerAppNotif()),
    'CustomerAppStep': TypeInfo(TypeOf.Class, create:() => CustomerAppStep()),
    'CustomerAppOrder': TypeInfo(TypeOf.Class, create:() => CustomerAppOrder()),
    'List<CustomerAppStep>': TypeInfo(TypeOf.Class, create:() => <CustomerAppStep>[]),
    'CustomerAppRecurrence': TypeInfo(TypeOf.Class, create:() => CustomerAppRecurrence()),
    'CustomerAppInvoice': TypeInfo(TypeOf.Class, create:() => CustomerAppInvoice()),
    'CustomerAppMe': TypeInfo(TypeOf.Class, create:() => CustomerAppMe()),
    'List<CustomerAppAddress>': TypeInfo(TypeOf.Class, create:() => <CustomerAppAddress>[]),
    'List<CustomerAppCard>': TypeInfo(TypeOf.Class, create:() => <CustomerAppCard>[]),
    'List<CustomerAppOrder>': TypeInfo(TypeOf.Class, create:() => <CustomerAppOrder>[]),
    'List<CustomerAppRecurrence>': TypeInfo(TypeOf.Class, create:() => <CustomerAppRecurrence>[]),
    'List<CustomerAppInvoice>': TypeInfo(TypeOf.Class, create:() => <CustomerAppInvoice>[]),
    'CourierBookOrderResponse': TypeInfo(TypeOf.Class, create:() => CourierBookOrderResponse()),
    'CourierCustomerRow': TypeInfo(TypeOf.Class, create:() => CourierCustomerRow()),
    'RunResult': TypeInfo(TypeOf.Class, create:() => RunResult()),
    'CustomerAppResponse': TypeInfo(TypeOf.Class, create:() => CustomerAppResponse()),
    'List<CourierCustomerRow>': TypeInfo(TypeOf.Class, create:() => <CourierCustomerRow>[]),
    'CustomerAppOrderRequest': TypeInfo(TypeOf.Class, create:() => CustomerAppOrderRequest()),
});

Dart CustomerAppOrderRequest DTOs

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

HTTP + JSV

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

POST /v1/c/app/orders HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Level: String,
	WindowId: String,
	Recur: String,
	AddressId: 0,
	DropAddressId: 0,
	RecipientName: String,
	Units: 0,
	Handoff: String,
	GateCode: String,
	Note: String,
	CardId: 0,
	QuotedTotal: 0,
	Lang: String,
	Slug: String,
	Profile: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Boot: 
	{
		Profile: String,
		Available: False,
		Reason: String,
		AuthMethod: String,
		Slug: String,
		Page: 
		{
			Available: False,
			BookingOn: False,
			Business: 
			{
				Name: String,
				Phone: String
			},
			Profile: 
			{
				Code: String,
				Name: String,
				Shape: String,
				Template: String,
				UnitOne: String,
				UnitMany: String,
				UnitOneEs: String,
				UnitManyEs: String,
				FacilityNoun: String,
				FacilityNounEs: String,
				FacilityName: String,
				Levels: 
				[
					{
						Code: String,
						Name: String,
						Ready: String,
						WithinMin: 0,
						InBy: String,
						Surcharge: 0,
						Days: 
						[
							0
						],
						DeadlineMin: 0
					}
				],
				Asap: False,
				Recurring: False,
				PayTiming: String,
				FinalAfterCount: False,
				CancelFee: 0,
				MissedFee: 0,
				MissedWaitMin: 0,
				ServiceArea: 
				[
					String
				],
				Zips: 
				[
					String
				],
				Handoffs: 
				{
					Hand: False,
					Porch: False,
					Desk: False,
					SigRequired: False,
					IdRequired: False,
					CodeRequired: False
				}
			},
			Profiles: 
			[
				{
					Code: String,
					Name: String,
					Shape: String
				}
			],
			CardEnabled: False,
			PublishableKey: String,
			AppUrl: String,
			Today: String,
			Weekday: 0,
			NowMin: 0
		},
		ManifestUrl: String
	},
	Customer: 
	{
		ContactId: 0,
		FirstName: String,
		LastName: String,
		Name: String,
		Phone: String,
		NeedsName: False,
		BillingMode: String,
		AccountCode: String,
		Addresses: 
		[
			{
				Id: 0,
				Label: String,
				Street: String,
				Unit: String,
				City: String,
				Zip: String,
				Lat: 0,
				Lng: 0,
				InArea: False
			}
		],
		Cards: 
		[
			{
				Id: 0,
				Label: String,
				Brand: String,
				Last4: String,
				IsDefault: False
			}
		],
		Notif: 
		{
			Texts: False,
			Push: False,
			Promos: False
		},
		Orders: 
		[
			{
				Id: 0,
				Code: String,
				Status: String,
				State: String,
				Active: False,
				LevelCode: String,
				LevelName: String,
				Units: 0,
				UnitsFound: 0,
				Address: String,
				Unit: String,
				Zip: String,
				DropAddress: String,
				RecipientName: String,
				Handoff: String,
				IsAsap: False,
				DayIx: 0,
				DateText: String,
				StartMin: 0,
				EndMin: 0,
				DriverFirstName: String,
				EtaMin: 0,
				Promise: String,
				PayMode: String,
				Amount: 0,
				Charged: 0,
				Tip: 0,
				CardLast4: String,
				RecurrenceId: 0,
				Steps: 
				[
					{
						Key: String,
						Done: False,
						Time: String
					}
				]
			}
		],
		Recurring: 
		[
			{
				Id: 0,
				Weekday: 0,
				StartMin: 0,
				EndMin: 0,
				Cadence: String,
				LevelCode: String,
				Units: 0,
				Handoff: String,
				Address: String,
				Paused: False,
				PayMode: String,
				CardLast4: String,
				NextDate: String,
				SkippedDate: String,
				AheadDays: 0
			}
		],
		Invoices: 
		[
			{
				Uid: 00000000000000000000000000000000,
				Number: String,
				DateText: String,
				Total: 0,
				Balance: 0,
				Paid: False
			}
		],
		Today: String,
		NowMin: 0
	},
	Addresses: 
	[
		{
			Id: 0,
			Label: String,
			Street: String,
			Unit: String,
			City: String,
			Zip: String,
			Lat: 0,
			Lng: 0,
			InArea: False
		}
	],
	Cards: 
	[
		{
			Id: 0,
			Label: String,
			Brand: String,
			Last4: String,
			IsDefault: False
		}
	],
	Notif: 
	{
		Texts: False,
		Push: False,
		Promos: False
	},
	Recurring: 
	[
		{
			Id: 0,
			Weekday: 0,
			StartMin: 0,
			EndMin: 0,
			Cadence: String,
			LevelCode: String,
			Units: 0,
			Handoff: String,
			Address: String,
			Paused: False,
			PayMode: String,
			CardLast4: String,
			NextDate: String,
			SkippedDate: String,
			AheadDays: 0
		}
	],
	Booked: 
	{
		Done: False,
		NeedsAction: False,
		ClientSecret: String,
		SetupIntentId: String,
		Code: String,
		TrackUrl: String,
		IcsUrl: String,
		WindowText: String,
		Promise: String,
		Total: 0,
		PayTiming: String,
		CardLast4: String,
		Repeats: String,
		LinkSentBy: String,
		ReopenStep: String,
		ResponseStatus: 
		{
			ErrorCode: String,
			Message: String,
			StackTrace: String,
			Errors: 
			[
				{
					ErrorCode: String,
					FieldName: String,
					Message: String,
					Meta: 
					{
						String: String
					}
				}
			],
			Meta: 
			{
				String: String
			}
		}
	},
	Sent: False,
	Token: String,
	NeedsName: False,
	Name: String,
	Url: String,
	ClientSecret: String,
	PublishableKey: String,
	Message: String,
	ReopenStep: String,
	Customers: 
	[
		{
			ContactId: 0,
			Name: String,
			Phone: String,
			BillingMode: String,
			AccountCode: String,
			Orders: 0,
			LastOrderAt: 0001-01-01,
			Unbilled: 0,
			UnbilledAmount: 0,
			Cards: 0
		}
	],
	Run: 
	{
		Invoices: 0,
		Orders: 0,
		Total: 0,
		Skipped: 
		[
			String
		]
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}