| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/queue/calendar/{LocationId} |
|---|
import 'package:servicestack/servicestack.dart';
class BranchCalendarHours implements IConvertible
{
String? Date;
String? Opens;
String? Closes;
bool? Closed;
BranchCalendarHours({this.Date,this.Opens,this.Closes,this.Closed});
BranchCalendarHours.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Date = json['Date'];
Opens = json['Opens'];
Closes = json['Closes'];
Closed = json['Closed'];
return this;
}
Map<String, dynamic> toJson() => {
'Date': Date,
'Opens': Opens,
'Closes': Closes,
'Closed': Closed
};
getTypeName() => "BranchCalendarHours";
TypeContext? context = _ctx;
}
class BranchCalendarBranch implements IConvertible
{
String? Id;
String? Name;
String? Street;
String? TimeZone;
int? Windows;
List<BranchCalendarHours>? Hours = [];
BranchCalendarBranch({this.Id,this.Name,this.Street,this.TimeZone,this.Windows,this.Hours});
BranchCalendarBranch.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Street = json['Street'];
TimeZone = json['TimeZone'];
Windows = json['Windows'];
Hours = JsonConverters.fromJson(json['Hours'],'List<BranchCalendarHours>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Street': Street,
'TimeZone': TimeZone,
'Windows': Windows,
'Hours': JsonConverters.toJson(Hours,'List<BranchCalendarHours>',context!)
};
getTypeName() => "BranchCalendarBranch";
TypeContext? context = _ctx;
}
class BranchCalendarLine implements IConvertible
{
String? Id;
String? Name;
int? Minutes;
String? Color;
BranchCalendarLine({this.Id,this.Name,this.Minutes,this.Color});
BranchCalendarLine.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Minutes = json['Minutes'];
Color = json['Color'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Minutes': Minutes,
'Color': Color
};
getTypeName() => "BranchCalendarLine";
TypeContext? context = _ctx;
}
class BranchCalendarCustomer implements IConvertible
{
int? ContactId;
String? ContactGuid;
String? Name;
String? Phone;
String? Email;
BranchCalendarCustomer({this.ContactId,this.ContactGuid,this.Name,this.Phone,this.Email});
BranchCalendarCustomer.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ContactId = json['ContactId'];
ContactGuid = json['ContactGuid'];
Name = json['Name'];
Phone = json['Phone'];
Email = json['Email'];
return this;
}
Map<String, dynamic> toJson() => {
'ContactId': ContactId,
'ContactGuid': ContactGuid,
'Name': Name,
'Phone': Phone,
'Email': Email
};
getTypeName() => "BranchCalendarCustomer";
TypeContext? context = _ctx;
}
class BranchCalendarServiceItem implements IConvertible
{
String? LineId;
String? Name;
int? Minutes;
BranchCalendarServiceItem({this.LineId,this.Name,this.Minutes});
BranchCalendarServiceItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
LineId = json['LineId'];
Name = json['Name'];
Minutes = json['Minutes'];
return this;
}
Map<String, dynamic> toJson() => {
'LineId': LineId,
'Name': Name,
'Minutes': Minutes
};
getTypeName() => "BranchCalendarServiceItem";
TypeContext? context = _ctx;
}
class BranchCalendarStatus implements IConvertible
{
String? State;
String? TicketLabel;
String? Window;
DateTime? ArrivedAt;
DateTime? CalledAt;
DateTime? ServedAt;
DateTime? NoShowAt;
DateTime? CancelledAt;
String? CancelledBy;
String? Source;
bool? CanCheckIn;
bool? CanNoShow;
bool? CanReopen;
bool? CanChange;
bool? CanCancel;
BranchCalendarStatus({this.State,this.TicketLabel,this.Window,this.ArrivedAt,this.CalledAt,this.ServedAt,this.NoShowAt,this.CancelledAt,this.CancelledBy,this.Source,this.CanCheckIn,this.CanNoShow,this.CanReopen,this.CanChange,this.CanCancel});
BranchCalendarStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
State = json['State'];
TicketLabel = json['TicketLabel'];
Window = json['Window'];
ArrivedAt = JsonConverters.fromJson(json['ArrivedAt'],'DateTime',context!);
CalledAt = JsonConverters.fromJson(json['CalledAt'],'DateTime',context!);
ServedAt = JsonConverters.fromJson(json['ServedAt'],'DateTime',context!);
NoShowAt = JsonConverters.fromJson(json['NoShowAt'],'DateTime',context!);
CancelledAt = JsonConverters.fromJson(json['CancelledAt'],'DateTime',context!);
CancelledBy = json['CancelledBy'];
Source = json['Source'];
CanCheckIn = json['CanCheckIn'];
CanNoShow = json['CanNoShow'];
CanReopen = json['CanReopen'];
CanChange = json['CanChange'];
CanCancel = json['CanCancel'];
return this;
}
Map<String, dynamic> toJson() => {
'State': State,
'TicketLabel': TicketLabel,
'Window': Window,
'ArrivedAt': JsonConverters.toJson(ArrivedAt,'DateTime',context!),
'CalledAt': JsonConverters.toJson(CalledAt,'DateTime',context!),
'ServedAt': JsonConverters.toJson(ServedAt,'DateTime',context!),
'NoShowAt': JsonConverters.toJson(NoShowAt,'DateTime',context!),
'CancelledAt': JsonConverters.toJson(CancelledAt,'DateTime',context!),
'CancelledBy': CancelledBy,
'Source': Source,
'CanCheckIn': CanCheckIn,
'CanNoShow': CanNoShow,
'CanReopen': CanReopen,
'CanChange': CanChange,
'CanCancel': CanCancel
};
getTypeName() => "BranchCalendarStatus";
TypeContext? context = _ctx;
}
class BranchCalendarPaperwork implements IConvertible
{
bool? AsksQuestionnaire;
bool? AsksUpload;
bool? Submitted;
BranchCalendarPaperwork({this.AsksQuestionnaire,this.AsksUpload,this.Submitted});
BranchCalendarPaperwork.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AsksQuestionnaire = json['AsksQuestionnaire'];
AsksUpload = json['AsksUpload'];
Submitted = json['Submitted'];
return this;
}
Map<String, dynamic> toJson() => {
'AsksQuestionnaire': AsksQuestionnaire,
'AsksUpload': AsksUpload,
'Submitted': Submitted
};
getTypeName() => "BranchCalendarPaperwork";
TypeContext? context = _ctx;
}
class BranchCalendarEvent implements IConvertible
{
int? CalendarEventId;
String? Kind;
String? Title;
DateTime? StartLocal;
DateTime? EndLocal;
bool? AllDay;
String? Description;
BranchCalendarCustomer? Customer;
List<BranchCalendarServiceItem>? Services = [];
BranchCalendarStatus? Status;
String? CheckInId;
BranchCalendarPaperwork? Paperwork;
BranchCalendarEvent({this.CalendarEventId,this.Kind,this.Title,this.StartLocal,this.EndLocal,this.AllDay,this.Description,this.Customer,this.Services,this.Status,this.CheckInId,this.Paperwork});
BranchCalendarEvent.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CalendarEventId = json['CalendarEventId'];
Kind = json['Kind'];
Title = json['Title'];
StartLocal = JsonConverters.fromJson(json['StartLocal'],'DateTime',context!);
EndLocal = JsonConverters.fromJson(json['EndLocal'],'DateTime',context!);
AllDay = json['AllDay'];
Description = json['Description'];
Customer = JsonConverters.fromJson(json['Customer'],'BranchCalendarCustomer',context!);
Services = JsonConverters.fromJson(json['Services'],'List<BranchCalendarServiceItem>',context!);
Status = JsonConverters.fromJson(json['Status'],'BranchCalendarStatus',context!);
CheckInId = json['CheckInId'];
Paperwork = JsonConverters.fromJson(json['Paperwork'],'BranchCalendarPaperwork',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CalendarEventId': CalendarEventId,
'Kind': Kind,
'Title': Title,
'StartLocal': JsonConverters.toJson(StartLocal,'DateTime',context!),
'EndLocal': JsonConverters.toJson(EndLocal,'DateTime',context!),
'AllDay': AllDay,
'Description': Description,
'Customer': JsonConverters.toJson(Customer,'BranchCalendarCustomer',context!),
'Services': JsonConverters.toJson(Services,'List<BranchCalendarServiceItem>',context!),
'Status': JsonConverters.toJson(Status,'BranchCalendarStatus',context!),
'CheckInId': CheckInId,
'Paperwork': JsonConverters.toJson(Paperwork,'BranchCalendarPaperwork',context!)
};
getTypeName() => "BranchCalendarEvent";
TypeContext? context = _ctx;
}
class BranchCalendarStaffHour implements IConvertible
{
String? Date;
int? Hour;
double? Windows;
String? Source;
BranchCalendarStaffHour({this.Date,this.Hour,this.Windows,this.Source});
BranchCalendarStaffHour.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Date = json['Date'];
Hour = json['Hour'];
Windows = JsonConverters.toDouble(json['Windows']);
Source = json['Source'];
return this;
}
Map<String, dynamic> toJson() => {
'Date': Date,
'Hour': Hour,
'Windows': Windows,
'Source': Source
};
getTypeName() => "BranchCalendarStaffHour";
TypeContext? context = _ctx;
}
class BranchCalendarWeekdayHour implements IConvertible
{
int? Weekday;
int? Hour;
double? Windows;
int? Days;
BranchCalendarWeekdayHour({this.Weekday,this.Hour,this.Windows,this.Days});
BranchCalendarWeekdayHour.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Weekday = json['Weekday'];
Hour = json['Hour'];
Windows = JsonConverters.toDouble(json['Windows']);
Days = json['Days'];
return this;
}
Map<String, dynamic> toJson() => {
'Weekday': Weekday,
'Hour': Hour,
'Windows': Windows,
'Days': Days
};
getTypeName() => "BranchCalendarWeekdayHour";
TypeContext? context = _ctx;
}
class BranchCalendarHourMean implements IConvertible
{
int? Hour;
double? Windows;
int? Days;
BranchCalendarHourMean({this.Hour,this.Windows,this.Days});
BranchCalendarHourMean.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Hour = json['Hour'];
Windows = JsonConverters.toDouble(json['Windows']);
Days = json['Days'];
return this;
}
Map<String, dynamic> toJson() => {
'Hour': Hour,
'Windows': Windows,
'Days': Days
};
getTypeName() => "BranchCalendarHourMean";
TypeContext? context = _ctx;
}
class BranchCalendarHistory implements IConvertible
{
List<BranchCalendarWeekdayHour>? ByWeekdayHour = [];
List<BranchCalendarHourMean>? ByHour = [];
BranchCalendarHistory({this.ByWeekdayHour,this.ByHour});
BranchCalendarHistory.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ByWeekdayHour = JsonConverters.fromJson(json['ByWeekdayHour'],'List<BranchCalendarWeekdayHour>',context!);
ByHour = JsonConverters.fromJson(json['ByHour'],'List<BranchCalendarHourMean>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ByWeekdayHour': JsonConverters.toJson(ByWeekdayHour,'List<BranchCalendarWeekdayHour>',context!),
'ByHour': JsonConverters.toJson(ByHour,'List<BranchCalendarHourMean>',context!)
};
getTypeName() => "BranchCalendarHistory";
TypeContext? context = _ctx;
}
class BranchCalendarResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
BranchCalendarBranch? Branch;
List<BranchCalendarLine>? Lines = [];
List<BranchCalendarEvent>? Events = [];
List<BranchCalendarStaffHour>? Staffing = [];
BranchCalendarHistory? History;
bool? ColorByService;
DateTime? ServerNowLocal;
BranchCalendarResponse({this.ResponseStatus,this.Branch,this.Lines,this.Events,this.Staffing,this.History,this.ColorByService,this.ServerNowLocal});
BranchCalendarResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Branch = JsonConverters.fromJson(json['Branch'],'BranchCalendarBranch',context!);
Lines = JsonConverters.fromJson(json['Lines'],'List<BranchCalendarLine>',context!);
Events = JsonConverters.fromJson(json['Events'],'List<BranchCalendarEvent>',context!);
Staffing = JsonConverters.fromJson(json['Staffing'],'List<BranchCalendarStaffHour>',context!);
History = JsonConverters.fromJson(json['History'],'BranchCalendarHistory',context!);
ColorByService = json['ColorByService'];
ServerNowLocal = JsonConverters.fromJson(json['ServerNowLocal'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Branch': JsonConverters.toJson(Branch,'BranchCalendarBranch',context!),
'Lines': JsonConverters.toJson(Lines,'List<BranchCalendarLine>',context!),
'Events': JsonConverters.toJson(Events,'List<BranchCalendarEvent>',context!),
'Staffing': JsonConverters.toJson(Staffing,'List<BranchCalendarStaffHour>',context!),
'History': JsonConverters.toJson(History,'BranchCalendarHistory',context!),
'ColorByService': ColorByService,
'ServerNowLocal': JsonConverters.toJson(ServerNowLocal,'DateTime',context!)
};
getTypeName() => "BranchCalendarResponse";
TypeContext? context = _ctx;
}
class BranchCalendarRequest implements IConvertible
{
String? LocationId;
DateTime? From;
DateTime? To;
bool? IncludeCancelled;
BranchCalendarRequest({this.LocationId,this.From,this.To,this.IncludeCancelled});
BranchCalendarRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
LocationId = json['LocationId'];
From = JsonConverters.fromJson(json['From'],'DateTime',context!);
To = JsonConverters.fromJson(json['To'],'DateTime',context!);
IncludeCancelled = json['IncludeCancelled'];
return this;
}
Map<String, dynamic> toJson() => {
'LocationId': LocationId,
'From': JsonConverters.toJson(From,'DateTime',context!),
'To': JsonConverters.toJson(To,'DateTime',context!),
'IncludeCancelled': IncludeCancelled
};
getTypeName() => "BranchCalendarRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'BranchCalendarHours': TypeInfo(TypeOf.Class, create:() => BranchCalendarHours()),
'BranchCalendarBranch': TypeInfo(TypeOf.Class, create:() => BranchCalendarBranch()),
'List<BranchCalendarHours>': TypeInfo(TypeOf.Class, create:() => <BranchCalendarHours>[]),
'BranchCalendarLine': TypeInfo(TypeOf.Class, create:() => BranchCalendarLine()),
'BranchCalendarCustomer': TypeInfo(TypeOf.Class, create:() => BranchCalendarCustomer()),
'BranchCalendarServiceItem': TypeInfo(TypeOf.Class, create:() => BranchCalendarServiceItem()),
'BranchCalendarStatus': TypeInfo(TypeOf.Class, create:() => BranchCalendarStatus()),
'BranchCalendarPaperwork': TypeInfo(TypeOf.Class, create:() => BranchCalendarPaperwork()),
'BranchCalendarEvent': TypeInfo(TypeOf.Class, create:() => BranchCalendarEvent()),
'List<BranchCalendarServiceItem>': TypeInfo(TypeOf.Class, create:() => <BranchCalendarServiceItem>[]),
'BranchCalendarStaffHour': TypeInfo(TypeOf.Class, create:() => BranchCalendarStaffHour()),
'BranchCalendarWeekdayHour': TypeInfo(TypeOf.Class, create:() => BranchCalendarWeekdayHour()),
'BranchCalendarHourMean': TypeInfo(TypeOf.Class, create:() => BranchCalendarHourMean()),
'BranchCalendarHistory': TypeInfo(TypeOf.Class, create:() => BranchCalendarHistory()),
'List<BranchCalendarWeekdayHour>': TypeInfo(TypeOf.Class, create:() => <BranchCalendarWeekdayHour>[]),
'List<BranchCalendarHourMean>': TypeInfo(TypeOf.Class, create:() => <BranchCalendarHourMean>[]),
'BranchCalendarResponse': TypeInfo(TypeOf.Class, create:() => BranchCalendarResponse()),
'List<BranchCalendarLine>': TypeInfo(TypeOf.Class, create:() => <BranchCalendarLine>[]),
'List<BranchCalendarEvent>': TypeInfo(TypeOf.Class, create:() => <BranchCalendarEvent>[]),
'List<BranchCalendarStaffHour>': TypeInfo(TypeOf.Class, create:() => <BranchCalendarStaffHour>[]),
'BranchCalendarRequest': TypeInfo(TypeOf.Class, create:() => BranchCalendarRequest()),
});
Dart BranchCalendarRequest DTOs
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.
GET /v1/queue/calendar/{LocationId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<BranchCalendarResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Branch>
<Hours>
<BranchCalendarHours>
<Closed>false</Closed>
<Closes>String</Closes>
<Date>String</Date>
<Opens>String</Opens>
</BranchCalendarHours>
</Hours>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Name>String</Name>
<Street>String</Street>
<TimeZone>String</TimeZone>
<Windows>0</Windows>
</Branch>
<ColorByService>false</ColorByService>
<Events>
<BranchCalendarEvent>
<AllDay>false</AllDay>
<CalendarEventId>0</CalendarEventId>
<CheckInId>00000000-0000-0000-0000-000000000000</CheckInId>
<Customer>
<ContactGuid>00000000-0000-0000-0000-000000000000</ContactGuid>
<ContactId>0</ContactId>
<Email>String</Email>
<Name>String</Name>
<Phone>String</Phone>
</Customer>
<Description>String</Description>
<EndLocal>0001-01-01T00:00:00</EndLocal>
<Kind>String</Kind>
<Paperwork>
<AsksQuestionnaire>false</AsksQuestionnaire>
<AsksUpload>false</AsksUpload>
<Submitted>false</Submitted>
</Paperwork>
<Services>
<BranchCalendarServiceItem>
<LineId>00000000-0000-0000-0000-000000000000</LineId>
<Minutes>0</Minutes>
<Name>String</Name>
</BranchCalendarServiceItem>
</Services>
<StartLocal>0001-01-01T00:00:00</StartLocal>
<Status>
<ArrivedAt>0001-01-01T00:00:00</ArrivedAt>
<CalledAt>0001-01-01T00:00:00</CalledAt>
<CanCancel>false</CanCancel>
<CanChange>false</CanChange>
<CanCheckIn>false</CanCheckIn>
<CanNoShow>false</CanNoShow>
<CanReopen>false</CanReopen>
<CancelledAt>0001-01-01T00:00:00</CancelledAt>
<CancelledBy>String</CancelledBy>
<NoShowAt>0001-01-01T00:00:00</NoShowAt>
<ServedAt>0001-01-01T00:00:00</ServedAt>
<Source>String</Source>
<State>String</State>
<TicketLabel>String</TicketLabel>
<Window>String</Window>
</Status>
<Title>String</Title>
</BranchCalendarEvent>
</Events>
<History>
<ByHour>
<BranchCalendarHourMean>
<Days>0</Days>
<Hour>0</Hour>
<Windows>0</Windows>
</BranchCalendarHourMean>
</ByHour>
<ByWeekdayHour>
<BranchCalendarWeekdayHour>
<Days>0</Days>
<Hour>0</Hour>
<Weekday>0</Weekday>
<Windows>0</Windows>
</BranchCalendarWeekdayHour>
</ByWeekdayHour>
</History>
<Lines>
<BranchCalendarLine>
<Color>String</Color>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Minutes>0</Minutes>
<Name>String</Name>
</BranchCalendarLine>
</Lines>
<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>
<ServerNowLocal>0001-01-01T00:00:00</ServerNowLocal>
<Staffing>
<BranchCalendarStaffHour>
<Date>String</Date>
<Hour>0</Hour>
<Source>String</Source>
<Windows>0</Windows>
</BranchCalendarStaffHour>
</Staffing>
</BranchCalendarResponse>