ClubReady Api

<back to all web services

BookingStatusEventsRequest

The following routes are available for this service:
GET/scheduling/booking-status-eventsList of booking status changes in a time frame.
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 BookingStatusEventsRequestDto extends ApiDtoBase implements IConvertible
{
    DateTime? FromDate;
    DateTime? ToDate;
    int? BookingTypeFilter;
    int? ConsultFilter;
    int? StatusFilter;

    BookingStatusEventsRequestDto({this.FromDate,this.ToDate,this.BookingTypeFilter,this.ConsultFilter,this.StatusFilter});
    BookingStatusEventsRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!);
        ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!);
        BookingTypeFilter = json['BookingTypeFilter'];
        ConsultFilter = json['ConsultFilter'];
        StatusFilter = json['StatusFilter'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!),
        'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!),
        'BookingTypeFilter': BookingTypeFilter,
        'ConsultFilter': ConsultFilter,
        'StatusFilter': StatusFilter
    });

    getTypeName() => "BookingStatusEventsRequestDto";
    TypeContext? context = _ctx;
}

enum RestrictedResourceType
{
    Store,
    Chain,
    User,
    Undefined,
}

class BookingStatusEventsRequest extends BookingStatusEventsRequestDto 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;

    /**
    * Chain ID
    */
    // @ApiMember(DataType="integer", Description="Chain ID", Name="ChainId", ParameterType="query")
    int? ChainId;

    /**
    * Store ID
    */
    // @ApiMember(DataType="integer", Description="Store ID", Name="StoreId", ParameterType="query")
    int? StoreId;

    /**
    * UTC Format
    */
    // @ApiMember(DataType="date", Description="UTC Format", IsRequired=true, Name="FromDate", ParameterType="query")
    DateTime? FromDate;

    /**
    * Max 24 Hours (UTC Format)
    */
    // @ApiMember(DataType="date", Description="Max 24 Hours (UTC Format)", IsRequired=true, Name="ToDate", ParameterType="query")
    DateTime? ToDate;

    /**
    * 0 = All, 1 = Classes, 2 = Services
    */
    // @ApiMember(DataType="integer", Description="0 = All, 1 = Classes, 2 = Services", IsRequired=true, Name="BookingTypeFilter", ParameterType="query")
    int? BookingTypeFilter;

    /**
    * 0 = Any, 1 = Only Consults, 2 = Exclude Consults
    */
    // @ApiMember(DataType="integer", Description="0 = Any, 1 = Only Consults, 2 = Exclude Consults", IsRequired=true, Name="ConsultFilter", ParameterType="query")
    int? ConsultFilter;

    /**
    * Leave blank for any, otherwise use ClubReady BookingStatus enum
    */
    // @ApiMember(DataType="integer", Description="Leave blank for any, otherwise use ClubReady BookingStatus enum", Name="StatusFilter", ParameterType="query")
    int? StatusFilter;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

    BookingStatusEventsRequest({this.ApiKey,this.ChainId,this.StoreId,this.FromDate,this.ToDate,this.BookingTypeFilter,this.ConsultFilter,this.StatusFilter,this.RestrictedId,this.RestrictedResourceType});
    BookingStatusEventsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ApiKey = json['ApiKey'];
        ChainId = json['ChainId'];
        StoreId = json['StoreId'];
        FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!);
        ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!);
        BookingTypeFilter = json['BookingTypeFilter'];
        ConsultFilter = json['ConsultFilter'];
        StatusFilter = json['StatusFilter'];
        RestrictedId = json['RestrictedId'];
        RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ApiKey': ApiKey,
        'ChainId': ChainId,
        'StoreId': StoreId,
        'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!),
        'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!),
        'BookingTypeFilter': BookingTypeFilter,
        'ConsultFilter': ConsultFilter,
        'StatusFilter': StatusFilter,
        'RestrictedId': RestrictedId,
        'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
    });

    getTypeName() => "BookingStatusEventsRequest";
    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 BookingStatus
{
    Undefined,
    Unavailable,
    Open,
    CancelledWithinPolicy,
    CancelledOutsidePolicy,
    Completed,
    NoShow,
    RescheduledWithinPolicy,
    RescheduledByAdmin,
    CancelledByAdminNotCustomerFault,
    Pending,
    WaitListed,
    Error,
}

class BookingStatusEventItem implements IConvertible
{
    int? ChainId;
    int? StoreId;
    int? UserId;
    int? BookingId;
    int? ClassScheduleId;
    int? ServiceId;
    int? SessionSizeId;
    DateTime? BookingDateTime;
    BookingStatus? Status;
    int? StatusId;
    DateTime? StatusChanged;
    bool? Consult;
    bool? BookedFromWaitList;

