| Requires any of the roles: | Agent, Administrator, Agent, Administrator, Agent, Administrator, Agent, Administrator |
| 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()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<CustomerCheckins xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AdjustedSignInTime>0001-01-01T00:00:00</AdjustedSignInTime>
<Completed>false</Completed>
<CompletedTime>0001-01-01T00:00:00</CompletedTime>
<CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
<EmployeeId>00000000-0000-0000-0000-000000000000</EmployeeId>
<Id>00000000-0000-0000-0000-000000000000</Id>
<LineId>00000000-0000-0000-0000-000000000000</LineId>
<LineIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</LineIds>
<LocationId>00000000-0000-0000-0000-000000000000</LocationId>
<QuestionnaireSubmitted>false</QuestionnaireSubmitted>
<SendReminders>false</SendReminders>
<SignInTime>0001-01-01T00:00:00</SignInTime>
<StationId>00000000-0000-0000-0000-000000000000</StationId>
<Status>0</Status>
<TaskTime>0</TaskTime>
<ApiKey>00000000-0000-0000-0000-000000000000</ApiKey>
</CustomerCheckins>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CustomerCheckinsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<CustomerCheckinRequirements>
<CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
<Description>String</Description>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Lines>
<Line>
<Active>false</Active>
<Cost>0</Cost>
<Description>String</Description>
<EntDate>0001-01-01T00:00:00</EntDate>
<Id>00000000-0000-0000-0000-000000000000</Id>
<LineImages>
<LineImage>
<FileName>String</FileName>
<ImageId>00000000-0000-0000-0000-000000000000</ImageId>
<ImageTitle>String</ImageTitle>
<UploadDate>0001-01-01T00:00:00</UploadDate>
</LineImage>
</LineImages>
<LocationId>00000000-0000-0000-0000-000000000000</LocationId>
<LocationName>String</LocationName>
<LowerThreshold>0</LowerThreshold>
<ModDate>0001-01-01T00:00:00</ModDate>
<Name>String</Name>
<RequireUpload>false</RequireUpload>
<SendQuestionnaire>false</SendQuestionnaire>
<ServiceDurationMinutes>0</ServiceDurationMinutes>
<UploadMessage>String</UploadMessage>
<UpperThreshold>0</UpperThreshold>
<WaitTime>0</WaitTime>
</Line>
</Lines>
<LocationId>00000000-0000-0000-0000-000000000000</LocationId>
<LocationName>String</LocationName>
<Name>String</Name>
<QuestionnaireSubmitted>false</QuestionnaireSubmitted>
<Questions>
<LineQuestion>
<Active>false</Active>
<Answer>String</Answer>
<CustomerCheckInId>00000000-0000-0000-0000-000000000000</CustomerCheckInId>
<Id>0</Id>
<LineId>00000000-0000-0000-0000-000000000000</LineId>
<Question>String</Question>
</LineQuestion>
</Questions>
<RequireUpload>false</RequireUpload>
<SendQuestionnaire>false</SendQuestionnaire>
<TotalCost>0</TotalCost>
<TotalServiceDurationMinutes>0</TotalServiceDurationMinutes>
</CustomerCheckinRequirements>
<CustomerCheckins>
<CustomerCheckinObject>
<AdjustedSignInTime>0001-01-01T00:00:00</AdjustedSignInTime>
<Completed>false</Completed>
<CompletedTime>0001-01-01T00:00:00</CompletedTime>
<CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
<EmployeeId>00000000-0000-0000-0000-000000000000</EmployeeId>
<Id>00000000-0000-0000-0000-000000000000</Id>
<LineId>00000000-0000-0000-0000-000000000000</LineId>
<LineIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:guid>00000000-0000-0000-0000-000000000000</d4p1:guid>
</LineIds>
<LocationId>00000000-0000-0000-0000-000000000000</LocationId>
<QuestionnaireSubmitted>false</QuestionnaireSubmitted>
<SendReminders>false</SendReminders>
<SignInTime>0001-01-01T00:00:00</SignInTime>
<StationId>00000000-0000-0000-0000-000000000000</StationId>
<Status>0</Status>
<TaskTime>0</TaskTime>
</CustomerCheckinObject>
</CustomerCheckins>
<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>
</CustomerCheckinsResponse>