Trendsic Platform Service

<back to all web services

CheckinTimelineRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/customercheckins/{Id}/timeline
import 'package:servicestack/servicestack.dart';

class SvcVisitRow implements IConvertible
{
    String? CheckinId;
    String? TicketLabel;
    DateTime? LocalDate;
    String? LineId;
    String? ServiceName;
    String? StationId;
    String? StationName;
    String? EmployeeId;
    String? EmployeeName;
    String? CustomerName;
    int? ContactId;
    int? ContactAgentId;
    String? CustomerId;
    bool? IsAppointment;
    DateTime? LocalHere;
    DateTime? LocalCalled;
    DateTime? LocalStart;
    DateTime? LocalEnd;
    int? WaitSec;
    int? ServeSec;
    String? Outcome;
    double? Fee;

    SvcVisitRow({this.CheckinId,this.TicketLabel,this.LocalDate,this.LineId,this.ServiceName,this.StationId,this.StationName,this.EmployeeId,this.EmployeeName,this.CustomerName,this.ContactId,this.ContactAgentId,this.CustomerId,this.IsAppointment,this.LocalHere,this.LocalCalled,this.LocalStart,this.LocalEnd,this.WaitSec,this.ServeSec,this.Outcome,this.Fee});
    SvcVisitRow.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CheckinId = json['CheckinId'];
        TicketLabel = json['TicketLabel'];
        LocalDate = JsonConverters.fromJson(json['LocalDate'],'DateTime',context!);
        LineId = json['LineId'];
        ServiceName = json['ServiceName'];
        StationId = json['StationId'];
        StationName = json['StationName'];
        EmployeeId = json['EmployeeId'];
        EmployeeName = json['EmployeeName'];
        CustomerName = json['CustomerName'];
        ContactId = json['ContactId'];
        ContactAgentId = json['ContactAgentId'];
        CustomerId = json['CustomerId'];
        IsAppointment = json['IsAppointment'];
        LocalHere = JsonConverters.fromJson(json['LocalHere'],'DateTime',context!);
        LocalCalled = JsonConverters.fromJson(json['LocalCalled'],'DateTime',context!);
        LocalStart = JsonConverters.fromJson(json['LocalStart'],'DateTime',context!);
        LocalEnd = JsonConverters.fromJson(json['LocalEnd'],'DateTime',context!);
        WaitSec = json['WaitSec'];
        ServeSec = json['ServeSec'];
        Outcome = json['Outcome'];
        Fee = JsonConverters.toDouble(json['Fee']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CheckinId': CheckinId,
        'TicketLabel': TicketLabel,
        'LocalDate': JsonConverters.toJson(LocalDate,'DateTime',context!),
        'LineId': LineId,
        'ServiceName': ServiceName,
        'StationId': StationId,
        'StationName': StationName,
        'EmployeeId': EmployeeId,
        'EmployeeName': EmployeeName,
        'CustomerName': CustomerName,
        'ContactId': ContactId,
        'ContactAgentId': ContactAgentId,
        'CustomerId': CustomerId,
        'IsAppointment': IsAppointment,
        'LocalHere': JsonConverters.toJson(LocalHere,'DateTime',context!),
        'LocalCalled': JsonConverters.toJson(LocalCalled,'DateTime',context!),
        'LocalStart': JsonConverters.toJson(LocalStart,'DateTime',context!),
        'LocalEnd': JsonConverters.toJson(LocalEnd,'DateTime',context!),
        'WaitSec': WaitSec,
        'ServeSec': ServeSec,
        'Outcome': Outcome,
        'Fee': Fee
    };

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

class SvcTimelineStep implements IConvertible
{
    DateTime? AtUtc;
    DateTime? LocalAt;
    String? Kind;
    String? StationName;
    String? EmployeeName;

    SvcTimelineStep({this.AtUtc,this.LocalAt,this.Kind,this.StationName,this.EmployeeName});
    SvcTimelineStep.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        AtUtc = JsonConverters.fromJson(json['AtUtc'],'DateTime',context!);
        LocalAt = JsonConverters.fromJson(json['LocalAt'],'DateTime',context!);
        Kind = json['Kind'];
        StationName = json['StationName'];
        EmployeeName = json['EmployeeName'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'AtUtc': JsonConverters.toJson(AtUtc,'DateTime',context!),
        'LocalAt': JsonConverters.toJson(LocalAt,'DateTime',context!),
        'Kind': Kind,
        'StationName': StationName,
        'EmployeeName': EmployeeName
    };

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

class SvcTimeline implements IConvertible
{
    SvcVisitRow? Visit;
    List<SvcTimelineStep>? Steps = [];
    int? WalkUpSec;

    SvcTimeline({this.Visit,this.Steps,this.WalkUpSec});
    SvcTimeline.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Visit = JsonConverters.fromJson(json['Visit'],'SvcVisitRow',context!);
        Steps = JsonConverters.fromJson(json['Steps'],'List<SvcTimelineStep>',context!);
        WalkUpSec = json['WalkUpSec'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Visit': JsonConverters.toJson(Visit,'SvcVisitRow',context!),
        'Steps': JsonConverters.toJson(Steps,'List<SvcTimelineStep>',context!),
        'WalkUpSec': WalkUpSec
    };

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

class CheckinTimelineResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    SvcTimeline? Timeline;

    CheckinTimelineResponse({this.ResponseStatus,this.Timeline});
    CheckinTimelineResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        Timeline = JsonConverters.fromJson(json['Timeline'],'SvcTimeline',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'Timeline': JsonConverters.toJson(Timeline,'SvcTimeline',context!)
    };

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

class CheckinTimelineRequest implements IConvertible
{
    String? Id;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'SvcVisitRow': TypeInfo(TypeOf.Class, create:() => SvcVisitRow()),
    'SvcTimelineStep': TypeInfo(TypeOf.Class, create:() => SvcTimelineStep()),
    'SvcTimeline': TypeInfo(TypeOf.Class, create:() => SvcTimeline()),
    'List<SvcTimelineStep>': TypeInfo(TypeOf.Class, create:() => <SvcTimelineStep>[]),
    'CheckinTimelineResponse': TypeInfo(TypeOf.Class, create:() => CheckinTimelineResponse()),
    'CheckinTimelineRequest': TypeInfo(TypeOf.Class, create:() => CheckinTimelineRequest()),
});

Dart CheckinTimelineRequest DTOs

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

HTTP + CSV

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

GET /v1/customercheckins/{Id}/timeline HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Timeline":{"Visit":{"CheckinId":"00000000000000000000000000000000","TicketLabel":"String","LocalDate":"0001-01-01T00:00:00.0000000","LineId":"00000000000000000000000000000000","ServiceName":"String","StationId":"00000000000000000000000000000000","StationName":"String","EmployeeId":"00000000000000000000000000000000","EmployeeName":"String","CustomerName":"String","ContactId":0,"ContactAgentId":0,"CustomerId":"00000000000000000000000000000000","IsAppointment":false,"LocalHere":"0001-01-01T00:00:00.0000000","LocalCalled":"0001-01-01T00:00:00.0000000","LocalStart":"0001-01-01T00:00:00.0000000","LocalEnd":"0001-01-01T00:00:00.0000000","WaitSec":0,"ServeSec":0,"Outcome":"String","Fee":0},"Steps":[{"AtUtc":"0001-01-01T00:00:00.0000000","LocalAt":"0001-01-01T00:00:00.0000000","Kind":"String","StationName":"String","EmployeeName":"String"}],"WalkUpSec":0}}