    BookingStatusEventItem({this.ChainId,this.StoreId,this.UserId,this.BookingId,this.ClassScheduleId,this.ServiceId,this.SessionSizeId,this.BookingDateTime,this.Status,this.StatusId,this.StatusChanged,this.Consult,this.BookedFromWaitList});
    BookingStatusEventItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ChainId = json['ChainId'];
        StoreId = json['StoreId'];
        UserId = json['UserId'];
        BookingId = json['BookingId'];
        ClassScheduleId = json['ClassScheduleId'];
        ServiceId = json['ServiceId'];
        SessionSizeId = json['SessionSizeId'];
        BookingDateTime = JsonConverters.fromJson(json['BookingDateTime'],'DateTime',context!);
        Status = JsonConverters.fromJson(json['Status'],'BookingStatus',context!);
        StatusId = json['StatusId'];
        StatusChanged = JsonConverters.fromJson(json['StatusChanged'],'DateTime',context!);
        Consult = json['Consult'];
        BookedFromWaitList = json['BookedFromWaitList'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ChainId': ChainId,
        'StoreId': StoreId,
        'UserId': UserId,
        'BookingId': BookingId,
        'ClassScheduleId': ClassScheduleId,
        'ServiceId': ServiceId,
        'SessionSizeId': SessionSizeId,
        'BookingDateTime': JsonConverters.toJson(BookingDateTime,'DateTime',context!),
        'Status': JsonConverters.toJson(Status,'BookingStatus',context!),
        'StatusId': StatusId,
        'StatusChanged': JsonConverters.toJson(StatusChanged,'DateTime',context!),
        'Consult': Consult,
        'BookedFromWaitList': BookedFromWaitList
    };

    getTypeName() => "BookingStatusEventItem";
    TypeContext? context = _ctx;
}

class BookingStatusEventsResponseDto extends ApiResponseBase implements IConvertible
{
    List<BookingStatusEventItem>? BookingStatusEvents;

    BookingStatusEventsResponseDto({this.BookingStatusEvents});
    BookingStatusEventsResponseDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        BookingStatusEvents = JsonConverters.fromJson(json['BookingStatusEvents'],'List<BookingStatusEventItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'BookingStatusEvents': JsonConverters.toJson(BookingStatusEvents,'List<BookingStatusEventItem>',context!)
    });

    getTypeName() => "BookingStatusEventsResponseDto";
    TypeContext? context = _ctx;
}

class BookingStatusEventsResponse extends BookingStatusEventsResponseDto implements IConvertible
{
    bool? Success;
    String? Message;
    List<BookingStatusEventItem>? BookingStatusEvents;

    BookingStatusEventsResponse({this.Success,this.Message,this.BookingStatusEvents});
    BookingStatusEventsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Success = json['Success'];
        Message = json['Message'];
        BookingStatusEvents = JsonConverters.fromJson(json['BookingStatusEvents'],'List<BookingStatusEventItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Success': Success,
        'Message': Message,
        'BookingStatusEvents': JsonConverters.toJson(BookingStatusEvents,'List<BookingStatusEventItem>',context!)
    });

    getTypeName() => "BookingStatusEventsResponse";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'BookingStatusEventsRequestDto': TypeInfo(TypeOf.Class, create:() => BookingStatusEventsRequestDto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'BookingStatusEventsRequest': TypeInfo(TypeOf.Class, create:() => BookingStatusEventsRequest()),
    'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
    'BookingStatus': TypeInfo(TypeOf.Enum, enumValues:BookingStatus.values),
    'BookingStatusEventItem': TypeInfo(TypeOf.Class, create:() => BookingStatusEventItem()),
    'BookingStatusEventsResponseDto': TypeInfo(TypeOf.Class, create:() => BookingStatusEventsResponseDto()),
    'List<BookingStatusEventItem>': TypeInfo(TypeOf.Class, create:() => <BookingStatusEventItem>[]),
    'BookingStatusEventsResponse': TypeInfo(TypeOf.Class, create:() => BookingStatusEventsResponse()),
});

Dart BookingStatusEventsRequest 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 /scheduling/booking-status-events HTTP/1.1 
Host: clubready.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Success: False,
	Message: String,
	BookingStatusEvents: 
	[
		{
			ChainId: 0,
			StoreId: 0,
			UserId: 0,
			BookingId: 0,
			ClassScheduleId: 0,
			ServiceId: 0,
			SessionSizeId: 0,
			BookingDateTime: 0001-01-01,
			Status: Undefined,
			StatusId: 0,
			StatusChanged: 0001-01-01,
			Consult: False,
			BookedFromWaitList: False
		}
	]
}