Trendsic Platform Service

<back to all web services

BranchCalendarRequest

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

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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Branch: 
	{
		Id: 00000000000000000000000000000000,
		Name: String,
		Street: String,
		TimeZone: String,
		Windows: 0,
		Hours: 
		[
			{
				Date: String,
				Opens: String,
				Closes: String,
				Closed: False
			}
		]
	},
	Lines: 
	[
		{
			Id: 00000000000000000000000000000000,
			Name: String,
			Minutes: 0,
			Color: String
		}
	],
	Events: 
	[
		{
			CalendarEventId: 0,
			Kind: String,
			Title: String,
			StartLocal: 0001-01-01,
			EndLocal: 0001-01-01,
			AllDay: False,
			Description: String,
			Customer: 
			{
				ContactId: 0,
				ContactGuid: 00000000000000000000000000000000,
				Name: String,
				Phone: String,
				Email: String
			},
			Services: 
			[
				{
					LineId: 00000000000000000000000000000000,
					Name: String,
					Minutes: 0
				}
			],
			Status: 
			{
				State: String,
				TicketLabel: String,
				Window: String,
				ArrivedAt: 0001-01-01,
				CalledAt: 0001-01-01,
				ServedAt: 0001-01-01,
				NoShowAt: 0001-01-01,
				CancelledAt: 0001-01-01,
				CancelledBy: String,
				Source: String,
				CanCheckIn: False,
				CanNoShow: False,
				CanReopen: False,
				CanChange: False,
				CanCancel: False
			},
			CheckInId: 00000000000000000000000000000000,
			Paperwork: 
			{
				AsksQuestionnaire: False,
				AsksUpload: False,
				Submitted: False
			}
		}
	],
	Staffing: 
	[
		{
			Date: String,
			Hour: 0,
			Windows: 0,
			Source: String
		}
	],
	History: 
	{
		ByWeekdayHour: 
		[
			{
				Weekday: 0,
				Hour: 0,
				Windows: 0,
				Days: 0
			}
		],
		ByHour: 
		[
			{
				Hour: 0,
				Windows: 0,
				Days: 0
			}
		]
	},
	ColorByService: False,
	ServerNowLocal: 0001-01-01
}