GET | /scheduling/class-roster | Get booked and waitlisted users for a class. |
---|
namespace ClubReady.Core.Api.Models
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type ApiDtoBase() =
member val ApiKey:String = null with get,set
member val StoreId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val ChainId:Nullable<Int32> = new Nullable<Int32>() with get,set
[<AllowNullLiteral>]
type ClassRosterRequestDto() =
inherit ApiDtoBase()
member val ClassScheduleId:Int32 = new Int32() with get,set
type RestrictedResourceType =
| Store = 0
| Chain = 1
| User = 2
| Undefined = 3
[<AllowNullLiteral>]
type ClassRosterRequest() =
inherit ClassRosterRequestDto()
///<summary>
///Api Key - grants access to resources
///</summary>
[<ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")>]
member val ApiKey:String = null with get,set
///<summary>
///Store Id or Chain Id is required
///</summary>
[<ApiMember(DataType="integer", Description="Store Id or Chain Id is required", Name="StoreId", ParameterType="query")>]
member val StoreId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Store Id or Chain Id is required
///</summary>
[<ApiMember(DataType="integer", Description="Store Id or Chain Id is required", Name="ChainId", ParameterType="query")>]
member val ChainId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Class Schedule ID
///</summary>
[<ApiMember(DataType="integer", Description="Class Schedule ID", IsRequired=true, Name="ClassScheduleId", ParameterType="query")>]
member val ClassScheduleId:Int32 = new Int32() with get,set
member val RestrictedId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val RestrictedResourceType:RestrictedResourceType = new RestrictedResourceType() with get,set
[<AllowNullLiteral>]
type ApiResponseBase() =
member val Success:Boolean = new Boolean() with get,set
member val Message:String = null with get,set
type ClassRosterCreditType =
| Uninitialized = 0
| PaidCredit = 1
| FreeCredit = 2
| AmenityCredit = 3
| MembershipTypeCredit = 4
| ClassPassCredit = 5
| Error = -1
[<AllowNullLiteral>]
type ClassRosterItem() =
member val BookingId:Int32 = new Int32() with get,set
member val UserId:Int32 = new Int32() with get,set
member val FirstName:String = null with get,set
member val LastName:String = null with get,set
member val Email:String = null with get,set
member val Phone:String = null with get,set
member val BookingMade:DateTime = new DateTime() with get,set
member val FirstTimeBooking:Boolean = new Boolean() with get,set
member val PackageName:String = null with get,set
member val PackageId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val LeadTypeName:String = null with get,set
member val LeadTypeId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val IsMember:Boolean = new Boolean() with get,set
member val MemberExpiration:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val CreditType:ClassRosterCreditType = new ClassRosterCreditType() with get,set
member val CreditsRemaining:Int32 = new Int32() with get,set
member val NextCreditExpiration:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val BookingStatusId:Nullable<Int16> = new Nullable<Int16>() with get,set
member val BookingStatusDescription:String = null with get,set
[<AllowNullLiteral>]
type ClassRosterResponseDto() =
inherit ApiResponseBase()
member val ClassRoster:ResizeArray<ClassRosterItem> = new ResizeArray<ClassRosterItem>() with get,set
member val WaitList:ResizeArray<ClassRosterItem> = new ResizeArray<ClassRosterItem>() with get,set
[<AllowNullLiteral>]
type ClassRosterResponse() =
inherit ClassRosterResponseDto()
member val Success:Boolean = new Boolean() with get,set
member val Message:String = null with get,set
member val ClassDate:DateTime = new DateTime() with get,set
member val FreeSpots:Int32 = new Int32() with get,set
member val MaxSpots:Int32 = new Int32() with get,set
member val TotalBooked:Int32 = new Int32() with get,set
member val LocationType:String = null with get,set
member val VirtualLink:String = null with get,set
member val ClassRoster:ResizeArray<ClassRosterItem> = new ResizeArray<ClassRosterItem>() with get,set
member val WaitList:ResizeArray<ClassRosterItem> = new ResizeArray<ClassRosterItem>() with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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: text/csv
HTTP/1.1 200 OK Content-Type: text/csv 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"}]}