ClubReady Api

<back to all web services

ClassRosterRequest

The following routes are available for this service:
GET/scheduling/class-rosterGet 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()),
});

Dart ClassRosterRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

{"Success":false,"Message":"String","ClassDate":"0001-01-01T00:00:00.0000000","FreeSpots":0,"MaxSpots":0,"TotalBooked":0,"LocationType":"String","VirtualLink":"String","ClassRoster":[{"BookingId":0,"UserId":0,"FirstName":"String","LastName":"String","Email":"String","Phone":"String","BookingMade":"0001-01-01T00:00:00.0000000","FirstTimeBooking":false,"PackageName":"String","PackageId":0,"LeadTypeName":"String","LeadTypeId":0,"IsMember":false,"MemberExpiration":"0001-01-01T00:00:00.0000000","CreditType":"Uninitialized","CreditsRemaining":0,"NextCreditExpiration":"0001-01-01T00:00:00.0000000","BookingStatusId":0,"BookingStatusDescription":"String"}],"WaitList":[{"BookingId":0,"UserId":0,"FirstName":"String","LastName":"String","Email":"String","Phone":"String","BookingMade":"0001-01-01T00:00:00.0000000","FirstTimeBooking":false,"PackageName":"String","PackageId":0,"LeadTypeName":"String","LeadTypeId":0,"IsMember":false,"MemberExpiration":"0001-01-01T00:00:00.0000000","CreditType":"Uninitialized","CreditsRemaining":0,"NextCreditExpiration":"0001-01-01T00:00:00.0000000","BookingStatusId":0,"BookingStatusDescription":"String"}]}