Trendsic Platform Service

<back to all web services

CustomerCheckins

Requires Authentication
Requires any of the roles:Agent, Administrator, Agent, Administrator, Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET,POST,DELETE,OPTIONS/v1/CustomerCheckins/{Id}
GET,POST,DELETE,OPTIONS/v1/CustomerCheckins
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class CustomerCheckinObject implements IConvertible
{
    String? Id;
    String? LineId;
    String? CustomerId;
    String? EmployeeId;
    String? LocationId;
    String? StationId;
    DateTime? SignInTime;
    DateTime? AdjustedSignInTime;
    bool? SendReminders;
    int? Status;
    int? TaskTime;
    bool? Completed;
    DateTime? CompletedTime;
    bool? QuestionnaireSubmitted;
    List<String>? LineIds = [];

    CustomerCheckinObject({this.Id,this.LineId,this.CustomerId,this.EmployeeId,this.LocationId,this.StationId,this.SignInTime,this.AdjustedSignInTime,this.SendReminders,this.Status,this.TaskTime,this.Completed,this.CompletedTime,this.QuestionnaireSubmitted,this.LineIds});
    CustomerCheckinObject.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        LineId = json['LineId'];
        CustomerId = json['CustomerId'];
        EmployeeId = json['EmployeeId'];
        LocationId = json['LocationId'];
        StationId = json['StationId'];
        SignInTime = JsonConverters.fromJson(json['SignInTime'],'DateTime',context!);
        AdjustedSignInTime = JsonConverters.fromJson(json['AdjustedSignInTime'],'DateTime',context!);
        SendReminders = json['SendReminders'];
        Status = json['Status'];
        TaskTime = json['TaskTime'];
        Completed = json['Completed'];
        CompletedTime = JsonConverters.fromJson(json['CompletedTime'],'DateTime',context!);
        QuestionnaireSubmitted = json['QuestionnaireSubmitted'];
        LineIds = JsonConverters.fromJson(json['LineIds'],'List<String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'LineId': LineId,
        'CustomerId': CustomerId,
        'EmployeeId': EmployeeId,
        'LocationId': LocationId,
        'StationId': StationId,
        'SignInTime': JsonConverters.toJson(SignInTime,'DateTime',context!),
        'AdjustedSignInTime': JsonConverters.toJson(AdjustedSignInTime,'DateTime',context!),
        'SendReminders': SendReminders,
        'Status': Status,
        'TaskTime': TaskTime,
        'Completed': Completed,
        'CompletedTime': JsonConverters.toJson(CompletedTime,'DateTime',context!),
        'QuestionnaireSubmitted': QuestionnaireSubmitted,
        'LineIds': JsonConverters.toJson(LineIds,'List<String>',context!)
    };

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

class LineQuestion implements IConvertible
{
    int? Id;
    String? CustomerCheckInId;
    String? LineId;
    String? Question;
    String? Answer;
    bool? Active;

    LineQuestion({this.Id,this.CustomerCheckInId,this.LineId,this.Question,this.Answer,this.Active});
    LineQuestion.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'CustomerCheckInId': CustomerCheckInId,
        'LineId': LineId,
        'Question': Question,
        'Answer': Answer,
        'Active': Active
    };

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

class LineImage implements IConvertible
{
    String? ImageId;
    String? FileName;
    String? ImageTitle;
    DateTime? UploadDate;

    LineImage({this.ImageId,this.FileName,this.ImageTitle,this.UploadDate});
    LineImage.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ImageId = json['ImageId'];
        FileName = json['FileName'];
        ImageTitle = json['ImageTitle'];
        UploadDate = JsonConverters.fromJson(json['UploadDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ImageId': ImageId,
        'FileName': FileName,
        'ImageTitle': ImageTitle,
        'UploadDate': JsonConverters.toJson(UploadDate,'DateTime',context!)
    };

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

class Line implements IConvertible
{
    String? Id;
    String? LocationId;
    String? LocationName;
    String? Name;
    String? Description;
    int? ServiceDurationMinutes;
    int? WaitTime;
    double? Cost;
    int? UpperThreshold;
    int? LowerThreshold;
    bool? Active;
    DateTime? EntDate;
    DateTime? ModDate;
    bool? SendQuestionnaire;
    bool? RequireUpload;
    String? UploadMessage;
    List<LineImage>? LineImages = [];

    Line({this.Id,this.LocationId,this.LocationName,this.Name,this.Description,this.ServiceDurationMinutes,this.WaitTime,this.Cost,this.UpperThreshold,this.LowerThreshold,this.Active,this.EntDate,this.ModDate,this.SendQuestionnaire,this.RequireUpload,this.UploadMessage,this.LineImages});
    Line.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        LocationId = json['LocationId'];
        LocationName = json['LocationName'];
        Name = json['Name'];
        Description = json['Description'];
        ServiceDurationMinutes = json['ServiceDurationMinutes'];
        WaitTime = json['WaitTime'];
        Cost = JsonConverters.toDouble(json['Cost']);
        UpperThreshold = json['UpperThreshold'];
        LowerThreshold = json['LowerThreshold'];
        Active = json['Active'];
        EntDate = JsonConverters.fromJson(json['EntDate'],'DateTime',context!);
        ModDate = JsonConverters.fromJson(json['ModDate'],'DateTime',context!);
        SendQuestionnaire = json['SendQuestionnaire'];
        RequireUpload = json['RequireUpload'];
        UploadMessage = json['UploadMessage'];
        LineImages = JsonConverters.fromJson(json['LineImages'],'List<LineImage>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'LocationId': LocationId,
        'LocationName': LocationName,
        'Name': Name,
        'Description': Description,
        'ServiceDurationMinutes': ServiceDurationMinutes,
        'WaitTime': WaitTime,
        'Cost': Cost,
        'UpperThreshold': UpperThreshold,
        'LowerThreshold': LowerThreshold,
        'Active': Active,
        'EntDate': JsonConverters.toJson(EntDate,'DateTime',context!),
        'ModDate': JsonConverters.toJson(ModDate,'DateTime',context!),
        'SendQuestionnaire': SendQuestionnaire,
        'RequireUpload': RequireUpload,
        'UploadMessage': UploadMessage,
        'LineImages': JsonConverters.toJson(LineImages,'List<LineImage>',context!)
    };

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

class CheckinInformation implements IConvertible
{
    String? Id;
    String? LocationId;
    String? LocationName;
    String? CustomerId;
    bool? QuestionnaireSubmitted;
    String? Name;
    String? Description;
    int? TotalServiceDurationMinutes;
    double? TotalCost;
    bool? SendQuestionnaire;
    bool? RequireUpload;
    List<LineQuestion>? Questions = [];
    List<Line>? Lines = [];

    CheckinInformation({this.Id,this.LocationId,this.LocationName,this.CustomerId,this.QuestionnaireSubmitted,this.Name,this.Description,this.TotalServiceDurationMinutes,this.TotalCost,this.SendQuestionnaire,this.RequireUpload,this.Questions,this.Lines});
    CheckinInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        LocationId = json['LocationId'];
        LocationName = json['LocationName'];
        CustomerId = json['CustomerId'];
        QuestionnaireSubmitted = json['QuestionnaireSubmitted'];
        Name = json['Name'];
        Description = json['Description'];
        TotalServiceDurationMinutes = json['TotalServiceDurationMinutes'];
        TotalCost = JsonConverters.toDouble(json['TotalCost']);
        SendQuestionnaire = json['SendQuestionnaire'];
        RequireUpload = json['RequireUpload'];
        Questions = JsonConverters.fromJson(json['Questions'],'List<LineQuestion>',context!);
        Lines = JsonConverters.fromJson(json['Lines'],'List<Line>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'LocationId': LocationId,
        'LocationName': LocationName,
        'CustomerId': CustomerId,
        'QuestionnaireSubmitted': QuestionnaireSubmitted,
        'Name': Name,
        'Description': Description,
        'TotalServiceDurationMinutes': TotalServiceDurationMinutes,
        'TotalCost': TotalCost,
        'SendQuestionnaire': SendQuestionnaire,
        'RequireUpload': RequireUpload,
        'Questions': JsonConverters.toJson(Questions,'List<LineQuestion>',context!),
        'Lines': JsonConverters.toJson(Lines,'List<Line>',context!)
    };

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

class CustomerCheckinsResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<CustomerCheckinObject>? CustomerCheckins = [];
    CheckinInformation? CustomerCheckinRequirements;

    CustomerCheckinsResponse({this.ResponseStatus,this.CustomerCheckins,this.CustomerCheckinRequirements});
    CustomerCheckinsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        CustomerCheckins = JsonConverters.fromJson(json['CustomerCheckins'],'List<CustomerCheckinObject>',context!);
        CustomerCheckinRequirements = JsonConverters.fromJson(json['CustomerCheckinRequirements'],'CheckinInformation',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'CustomerCheckins': JsonConverters.toJson(CustomerCheckins,'List<CustomerCheckinObject>',context!),
        'CustomerCheckinRequirements': JsonConverters.toJson(CustomerCheckinRequirements,'CheckinInformation',context!)
    };

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

class CustomerCheckins extends CustomerCheckinObject implements IConvertible
{
    String? ApiKey;

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

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ApiKey': ApiKey
    });

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'CustomerCheckinObject': TypeInfo(TypeOf.Class, create:() => CustomerCheckinObject()),
    'LineQuestion': TypeInfo(TypeOf.Class, create:() => LineQuestion()),
    'LineImage': TypeInfo(TypeOf.Class, create:() => LineImage()),
    'Line': TypeInfo(TypeOf.Class, create:() => Line()),
    'List<LineImage>': TypeInfo(TypeOf.Class, create:() => <LineImage>[]),
    'CheckinInformation': TypeInfo(TypeOf.Class, create:() => CheckinInformation()),
    'List<LineQuestion>': TypeInfo(TypeOf.Class, create:() => <LineQuestion>[]),
    'List<Line>': TypeInfo(TypeOf.Class, create:() => <Line>[]),
    'CustomerCheckinsResponse': TypeInfo(TypeOf.Class, create:() => CustomerCheckinsResponse()),
    'List<CustomerCheckinObject>': TypeInfo(TypeOf.Class, create:() => <CustomerCheckinObject>[]),
    'CustomerCheckins': TypeInfo(TypeOf.Class, create:() => CustomerCheckins()),
});

Dart CustomerCheckins 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.

POST /v1/CustomerCheckins/{Id} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"ApiKey":"00000000000000000000000000000000","Id":"00000000000000000000000000000000","LineId":"00000000000000000000000000000000","CustomerId":"00000000000000000000000000000000","EmployeeId":"00000000000000000000000000000000","LocationId":"00000000000000000000000000000000","StationId":"00000000000000000000000000000000","SignInTime":"0001-01-01T00:00:00.0000000","AdjustedSignInTime":"0001-01-01T00:00:00.0000000","SendReminders":false,"Status":0,"TaskTime":0,"Completed":false,"CompletedTime":"0001-01-01T00:00:00.0000000","QuestionnaireSubmitted":false,"LineIds":["00000000000000000000000000000000"]}
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"}},"CustomerCheckins":[{"Id":"00000000000000000000000000000000","LineId":"00000000000000000000000000000000","CustomerId":"00000000000000000000000000000000","EmployeeId":"00000000000000000000000000000000","LocationId":"00000000000000000000000000000000","StationId":"00000000000000000000000000000000","SignInTime":"0001-01-01T00:00:00.0000000","AdjustedSignInTime":"0001-01-01T00:00:00.0000000","SendReminders":false,"Status":0,"TaskTime":0,"Completed":false,"CompletedTime":"0001-01-01T00:00:00.0000000","QuestionnaireSubmitted":false,"LineIds":["00000000000000000000000000000000"]}],"CustomerCheckinRequirements":{"Id":"00000000000000000000000000000000","LocationId":"00000000000000000000000000000000","LocationName":"String","CustomerId":"00000000000000000000000000000000","QuestionnaireSubmitted":false,"Name":"String","Description":"String","TotalServiceDurationMinutes":0,"TotalCost":0,"SendQuestionnaire":false,"RequireUpload":false,"Questions":[{"Id":0,"CustomerCheckInId":"00000000000000000000000000000000","LineId":"00000000000000000000000000000000","Question":"String","Answer":"String","Active":false}],"Lines":[{"Id":"00000000000000000000000000000000","LocationId":"00000000000000000000000000000000","LocationName":"String","Name":"String","Description":"String","ServiceDurationMinutes":0,"WaitTime":0,"Cost":0,"UpperThreshold":0,"LowerThreshold":0,"Active":false,"EntDate":"0001-01-01T00:00:00.0000000","ModDate":"0001-01-01T00:00:00.0000000","SendQuestionnaire":false,"RequireUpload":false,"UploadMessage":"String","LineImages":[{"ImageId":"00000000000000000000000000000000","FileName":"String","ImageTitle":"String","UploadDate":"0001-01-01T00:00:00.0000000"}]}]}}