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 .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/customercheckins/{Id}/timeline HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CheckinTimelineResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <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>
  <Timeline>
    <Steps>
      <SvcTimelineStep>
        <AtUtc>0001-01-01T00:00:00</AtUtc>
        <EmployeeName>String</EmployeeName>
        <Kind>String</Kind>
        <LocalAt>0001-01-01T00:00:00</LocalAt>
        <StationName>String</StationName>
      </SvcTimelineStep>
    </Steps>
    <Visit>
      <CheckinId>00000000-0000-0000-0000-000000000000</CheckinId>
      <ContactAgentId>0</ContactAgentId>
      <ContactId>0</ContactId>
      <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
      <CustomerName>String</CustomerName>
      <EmployeeId>00000000-0000-0000-0000-000000000000</EmployeeId>
      <EmployeeName>String</EmployeeName>
      <Fee>0</Fee>
      <IsAppointment>false</IsAppointment>
      <LineId>00000000-0000-0000-0000-000000000000</LineId>
      <LocalCalled>0001-01-01T00:00:00</LocalCalled>
      <LocalDate>0001-01-01T00:00:00</LocalDate>
      <LocalEnd>0001-01-01T00:00:00</LocalEnd>
      <LocalHere>0001-01-01T00:00:00</LocalHere>
      <LocalStart>0001-01-01T00:00:00</LocalStart>
      <Outcome>String</Outcome>
      <ServeSec>0</ServeSec>
      <ServiceName>String</ServiceName>
      <StationId>00000000-0000-0000-0000-000000000000</StationId>
      <StationName>String</StationName>
      <TicketLabel>String</TicketLabel>
      <WaitSec>0</WaitSec>
    </Visit>
    <WalkUpSec>0</WalkUpSec>
  </Timeline>
</CheckinTimelineResponse>