GET | /scheduling/class-roster | Get booked and waitlisted users for a class. |
---|
import 'package:servicestack/servicestack.dart';
class ApiDtoBase implements IConvertible
{
String? ApiKey;
int? StoreId;
int? ChainId;
ApiDtoBase({this.ApiKey,this.StoreId,this.ChainId});
ApiDtoBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ApiKey = json['ApiKey'];
StoreId = json['StoreId'];
ChainId = json['ChainId'];
return this;
}
Map<String, dynamic> toJson() => {
'ApiKey': ApiKey,
'StoreId': StoreId,
'ChainId': ChainId
};
getTypeName() => "ApiDtoBase";
TypeContext? context = _ctx;
}
class ClassRosterRequestDto extends ApiDtoBase implements IConvertible
{
int? ClassScheduleId;
ClassRosterRequestDto({this.ClassScheduleId});
ClassRosterRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ClassScheduleId = json['ClassScheduleId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ClassScheduleId': ClassScheduleId
});
getTypeName() => "ClassRosterRequestDto";
TypeContext? context = _ctx;
}
enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
class ClassRosterRequest extends ClassRosterRequestDto implements IRestrictedApiRequest, IConvertible
{
/**
* Api Key - grants access to resources
*/
// @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
String? ApiKey;
/**
* Store Id or Chain Id is required
*/
// @ApiMember(DataType="integer", Description="Store Id or Chain Id is required", Name="StoreId", ParameterType="query")
int? StoreId;
/**
* Store Id or Chain Id is required
*/
// @ApiMember(DataType="integer", Description="Store Id or Chain Id is required", Name="ChainId", ParameterType="query")
int? ChainId;
/**
* Class Schedule ID
*/
// @ApiMember(DataType="integer", Description="Class Schedule ID", IsRequired=true, Name="ClassScheduleId", ParameterType="query")
int? ClassScheduleId;
int? RestrictedId;
RestrictedResourceType? RestrictedResourceType;
ClassRosterRequest({this.ApiKey,this.StoreId,this.ChainId,this.ClassScheduleId,this.RestrictedId,this.RestrictedResourceType});
ClassRosterRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ApiKey = json['ApiKey'];
StoreId = json['StoreId'];
ChainId = json['ChainId'];
ClassScheduleId = json['ClassScheduleId'];
RestrictedId = json['RestrictedId'];
RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ApiKey': ApiKey,
'StoreId': StoreId,
'ChainId': ChainId,
'ClassScheduleId': ClassScheduleId,
'RestrictedId': RestrictedId,
'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
});
getTypeName() => "ClassRosterRequest";
TypeContext? context = _ctx;
}
class ApiResponseBase implements IConvertible
{
bool? Success;
String? Message;
ApiResponseBase({this.Success,this.Message});
ApiResponseBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Success = json['Success'];
Message = json['Message'];
return this;
}
Map<String, dynamic> toJson() => {
'Success': Success,
'Message': Message
};
getTypeName() => "ApiResponseBase";
TypeContext? context = _ctx;
}
enum ClassRosterCreditType
{
Uninitialized,
PaidCredit,
FreeCredit,
AmenityCredit,
MembershipTypeCredit,
ClassPassCredit,
Error,
}
class ClassRosterItem implements IConvertible
{
int? BookingId;
int? UserId;
String? FirstName;
String? LastName;
String? Email;
String? Phone;
DateTime? BookingMade;
bool? FirstTimeBooking;
String? PackageName;
int? PackageId;
String? LeadTypeName;
int? LeadTypeId;
bool? IsMember;
DateTime? MemberExpiration;
ClassRosterCreditType? CreditType;
int? CreditsRemaining;
DateTime? NextCreditExpiration;
int? BookingStatusId;
String? BookingStatusDescription;
ClassRosterItem({this.BookingId,this.UserId,this.FirstName,this.LastName,this.Email,this.Phone,this.BookingMade,this.FirstTimeBooking,this.PackageName,this.PackageId,this.LeadTypeName,this.LeadTypeId,this.IsMember,this.MemberExpiration,this.CreditType,this.CreditsRemaining,this.NextCreditExpiration,this.BookingStatusId,this.BookingStatusDescription});
ClassRosterItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BookingId = json['BookingId'];
UserId = json['UserId'];
FirstName = json['FirstName'];
LastName = json['LastName'];
Email = json['Email'];
Phone = json['Phone'];
BookingMade = JsonConverters.fromJson(json['BookingMade'],'DateTime',context!);
FirstTimeBooking = json['FirstTimeBooking'];
PackageName = json['PackageName'];
PackageId = json['PackageId'];
LeadTypeName = json['LeadTypeName'];
LeadTypeId = json['LeadTypeId'];
IsMember = json['IsMember'];
MemberExpiration = JsonConverters.fromJson(json['MemberExpiration'],'DateTime',context!);
CreditType = JsonConverters.fromJson(json['CreditType'],'ClassRosterCreditType',context!);
CreditsRemaining = json['CreditsRemaining'];
NextCreditExpiration = JsonConverters.fromJson(json['NextCreditExpiration'],'DateTime',context!);
BookingStatusId = json['BookingStatusId'];
BookingStatusDescription = json['BookingStatusDescription'];
return this;
}
Map<String, dynamic> toJson() => {
'BookingId': BookingId,
'UserId': UserId,
'FirstName': FirstName,
'LastName': LastName,
'Email': Email,
'Phone': Phone,
'BookingMade': JsonConverters.toJson(BookingMade,'DateTime',context!),
'FirstTimeBooking': FirstTimeBooking,
'PackageName': PackageName,
'PackageId': PackageId,
'LeadTypeName': LeadTypeName,
'LeadTypeId': LeadTypeId,
'IsMember': IsMember,
'MemberExpiration': JsonConverters.toJson(MemberExpiration,'DateTime',context!),
'CreditType': JsonConverters.toJson(CreditType,'ClassRosterCreditType',context!),
'CreditsRemaining': CreditsRemaining,
'NextCreditExpiration': JsonConverters.toJson(NextCreditExpiration,'DateTime',context!),
'BookingStatusId': BookingStatusId,
'BookingStatusDescription': BookingStatusDescription
};
getTypeName() => "ClassRosterItem";
TypeContext? context = _ctx;
}
class ClassRosterResponseDto extends ApiResponseBase implements IConvertible
{
List<ClassRosterItem>? ClassRoster;
List<ClassRosterItem>? WaitList;
ClassRosterResponseDto({this.ClassRoster,this.WaitList});
ClassRosterResponseDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ClassRoster = JsonConverters.fromJson(json['ClassRoster'],'List<ClassRosterItem>',context!);
WaitList = JsonConverters.fromJson(json['WaitList'],'List<ClassRosterItem>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ClassRoster': JsonConverters.toJson(ClassRoster,'List<ClassRosterItem>',context!),
'WaitList': JsonConverters.toJson(WaitList,'List<ClassRosterItem>',context!)
});
getTypeName() => "ClassRosterResponseDto";
TypeContext? context = _ctx;
}
class ClassRosterResponse extends ClassRosterResponseDto implements IConvertible
{
bool? Success;
String? Message;
DateTime? ClassDate;
int? FreeSpots;
int? MaxSpots;
int? TotalBooked;
String? LocationType;
String? VirtualLink;
List<ClassRosterItem>? ClassRoster;
List<ClassRosterItem>? WaitList;
ClassRosterResponse({this.Success,this.Message,this.ClassDate,this.FreeSpots,this.MaxSpots,this.TotalBooked,this.LocationType,this.VirtualLink,this.ClassRoster,this.WaitList});
ClassRosterResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
Success = json['Success'];
Message = json['Message'];
ClassDate = JsonConverters.fromJson(json['ClassDate'],'DateTime',context!);
FreeSpots = json['FreeSpots'];
MaxSpots = json['MaxSpots'];
TotalBooked = json['TotalBooked'];
LocationType = json['LocationType'];
VirtualLink = json['VirtualLink'];
ClassRoster = JsonConverters.fromJson(json['ClassRoster'],'List<ClassRosterItem>',context!);
WaitList = JsonConverters.fromJson(json['WaitList'],'List<ClassRosterItem>',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'Success': Success,
'Message': Message,
'ClassDate': JsonConverters.toJson(ClassDate,'DateTime',context!),
'FreeSpots': FreeSpots,
'MaxSpots': MaxSpots,
'TotalBooked': TotalBooked,
'LocationType': LocationType,
'VirtualLink': VirtualLink,
'ClassRoster': JsonConverters.toJson(ClassRoster,'List<ClassRosterItem>',context!),
'WaitList': JsonConverters.toJson(WaitList,'List<ClassRosterItem>',context!)
});
getTypeName() => "ClassRosterResponse";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
'ClassRosterRequestDto': TypeInfo(TypeOf.Class, create:() => ClassRosterRequestDto()),
'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
'ClassRosterRequest': TypeInfo(TypeOf.Class, create:() => ClassRosterRequest()),
'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
'ClassRosterCreditType': TypeInfo(TypeOf.Enum, enumValues:ClassRosterCreditType.values),
'ClassRosterItem': TypeInfo(TypeOf.Class, create:() => ClassRosterItem()),
'ClassRosterResponseDto': TypeInfo(TypeOf.Class, create:() => ClassRosterResponseDto()),
'List<ClassRosterItem>': TypeInfo(TypeOf.Class, create:() => <ClassRosterItem>[]),
'ClassRosterResponse': TypeInfo(TypeOf.Class, create:() => ClassRosterResponse()),
});
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 /scheduling/class-roster HTTP/1.1 Host: clubready.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ClassRosterResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Scheduling.Model"> <Message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Message> <Success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</Success> <ClassRoster xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models"> <ClassRosterItem> <BookingId>0</BookingId> <BookingMade>0001-01-01T00:00:00</BookingMade> <BookingStatusDescription>String</BookingStatusDescription> <BookingStatusId>0</BookingStatusId> <CreditType>Uninitialized</CreditType> <CreditsRemaining>0</CreditsRemaining> <Email>String</Email> <FirstName>String</FirstName> <FirstTimeBooking>false</FirstTimeBooking> <IsMember>false</IsMember> <IsWaitList>false</IsWaitList> <LastName>String</LastName> <LeadTypeId>0</LeadTypeId> <LeadTypeName>String</LeadTypeName> <MemberExpiration>0001-01-01T00:00:00</MemberExpiration> <NextCreditExpiration>0001-01-01T00:00:00</NextCreditExpiration> <PackageId>0</PackageId> <PackageName>String</PackageName> <Phone>String</Phone> <UserId>0</UserId> </ClassRosterItem> </ClassRoster> <WaitList xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models"> <ClassRosterItem> <BookingId>0</BookingId> <BookingMade>0001-01-01T00:00:00</BookingMade> <BookingStatusDescription>String</BookingStatusDescription> <BookingStatusId>0</BookingStatusId> <CreditType>Uninitialized</CreditType> <CreditsRemaining>0</CreditsRemaining> <Email>String</Email> <FirstName>String</FirstName> <FirstTimeBooking>false</FirstTimeBooking> <IsMember>false</IsMember> <IsWaitList>false</IsWaitList> <LastName>String</LastName> <LeadTypeId>0</LeadTypeId> <LeadTypeName>String</LeadTypeName> <MemberExpiration>0001-01-01T00:00:00</MemberExpiration> <NextCreditExpiration>0001-01-01T00:00:00</NextCreditExpiration> <PackageId>0</PackageId> <PackageName>String</PackageName> <Phone>String</Phone> <UserId>0</UserId> </ClassRosterItem> </WaitList> <ClassDate>0001-01-01T00:00:00</ClassDate> <FreeSpots>0</FreeSpots> <LocationType>String</LocationType> <MaxSpots>0</MaxSpots> <TotalBooked>0</TotalBooked> <VirtualLink>String</VirtualLink> </ClassRosterResponse>