Trendsic Platform Service

<back to all web services

DispatchTrackRequest

The following routes are available for this service:
GET,OPTIONS/v1/dispatch/track/{Token}/json
import 'package:servicestack/servicestack.dart';

class DispatchTrackStepView implements IConvertible
{
    String? Name;
    DateTime? At;
    bool? Done;
    bool? Current;

    DispatchTrackStepView({this.Name,this.At,this.Done,this.Current});
    DispatchTrackStepView.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        At = JsonConverters.fromJson(json['At'],'DateTime',context!);
        Done = json['Done'];
        Current = json['Current'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'At': JsonConverters.toJson(At,'DateTime',context!),
        'Done': Done,
        'Current': Current
    };

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

class DispatchTrackResponse implements IConvertible
{
    String? Kind;
    String? Code;
    String? What;
    String? FromLoc;
    String? ToLoc;
    int? Bags;
    double? Fare;
    String? PayMode;
    String? CardLast4;
    bool? Charged;
    String? Stage;
    String? Headline;
    String? Sub;
    bool? IsClosed;
    String? Eta;
    String? DriverName;
    String? CustomerName;
    List<DispatchTrackStepView>? Steps = [];
    bool? Expired;
    bool? Invalid;
    ResponseStatus? ResponseStatus;

    DispatchTrackResponse({this.Kind,this.Code,this.What,this.FromLoc,this.ToLoc,this.Bags,this.Fare,this.PayMode,this.CardLast4,this.Charged,this.Stage,this.Headline,this.Sub,this.IsClosed,this.Eta,this.DriverName,this.CustomerName,this.Steps,this.Expired,this.Invalid,this.ResponseStatus});
    DispatchTrackResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Kind = json['Kind'];
        Code = json['Code'];
        What = json['What'];
        FromLoc = json['FromLoc'];
        ToLoc = json['ToLoc'];
        Bags = json['Bags'];
        Fare = JsonConverters.toDouble(json['Fare']);
        PayMode = json['PayMode'];
        CardLast4 = json['CardLast4'];
        Charged = json['Charged'];
        Stage = json['Stage'];
        Headline = json['Headline'];
        Sub = json['Sub'];
        IsClosed = json['IsClosed'];
        Eta = json['Eta'];
        DriverName = json['DriverName'];
        CustomerName = json['CustomerName'];
        Steps = JsonConverters.fromJson(json['Steps'],'List<DispatchTrackStepView>',context!);
        Expired = json['Expired'];
        Invalid = json['Invalid'];
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Kind': Kind,
        'Code': Code,
        'What': What,
        'FromLoc': FromLoc,
        'ToLoc': ToLoc,
        'Bags': Bags,
        'Fare': Fare,
        'PayMode': PayMode,
        'CardLast4': CardLast4,
        'Charged': Charged,
        'Stage': Stage,
        'Headline': Headline,
        'Sub': Sub,
        'IsClosed': IsClosed,
        'Eta': Eta,
        'DriverName': DriverName,
        'CustomerName': CustomerName,
        'Steps': JsonConverters.toJson(Steps,'List<DispatchTrackStepView>',context!),
        'Expired': Expired,
        'Invalid': Invalid,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class DispatchTrackRequest implements IConvertible
{
    String? Token;

    DispatchTrackRequest({this.Token});
    DispatchTrackRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'DispatchTrackStepView': TypeInfo(TypeOf.Class, create:() => DispatchTrackStepView()),
    'DispatchTrackResponse': TypeInfo(TypeOf.Class, create:() => DispatchTrackResponse()),
    'List<DispatchTrackStepView>': TypeInfo(TypeOf.Class, create:() => <DispatchTrackStepView>[]),
    'DispatchTrackRequest': TypeInfo(TypeOf.Class, create:() => DispatchTrackRequest()),
});

Dart DispatchTrackRequest DTOs

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

HTTP + OTHER

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

GET /v1/dispatch/track/{Token}/json HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Kind":"String","Code":"String","What":"String","FromLoc":"String","ToLoc":"String","Bags":0,"Fare":0,"PayMode":"String","CardLast4":"String","Charged":false,"Stage":"String","Headline":"String","Sub":"String","IsClosed":false,"Eta":"String","DriverName":"String","CustomerName":"String","Steps":[{"Name":"String","At":"0001-01-01T00:00:00.0000000","Done":false,"Current":false}],"Expired":false,"Invalid":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}